diff --git a/baystation12.dme b/baystation12.dme index 9423cef1e0..a0495f8487 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -886,6 +886,7 @@ #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mining\drilling\distribution.dm" #include "code\modules\mining\drilling\drill.dm" +#include "code\modules\mining\drilling\scanner.dm" #include "code\modules\mob\abilities.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" @@ -954,6 +955,7 @@ #include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\emote.dm" #include "code\modules\mob\living\carbon\brain\life.dm" +#include "code\modules\mob\living\carbon\brain\login.dm" #include "code\modules\mob\living\carbon\brain\MMI.dm" #include "code\modules\mob\living\carbon\brain\posibrain.dm" #include "code\modules\mob\living\carbon\brain\say.dm" @@ -982,6 +984,7 @@ #include "code\modules\mob\living\carbon\metroid\login.dm" #include "code\modules\mob\living\carbon\metroid\metroid.dm" #include "code\modules\mob\living\carbon\metroid\powers.dm" +#include "code\modules\mob\living\carbon\metroid\say.dm" #include "code\modules\mob\living\carbon\metroid\subtypes.dm" #include "code\modules\mob\living\carbon\metroid\update_icons.dm" #include "code\modules\mob\living\carbon\monkey\death.dm" diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 78c9336e8c..f6746f3dab 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -173,7 +173,7 @@ Thus, the two variables affect pump operation are set in New(): return 1 -/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & (BROKEN|NOPOWER)) return @@ -190,7 +190,7 @@ Thus, the two variables affect pump operation are set in New(): ) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index d52090b0c7..1d1d335cb8 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -112,14 +112,14 @@ return -/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) usr.set_machine(src) var/list/data = new() data = build_uidata() - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330) diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index 64af4057b0..3b5dd1780f 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -137,14 +137,14 @@ return 1 -/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) usr.set_machine(src) var/list/data = new() data = build_uidata() - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 9b99b80f27..34f746b8a6 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -77,7 +77,7 @@ /obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob) src.ui_interact(user) -/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // this is the data which will be sent to the ui var/data[0] data["on"] = on ? 1 : 0 @@ -93,7 +93,7 @@ data["gasTemperatureClass"] = temp_class // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm index 07d6a4579b..41f2c4cdf9 100644 --- a/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm +++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm @@ -30,7 +30,7 @@ ui_interact(user) -/obj/machinery/computer/engines/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/engines/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(!linked) return @@ -50,7 +50,7 @@ data["engines_info"] = enginfo - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "engines_control.tmpl", "[linked.name] Engines Control", 380, 530) ui.set_initial_data(data) diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm index f81e569abc..d78934f574 100644 --- a/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm +++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm @@ -70,7 +70,7 @@ ui_interact(user) -/obj/machinery/computer/helm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/helm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(!linked) return @@ -101,7 +101,7 @@ data["locations"] = locations - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "helm.tmpl", "[linked.name] Helm Control", 380, 530) ui.set_initial_data(data) diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm index c63ad2d763..4ebc9469da 100644 --- a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm +++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm @@ -44,7 +44,7 @@ var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag] return shuttle && destination && get_dist(home, destination) <= shuttle.range -/obj/machinery/computer/shuttle_control/explore/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/shuttle_control/explore/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag] if (!istype(shuttle)) @@ -103,7 +103,7 @@ "can_force" = can_go && shuttle.can_force(), ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "shuttle_control_console_exploration.tmpl", "[shuttle_tag] Shuttle Control", 470, 310) diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm index 66e14b040c..7f98a7b6ec 100644 --- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm +++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm @@ -83,9 +83,9 @@ proc/assign_sec_to_department(var/mob/living/carbon/human/H) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 + + implant_loyalty(H) + return 1 /obj/item/device/radio/headset/headset_sec/department/New() diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm index a214626d1c..243dc47c75 100644 --- a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm +++ b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm @@ -23,9 +23,9 @@ H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 + + H.implant_loyalty(src) // Will not do so if config is set to disallow. + return 1 @@ -52,9 +52,9 @@ H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 + + H.implant_loyalty(src) // // Will not do so if config is set to disallow. + return 1 @@ -89,9 +89,7 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 + H.implant_loyalty(src) // Will not do so if config is set to disallow. return 1 @@ -118,9 +116,9 @@ H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 + + H.implant_loyalty(src) // Will not do so if config is set to disallow. + return 1 /datum/job/hop diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm index 88f06f98e7..e74c6fce6c 100644 --- a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm +++ b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm @@ -70,7 +70,7 @@ new /obj/item/weapon/storage/backpack/satchel_sec(src) new /obj/item/weapon/cartridge/hos(src) new /obj/item/device/radio/headset/heads/hos(src) - new /obj/item/weapon/storage/lockbox/loyalty(src) + if (config.use_loyalty_implants) new /obj/item/weapon/storage/lockbox/loyalty(src) new /obj/item/weapon/storage/flashbang_kit(src) new /obj/item/weapon/storage/belt/security(src) new /obj/item/device/flash(src) diff --git a/code/WorkInProgress/computer3/computer.dm b/code/WorkInProgress/computer3/computer.dm index 95824e555e..093f7b5ed7 100644 --- a/code/WorkInProgress/computer3/computer.dm +++ b/code/WorkInProgress/computer3/computer.dm @@ -75,6 +75,15 @@ set name = "Reset Computer" set category = "Object" set src in view(1) + + if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living)) + usr << "\red You can't do that." + return + + if(!Adjacent(usr)) + usr << "You can't reach it." + return + Reset() New(var/L, var/built = 0) @@ -446,4 +455,4 @@ icon_state = "wallframe" density = 0 pixel_y = -3 - show_keyboard = 0 \ No newline at end of file + show_keyboard = 0 diff --git a/code/WorkInProgress/computer3/computers/law.dm b/code/WorkInProgress/computer3/computers/law.dm index 8f7a639ae2..409552cc79 100644 --- a/code/WorkInProgress/computer3/computers/law.dm +++ b/code/WorkInProgress/computer3/computers/law.dm @@ -13,7 +13,7 @@ set category = "Object" set name = "Access Computer's Internals" set src in oview(1) - if(get_dist(src, usr) > 1 || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon)) + if(!Adjacent(usr) || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon) || !istype(usr, /mob/living)) return opened = !opened diff --git a/code/WorkInProgress/computer3/laptop.dm b/code/WorkInProgress/computer3/laptop.dm index 1868f82c83..b88f782c2c 100644 --- a/code/WorkInProgress/computer3/laptop.dm +++ b/code/WorkInProgress/computer3/laptop.dm @@ -30,10 +30,18 @@ var/obj/machinery/computer3/laptop/stored_computer = null verb/open_computer() - set name = "open laptop" + set name = "Open Laptop" set category = "Object" set src in view(1) + if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living)) + usr << "\red You can't do that." + return + + if(!Adjacent(usr)) + usr << "You can't reach it." + return + if(!istype(loc,/turf)) usr << "[src] is too bulky! You'll have to set it down." return @@ -58,11 +66,45 @@ del src AltClick() - open_computer() + if(Adjacent(usr)) + open_computer() + +//Quickfix until Snapshot works out how he wants to redo power. ~Z +/obj/item/device/laptop/verb/eject_id() + set category = "Object" + set name = "Eject ID Card" + set src in oview(1) + + if(stored_computer) + stored_computer.eject_id() + +/obj/machinery/computer3/laptop/verb/eject_id() + set category = "Object" + set name = "Eject ID Card" + set src in oview(1) + + var/obj/item/part/computer/cardslot/C = locate() in src.contents + + if(!C) + usr << "There is no card port on the laptop." + return + + var/obj/item/weapon/card/id/card + if(C.reader) + card = C.reader + else if(C.writer) + card = C.writer + else + usr << "There is nothing to remove from the laptop card port." + return + + usr << "You remove [card] from the laptop." + C.remove(card) + /obj/machinery/computer3/laptop name = "Laptop Computer" - desc = "A clamshell portable computer. It is open." + desc = "A clamshell portable computer. It is open." icon_state = "laptop" density = 0 @@ -82,6 +124,14 @@ set category = "Object" set src in view(1) + if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living)) + usr << "\red You can't do that." + return + + if(!Adjacent(usr)) + usr << "You can't reach it." + return + if(istype(loc,/obj/item/device/laptop)) testing("Close closed computer") return @@ -133,5 +183,5 @@ AltClick() - close_computer() - + if(Adjacent(usr)) + close_computer() diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm index 6faafad342..8e0cdbc638 100644 --- a/code/WorkInProgress/kilakk/responseteam.dm +++ b/code/WorkInProgress/kilakk/responseteam.dm @@ -231,9 +231,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams // equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) // Regular medkit // Loyalty implants - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) - L.imp_in = src - L.implanted = 1 + implant_loyalty(src) // ID cards var/obj/item/weapon/card/id/E = new(src) diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index 1e3df5292a..f96e47c188 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -118,7 +118,7 @@ obj/var/contaminated = 0 /mob/living/carbon/human/proc/burn_eyes() //The proc that handles eye burning. if(prob(20)) src << "\red Your eyes burn!" - var/datum/organ/internal/eyes/E = internal_organs["eyes"] + var/datum/organ/internal/eyes/E = internal_organs_by_name["eyes"] E.damage += 2.5 eye_blurry = min(eye_blurry+1.5,50) if (prob(max(0,E.damage - 15) + 1) &&!eye_blind) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 90a68b02b6..22c8a11300 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -63,7 +63,7 @@ slime.Discipline = 0 if(power >= 3) - if(istype(slime, /mob/living/carbon/slime/adult)) + if(slime.is_adult) if(prob(5 + round(power/2))) if(slime.Victim) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 0abb637cce..3f74cbd0ea 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -141,7 +141,7 @@ var/const/tk_maxrange = 15 else apply_focus_overlay() - focus.throw_at(target, 10, 1) + focus.throw_at(target, 10, 1, user) last_throw = world.time return diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index f9d825d896..66747abbb5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -112,6 +112,8 @@ var/revival_cloning = 1 var/revival_brain_life = -1 + var/use_loyalty_implants = 0 + //Used for modifying movement speed for mobs. //Unversal modifiers var/run_speed = 0 @@ -521,10 +523,21 @@ config.revival_cloning = value if("revival_brain_life") config.revival_brain_life = value + if("organ_health_multiplier") + config.organ_health_multiplier = value / 100 + if("organ_regeneration_multiplier") + config.organ_regeneration_multiplier = value / 100 + if("bones_can_break") + config.bones_can_break = value + if("limbs_can_break") + config.limbs_can_break = value + + if("run_speed") config.run_speed = value if("walk_speed") config.walk_speed = value + if("human_delay") config.human_delay = value if("robot_delay") @@ -537,14 +550,11 @@ config.slime_delay = value if("animal_delay") config.animal_delay = value - if("organ_health_multiplier") - config.organ_health_multiplier = value / 100 - if("organ_regeneration_multiplier") - config.organ_regeneration_multiplier = value / 100 - if("bones_can_break") - config.bones_can_break = value - if("limbs_can_break") - config.limbs_can_break = value + + + if("use_loyalty_implants") + config.use_loyalty_implants = 1 + else log_misc("Unknown setting in configuration: '[name]'") diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 2ae5d1db1e..0b314a2531 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -33,7 +33,9 @@ datum/controller/game_controller var/mob/list/expensive_mobs = list() var/rebuild_active_areas = 0 - var/list/shuttle_list //for debugging and VV + var/list/shuttle_list // For debugging and VV + var/datum/ore_distribution/asteroid_ore_map // For debugging and VV. + datum/controller/game_controller/New() //There can be only one master_controller. Out with the old and in with the new. @@ -108,9 +110,9 @@ datum/controller/game_controller/proc/setup_objects() T.broadcast_status() //Create the mining ore distribution map. - world << "Generating resource distribution map." - var/datum/ore_distribution/O = new() - O.populate_distribution_map() + //Create the mining ore distribution map. + asteroid_ore_map = new /datum/ore_distribution() + asteroid_ore_map.populate_distribution_map() //Set up spawn points. populate_spawn_points() diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index e8785482a9..a331dab556 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -1,6 +1,27 @@ //TODO: rewrite and standardise all controller datums to the datum/controller type //TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff) - MC done - lighting done +/client/proc/show_distribution_map() + set category = "Debug" + set name = "Show Distribution Map" + set desc = "Print the asteroid ore distribution map to the world." + + if(!holder) return + + if(master_controller && master_controller.asteroid_ore_map) + master_controller.asteroid_ore_map.print_distribution_map() + +/client/proc/remake_distribution_map() + set category = "Debug" + set name = "Remake Distribution Map" + set desc = "Rebuild the asteroid ore distribution map." + + if(!holder) return + + if(master_controller && master_controller.asteroid_ore_map) + master_controller.asteroid_ore_map = new /datum/ore_distribution() + master_controller.asteroid_ore_map.populate_distribution_map() + /client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply")) set category = "Debug" set name = "Restart Controller" diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 936eea26d1..b749bfb07e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -510,14 +510,9 @@ datum/mind I.Del() break H << "\blue Your loyalty implant has been deactivated." - if("add") - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - var/datum/organ/external/affected = H.organs_by_name["head"] - affected.implants += L - L.part = affected + if("add") + H.implant_loyalty(H, override = TRUE) H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" if(src in ticker.mode.revolutionaries) special_role = null @@ -541,6 +536,8 @@ datum/mind special_role = null current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") + else + else if (href_list["revolution"]) current.hud_updateflag |= (1 << SPECIALROLE_HUD) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 7990329aa1..abca12f25e 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -681,14 +681,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee access = access_armory group = "Security" -/datum/supply_packs/loyalty - name = "Loyalty implant crate" - contains = list (/obj/item/weapon/storage/lockbox/loyalty) - cost = 60 - containertype = /obj/structure/closet/crate/secure - containername = "Loyalty implant crate" - access = access_armory - group = "Security" /datum/supply_packs/ballistic name = "Ballistic gear crate" @@ -725,6 +717,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee access = access_armory group = "Security" +/* +/datum/supply_packs/loyalty + name = "Loyalty implant crate" + contains = list (/obj/item/weapon/storage/lockbox/loyalty) + cost = 60 + containertype = /obj/structure/closet/crate/secure + containername = "Loyalty implant crate" + access = access_armory + group = "Security" +*/ + /datum/supply_packs/expenergy name = "Experimental energy gear crate" contains = list(/obj/item/clothing/suit/armor/laserproof, diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 25a5242c07..c7e3df319d 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -303,9 +303,10 @@ var/global/list/PDA_Manifest = list() throw_speed = 1 throw_range = 20 flags = FPRINT | TABLEPASS | CONDUCT + afterattack(atom/target as mob|obj|turf|area, mob/user as mob) user.drop_item() - src.throw_at(target, throw_range, throw_speed) + src.throw_at(target, throw_range, throw_speed, user) /obj/effect/stop var/victim = null diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 31f3f0cb97..3d40b556f6 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -87,8 +87,6 @@ for(var/area/RA in related) for(var/obj/machinery/camera/C in RA) C.network.Remove("Atmosphere Alarms") - for (var/obj/machinery/alarm/AA in RA) - AA.update_icon() for(var/mob/living/silicon/aiPlayer in player_list) aiPlayer.cancelAlarm("Atmosphere", src, src) for(var/obj/machinery/computer/station_alert/a in machines) @@ -101,8 +99,6 @@ for(var/obj/machinery/camera/C in RA) cameras += C C.network.Add("Atmosphere Alarms") - for (var/obj/machinery/alarm/AA in RA) - AA.update_icon() for(var/mob/living/silicon/aiPlayer in player_list) aiPlayer.triggerAlarm("Atmosphere", src, cameras, src) for(var/obj/machinery/computer/station_alert/a in machines) @@ -110,6 +106,10 @@ air_doors_close() atmosalm = danger_level + for(var/area/RA in related) + for (var/obj/machinery/alarm/AA in RA) + AA.update_icon() + return 1 return 0 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3253f272d0..05a52137cc 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -22,27 +22,6 @@ //Detective Work, used for the duplicate data points kept in the scanners var/list/original_atom -/atom/proc/throw_impact(atom/hit_atom, var/speed) - if(istype(hit_atom,/mob/living)) - var/mob/living/M = hit_atom - M.hitby(src,speed) - - else if(isobj(hit_atom)) - var/obj/O = hit_atom - if(!O.anchored) - step(O, src.dir) - O.hitby(src,speed) - - else if(isturf(hit_atom)) - var/turf/T = hit_atom - if(T.density) - spawn(2) - step(src, turn(src.dir, 180)) - if(istype(src,/mob/living)) - var/mob/living/M = src - M.take_organ_damage(20) - - /atom/proc/assume_air(datum/gas_mixture/giver) return null @@ -237,6 +216,8 @@ its easier to just keep the beam vertical. return /atom/proc/hitby(atom/movable/AM as mob|obj) + if (density) + AM.throwing = 0 return /atom/proc/add_hiddenprint(mob/living/M as mob) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 41da5ea7c8..de6b84d655 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -7,6 +7,8 @@ var/l_move_time = 1 var/m_flag = 1 var/throwing = 0 + var/thrower + var/turf/throw_source = null var/throw_speed = 2 var/throw_range = 7 var/moved_recently = 0 @@ -25,7 +27,6 @@ /atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes) if(src.throwing) src.throw_impact(A) - src.throwing = 0 spawn( 0 ) if ((A && yes)) @@ -44,6 +45,29 @@ return 1 return 0 +//called when src is thrown into hit_atom +/atom/movable/proc/throw_impact(atom/hit_atom, var/speed) + if(istype(hit_atom,/mob/living)) + var/mob/living/M = hit_atom + M.hitby(src,speed) + + else if(isobj(hit_atom)) + var/obj/O = hit_atom + if(!O.anchored) + step(O, src.dir) + O.hitby(src,speed) + + else if(isturf(hit_atom)) + src.throwing = 0 + var/turf/T = hit_atom + if(T.density) + spawn(2) + step(src, turn(src.dir, 180)) + if(istype(src,/mob/living)) + var/mob/living/M = src + M.turf_collision(T, speed) + +//decided whether a movable atom being thrown can pass through the turf it is in. /atom/movable/proc/hit_check(var/speed) if(src.throwing) for(var/atom/A in get_turf(src)) @@ -51,18 +75,17 @@ if(istype(A,/mob/living)) if(A:lying) continue src.throw_impact(A,speed) - if(src.throwing == 1) - src.throwing = 0 if(isobj(A)) if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement src.throw_impact(A,speed) - src.throwing = 0 -/atom/movable/proc/throw_at(atom/target, range, speed) +/atom/movable/proc/throw_at(atom/target, range, speed, thrower) if(!target || !src) return 0 //use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target src.throwing = 1 + src.thrower = thrower + src.throw_source = get_turf(src) //store the origin turf if(usr) if(HULK in usr.mutations) @@ -149,8 +172,10 @@ a = get_area(src.loc) //done throwing, either because it hit something or it finished moving - src.throwing = 0 if(isobj(src)) src.throw_impact(get_turf(src),speed) + src.throwing = 0 + src.thrower = null + src.throw_source = null //Overlays diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 235156d3d3..af1fe64a9f 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -345,7 +345,7 @@ * * @return nothing */ -/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(user == connected.occupant || user.stat) return @@ -425,7 +425,7 @@ data["beakerVolume"] += R.volume // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index d0db2d66b9..4a0712c712 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -71,7 +71,7 @@ world << sound('sound/AI/commandreport.ogg') // add an extra law to the AI to make sure it cooperates with the heads - var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command, any crew member with loyalty implant. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws." + var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws." for(var/mob/living/silicon/ai/M in world) M.add_ion_law(extra_law) M << "\red " + extra_law diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index acc7c3e853..3f141f2156 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -5,7 +5,7 @@ faction = "Station" total_positions = 1 spawn_positions = 1 - supervisors = "Nanotrasen officials and Space law" + supervisors = "Nanotrasen officials and Corporate Regulations" selection_color = "#ccccff" idtype = /obj/item/weapon/card/id/gold req_admin_notify = 1 @@ -32,13 +32,10 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 world << "[H.real_name] is the captain!" - var/datum/organ/external/affected = H.organs_by_name["head"] - affected.implants += L - L.part = affected + + H.implant_loyalty(src) + return 1 get_access() diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 0576e5b823..57350f087a 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -357,10 +357,8 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - var/datum/organ/external/affected = H.organs_by_name["head"] - affected.implants += L - L.part = affected + + H.implant_loyalty(H) + + return 1 diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 69e9babb0a..c83c0c0ea2 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -39,12 +39,7 @@ else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) - L.imp_in = H - L.implanted = 1 - var/datum/organ/external/affected = H.organs_by_name["head"] - affected.implants += L - L.part = affected + H.implant_loyalty(H) return 1 @@ -165,4 +160,4 @@ else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack) - return 1 + return 1 diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index c8be3a2351..d0600b4cca 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -377,6 +377,8 @@ var/global/datum/controller/occupations/job_master if(G.slot) H.equip_to_slot_or_del(new G.path(H), G.slot) + H << "\blue Equipping you with [thing]!" + else spawn_in_storage += thing @@ -462,15 +464,19 @@ var/global/datum/controller/occupations/job_master H.equip_to_slot_or_del(BPK, slot_back,1) //Deferred item spawning. - var/obj/item/weapon/storage/B = locate(/obj/item/weapon/storage/backpack) in H.contents + if(spawn_in_storage && spawn_in_storage.len) + var/obj/item/weapon/storage/B + for(var/obj/item/weapon/storage/S in H.contents) + B = S + break - if(isnull(B) || istype(B)) - B = locate(/obj/item/weapon/storage/box) in H.contents - - if(!isnull(B)) - for(var/thing in spawn_in_storage) - var/datum/gear/G = gear_datums[thing] - new G.path(B) + if(!isnull(B)) + for(var/thing in spawn_in_storage) + H << "\blue Placing [thing] in your [B]!" + var/datum/gear/G = gear_datums[thing] + new G.path(B) + else + H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug." //TODO: Generalize this by-species if(H.species) diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 1551ebac4f..85367d9d87 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -44,7 +44,7 @@ /obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob) src.ui_interact(user) -/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // this is the data which will be sent to the ui var/data[0] data["on"] = on ? 1 : 0 @@ -62,7 +62,7 @@ data["gasTemperatureClass"] = temp_class // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -90,4 +90,3 @@ /obj/machinery/atmospherics/unary/cold_sink/freezer/process() ..() - diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index ec5529c80c..dac4bf7b00 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -332,8 +332,7 @@ else dat += "[e.display_name]--Not Found" dat += "" - for(var/organ_name in occupant.internal_organs) - var/datum/organ/internal/i = occupant.internal_organs[organ_name] + for(var/datum/organ/internal/i in occupant.internal_organs) var/mech = "" if(i.robotic == 1) mech = "Assisted:" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 8f0751dc63..d4ac8e186f 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -104,7 +104,7 @@ var/phoron_dangerlevel = 0 var/temperature_dangerlevel = 0 var/other_dangerlevel = 0 - + var/alarm_sound_cooldown = 200 var/last_sound_time = 0 @@ -173,7 +173,6 @@ if(!istype(location)) return//returns if loc is not simulated if ((alarm_area.fire || alarm_area.atmosalm >= 2) && world.time > last_sound_time + alarm_sound_cooldown) - playsound(src.loc, 'sound/machines/airalarm.ogg', 40, 0, 5) last_sound_time = world.time var/datum/gas_mixture/environment = location.return_air() @@ -332,11 +331,11 @@ if((stat & (NOPOWER|BROKEN)) || shorted) icon_state = "alarmp" return - + var/icon_level = danger_level if (alarm_area.atmosalm) icon_level = max(icon_level, 1) //if there's an atmos alarm but everything is okay locally, no need to go past yellow - + switch(icon_level) if (0) icon_state = "alarm0" @@ -420,6 +419,12 @@ return 1 /obj/machinery/alarm/proc/apply_mode() + //propagate mode to other air alarms in the area + //TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area + for (var/area/RA in alarm_area.related) + for (var/obj/machinery/alarm/AA in RA) + AA.mode = mode + switch(mode) if(AALARM_MODE_SCRUBBING) for(var/device_id in alarm_area.air_scrub_names) @@ -736,7 +741,7 @@ Toxins: [phoron_percent]%
output += "Fire alarm in area" else output += "No alerts" - + return output /obj/machinery/alarm/proc/rcon_text() diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 3557f1f655..96152823ca 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -241,7 +241,7 @@ update_flag /obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob) return src.ui_interact(user) -/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if (src.destroyed) return @@ -261,7 +261,7 @@ update_flag data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm index 228b525049..1c0bd0875f 100644 --- a/code/game/machinery/bots/farmbot.dm +++ b/code/game/machinery/bots/farmbot.dm @@ -394,7 +394,7 @@ if ( emagged ) // Warning, hungry humans detected: throw fertilizer at them spawn(0) fert.loc = src.loc - fert.throw_at(target, 16, 3) + fert.throw_at(target, 16, 3, src) src.visible_message("\red [src] launches [fert.name] at [target.name]!") flick("farmbot_broke", src) spawn (FARMBOT_EMAG_DELAY) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index fd11787363..b40f511a3b 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -80,7 +80,7 @@ if(stat & (NOPOWER|BROKEN)) return ui_interact(user) -/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", datum/nanoui/ui=null) +/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -133,7 +133,7 @@ data["regions"] = regions - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700) ui.set_initial_data(data) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 528815ad07..d7595e1a29 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -57,7 +57,7 @@ /obj/machinery/computer/crew/interact(mob/user) ui_interact(user) -/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & (BROKEN|NOPOWER)) return user.set_machine(src) @@ -97,7 +97,7 @@ data["crewmembers"] = crewmembers - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 600) ui.set_initial_data(data) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 2949498ae3..3898593172 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -253,7 +253,7 @@ switch(href_list["field"]) if("fingerprint") if (istype(src.active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["fingerprint"] = t1 @@ -271,55 +271,55 @@ src.active1.fields["age"] = t1 if("mi_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis"] = t1 if("mi_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["mi_dis_d"] = t1 if("ma_dis") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis"] = t1 if("ma_dis_d") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["ma_dis_d"] = t1 if("alg") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg"] = t1 if("alg_d") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["alg_d"] = t1 if("cdi") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi"] = t1 if("cdi_d") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["cdi_d"] = t1 if("notes") if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(html_encode(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return src.active2.fields["notes"] = t1 @@ -334,21 +334,21 @@ src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if("b_dna") if (istype(src.active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return src.active1.fields["dna"] = t1 if("vir_name") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) - var/t1 = copytext(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return v.fields["name"] = t1 if("vir_desc") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) - var/t1 = copytext(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) return v.fields["description"] = t1 @@ -451,7 +451,7 @@ if (!( istype(src.active2, /datum/data/record) )) return var/a2 = src.active2 - var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) return var/counter = 1 diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 58a77c950d..e7060f7577 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -387,7 +387,7 @@ What a mess.*/ if (!( istype(active2, /datum/data/record) )) return var/a2 = active2 - var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return var/counter = 1 @@ -450,19 +450,19 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text + var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1) return active1.fields["name"] = t1 if("id") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["id"] = t1 if("fingerprint") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["fingerprint"] = t1 @@ -480,31 +480,31 @@ What a mess.*/ active1.fields["age"] = t1 if("mi_crim") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim"] = t1 if("mi_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["mi_crim_d"] = t1 if("ma_crim") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim"] = t1 if("ma_crim_d") if (istype(active2, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["ma_crim_d"] = t1 if("notes") if (istype(active2, /datum/data/record)) - var/t1 = copytext(html_encode(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2)) return active2.fields["notes"] = t1 @@ -531,7 +531,7 @@ What a mess.*/ alert(usr, "You do not have the required rank to do this!") if("species") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["species"] = t1 diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 27360e963e..bc4d977dad 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -325,19 +325,19 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text + var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1) return active1.fields["name"] = t1 if("id") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["id"] = t1 if("fingerprint") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["fingerprint"] = t1 @@ -366,7 +366,7 @@ What a mess.*/ alert(usr, "You do not have the required rank to do this!") if("species") if (istype(active1, /datum/data/record)) - var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN) + var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1)) return active1.fields["species"] = t1 diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index b909404a1c..a82828311c 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -73,7 +73,7 @@ * * @return nothing */ -/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(user == occupant || user.stat) return @@ -121,7 +121,7 @@ data["beakerVolume"] += R.volume // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 36007f171d..05f7447283 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -77,6 +77,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. icon_state = "door_closed" power_channel = ENVIRON + explosion_resistance = 15 var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. var/hackProof = 0 // if 1, this door can't be hacked by the AI var/secondsMainPowerLost = 0 //The number of seconds until power is restored. diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 59ed905a0a..afd2f72529 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -6,13 +6,16 @@ obj/machinery/door/airlock var/frequency var/shockedby = list() var/datum/radio_frequency/radio_connection - explosion_resistance = 15 + var/cur_command = null //the command the door is currently attempting to complete obj/machinery/door/airlock/proc/can_radio() if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_AI_CONTROL) ) return 0 return 1 +obj/machinery/door/airlock/process() + ..() + execute_current_command() obj/machinery/door/airlock/receive_signal(datum/signal/signal) if (!can_radio()) return @@ -21,7 +24,19 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal) if(id_tag != signal.data["tag"] || !signal.data["command"]) return - switch(signal.data["command"]) + cur_command = signal.data["command"] + execute_current_command() + +obj/machinery/door/airlock/proc/execute_current_command() + if (!cur_command) + return + + do_command(cur_command) + if (command_completed(cur_command)) + cur_command = null + +obj/machinery/door/airlock/proc/do_command(var/command) + switch(command) if("open") open() @@ -48,9 +63,30 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal) lock() sleep(2) - + send_status() +obj/machinery/door/airlock/proc/command_completed(var/command) + switch(command) + if("open") + return (!density) + + if("close") + return density + + if("unlock") + return !locked + + if("lock") + return locked + + if("secure_open") + return (locked && !density) + + if("secure_close") + return (locked && density) + + return 1 //Unknown command. Just assume it's completed. obj/machinery/door/airlock/proc/send_status() if(radio_connection) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 61d26340a5..44d374b85c 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -173,7 +173,7 @@ return src.attack_hand(user) /obj/machinery/door/window/attack_paw(mob/user as mob) - if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult)) + if(istype(user, /mob/living/carbon/alien/humanoid)) if(src.operating) return playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) @@ -346,4 +346,4 @@ /obj/machinery/door/window/brigdoor/southright dir = SOUTH icon_state = "rightsecure" - base_state = "rightsecure" + base_state = "rightsecure" diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm index 4a48558f87..96177f9a9d 100644 --- a/code/game/machinery/embedded_controller/airlock_controllers.dm +++ b/code/game/machinery/embedded_controller/airlock_controllers.dm @@ -17,7 +17,7 @@ /obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller name = "Advanced Airlock Controller" -/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -29,7 +29,7 @@ "secure" = program.memory["secure"] ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290) @@ -75,7 +75,7 @@ name = "Airlock Controller" tag_secure = 1 -/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -85,7 +85,7 @@ "processing" = program.memory["processing"], ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290) @@ -140,7 +140,7 @@ else icon_state = "access_control_off" -/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -149,7 +149,7 @@ "processing" = program.memory["processing"] ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220) diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm index 0e9877d797..cb69c4d5bf 100644 --- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_docking_controller.dm @@ -11,7 +11,7 @@ docking_program = new/datum/computer/file/embedded_program/docking/airlock(src, airlock_program) program = docking_program -/obj/machinery/embedded_controller/radio/airlock/docking_port/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/airlock/docking_port/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -24,7 +24,7 @@ "override_enabled" = docking_program.override_enabled, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm index 99c7bf5784..d03bffcbae 100644 --- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm +++ b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm @@ -22,7 +22,7 @@ child_names[tags[i]] = names[i] -/obj/machinery/embedded_controller/radio/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/list/airlocks[child_names.len] @@ -35,7 +35,7 @@ "airlocks" = airlocks, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290) @@ -60,7 +60,7 @@ airlock_program = new/datum/computer/file/embedded_program/airlock/multi_docking(src) program = airlock_program -/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -73,7 +73,7 @@ "override_enabled" = airlock_program.override_enabled, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm b/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm index f84fbf0b32..7a14c9edc2 100644 --- a/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm +++ b/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm @@ -2,7 +2,7 @@ /obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod var/datum/shuttle/ferry/escape_pod/pod -/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -14,7 +14,7 @@ "is_armed" = pod.arming_controller.armed, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "escape_pod_console.tmpl", name, 470, 290) @@ -44,7 +44,7 @@ docking_program = new/datum/computer/file/embedded_program/docking/simple/escape_pod(src) program = docking_program -/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/armed = null @@ -58,7 +58,7 @@ "armed" = armed, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "escape_pod_berth_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/embedded_controller/simple_docking_controller.dm b/code/game/machinery/embedded_controller/simple_docking_controller.dm index 877247799b..9eee569ae6 100644 --- a/code/game/machinery/embedded_controller/simple_docking_controller.dm +++ b/code/game/machinery/embedded_controller/simple_docking_controller.dm @@ -9,7 +9,7 @@ docking_program = new/datum/computer/file/embedded_program/docking/simple(src) program = docking_program -/obj/machinery/embedded_controller/radio/simple_docking_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/embedded_controller/radio/simple_docking_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] data = list( @@ -19,7 +19,7 @@ "door_lock" = docking_program.memory["door_status"]["lock"], ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 303e814ef1..eff51fc697 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -81,7 +81,7 @@ O.Weaken(strength) if (istype(O, /mob/living/carbon/human)) var/mob/living/carbon/human/H = O - var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] + var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] if ((E.damage > E.min_bruised_damage && prob(E.damage + 50))) flick("e_flash", O:flash) E.damage += rand(1, 5) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 4b2fce70cd..b74d3a587a 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -217,7 +217,7 @@ var/obj/item/meatslab = allmeat[i] var/turf/Tx = locate(src.x - i, src.y, src.z) meatslab.loc = src.loc - meatslab.throw_at(Tx,i,3) + meatslab.throw_at(Tx,i,3,src) if (!Tx.density) new /obj/effect/decal/cleanable/blood/gibs(Tx,i) src.operating = 0 diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 6242626bc7..b3d3552565 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -225,7 +225,7 @@ * SmartFridge Menu ********************/ -/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/is_secure = istype(src,/obj/machinery/smartfridge/secure) @@ -269,7 +269,7 @@ if (vendor_wires.len > 0) data["wires"] = vendor_wires - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500) ui.set_initial_data(data) @@ -403,7 +403,7 @@ if(!throw_item) return 0 spawn(0) - throw_item.throw_at(target,16,3) + throw_item.throw_at(target,16,3,src) src.visible_message("\red [src] launches [throw_item.name] at [target.name]!") return 1 diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 58da1b1d9e..7e6f1e3f7e 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -575,7 +575,7 @@ /obj/machinery/suit_cycler name = "suit cycler" - desc = "An industrial machine for repairing, painting and equipping hardsuits." + desc = "An industrial machine for painting and refitting hardsuits." anchored = 1 density = 1 @@ -591,6 +591,7 @@ var/model_text = "" // Some flavour text for the topic box. var/locked = 1 // If locked, nothing can be taken from or added to the cycler. var/panel_open = 0 // Hacking! + var/can_repair // If set, the cycler can repair hardsuits. // Wiring bollocks. var/wires = 15 @@ -604,26 +605,54 @@ //Species that the suits can be configured to fit. var/list/species = list("Human","Skrell","Unathi","Tajaran") - var/target_department = "Engineering" - var/target_species = "Human" + var/target_department + var/target_species var/mob/living/carbon/human/occupant = null var/obj/item/clothing/suit/space/rig/suit = null var/obj/item/clothing/head/helmet/space/helmet = null +/obj/machinery/suit_cycler/New() + ..() + target_department = departments[1] + target_species = species[1] + if(!target_department || !target_species) del(src) + /obj/machinery/suit_cycler/engineering name = "Engineering suit cycler" model_text = "Engineering" req_access = list(access_construction) departments = list("Engineering","Atmos") - species = list("Human","Unathi","Tajaran") + species = list("Human","Tajaran") //Add Unathi when sprites exist for their suits. /obj/machinery/suit_cycler/mining name = "Mining suit cycler" model_text = "Mining" req_access = list(access_mining) departments = list("Mining") - species = list("Human","Unathi","Tajaran") + species = list("Human","Tajaran") + +/obj/machinery/suit_cycler/security + name = "Security suit cycler" + model_text = "Security" + req_access = list(access_security) + departments = list("Security") + species = list("Human","Tajaran") + +/obj/machinery/suit_cycler/medical + name = "Medical suit cycler" + model_text = "Medical" + req_access = list(access_medical) + departments = list("Medical") + species = list("Human","Tajaran") + +/obj/machinery/suit_cycler/syndicate + name = "Nonstandard suit cycler" + model_text = "Nonstandard" + req_access = list(access_syndicate) + departments = list("Mercenary") + species = list("Human","Tajaran","Unathi","Skrell") + can_repair = 1 /obj/machinery/suit_cycler/attack_ai(mob/user as mob) return src.attack_hand(user) @@ -780,7 +809,7 @@ dat += "Helmet: [helmet ? "\the [helmet]" : "no helmet stored" ]. \[eject\]
" dat += "Suit: [suit ? "\the [suit]" : "no suit stored" ]. \[eject\]" - if(suit && istype(suit)) + if(can_repair && suit && istype(suit)) dat += "[(suit.damage ? " \[repair\]" : "")]" dat += "
UV decontamination systems: SYSTEM ERROR" : "green'>READY"]
" @@ -839,7 +868,7 @@ radiation_level = input("Please select the desired radiation level.","Suit cycler",null) as null|anything in choices else if(href_list["repair_suit"]) - if(!suit) return + if(!suit || !can_repair) return active = 1 spawn(100) repair_suit() @@ -943,7 +972,7 @@ /obj/machinery/suit_cycler/proc/finished_job() var/turf/T = get_turf(src) - T.visible_message("\The [src] pings loudly.") + T.visible_message("\icon[src] \blue The [src] pings loudly.") icon_state = initial(icon_state) active = 0 src.updateUsrDialog() @@ -1036,8 +1065,11 @@ return switch(target_species) - if("Human" || "Skrell") - if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox") + if("Skrell") + if(helmet) helmet.species_restricted = list("Skrell") + if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox") + if("Human") + if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Skrell") if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox") if("Unathi") if(helmet) helmet.species_restricted = list("Unathi") @@ -1097,7 +1129,7 @@ suit.name = "atmospherics hardsuit" suit.icon_state = "rig-atmos" suit.item_state = "atmos_hardsuit" - if("^%###^%$") + if("^%###^%$" || "Mercenary") if(helmet) helmet.name = "blood-red hardsuit helmet" helmet.icon_state = "rig0-syndie" @@ -1106,4 +1138,7 @@ if(suit) suit.name = "blood-red hardsuit" suit.item_state = "syndie_hardsuit" - suit.icon_state = "rig-syndie" \ No newline at end of file + suit.icon_state = "rig-syndie" + + if(helmet) helmet.name = "refitted [helmet.name]" + if(suit) suit.name = "refitted [suit.name]" \ No newline at end of file diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 5dd31a036e..e69a2b36de 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -552,7 +552,7 @@ if (!throw_item) return 0 spawn(0) - throw_item.throw_at(target, 16, 3) + throw_item.throw_at(target, 16, 3, src) src.visible_message("\red [src] launches [throw_item.name] at [target.name]!") return 1 diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 08cc9a65d0..629e3b9d7d 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -464,7 +464,7 @@ return else if(target!=locked) if(locked in view(chassis)) - locked.throw_at(target, 14, 1.5) + locked.throw_at(target, 14, 1.5, chassis) locked = null send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info()) set_ready_state(0) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index e8a9dc072f..fb1174814d 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -231,7 +231,7 @@ var/missile_range = 30 /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/Fire(atom/movable/AM, atom/target, turf/aimloc) - AM.throw_at(target,missile_range, missile_speed) + AM.throw_at(target,missile_range, missile_speed, chassis) /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive name = "SRM-8 Missile Rack" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index e3465c3b7c..0cb89ee683 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -469,6 +469,7 @@ return /obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper + ..() src.log_message("Hit by [A].",1) call((proc_res["dynhitby"]||src), "dynhitby")(A) return diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b0897829e2..6beb98c40c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -539,7 +539,7 @@ "\red You stab yourself in the eyes with [src]!" \ ) if(istype(M, /mob/living/carbon/human)) - var/datum/organ/internal/eyes/eyes = H.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"] eyes.damage += rand(3,4) if(eyes.damage >= eyes.min_bruised_damage) if(M.stat != 2) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index bc402a7a39..d4879eff36 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -328,7 +328,7 @@ var/global/list/obj/item/device/pda/PDAs = list() return -/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui_tick++ var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main") var/auto_update = 1 @@ -462,7 +462,7 @@ var/global/list/obj/item/device/pda/PDAs = list() data["aircontents"] = list("reading" = 0) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -1214,8 +1214,54 @@ var/global/list/obj/item/device/pda/PDAs = list() user << "\blue Tank is empty!" if (!scanmode && istype(A, /obj/item/weapon/paper) && owner) - note = A:info - user << "\blue Paper scanned." //concept of scanning paper copyright brainoblivion 2009 + // JMO 20140705: Makes scanned document show up properly in the notes. Not pretty for formatted documents, + // as this will clobber the HTML, but at least it lets you scan a document. You can restore the original + // notes by editing the note again. (Was going to allow you to edit, but scanned documents are too long.) + var/raw_scan = (A:info) + var/formatted_scan = "" + // Scrub out the tags (replacing a few formatting ones along the way) + + // Find the beginning and end of the first tag. + var/tag_start = findtext(raw_scan,"<") + var/tag_stop = findtext(raw_scan,">") + + // Until we run out of complete tags... + while(tag_start&&tag_stop) + var/pre = copytext(raw_scan,1,tag_start) // Get the stuff that comes before the tag + var/tag = lowertext(copytext(raw_scan,tag_start+1,tag_stop)) // Get the tag so we can do intellegent replacement + var/tagend = findtext(tag," ") // Find the first space in the tag if there is one. + + // Anything that's before the tag can just be added as is. + formatted_scan = formatted_scan+pre + + // If we have a space after the tag (and presumably attributes) just crop that off. + if (tagend) + tag=copytext(tag,1,tagend) + + if (tag=="p"||tag=="/p"||tag=="br") // Check if it's I vertical space tag. + formatted_scan=formatted_scan+"
" // If so, add some padding in. + + raw_scan = copytext(raw_scan,tag_stop+1) // continue on with the stuff after the tag + + // Look for the next tag in what's left + tag_start = findtext(raw_scan,"<") + tag_stop = findtext(raw_scan,">") + + // Anything that is left in the page. just tack it on to the end as is + formatted_scan=formatted_scan+raw_scan + + // If there is something in there already, pad it out. + if (length(note)>0) + note = note + "

" + + // Store the scanned document to the notes + note = "Scanned Document. Edit to restore previous notes/delete scan.
----------
" + formatted_scan + "
" + // notehtml ISN'T set to allow user to get their old notes back. A better implementation would add a "scanned documents" + // feature to the PDA, which would better convey the availability of the feature, but this will work for now. + + // Inform the user + user << "\blue Paper scanned and OCRed to notekeeper." //concept of scanning paper copyright brainoblivion 2009 + /obj/item/device/pda/proc/explode() //This needs tuning. //Sure did. diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 43daf35b32..204b94cc3d 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -71,6 +71,10 @@ dat += "
" dat += {"[A.control_disabled ? "Enable" : "Disable"] Wireless Activity"} dat += "
" + dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]" + dat += "
" + dat += {"[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver"} + dat += "
" dat += {" Close"} user << browse(dat, "window=aicard") onclose(user, "aicard") @@ -92,6 +96,12 @@ U.unset_machine() return + if ("Radio") + for(var/mob/living/silicon/ai/A in src) + A.aiRadio.disabledAi = !A.aiRadio.disabledAi + A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]" + U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver" + if ("Wipe") var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No") if(confirm == "Yes") diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index d2d5417d6c..287e827249 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -74,6 +74,12 @@ icon_state = "cap_cypherkey" channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0) +/obj/item/device/encryptionkey/heads/ai_integrated + name = "AI Integrated Encryption Key" + desc = "Integrated encryption key" + icon_state = "cap_cypherkey" + channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1) + /obj/item/device/encryptionkey/heads/rd name = "Research Director's Encryption Key" desc = "An encyption key for a radio headset. Contains cypherkeys." diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index ed59e43989..ab376e4825 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -19,7 +19,9 @@ keyslot1 = new /obj/item/device/encryptionkey/ recalculateChannels() -/obj/item/device/radio/headset/receive_range(freq, level) +/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0) + if (aiOverride) + return ..(freq, level) if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc if(H.l_ear == src || H.r_ear == src) @@ -99,6 +101,20 @@ item_state = "headset" keyslot2 = new /obj/item/device/encryptionkey/heads/captain +/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway. + name = "AI Subspace Transceiver" + desc = "Integrated AI radio transceiver." + icon_state = "ai_radio" + item_state = "headset" + keyslot2 = new /obj/item/device/encryptionkey/heads/ai_integrated + var/myAi = null // Atlantis: Reference back to the AI which has this radio. + var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu. + +/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level) + if (disabledAi) + return -1 //Transciever Disabled. + return ..(freq, level, 1) + /obj/item/device/radio/headset/heads/rd name = "Research Director's headset" desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c." diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index c1cf3aa8f0..5cde8bc5bd 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -427,4 +427,47 @@ REAGENT SCANNER name = "advanced reagent scanner" icon_state = "adv_spectrometer" details = 1 - origin_tech = "magnets=4;biotech=2" \ No newline at end of file + origin_tech = "magnets=4;biotech=2" + +/obj/item/device/slime_scanner + name = "slime scanner" + icon_state = "adv_spectrometer" + item_state = "analyzer" + origin_tech = "biotech=1" + w_class = 2.0 + flags = CONDUCT + throwforce = 0 + throw_speed = 3 + throw_range = 7 + matter = list("metal" = 30,"glass" = 20) + +/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob) + if (!isslime(M)) + user << "This device can only scan slimes!" + return + var/mob/living/carbon/slime/T = M + user.show_message("Slime scan results:") + user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby")) + user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition())) + if (T.nutrition < T.get_starve_nutrition()) + user.show_message("Warning: slime is starving!") + else if (T.nutrition < T.get_hunger_nutrition()) + user.show_message("Warning: slime is hungry") + user.show_message("Electric change strength: [T.powerlevel]") + user.show_message("Health: [T.health]") + if (T.slime_mutation[4] == T.colour) + user.show_message("This slime does not evolve any further") + else + if (T.slime_mutation[3] == T.slime_mutation[4]) + if (T.slime_mutation[2] == T.slime_mutation[1]) + user.show_message(text("Possible mutation: []", T.slime_mutation[3])) + user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting") + else + user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3])) + user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting") + else + user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4])) + user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting") + if (T.cores > 1) + user.show_message("Anomalious slime core amount detected") + user.show_message("Growth progress: [T.amount_grown]/10") diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 2fa75536ec..1e7c459756 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -67,7 +67,7 @@ /obj/item/device/transfer_valve/attack_self(mob/user as mob) ui_interact(user) -/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // this is the data which will be sent to the ui var/data[0] @@ -77,7 +77,7 @@ data["valveOpen"] = valve_open ? 1 : 0 // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 41ae746739..aa01d0454d 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -340,7 +340,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid /* NANO UI FOR UPLINK WOOP WOOP */ -/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/title = "Syndicate Uplink" var/data[0] @@ -349,7 +349,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid data["welcome"] = welcome // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 219843e68b..652e51e95c 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -82,16 +82,19 @@ C = usr.buckled var/obj/B = usr.buckled var/movementdirection = turn(direction,180) - if(C) C.propelled = 1 - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(1) + if(C) C.propelled = 4 B.Move(get_step(usr,movementdirection), movementdirection) sleep(1) B.Move(get_step(usr,movementdirection), movementdirection) + if(C) C.propelled = 3 + sleep(1) + B.Move(get_step(usr,movementdirection), movementdirection) sleep(1) B.Move(get_step(usr,movementdirection), movementdirection) + if(C) C.propelled = 2 sleep(2) B.Move(get_step(usr,movementdirection), movementdirection) + if(C) C.propelled = 1 sleep(2) B.Move(get_step(usr,movementdirection), movementdirection) if(C) C.propelled = 0 diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 2716719fda..dd60f16645 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -83,7 +83,7 @@ //This really should be in mob not every check if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] + var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] if (E.damage >= E.min_bruised_damage) M << "\red Your eyes start to burn badly!" if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang))) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index f8c46134c1..c474650f9a 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -1,5 +1,7 @@ #define MALFUNCTION_TEMPORARY 1 #define MALFUNCTION_PERMANENT 2 + + /obj/item/weapon/implant name = "implant" icon = 'icons/obj/device.dmi' diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index f1f5d8521e..f92f5b759c 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -65,8 +65,6 @@ update() return - - /obj/item/weapon/implanter/explosive name = "implanter (E)" diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 7244d45520..12af48f6c8 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -66,7 +66,6 @@ name = "fork" desc = "It's a fork. Sure is pointy." icon_state = "fork" - sharp = 1 /obj/item/weapon/kitchen/utensil/pfork name = "plastic fork" @@ -456,4 +455,4 @@ for(var/i = 1, i <= rand(1,2), i++) if(I) step(I, pick(NORTH,SOUTH,EAST,WEST)) - sleep(rand(2,4)) + sleep(rand(2,4)) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 319486d6a3..b301a77e76 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -737,11 +737,11 @@ /obj/item/weapon/book/manual/security_space_law - name = "Space Law" + name = "Corporate Regulations" desc = "A set of NanoTrasen guidelines for keeping law and order on their space stations." icon_state = "bookSpaceLaw" author = "NanoTrasen" - title = "Space Law" + title = "Corporate Regulations" dat = {" @@ -749,7 +749,7 @@ - + diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 8b883f818a..e0a3bcb592 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -127,7 +127,7 @@ ui_interact(user) -/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/using_internal if(istype(loc,/mob/living/carbon)) @@ -150,7 +150,7 @@ data["maskConnected"] = 1 // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index a05d2eac37..d148b3b758 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -356,7 +356,7 @@ var/safety = user:eyecheck() if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user - var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] + var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] if(H.species.flags & IS_SYNTHETIC) return switch(safety) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index bb50f1d63d..595a7d903b 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -58,7 +58,9 @@ return /obj/structure/grille/attack_slime(mob/user as mob) - if(!istype(user, /mob/living/carbon/slime/adult)) return + var/mob/living/carbon/slime/S = user + if (!S.is_adult) + return playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) user.visible_message("[user] smashes against [src].", \ diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 3d21a3a2b2..cd9dfd3e8a 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -103,7 +103,9 @@ attack_slime(mob/user as mob) - if(!isslimeadult(user)) return + var/mob/living/carbon/slime/S = user + if (!S.is_adult) + return attack_generic(user, rand(10, 15)) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 0937e72d84..5977121973 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -105,7 +105,9 @@ /obj/structure/mirror/attack_slime(mob/user as mob) - if(!isslimeadult(user)) return + var/mob/living/carbon/slime/S = user + if (!S.is_adult) + return if(shattered) playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) return diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 9982017c6b..115806277c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -138,7 +138,7 @@ if(propelled) var/mob/living/occupant = buckled_mob unbuckle() - occupant.throw_at(A, 3, 2) + occupant.throw_at(A, 3, propelled) occupant.apply_effect(6, STUN, 0) occupant.apply_effect(6, WEAKEN, 0) occupant.apply_effect(6, STUTTER, 0) diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index adec836a78..705351acfc 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -136,7 +136,12 @@ if(propelled || (pulling && (pulling.a_intent == "hurt"))) var/mob/living/occupant = buckled_mob unbuckle() - occupant.throw_at(A, 3, 2) + + if (pulling && (pulling.a_intent == "hurt")) + occupant.throw_at(A, 3, 3, pulling) + else if (propelled) + occupant.throw_at(A, 3, propelled) + occupant.apply_effect(6, STUN, 0) occupant.apply_effect(6, WEAKEN, 0) occupant.apply_effect(6, STUTTER, 0) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index bc4d5fd25e..4977da7f4d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -155,7 +155,9 @@ /obj/structure/window/attack_slime(mob/user as mob) - if(!isslimeadult(user)) return + var/mob/living/carbon/slime/S = user + if (!S.is_adult) + return attack_generic(user, rand(10, 15)) diff --git a/code/game/sound.dm b/code/game/sound.dm index d3f47aff82..3f89ea4d18 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -25,10 +25,23 @@ var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pagetur var/mob/M = P if(!M || !M.client) continue - if(get_dist(M, turf_source) <= (world.view + extrarange) * 6) + + var/distance = get_dist(M, turf_source) + if(distance <= (world.view + extrarange) * 3) var/turf/T = get_turf(M) + if(T && T.z == turf_source.z) - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff) + //check that the air can transmit sound + var/datum/gas_mixture/environment = T.return_air() + if (!environment || environment.return_pressure() < SOUND_MINIMUM_PRESSURE) + if (distance > 1) + continue + + var/new_frequency = 32000 + (frequency - 32000)*0.125 //lower the frequency. very rudimentary + var/new_volume = vol*0.15 //muffle the sound, like we're hearing through contact + M.playsound_local(turf_source, soundin, new_volume, vary, new_frequency, falloff) + else + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff) var/const/FALLOFF_SOUNDS = 2 var/const/SURROUND_CAP = 255 @@ -52,7 +65,7 @@ var/const/SURROUND_CAP = 255 if(isturf(turf_source)) // 3D sounds, the technology is here! var/turf/T = get_turf(src) - S.volume -= get_dist(T, turf_source) * 0.5 + S.volume -= get_dist(T, turf_source) * 0.75 if (S.volume < 0) S.volume = 0 var/dx = turf_source.x - T.x // Hearing from the right/left diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index c87d375e97..cead05c53e 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -130,6 +130,10 @@ var/global/normal_ooc_colour = "#002eb8" log_ooc("(LOCAL) [mob.name]/[key] : [msg]") var/list/heard = get_mobs_in_view(7, src.mob) + var/mob/S = src.mob + var/display_name = S.key + if(S.stat != DEAD) + display_name = S.name for(var/mob/M in heard) if(!M.client) continue @@ -138,7 +142,6 @@ var/global/normal_ooc_colour = "#002eb8" continue //they are handled after that if(C.prefs.toggles & CHAT_LOOC) - var/display_name = src.key if(holder) if(holder.fakekey) if(C.holder) @@ -151,4 +154,4 @@ var/global/normal_ooc_colour = "#002eb8" var/prefix = "(R)LOOC" if (C.mob in heard) prefix = "LOOC" - C << "[prefix]: [src.key]: [msg]" \ No newline at end of file + C << "[prefix]: [display_name]: [msg]" \ No newline at end of file diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 21a3047ce3..bf6c555997 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -144,8 +144,10 @@ var/list/admin_verbs_debug = list( /client/proc/cmd_debug_tog_aliens, /client/proc/air_report, /client/proc/reload_admins, - /client/proc/reload_mentors, + /client/proc/reload_mentors, /client/proc/restart_controller, + /client/proc/remake_distribution_map, + /client/proc/show_distribution_map, /client/proc/enable_debug_verbs, /client/proc/callproc, /client/proc/toggledebuglogs, @@ -585,22 +587,22 @@ var/list/admin_verbs_mentor = list( feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].") message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1) - + /client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom set category = "Fun" set name = "Give Disease" set desc = "Gives a Disease to a mob." - + var/datum/disease2/disease/D = new /datum/disease2/disease() - + var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater") - + D.makerandom(greater) if (!greater) D.infectionchance = 1 - + D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num - + if(istype(T,/mob/living/carbon/human)) var/mob/living/carbon/human/H = T if (H.species) @@ -609,7 +611,7 @@ var/list/admin_verbs_mentor = list( var/mob/living/carbon/monkey/M = T D.affected_species = list(M.greaterform) infect_virus2(T,D,1) - + feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].") message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5990b64ceb..6b1e1d2b01 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -228,7 +228,7 @@ emergency_shuttle.call_evac() log_admin("[key_name(usr)] called the Emergency Shuttle") message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1) - + else if (emergency_shuttle.can_recall()) emergency_shuttle.recall() log_admin("[key_name(usr)] sent the Emergency Shuttle back") @@ -247,7 +247,7 @@ log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]") message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1) else if (emergency_shuttle.shuttle.has_arrive_time()) - + var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10 @@ -255,7 +255,7 @@ message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1) else alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.") - + href_list["secretsadmin"] = "check_antagonist" else if(href_list["delay_round_end"]) @@ -291,7 +291,6 @@ if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob ) if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob ) if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) - if("adultslime") M.change_mob_type( /mob/living/carbon/slime/adult , null, null, delmob ) if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob ) if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob ) if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob ) @@ -1935,20 +1934,20 @@ if("launchshuttle") if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. - + feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShL") - + var/list/valid_shuttles = list() for (var/shuttle_tag in shuttle_controller.shuttles) if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry)) valid_shuttles += shuttle_tag - + var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles - + if (!shuttle_tag) return - + var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag] if (S.can_launch()) S.launch(usr) @@ -1956,23 +1955,23 @@ log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle") else alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.") - + if("forcelaunchshuttle") if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. - + feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShFL") - + var/list/valid_shuttles = list() for (var/shuttle_tag in shuttle_controller.shuttles) if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry)) valid_shuttles += shuttle_tag - + var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles - + if (!shuttle_tag) return - + var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag] if (S.can_force()) S.force_launch(usr) @@ -1980,31 +1979,31 @@ log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch") else alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.") - + if("jumpshuttle") if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. - + feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShJ") - + var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles if (!shuttle_tag) return - + var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag] - + var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!origin_area) return - + var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!destination_area) return - + var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No") if (long_jump == "Yes") var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!transition_area) return - + var/move_duration = input("How many seconds will this jump take?") as num - + S.long_jump(origin_area, destination_area, transition_area, move_duration) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1) log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle") @@ -2012,29 +2011,29 @@ S.short_jump(origin_area, destination_area) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1) log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle") - + if("moveshuttle") if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShM") - + var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel") if (confirm == "Cancel") return var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles if (!shuttle_tag) return - + var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag] - + var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!origin_area) return - + var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world if (!destination_area) return - + S.move(origin_area, destination_area) message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1) log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle") diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index cf5b94322d..e8a92edbe3 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -158,9 +158,7 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand) - var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)//Here you go Deuryn - L.imp_in = src - L.implanted = 1 + implant_loyalty(src) diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index e8df54ddfd..aee6547694 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -367,6 +367,7 @@ proc/populate_gear_list() display_name = "engineering bandana" path = /obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 cost = 2 + slot = slot_head allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer") //Science @@ -381,12 +382,14 @@ proc/populate_gear_list() display_name = "Zhan-Khazan furs" path = /obj/item/clothing/suit/tajaran/furs cost = 3 + slot = slot_wear_suit whitelisted = "Tajaran" /datum/gear/zhan_scarf display_name = "Zhan-Khazan headscarf" path = /obj/item/clothing/head/tajaran/scarf cost = 2 + slot = slot_head whitelisted = "Tajaran" /datum/gear/unathi_robe diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 805f85f875..034fede96a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -405,4 +405,8 @@ BLIND // can't see anything sensor_mode = pick(0,1,2,3) ..() +/obj/item/clothing/under/emp_act(severity) + if (hastie) + hastie.emp_act(severity) + ..() diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index d2ef8deccf..692cc90b63 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -3,7 +3,7 @@ /obj/item/clothing/head/chefhat name = "chef's hat" desc = "It's a hat used by chefs to keep hair out of your food. Judging by the food in the mess, they don't work." - icon_state = "chef" + icon_state = "chefhat" item_state = "chefhat" desc = "The commander in chef's head wear." flags = FPRINT | TABLEPASS diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index f94766f16c..19ea76ed4e 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -59,7 +59,7 @@ if(stat & (NOPOWER|BROKEN)) return ui_interact(user) -/obj/machinery/account_database/ui_interact(mob/user, ui_key="main", datum/nanoui/ui=null) +/obj/machinery/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -105,7 +105,7 @@ if (accounts.len > 0) data["accounts"] = accounts - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640) ui.set_initial_data(data) diff --git a/code/modules/events/organ_failure.dm b/code/modules/events/organ_failure.dm index 1499afcb45..f51c463328 100644 --- a/code/modules/events/organ_failure.dm +++ b/code/modules/events/organ_failure.dm @@ -13,7 +13,7 @@ datum/event/organ_failure/announce() datum/event/organ_failure/start() var/list/candidates = list() //list of candidate keys for(var/mob/living/carbon/human/G in player_list) - if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70) + if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70 && G.internal_organs) candidates += G if(!candidates.len) return candidates = shuffle(candidates)//Incorporating Donkie's list shuffle @@ -24,8 +24,7 @@ datum/event/organ_failure/start() var/acute = prob(15) if (prob(75)) //internal organ infection - var/O = pick(C.internal_organs) - var/datum/organ/internal/I = C.internal_organs[O] + var/datum/organ/internal/I = pick(C.internal_organs) if (acute) I.germ_level = max(INFECTION_LEVEL_TWO, I.germ_level) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index d7ee461161..60adf1e704 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -116,7 +116,7 @@ H.concealed = 1 H.update_icon() usr.visible_message("\The [usr] deals a card to \the [M].") - H.throw_at(get_step(M,M.dir),10,1) + H.throw_at(get_step(M,M.dir),10,1,H) /obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob) if(istype(O,/obj/item/weapon/hand)) diff --git a/code/modules/mining/drilling/distribution.dm b/code/modules/mining/drilling/distribution.dm index 1b4c698ea9..bf32d417cd 100644 --- a/code/modules/mining/drilling/distribution.dm +++ b/code/modules/mining/drilling/distribution.dm @@ -18,9 +18,9 @@ #define MAX_DEEP_COUNT 300 #define ITERATE_BEFORE_FAIL 200 -#define RESOURCE_HIGH_MAX 3 -#define RESOURCE_HIGH_MIN 0 -#define RESOURCE_MID_MAX 2 +#define RESOURCE_HIGH_MAX 4 +#define RESOURCE_HIGH_MIN 2 +#define RESOURCE_MID_MAX 3 #define RESOURCE_MID_MIN 1 #define RESOURCE_LOW_MAX 1 #define RESOURCE_LOW_MIN 0 @@ -103,6 +103,14 @@ Deep minerals: for(var/y = 1, y <= real_size, y++) map[MAP_CELL] = 0 +/datum/ore_distribution/proc/print_distribution_map() + var/line = "" + for(var/x = 1, x <= real_size, x++) + for(var/y = 1, y <= real_size, y++) + line += num2text(round(map[MAP_CELL]/25.5)) + world << line + line = "" + /datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size) var/size = input_size @@ -157,36 +165,37 @@ Deep minerals: if(target_turf && target_turf.has_resources) target_turf.resources = list() - target_turf.resources["silicates"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) - target_turf.resources["carbonaceous rock"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) + target_turf.resources["silicates"] = rand(3,5) + target_turf.resources["carbonaceous rock"] = rand(3,5) - if(map[MAP_CELL] > (range*0.60)) - target_turf.resources["iron"] = 0 - target_turf.resources["gold"] = 0 - target_turf.resources["silver"] = 0 - target_turf.resources["uranium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) - target_turf.resources["diamond"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) - target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - else if(map[MAP_CELL] > (range*0.40)) - target_turf.resources["iron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["diamond"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) - target_turf.resources["phoron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["osmium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["hydrogen"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - else - target_turf.resources["iron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) - target_turf.resources["phoron"] = 0 - target_turf.resources["osmium"] = 0 - target_turf.resources["hydrogen"] = 0 + switch(map[MAP_CELL]) + if(0 to 100) + target_turf.resources["iron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) + target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) + target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) + target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) + target_turf.resources["diamond"] = 0 + target_turf.resources["phoron"] = 0 + target_turf.resources["osmium"] = 0 + target_turf.resources["hydrogen"] = 0 + if(100 to 124) + target_turf.resources["iron"] = 0 + target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) + target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) + target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) + target_turf.resources["diamond"] = 0 + target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) + target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) + target_turf.resources["hydrogen"] = 0 + if(125 to 255) + target_turf.resources["iron"] = 0 + target_turf.resources["gold"] = 0 + target_turf.resources["silver"] = 0 + target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) + target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX) + target_turf.resources["phoron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) + target_turf.resources["osmium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX) + target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX) tx += chunk_size tx = origin_x diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index cbfdd53f9a..4ed2cd0867 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -265,13 +265,13 @@ update_icon() /obj/machinery/mining/drill/proc/get_harvest_capacity() - return 3 * (cutter ? cutter.rating : 0) + return (cutter ? cutter.rating : 0) /obj/machinery/mining/drill/proc/get_storage_capacity() - return 100 * (storage ? storage.rating : 0) + return 200 * (storage ? storage.rating : 0) /obj/machinery/mining/drill/proc/get_charge_use() - return 100 - (20 * (cellmount ? cellmount.rating : 0)) + return 50 - (10 * (cellmount ? cellmount.rating : 0)) /obj/machinery/mining/drill/proc/get_resource_field() @@ -346,6 +346,11 @@ /obj/machinery/mining/brace/proc/connect() var/turf/T = get_step(get_turf(src), src.dir) + + if(!T.has_resources) + src.visible_message("\red The terrain near the brace is unsuitable!") + return + for(var/thing in T.contents) if(istype(thing,/obj/machinery/mining/drill)) connected = thing diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm new file mode 100644 index 0000000000..5b19064160 --- /dev/null +++ b/code/modules/mining/drilling/scanner.dm @@ -0,0 +1,54 @@ +/obj/item/weapon/mining_scanner + name = "ore detector" + desc = "A complex device used to locate ore deep underground." + icon = 'icons/obj/device.dmi' + icon_state = "forensic0-old" //GET A BETTER SPRITE. + item_state = "electronic" + matter = list("metal" = 150) + + origin_tech = "magnets=1;engineering=1" + +/obj/item/weapon/mining_scanner/attack_self(mob/user as mob) + + user << "You begin sweeping \the [src] about, scanning for metal deposits." + + if(!do_after(user,50)) return + + if(!user || !src) return + + var/list/metals = list( + "surface minerals" = 0, + "precious metals" = 0, + "nuclear fuel" = 0, + "exotic matter" = 0 + ) + + for(var/turf/T in oview(3,get_turf(user))) + + if(!T.has_resources) + continue + + for(var/metal in T.resources) + + var/ore_type + + switch(metal) + if("silicates" || "carbonaceous rock" || "iron") ore_type = "surface minerals" + if("gold" || "silver" || "diamond") ore_type = "precious metals" + if("uranium") ore_type = "nuclear fuel" + if("phoron" || "osmium" || "hydrogen") ore_type = "exotic matter" + + if(ore_type) metals[ore_type] += T.resources[metal] + + user << "\icon[src] \blue The scanner beeps and displays a readout." + + for(var/ore_type in metals) + + var/result = "no sign" + + switch(metals[ore_type]) + if(1 to 50) result = "trace amounts" + if(51 to 150) result = "significant amounts" + if(151 to INFINITY) result = "huge quantities" + + user << "- [result] of [ore_type]." \ No newline at end of file diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index d350e2052c..d8b671af25 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -142,10 +142,20 @@ /obj/machinery/mineral/processing_unit/process() - if (!active || !src.output || !src.input) return + if (!src.output || !src.input) return var/list/tick_alloys = list() + //Grab some more ore to process this tick. + for(var/i = 0,i 0 && findtext(message,"\"",1, null) > 0) + // return //This check does not work and I have no idea why, I'm leaving it in for reference. + if (src.client) if (client.prefs.muted & MUTE_IC) src << "\red You cannot send IC messages (muted)." diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 6ce436e12a..026ef891a9 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -388,7 +388,7 @@ if(display_gloves) msg += "[src] has blood running from under [t_his] gloves!\n" - for(var/implant in get_visible_implants(1)) + for(var/implant in get_visible_implants(0)) msg += "[src] has \a [implant] sticking out of [t_his] flesh!\n" if(digitalcamo) msg += "[t_He] [t_is] repulsively uncanny!\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4f6368ad6f..fca5ffa065 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -317,6 +317,16 @@ if(armor >= 2) return +/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. + if(!config.use_loyalty_implants && !override) return // Nuh-uh. + + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M) + L.imp_in = M + L.implanted = 1 + var/datum/organ/external/affected = M.organs_by_name["head"] + affected.implants += L + L.part = affected + /mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M) for(var/L in M.contents) if(istype(L, /obj/item/weapon/implant/loyalty)) @@ -336,7 +346,7 @@ var/damage = rand(1, 3) - if(istype(M, /mob/living/carbon/slime/adult)) + if(M.is_adult) damage = rand(10, 35) else damage = rand(5, 25) @@ -1086,8 +1096,7 @@ H.brainmob.mind.transfer_to(src) del(H) - for(var/E in internal_organs) - var/datum/organ/internal/I = internal_organs[E] + for(var/datum/organ/internal/I in internal_organs) I.damage = 0 for (var/datum/disease/virus in viruses) @@ -1099,11 +1108,11 @@ ..() /mob/living/carbon/human/proc/is_lung_ruptured() - var/datum/organ/internal/lungs/L = internal_organs["lungs"] + var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"] return L.is_bruised() /mob/living/carbon/human/proc/rupture_lung() - var/datum/organ/internal/lungs/L = internal_organs["lungs"] + var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"] if(!L.is_bruised()) src.custom_pain("You feel a stabbing pain in your chest!", 1) @@ -1166,7 +1175,7 @@ var/list/visible_implants = list() for(var/datum/organ/external/organ in src.organs) for(var/obj/item/weapon/O in organ.implants) - if(!istype(O,/obj/item/weapon/implant) && O.w_class > class) + if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel)) visible_implants += O return(visible_implants) @@ -1384,7 +1393,7 @@ status_flags |= LEAPING src.visible_message("\The [src] leaps at [T]!") - src.throw_at(get_step(get_turf(T),get_turf(src)), 5, 1) + src.throw_at(get_step(get_turf(T),get_turf(src)), 5, 1, src) playsound(src.loc, 'sound/voice/shriek1.ogg', 50, 1) sleep(5) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 4609df2929..570e141c65 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -17,7 +17,7 @@ /mob/living/carbon/human/getBrainLoss() var/res = brainloss - var/datum/organ/internal/brain/sponge = internal_organs["brain"] + var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"] if (sponge.is_bruised()) res += 20 if (sponge.is_broken()) @@ -307,9 +307,8 @@ This function restores all organs. var/embed_threshold = sharp? 5*W.w_class : 15*W.w_class //Sharp objects will always embed if they do enough damage. - if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc)) || (damage > embed_threshold && prob(embed_chance))) + //Thrown objects have some momentum already and have a small chance to embed even if the damage is below the threshold + if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc) && prob(damage/(10*W.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) organ.embed(W) - else if( (damage > (5*W.w_class)) && ((!ismob(W.loc) && !sharp)) || (prob((damage - 2)/W.w_class) ) ) - organ.embed(W) return 1 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 0f091a5654..6260a297a1 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -51,11 +51,6 @@ emp_act return -1 // complete projectile permutation - if(check_shields(P.damage, "the [P.name]")) - P.on_hit(src, 2, def_zone) - handle_suit_punctures(P.damage_type, P.damage) - return 2 - //BEGIN BOOK'S TASER NERF. if(istype(P, /obj/item/projectile/beam/stun)) var/datum/organ/external/select_area = get_organ(def_zone) // We're checking the outside, buddy! @@ -89,6 +84,10 @@ emp_act return //END TASER NERF + if(check_shields(P.damage, "the [P.name]")) + P.on_hit(src, 2, def_zone) + return 2 + var/datum/organ/external/organ = get_organ(check_zone(def_zone)) var/armor = getarmor_organ(organ, "bullet") @@ -190,7 +189,8 @@ emp_act /mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone) if(!I || !user) return 0 - var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src) + var/target_zone = def_zone? def_zone : get_zone_with_miss_chance(user.zone_sel.selecting, src) + if(user == src) // Attacking yourself can't miss target_zone = user.zone_sel.selecting if(!target_zone) @@ -229,7 +229,7 @@ emp_act var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") var/weapon_sharp = is_sharp(I) var/weapon_edge = has_edge(I) - if ((weapon_sharp || weapon_edge) && prob(getarmor(def_zone, "melee"))) + if ((weapon_sharp || weapon_edge) && prob(getarmor(target_zone, "melee"))) weapon_sharp = 0 weapon_edge = 0 @@ -282,6 +282,77 @@ emp_act bloody_body(src) return 1 +//this proc handles being hit by a thrown atom +/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5) + if(istype(AM,/obj/)) + var/obj/O = AM + var/dtype = BRUTE + if(istype(O,/obj/item/weapon)) + var/obj/item/weapon/W = O + dtype = W.damtype + var/throw_damage = O.throwforce*(speed/5) + + var/zone + if (istype(O.thrower, /mob/living)) + var/mob/living/L = O.thrower + zone = check_zone(L.zone_sel.selecting) + else + zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest + + //check if we hit + if (O.throw_source) + var/distance = get_dist(O.throw_source, loc) + zone = get_zone_with_miss_chance(zone, src, min(15*(distance-2), 0)) + else + zone = get_zone_with_miss_chance(zone, src, 15) + + if(!zone) + visible_message("\blue \The [O] misses [src] narrowly!") + return + + O.throwing = 0 //it hit, so stop moving + + if ((O.thrower != src) && check_shields(throw_damage, "[O]")) + return + + var/datum/organ/external/affecting = get_organ(zone) + var/hit_area = affecting.display_name + + src.visible_message("\red [src] has been hit in the [hit_area] by [O].") + var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here + + if(armor < 2) + apply_damage(throw_damage, dtype, zone, armor, is_sharp(O), has_edge(O), O) + + if(ismob(O.thrower)) + var/mob/M = O.thrower + var/client/assailant = M.client + if(assailant) + src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [M.name] ([assailant.ckey])") + M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") + if(!istype(src,/mob/living/simple_animal/mouse)) + msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (JMP)") + + // Begin BS12 momentum-transfer code. + if(O.throw_source && speed >= 15) + var/obj/item/weapon/W = O + var/momentum = speed/2 + var/dir = get_dir(O.throw_source, src) + + visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!") + src.throw_at(get_edge_target_turf(src,dir),1,momentum) + + if(!W || !src) return + + if(W.loc == src && W.sharp) //Projectile is embedded and suitable for pinning. + var/turf/T = near_wall(dir,2) + + if(T) + src.loc = T + visible_message("[src] is pinned to the wall by [O]!","You are pinned to the wall by [O]!") + src.anchored = 1 + src.pinned += O + /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) if (gloves) gloves.add_blood(source) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 211da1cdac..f772fe5840 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -690,6 +690,7 @@ loc_temp = environment.temperature if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1 && environment.phoron < MOLES_PHORON_VISIBLE) + pressure_alert = 0 return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp //Body temperature adjusts depending on surrounding atmosphere based on your thermal protection @@ -1098,6 +1099,9 @@ return //TODO: DEFERRED proc/handle_regular_status_updates() + + if(status_flags & GODMODE) return 0 + if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 silent = 0 diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm index e37f3d2368..b8e004e201 100644 --- a/code/modules/mob/living/carbon/metroid/death.dm +++ b/code/modules/mob/living/carbon/metroid/death.dm @@ -1,23 +1,28 @@ /mob/living/carbon/slime/death(gibbed) + if(!gibbed) + if(is_adult) + var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc) + M.colour = colour + M.rabid = 1 + is_adult = 0 + maxHealth = 150 + revive() + regenerate_icons() + number = rand(1, 1000) + name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" + return + if(stat == DEAD) return stat = DEAD icon_state = "[colour] baby slime dead" - - if(!gibbed) - if(istype(src, /mob/living/carbon/slime/adult)) - ghostize() - var/mob/living/carbon/slime/M1 = new primarytype(loc) - M1.rabid = 1 - var/mob/living/carbon/slime/M2 = new primarytype(loc) - M2.rabid = 1 - if(src) del(src) - else - for(var/mob/O in viewers(src, null)) - O.show_message("The [name] seizes up and falls limp...", 1) //ded -- Urist + overlays.len = 0 + for(var/mob/O in viewers(src, null)) + O.show_message("The [name] seizes up and falls limp...", 1) //ded -- Urist update_canmove() if(blind) blind.layer = 0 - ticker.mode.check_win() + if(ticker && ticker.mode) + ticker.mode.check_win() return ..(gibbed) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/metroid/emote.dm b/code/modules/mob/living/carbon/metroid/emote.dm index 2f6f000539..2cbc139f5a 100644 --- a/code/modules/mob/living/carbon/metroid/emote.dm +++ b/code/modules/mob/living/carbon/metroid/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/slime/emote(var/act,var/m_type=1,var/message = null) +/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null) if (findtext(act, "-", 1, null)) @@ -9,7 +9,7 @@ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' act = copytext(act,1,length(act)) - switch(act) + switch(act) //Alphabetical please if ("me") if(silent) return @@ -19,40 +19,51 @@ return if (src.client.handle_spam_prevention(message,MUTE_IC)) return - if (stat) - return - if(!(message)) - return - return custom_emote(m_type, message) - - if ("custom") - return custom_emote(m_type, message) - if("moan") - message = "The [src.name] moans." - m_type = 2 - if("shiver") - message = "The [src.name] shivers." - m_type = 2 - if("sway") - message = "The [src.name] sways around dizzily." - m_type = 1 - if("twitch") - message = "The [src.name] twitches." - m_type = 1 - if("vibrate") - message = "The [src.name] vibrates!" - m_type = 1 - if("light") - message = "The [src.name] lights up for a bit, then stops." - m_type = 1 - if("jiggle") - message = "The [src.name] jiggles!" - m_type = 1 + if (stat) + return + if(!(message)) + return + return custom_emote(m_type, message) if("bounce") message = "The [src.name] bounces in place." m_type = 1 + + if ("custom") + return custom_emote(m_type, message) + + if("jiggle") + message = "The [src.name] jiggles!" + m_type = 1 + + if("light") + message = "The [src.name] lights up for a bit, then stops." + m_type = 1 + + if("moan") + message = "The [src.name] moans." + m_type = 2 + + if("shiver") + message = "The [src.name] shivers." + m_type = 2 + + if("sway") + message = "The [src.name] sways around dizzily." + m_type = 1 + + if("twitch") + message = "The [src.name] twitches." + m_type = 1 + + if("vibrate") + message = "The [src.name] vibrates!" + m_type = 1 + + if ("help") //This is an exception + src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate" + else - src << text("Invalid Emote: []", act) + src << "\blue Unusable emote '[act]'. Say *help for a list." if ((message && src.stat == 0)) if (m_type & 1) for(var/mob/O in viewers(src, null)) diff --git a/code/modules/mob/living/carbon/metroid/hud.dm b/code/modules/mob/living/carbon/metroid/hud.dm index c770083906..cfaa7f4f16 100644 --- a/code/modules/mob/living/carbon/metroid/hud.dm +++ b/code/modules/mob/living/carbon/metroid/hud.dm @@ -1,4 +1,2 @@ - /mob/living/carbon/slime/proc/regular_hud_updates() - return - + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 47e9f6c675..c82d517d59 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -1,3 +1,10 @@ +/mob/living/carbon/slime + var/AIproc = 0 // determines if the AI loop is activated + var/Atkcool = 0 // attack cooldown + var/Tempstun = 0 // temporary temperature stuns + var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while + var/SStun = 0 // stun variable + /mob/living/carbon/slime/Life() set invisibility = 0 set background = 1 @@ -15,114 +22,80 @@ handle_targets() + if (!ckey) + handle_speech_and_mood() - var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE + var/datum/gas_mixture/environment if(src.loc) environment = loc.return_air() - //Apparently, the person who wrote this code designed it so that //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. src.blinded = null - // Basically just deletes any screen objects :< - regular_hud_updates() + regular_hud_updates() // Basically just deletes any screen objects :< - //Handle temperature/pressure differences between body and environment if(environment) - handle_environment(environment) + handle_environment(environment) // Handle temperature/pressure differences between body and environment - //Status updates, death etc. - handle_regular_status_updates() - - - - - -/mob/living/carbon/slime - var/AIproc = 0 // determines if the AI loop is activated - var/Atkcool = 0 // attack cooldown - var/Tempstun = 0 // temporary temperature stuns - var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while - var/SStun = 0 // stun variable + handle_regular_status_updates() // Status updates, death etc. /mob/living/carbon/slime/proc/AIprocess() // the master AI process - //world << "AI proc started." if(AIproc || stat == DEAD || client) return var/hungry = 0 - var/starving = 0 - if(istype(src, /mob/living/carbon/slime/adult)) - switch(nutrition) - if(400 to 1100) hungry = 1 - if(0 to 399) - starving = 1 - else - switch(nutrition) - if(150 to 900) hungry = 1 - if(0 to 149) starving = 1 + if (nutrition < get_starve_nutrition()) + hungry = 2 + else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition()) + hungry = 1 + AIproc = 1 - //world << "AIproc [AIproc] && stat != 2 [stat] && (attacked > 0 [attacked] || starving [starving] || hungry [hungry] || rabid [rabid] || Victim [Victim] || Target [Target]" - while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim)) + + while(AIproc && stat != 2 && (attacked || hungry || rabid || Victim)) if(Victim) // can't eat AND have this little process at the same time - //world << "break 1" break if(!Target || client) - //world << "break 2" break - if(Target.health <= -70 || Target.stat == 2) Target = null AIproc = 0 - //world << "break 3" break if(Target) - //world << "[Target] Target Found" for(var/mob/living/carbon/slime/M in view(1,Target)) if(M.Victim == Target) Target = null AIproc = 0 - //world << "break 4" break if(!AIproc) - //world << "break 5" break if(Target in view(1,src)) - if(istype(Target, /mob/living/silicon)) if(!Atkcool) - spawn() - Atkcool = 1 - sleep(15) + Atkcool = 1 + spawn(45) Atkcool = 0 if(Target.Adjacent(src)) Target.attack_slime(src) - //world << "retrun 1" return if(!Target.lying && prob(80)) if(Target.client && Target.health >= 20) if(!Atkcool) - spawn() - Atkcool = 1 - sleep(25) + Atkcool = 1 + spawn(45) Atkcool = 0 if(Target.Adjacent(src)) Target.attack_slime(src) - - if(prob(30)) - step_to(src, Target) - else if(!Atkcool && Target.Adjacent(src)) Feedon(Target) @@ -133,13 +106,13 @@ else if(Target in view(7, src)) - if(Target.Adjacent(src)) + if(!Target.Adjacent(src)) // Bug of the month candidate: slimes were attempting to move to target only if it was directly next to them, which caused them to target things, but not approach them step_to(src, Target) + sleep(5) else Target = null AIproc = 0 - //world << "break 6" break var/sleeptime = movement_delay() @@ -148,7 +121,6 @@ sleep(sleeptime + 2) // this is about as fast as a player slime can go AIproc = 0 - //world << "AI proc ended." /mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment) if(!environment) @@ -166,28 +138,11 @@ else loc_temp = environment.temperature - /* - if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10))) - var/transfer_coefficient - - transfer_coefficient = 1 - if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature)) - transfer_coefficient *= wear_mask.heat_transfer_coefficient - - // handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient) - */ - - if(loc_temp < 310.15) // a cold place bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1) else // a hot place bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1) - /* - if(stat==2) - bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000) - - */ //Account for massive pressure differences if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc @@ -207,7 +162,6 @@ return //TODO: DEFERRED - /mob/living/carbon/slime/proc/adjust_body_temperature(current, loc_temp, boost) var/temperature = current var/difference = abs(current-loc_temp) //get difference @@ -229,33 +183,28 @@ if(reagents) reagents.metabolize(src) - src.updatehealth() return //TODO: DEFERRED - /mob/living/carbon/slime/proc/handle_regular_status_updates() - if(istype(src, /mob/living/carbon/slime/adult)) + if(is_adult) health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) else health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - - - if(health < config.health_threshold_dead && stat != 2) death() return else if(src.health < config.health_threshold_crit) - // if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") - //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10) + if(!src.reagents.has_reagent("inaprovaline")) + src.adjustOxyLoss(10) - if(src.stat != DEAD) src.stat = UNCONSCIOUS + if(src.stat != DEAD) + src.stat = UNCONSCIOUS if(prob(30)) adjustOxyLoss(-1) @@ -264,12 +213,9 @@ adjustCloneLoss(-1) adjustBruteLoss(-1) - if (src.stat == DEAD) - src.lying = 1 src.blinded = 1 - else if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc. if (src.stunned > 0) @@ -314,89 +260,25 @@ return 1 - /mob/living/carbon/slime/proc/handle_nutrition() - if(prob(20)) - if(istype(src, /mob/living/carbon/slime/adult)) nutrition-=rand(4,6) - else nutrition-=rand(2,3) + if (prob(15)) + nutrition -= 1 + is_adult if(nutrition <= 0) nutrition = 0 if(prob(75)) - adjustToxLoss(rand(0,5)) - else - if(istype(src, /mob/living/carbon/slime/adult)) - if(nutrition >= 1000) - if(prob(40)) amount_grown++ + else if (nutrition >= get_grow_nutrition() && amount_grown < 10) + nutrition -= 20 + amount_grown++ + if(amount_grown >= 10 && !Victim && !Target && !ckey) + if(is_adult) + Reproduce() else - if(nutrition >= 800) - if(prob(40)) amount_grown++ - - if(amount_grown >= 10 && !Victim && !Target) - if(istype(src, /mob/living/carbon/slime/adult)) - if(!client) - for(var/i=1,i<=4,i++) - if(prob(70)) - var/mob/living/carbon/slime/M = new primarytype(loc) - M.powerlevel = round(powerlevel/4) - M.Friends = Friends - M.tame = tame - M.rabid = rabid - M.Discipline = Discipline - if(i != 1) step_away(M,src) - else - var/mutations = pick("one","two","three","four") - switch(mutations) - if("one") - var/mob/living/carbon/slime/M = new mutationone(loc) - M.powerlevel = round(powerlevel/4) - M.Friends = Friends - M.tame = tame - M.rabid = rabid - M.Discipline = Discipline - if(i != 1) step_away(M,src) - if("two") - var/mob/living/carbon/slime/M = new mutationtwo(loc) - M.powerlevel = round(powerlevel/4) - M.Friends = Friends - M.tame = tame - M.rabid = rabid - M.Discipline = Discipline - if(i != 1) step_away(M,src) - if("three") - var/mob/living/carbon/slime/M = new mutationthree(loc) - M.powerlevel = round(powerlevel/4) - M.Friends = Friends - M.tame = tame - M.rabid = rabid - M.Discipline = Discipline - if(i != 1) step_away(M,src) - if("four") - var/mob/living/carbon/slime/M = new mutationfour(loc) - M.powerlevel = round(powerlevel/4) - M.Friends = Friends - M.tame = tame - M.rabid = rabid - M.Discipline = Discipline - if(i != 1) step_away(M,src) - - del(src) - - else - if(!client) - var/mob/living/carbon/slime/adult/A = new adulttype(src.loc) - A.nutrition = nutrition -// A.nutrition += 100 - A.powerlevel = max(0, powerlevel-1) - A.Friends = Friends - A.tame = tame - A.rabid = rabid - del(src) - + Evolve() /mob/living/carbon/slime/proc/handle_targets() if(Tempstun) @@ -408,8 +290,7 @@ if(attacked > 50) attacked = 50 if(attacked > 0) - if(prob(85)) - attacked-- + attacked-- if(Discipline > 0) @@ -419,136 +300,278 @@ if(prob(10)) Discipline-- - if(!client) - if(!canmove) return - // DO AI STUFF HERE - - if(Target) - if(attacked <= 0) - Target = null - if(Victim) return // if it's eating someone already, continue eating! - - if(prob(1)) - emote(pick("bounce","sway","light","vibrate","jiggle")) + if(Target) + --target_patience + if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention + target_patience = 0 + Target = null if(AIproc && SStun) return - var/hungry = 0 // determines if the slime is hungry - var/starving = 0 // determines if the slime is starving-hungry - if(istype(src, /mob/living/carbon/slime/adult)) // 1200 max nutrition - switch(nutrition) - if(601 to 900) - if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time - if(301 to 600) hungry = 1 - if(0 to 300) - starving = 1 - else - switch(nutrition) // 1000 max nutrition - if(501 to 700) - if(prob(25)) hungry = 1 - if(201 to 500) hungry = 1 - if(0 to 200) starving = 1 + if (nutrition < get_starve_nutrition()) + hungry = 2 + else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition()) + hungry = 1 - - if(starving && !client) // if a slime is starving, it starts losing its friends + if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends if(Friends.len > 0 && prob(1)) var/mob/nofriend = pick(Friends) - Friends -= nofriend + --Friends[nofriend] if(!Target) - var/list/targets = list() + if(will_hunt() && hungry || attacked || rabid) // Only add to the list if we need to + var/list/targets = list() - if(hungry || starving) //Only add to the list if we need to for(var/mob/living/L in view(7,src)) - //Ignore other slimes, dead mobs and simple_animals - if(isslime(L) || L.stat != CONSCIOUS || isanimal(L)) + if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs continue - if(issilicon(L)) - if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things - if(!starving && Discipline > 0) + if(L in Friends) // No eating friends! + continue + + if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence + targets += L // Possible target found! + + if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men + var/mob/living/carbon/human/H = L + if(H.dna) + if(H.dna.mutantrace == "slime") continue - if(tame) //Tame slimes ignore electronic life + if(!L.canmove) // Only one slime can latch on at a time. + var/notarget = 0 + for(var/mob/living/carbon/slime/M in view(1,L)) + if(M.Victim == L) + notarget = 1 + if(notarget) continue - targets += L //Possible target found! + targets += L // Possible target found! - else if(iscarbon(L)) - - if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men - var/mob/living/carbon/human/H = L - if(H.dna) - if(H.dna.mutantrace == "slime") - continue - - if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things - if(!starving && Discipline > 0) - continue - - if(L in Friends) //No eating friends! - continue - - if(tame && ishuman(L)) //Tame slimes dont eat people. - continue - - if(!L.canmove) //Only one slime can latch on at a time. - - var/notarget = 0 - for(var/mob/living/carbon/slime/M in view(1,L)) - if(M.Victim == L) - notarget = 1 - if(notarget) - continue - - targets += L //Possible target found! - - - - if((hungry || starving) && targets.len > 0) - if(!istype(src, /mob/living/carbon/slime/adult)) - if(!starving) + if(targets.len > 0) + if(attacked || rabid || hungry == 2) + Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care + else for(var/mob/living/carbon/C in targets) if(!Discipline && prob(5)) - if(ishuman(C)) - Target = C - break - if(isalienadult(C)) + if(ishuman(C) || isalienadult(C)) Target = C break - if(islarva(C)) + if(islarva(C) || ismonkey(C)) Target = C break - if(ismonkey(C)) - Target = C - break - else - Target = targets[1] - else - Target = targets[1] // closest target - if(targets.len > 0) - if(attacked > 0 || rabid) - Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest! + if (Target) + target_patience = rand(5,7) + if (is_adult) + target_patience += 3 + if(!Target) // If we have no target, we are wandering or following orders + if (Leader) + if (holding_still) + holding_still = max(holding_still - 1, 0) + else if(canmove && isturf(loc)) + step_to(src, Leader) - if(!Target) - if(hungry || starving) - if(canmove && isturf(loc) && prob(50)) + else if(hungry) + if (holding_still) + holding_still = max(holding_still - hungry, 0) + else if(canmove && isturf(loc) && prob(50)) step(src, pick(cardinal)) else - if(canmove && isturf(loc) && prob(33)) + if (holding_still) + holding_still = max(holding_still - 1, 0) + else if(canmove && isturf(loc) && prob(33)) step(src, pick(cardinal)) - else - if(!AIproc) - spawn() AIprocess() + else if(!AIproc) + spawn() + AIprocess() + +/mob/living/carbon/slime/proc/handle_speech_and_mood() + //Mood starts here + var/newmood = "" + if (rabid || attacked) newmood = "angry" + else if (Target) newmood = "mischevous" + + if (!newmood) + if (Discipline && prob(25)) + newmood = "pout" + else if (prob(1)) + newmood = pick("sad", ":3", "pout") + + if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood) + if (prob(75)) newmood = mood + + if (newmood != mood) // This is so we don't redraw them every time + mood = newmood + regenerate_icons() + + //Speech understanding starts here + var/to_say + if (speech_buffer.len > 0) + var/who = speech_buffer[1] // Who said it? + var/phrase = speech_buffer[2] // What did they say? + if ((findtext(phrase, num2text(number)) || findtext(phrase, "slimes"))) // Talking to us + if (findtext(phrase, "hello") || findtext(phrase, "hi")) + to_say = pick("Hello...", "Hi...") + else if (findtext(phrase, "follow")) + if (Leader) + if (Leader == who) // Already following him + to_say = pick("Yes...", "Lead...", "Following...") + else if (Friends[who] > Friends[Leader]) // VIVA + Leader = who + to_say = "Yes... I follow [who]..." + else + to_say = "No... I follow [Leader]..." + else + if (Friends[who] > 2) + Leader = who + to_say = "I follow..." + else // Not friendly enough + to_say = pick("No...", "I won't follow...") + else if (findtext(phrase, "stop")) + if (Victim) // We are asked to stop feeding + if (Friends[who] > 4) + Victim = null + Target = null + if (Friends[who] < 7) + --Friends[who] + to_say = "Grrr..." // I'm angry but I do it + else + to_say = "Fine..." + else if (Target) // We are asked to stop chasing + if (Friends[who] > 3) + Target = null + if (Friends[who] < 6) + --Friends[who] + to_say = "Grrr..." // I'm angry but I do it + else + to_say = "Fine..." + else if (Leader) // We are asked to stop following + if (Leader == who) + to_say = "Yes... I'll stay..." + Leader = null + else + if (Friends[who] > Friends[Leader]) + Leader = null + to_say = "Yes... I'll stop..." + else + to_say = "No... I'll keep following..." + else if (findtext(phrase, "stay")) + if (Leader) + if (Leader == who) + holding_still = Friends[who] * 10 + to_say = "Yes... Staying..." + else if (Friends[who] > Friends[Leader]) + holding_still = (Friends[who] - Friends[Leader]) * 10 + to_say = "Yes... Staying..." + else + to_say = "No... I'll keep following..." + else + if (Friends[who] > 2) + holding_still = Friends[who] * 10 + to_say = "Yes... Staying..." + else + to_say = "No... I won't stay..." + speech_buffer = list() + + //Speech starts here + if (to_say) + say (to_say) + else if(prob(1)) + emote(pick("bounce","sway","light","vibrate","jiggle")) + else + var/t = 10 + var/slimes_near = -1 // Don't count myself + var/dead_slimes = 0 + var/friends_near = list() + for (var/mob/living/carbon/M in view(7,src)) + if (isslime(M)) + ++slimes_near + if (M.stat == DEAD) + ++dead_slimes + if (M in Friends) + t += 20 + friends_near += M + if (nutrition < get_hunger_nutrition()) t += 10 + if (nutrition < get_starve_nutrition()) t += 10 + if (prob(2) && prob(t)) + var/phrases = list() + if (Target) phrases += "[Target]... looks tasty..." + if (nutrition < get_starve_nutrition()) + phrases += "So... hungry..." + phrases += "Very... hungry..." + phrases += "Need... food..." + phrases += "Must... eat..." + else if (nutrition < get_hunger_nutrition()) + phrases += "Hungry..." + phrases += "Where is the food?" + phrases += "I want to eat..." + phrases += "Rawr..." + phrases += "Blop..." + phrases += "Blorble..." + if (rabid || attacked) + phrases += "Hrr..." + phrases += "Nhuu..." + phrases += "Unn..." + if (mood == ":3") + phrases += "Purr..." + if (attacked) + phrases += "Grrr..." + if (getToxLoss() > 30) + phrases += "Cold..." + if (getToxLoss() > 60) + phrases += "So... cold..." + phrases += "Very... cold..." + if (getToxLoss() > 90) + phrases += "..." + phrases += "C... c..." + if (Victim) + phrases += "Nom..." + phrases += "Tasty..." + if (powerlevel > 3) phrases += "Bzzz..." + if (powerlevel > 5) phrases += "Zap..." + if (powerlevel > 8) phrases += "Zap... Bzz..." + if (mood == "sad") phrases += "Bored..." + if (slimes_near) phrases += "Brother..." + if (slimes_near > 1) phrases += "Brothers..." + if (dead_slimes) phrases += "What happened?" + if (!slimes_near) + phrases += "Lonely..." + for (var/M in friends_near) + phrases += "[M]... friend..." + if (nutrition < get_hunger_nutrition()) + phrases += "[M]... feed me..." + say (pick(phrases)) + +/mob/living/carbon/slime/proc/get_max_nutrition() // Can't go above it + if (is_adult) return 1200 + else return 1000 + +/mob/living/carbon/slime/proc/get_grow_nutrition() // Above it we grow, below it we can eat + if (is_adult) return 1000 + else return 800 + +/mob/living/carbon/slime/proc/get_hunger_nutrition() // Below it we will always eat + if (is_adult) return 600 + else return 500 + +/mob/living/carbon/slime/proc/get_starve_nutrition() // Below it we will eat before everything else + if (is_adult) return 300 + else return 200 + +/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing + if (hunger == 2 || rabid || attacked) return 1 + if (Leader) return 0 + if (holding_still) return 0 + return 1 diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 0f4d205156..67f0b904ed 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -3,7 +3,8 @@ icon = 'icons/mob/slimes.dmi' icon_state = "grey baby slime" pass_flags = PASSTABLE - speak_emote = list("hums") + var/is_adult = 0 + speak_emote = list("telepathically chirps") layer = 5 @@ -12,7 +13,7 @@ gender = NEUTER update_icon = 0 - nutrition = 700 // 1000 = max + nutrition = 700 see_in_dark = 8 update_slimes = 0 @@ -22,67 +23,58 @@ status_flags = CANPARALYSE|CANPUSH var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside + var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35 - var/powerlevel = 0 // 1-10 controls how much electricity they are generating - var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows into an adult - // if adult: if 10: reproduces + var/powerlevel = 0 // 1-10 controls how much electricity they are generating + var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces + var/number = 0 // Used to understand when someone is talking to it var/mob/living/Victim = null // the person the slime is currently feeding on var/mob/living/Target = null // AI variable - tells the slime to hunt this down + var/mob/living/Leader = null // AI variable - tells the slime to follow this person - var/attacked = 0 // determines if it's been attacked recently. Can be any number, is a cooloff-ish variable - var/tame = 0 // if set to 1, the slime will not eat humans ever, or attack them - var/rabid = 0 // if set to 1, the slime will attack and eat anything it comes in contact with + var/attacked = 0 // Determines if it's been attacked recently. Can be any number, is a cooloff-ish variable + var/rabid = 0 // If set to 1, the slime will attack and eat anything it comes in contact with + var/holding_still = 0 // AI variable, cooloff-ish for how long it's going to stay in one place + var/target_patience = 0 // AI variable, cooloff-ish for how long it's going to follow its target - var/list/Friends = list() // A list of potential friends - var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a slime "likes" something. If the slime likes it more than 2 times, it becomes a friend + var/list/Friends = list() // A list of friends; they are not considered targets for feeding; passed down after splitting - // slimes pass on genetic data, so all their offspring have the same "Friends", + var/list/speech_buffer = list() // Last phrase said near it and person who said it + + var/mood = "" // To show its face ///////////TIME FOR SUBSPECIES var/colour = "grey" - var/primarytype = /mob/living/carbon/slime - var/mutationone = /mob/living/carbon/slime/orange - var/mutationtwo = /mob/living/carbon/slime/metal - var/mutationthree = /mob/living/carbon/slime/blue - var/mutationfour = /mob/living/carbon/slime/purple - var/adulttype = /mob/living/carbon/slime/adult var/coretype = /obj/item/slime_extract/grey - -/mob/living/carbon/slime/adult - name = "adult slime" - icon = 'icons/mob/slimes.dmi' - icon_state = "grey adult slime" - speak_emote = list("telepathically chirps") - - health = 200 - gender = NEUTER - - update_icon = 0 - nutrition = 800 // 1200 = max - + var/list/slime_mutation[4] /mob/living/carbon/slime/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src - if(name == "baby slime") - name = text("[colour] baby slime ([rand(1, 1000)])") - else - name = text("[colour] adult slime ([rand(1,1000)])") - real_name = name - spawn (1) - regenerate_icons() - src << "\blue Your icons have been generated!" + create_reagents(100) + spawn (0) + number = rand(1, 1000) + name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" + icon_state = "[colour] [is_adult ? "adult" : "baby"] slime" + real_name = name + slime_mutation = mutation_table(colour) + mutation_chance = rand(25, 35) + var/sanitizedcolour = replacetext(colour, " ", "") + coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]") ..() -/mob/living/carbon/slime/adult/New() - //verbs.Remove(/mob/living/carbon/slime/verb/ventcrawl) +/mob/living/carbon/slime/regenerate_icons() + icon_state = "[colour] [is_adult ? "adult" : "baby"] slime" + overlays.len = 0 + if (mood) + overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]") ..() /mob/living/carbon/slime/movement_delay() + if (bodytemperature >= 330.23) // 135 F + return -1 // slimes become supercharged at high temperatures + var/tally = 0 var/health_deficiency = (100 - health) @@ -92,115 +84,93 @@ tally += (283.222 - bodytemperature) / 10 * 1.75 if(reagents) - if(reagents.has_reagent("hyperzine")) // hyperzine slows slimes down - tally *= 2 // moves twice as slow + if(reagents.has_reagent("hyperzine")) // Hyperzine slows slimes down + tally *= 2 - if(reagents.has_reagent("frostoil")) // frostoil also makes them move VEEERRYYYYY slow + if(reagents.has_reagent("frostoil")) // Frostoil also makes them move VEEERRYYYYY slow tally *= 5 if(health <= 0) // if damaged, the slime moves twice as slow tally *= 2 - if (bodytemperature >= 330.23) // 135 F - return -1 // slimes become supercharged at high temperatures - - return tally+config.slime_delay - + return tally + config.slime_delay /mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if ((!( yes ) || now_pushing)) - return - now_pushing = 1 + if ((!(yes) || now_pushing)) + return + now_pushing = 1 - if(isobj(AM)) - if(!client && powerlevel > 0) - var/probab = 10 - switch(powerlevel) - if(1 to 2) probab = 20 - if(3 to 4) probab = 30 - if(5 to 6) probab = 40 - if(7 to 8) probab = 60 - if(9) probab = 70 - if(10) probab = 95 - if(prob(probab)) + if(isobj(AM)) + if(!client && powerlevel > 0) + var/probab = 10 + switch(powerlevel) + if(1 to 2) probab = 20 + if(3 to 4) probab = 30 + if(5 to 6) probab = 40 + if(7 to 8) probab = 60 + if(9) probab = 70 + if(10) probab = 95 + if(prob(probab)) + if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille)) + if(nutrition <= get_hunger_nutrition() && !Atkcool) + if (is_adult || prob(5)) + AM.attack_slime(src) + spawn() + Atkcool = 1 + sleep(45) + Atkcool = 0 + if(ismob(AM)) + var/mob/tmob = AM - if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille)) - if(istype(src, /mob/living/carbon/slime/adult)) - if(nutrition <= 600 && !Atkcool) - AM.attack_slime(src) - spawn() - Atkcool = 1 - sleep(15) - Atkcool = 0 - else - if(nutrition <= 500 && !Atkcool) - if(prob(5)) - AM.attack_slime(src) - spawn() - Atkcool = 1 - sleep(15) - Atkcool = 0 - - if(ismob(AM)) - var/mob/tmob = AM - - if(istype(src, /mob/living/carbon/slime/adult)) - if(istype(tmob, /mob/living/carbon/human)) - if(prob(90)) - now_pushing = 0 - return - else - if(istype(tmob, /mob/living/carbon/human)) + if(is_adult) + if(istype(tmob, /mob/living/carbon/human)) + if(prob(90)) now_pushing = 0 return + else + if(istype(tmob, /mob/living/carbon/human)) + now_pushing = 0 + return - now_pushing = 0 - ..() - if (!( istype(AM, /atom/movable) )) - return - if (!( now_pushing )) - now_pushing = 1 - if (!( AM.anchored )) - var/t = get_dir(src, AM) - if (istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null + now_pushing = 0 + ..() + if (!istype(AM, /atom/movable)) return - return + if (!( now_pushing )) + now_pushing = 1 + if (!( AM.anchored )) + var/t = get_dir(src, AM) + if (istype(AM, /obj/structure/window)) + if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) + for(var/obj/structure/window/win in get_step(AM,t)) + now_pushing = 0 + return + step(AM, t) + now_pushing = null /mob/living/carbon/slime/Process_Spacemove() return 2 - /mob/living/carbon/slime/Stat() ..() statpanel("Status") - if(istype(src, /mob/living/carbon/slime/adult)) + if(is_adult) stat(null, "Health: [round((health / 200) * 100)]%") else stat(null, "Health: [round((health / 150) * 100)]%") - if (client.statpanel == "Status") - if(istype(src,/mob/living/carbon/slime/adult)) - stat(null, "Nutrition: [nutrition]/1200") - if(amount_grown >= 10) + stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]") + if(amount_grown >= 10) + if(is_adult) stat(null, "You can reproduce!") - else - stat(null, "Nutrition: [nutrition]/1000") - if(amount_grown >= 10) + else stat(null, "You can evolve!") stat(null,"Power Level: [powerlevel]") - /mob/living/carbon/slime/adjustFireLoss(amount) ..(-abs(amount)) // Heals them return @@ -210,25 +180,18 @@ ..(Proj) return 0 - /mob/living/carbon/slime/emp_act(severity) powerlevel = 0 // oh no, the power! ..() /mob/living/carbon/slime/ex_act(severity) - - if (stat == 2 && client) - return - - else if (stat == 2 && !client) - del(src) - return + ..() var/b_loss = null var/f_loss = null switch (severity) if (1.0) - b_loss += 500 + del(src) return if (2.0) @@ -260,7 +223,7 @@ //paralysis += 1 - show_message("\red The blob attacks you!") + show_message(" The blob attacks you!") adjustFireLoss(damage) @@ -271,7 +234,6 @@ /mob/living/carbon/slime/u_equip(obj/item/W as obj) return - /mob/living/carbon/slime/attack_ui(slot) return @@ -286,52 +248,48 @@ updatehealth() return - /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob) if (!ticker) M << "You cannot attack people before the game has started." return - if(Victim) return // can't attack while eating! + if (Victim) return // can't attack while eating! if (health > -100) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red The [M.name] has glomped []!", src), 1) - + visible_message(" The [M.name] has glomped [src]!", \ + " The [M.name] has glomped [src]!") var/damage = rand(1, 3) attacked += 5 - if(istype(src, /mob/living/carbon/slime/adult)) + if(M.is_adult) damage = rand(1, 6) else damage = rand(1, 3) adjustBruteLoss(damage) - updatehealth() - return - /mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob) if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else if(M.attack_sound) playsound(loc, M.attack_sound, 50, 1, 1) - for(var/mob/O in viewers(src, null)) - O.show_message("\red [M] [M.attacktext] [src]!", 1) + visible_message("[M] [M.attacktext] [src]!", \ + "[M] [M.attacktext] [src]!") M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) + attacked += 10 adjustBruteLoss(damage) updatehealth() /mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob) - if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens. + if(!(istype(M, /mob/living/carbon/monkey))) + return // Fix for aliens receiving double messages when attacking other aliens. if (!ticker) M << "You cannot attack people before the game has started." @@ -340,6 +298,7 @@ if (istype(loc, /turf) && istype(loc.loc, /area/start)) M << "No attacking people at spawn, you jackass." return + ..() switch(M.a_intent) @@ -352,9 +311,8 @@ if (health > 0) attacked += 10 //playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [M.name] has attacked [src]!"), 1) + visible_message("[M.name] has attacked [src]!", \ + "[M.name] has attacked [src]!") adjustBruteLoss(rand(1, 3)) updatehealth() return @@ -374,15 +332,11 @@ if(Victim) if(Victim == M) if(prob(60)) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [M] attempts to wrestle \the [name] off!", 1) + visible_message("[M] attempts to wrestle \the [name] off!") playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) else - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [M] manages to wrestle \the [name] off!", 1) + visible_message(" [M] manages to wrestle \the [name] off!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(prob(90) && !client) @@ -402,21 +356,17 @@ else if(prob(30)) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [M] attempts to wrestle \the [name] off of [Victim]!", 1) + visible_message("[M] attempts to wrestle \the [name] off of [Victim]!") playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) else - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [M] manages to wrestle \the [name] off of [Victim]!", 1) + visible_message(" [M] manages to wrestle \the [name] off of [Victim]!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(prob(80) && !client) Discipline++ - if(!istype(src, /mob/living/carbon/slime/adult)) + if(!is_adult) if(Discipline == 1) attacked = 0 @@ -432,18 +382,13 @@ return - - - if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.use(2500) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message("\red [src] has been touched with the stun gloves by [M]!", 1, "\red You hear someone fall.", 2) + visible_message("[src] has been touched with the stun gloves by [M]!") return else M << "\red Not enough charge! " @@ -455,21 +400,18 @@ help_shake_act(M) if ("grab") - if (M == src) + if (M == src || anchored) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src) M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) + visible_message("[M] has grabbed [src] passively!") else @@ -479,8 +421,9 @@ if (prob(90)) if (HULK in M.mutations) damage += 5 - if(Victim) + if(Victim || Target) Victim = null + Target = null anchored = 0 if(prob(80) && !client) Discipline++ @@ -492,17 +435,14 @@ playsound(loc, "punch", 25, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has punched []!", M, src), 1) + visible_message("[M] has punched [src]!", \ + "[M] has punched [src]!") adjustBruteLoss(damage) updatehealth() else playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has attempted to punch []!", M, src), 1) + visible_message("[M] has attempted to punch [src]!") return @@ -518,48 +458,41 @@ switch(M.a_intent) if ("help") - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) + visible_message("[M] caresses [src] with its scythe like arm.") if ("hurt") - if ((prob(95) && health > 0)) + if (prob(95)) attacked += 10 playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) var/damage = rand(15, 30) if (damage >= 25) damage = rand(20, 40) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has attacked [name]!", M), 1) + visible_message("[M] has attacked [name]!", \ + "[M] has attacked [name]!") else - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has wounded [name]!", M), 1) + visible_message("[M] has wounded [name]!", \ + ")[M] has wounded [name]!") adjustBruteLoss(damage) updatehealth() else playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has attempted to lunge at [name]!", M), 1) + visible_message("[M] has attempted to lunge at [name]!", \ + "[M] has attempted to lunge at [name]!") if ("grab") - if (M == src) + if (M == src || anchored) return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src ) M.put_in_active_hand(G) - grabbed_by += G G.synch() LAssailant = M playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has grabbed [name] passively!", M), 1) + visible_message(" [M] has grabbed [name] passively!") if ("disarm") playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) @@ -567,12 +500,12 @@ attacked += 10 if(prob(95)) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has tackled [name]!", M), 1) + visible_message("[M] has tackled [name]!", \ + "[M] has tackled [name]!") - if(Victim) + if(Victim || Target) Victim = null + Target = null anchored = 0 if(prob(80) && !client) Discipline++ @@ -593,68 +526,123 @@ else drop_item() - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has disarmed [name]!", M), 1) + visible_message("[M] has disarmed [name]!", + "[M] has disarmed [name]!") adjustBruteLoss(damage) updatehealth() return +/mob/living/carbon/slime/attackby(obj/item/W, mob/user) + if(W.force > 0) + attacked += 10 + if(prob(25)) + user << "[W] passes right through [src]!" + return + if(Discipline && prob(50)) // wow, buddy, why am I getting attacked?? + Discipline = 0 + if(W.force >= 3) + if(is_adult) + if(prob(5 + round(W.force/2))) + if(Victim || Target) + if(prob(80) && !client) + Discipline++ + + Victim = null + Target = null + anchored = 0 + + spawn() + SStun = 1 + sleep(rand(5,20)) + SStun = 0 + + spawn(0) + if(user) + canmove = 0 + step_away(src, user) + if(prob(25 + W.force)) + sleep(2) + if(user) + step_away(src, user) + canmove = 1 + + else + if(prob(10 + W.force*2)) + if(Victim || Target) + if(prob(80) && !client) + Discipline++ + if(Discipline == 1) + attacked = 0 + spawn() + SStun = 1 + sleep(rand(5,20)) + SStun = 0 + + Victim = null + Target = null + anchored = 0 + + spawn(0) + if(user) + canmove = 0 + step_away(src, user) + if(prob(25 + W.force*4)) + sleep(2) + if(user) + step_away(src, user) + canmove = 1 + ..() /mob/living/carbon/slime/restrained() return 0 - mob/living/carbon/slime/var/co2overloadtime = null mob/living/carbon/slime/var/temperature_resistance = T0C+75 - -/mob/living/carbon/slime/show_inv(mob/user as mob) - - user.set_machine(src) - var/dat = {" -
[name]
-


-
Close -
"} - user << browse(dat, text("window=mob[name];size=340x480")) - onclose(user, "mob[name]") +/mob/living/carbon/slime/show_inv(mob/user) return -/mob/living/carbon/slime/updatehealth() - if(status_flags & GODMODE) - if(istype(src, /mob/living/carbon/slime/adult)) - health = 200 - else - health = 150 - stat = CONSCIOUS - else - // slimes can't suffocate unless they suicide. They are also not harmed by fire - if(istype(src, /mob/living/carbon/slime/adult)) - health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - else - health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) +/mob/living/carbon/slime/toggle_throw_mode() + return +/mob/living/carbon/slime/proc/apply_water() + adjustToxLoss(rand(15,20)) + if (!client) + if (Target) // Like cats + Target = null + ++Discipline + return /obj/item/slime_extract name = "slime extract" desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." icon = 'icons/mob/slimes.dmi' icon_state = "grey slime extract" - flags = TABLEPASS force = 1.0 w_class = 1.0 - throwforce = 1.0 + throwforce = 0 throw_speed = 3 throw_range = 6 origin_tech = "biotech=4" var/Uses = 1 // uses before it goes inert + var/enhanced = 0 //has it been enhanced before? + + attackby(obj/item/O as obj, mob/user as mob) + if(istype(O, /obj/item/weapon/slimesteroid2)) + if(enhanced == 1) + user << " This extract has already been enhanced!" + return ..() + if(Uses == 0) + user << " You can't enhance a used extract!" + return ..() + user <<"You apply the enhancer. It now has triple the amount of uses." + Uses = 3 + enhanced = 1 + del(O) /obj/item/slime_extract/New() ..() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) /obj/item/slime_extract/grey name = "grey slime extract" @@ -724,6 +712,26 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 name = "adamantine slime extract" icon_state = "adamantine slime extract" +/obj/item/slime_extract/bluespace + name = "bluespace slime extract" + icon_state = "bluespace slime extract" + +/obj/item/slime_extract/pyrite + name = "pyrite slime extract" + icon_state = "pyrite slime extract" + +/obj/item/slime_extract/cerulean + name = "cerulean slime extract" + icon_state = "cerulean slime extract" + +/obj/item/slime_extract/sepia + name = "sepia slime extract" + icon_state = "sepia slime extract" + +/obj/item/slime_extract/rainbow + name = "rainbow slime extract" + icon_state = "rainbow slime extract" + ////Pet Slime Creation/// /obj/item/weapon/slimepotion @@ -734,28 +742,31 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 attack(mob/living/carbon/slime/M as mob, mob/user as mob) if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. - user << "\red The potion only works on baby slimes!" + user << " The potion only works on baby slimes!" return ..() - if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults - user << "\red Only baby slimes can be tamed!" + if(M.is_adult) //Can't tame adults + user << " Only baby slimes can be tamed!" return..() if(M.stat) - user << "\red The slime is dead!" + user << " The slime is dead!" return..() + if(M.mind) + user << " The slime resists!" + return ..() var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc) pet.icon_state = "[M.colour] baby slime" pet.icon_living = "[M.colour] baby slime" pet.icon_dead = "[M.colour] baby slime dead" pet.colour = "[M.colour]" user <<"You feed the slime the potion, removing it's powers and calming it." - del (M) + del(M) var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN) if (!newname) newname = "pet slime" pet.name = newname pet.real_name = newname - del (src) + del(src) /obj/item/weapon/slimepotion2 name = "advanced docility potion" @@ -763,27 +774,30 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 icon = 'icons/obj/chemical.dmi' icon_state = "bottle19" - attack(mob/living/carbon/slime/adult/M as mob, mob/user as mob) - if(!istype(M, /mob/living/carbon/slime/adult))//If target is not a slime. - user << "\red The potion only works on adult slimes!" + attack(mob/living/carbon/slime/M as mob, mob/user as mob) + if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime. + user << " The potion only works on slimes!" return ..() if(M.stat) - user << "\red The slime is dead!" + user << " The slime is dead!" return..() + if(M.mind) + user << " The slime resists!" + return ..() var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc) pet.icon_state = "[M.colour] adult slime" pet.icon_living = "[M.colour] adult slime" pet.icon_dead = "[M.colour] baby slime dead" pet.colour = "[M.colour]" user <<"You feed the slime the potion, removing it's powers and calming it." - del (M) + del(M) var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN) if (!newname) newname = "pet slime" pet.name = newname pet.real_name = newname - del (src) + del(src) /obj/item/weapon/slimesteroid @@ -794,25 +808,45 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 attack(mob/living/carbon/slime/M as mob, mob/user as mob) if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. - user << "\red The steroid only works on baby slimes!" + user << " The steroid only works on baby slimes!" return ..() - if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults - user << "\red Only baby slimes can use the steroid!" + if(M.is_adult) //Can't tame adults + user << " Only baby slimes can use the steroid!" return..() if(M.stat) - user << "\red The slime is dead!" + user << " The slime is dead!" return..() if(M.cores == 3) - user <<"\red The slime already has the maximum amount of extract!" + user <<" The slime already has the maximum amount of extract!" return..() user <<"You feed the slime the steroid. It now has triple the amount of extract." M.cores = 3 - del (src) + del(src) +/obj/item/weapon/slimesteroid2 + name = "extract enhancer" + desc = "A potent chemical mix that will give a slime extract three uses." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + + /*afterattack(obj/target, mob/user , flag) + if(istype(target, /obj/item/slime_extract)) + if(target.enhanced == 1) + user << " This extract has already been enhanced!" + return ..() + if(target.Uses == 0) + user << " You can't enhance a used extract!" + return ..() + user <<"You apply the enhancer. It now has triple the amount of uses." + target.Uses = 3 + target.enahnced = 1 + del(src)*/ ////////Adamantine Golem stuff I dunno where else to put it +// This will eventually be removed. + /obj/item/clothing/under/golem name = "adamantine skin" desc = "a golem's skin" @@ -949,6 +983,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 var/area/A = get_area(src) if(A) G << "Golem rune created in [A.name]." + //////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them//////////////////////// /* @@ -958,11 +993,10 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." icon = 'icons/mob/slimes.dmi' icon_state = "slime extract" - flags = TABLEPASS force = 1.0 w_class = 1.0 throwforce = 1.0 - throw_speed = 3 + throw_speed = 2 throw_range = 6 origin_tech = "biotech=4" var/POWERFLAG = 0 // sshhhhhhh @@ -971,9 +1005,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 /obj/item/slime_core/New() ..() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) POWERFLAG = rand(1,10) Uses = rand(7, 25) //flags |= NOREACT @@ -1017,9 +1049,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 /obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch() processing_objects.Remove(src) var/turf/T = get_turf(src) - src.visible_message("\blue The [name] pulsates and quivers!") + src.visible_message(" The [name] pulsates and quivers!") spawn(rand(50,100)) - src.visible_message("\blue The [name] bursts open!") + src.visible_message(" The [name] bursts open!") new/mob/living/carbon/slime(T) del(src) @@ -1035,4 +1067,4 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 return else ..() -*/ \ No newline at end of file +*/ diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 707fc9cc15..bb7dcbe7bb 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -11,12 +11,12 @@ var/list/choices = list() for(var/mob/living/C in view(1,src)) - if(C!=src && !istype(C,/mob/living/carbon/slime)) + if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C)) choices += C - var/mob/living/carbon/M = input(src,"Who do you wish to feed on?") in null|choices + var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices if(!M) return - if(M in view(1, src)) + if(Adjacent(M)) if(!istype(src, /mob/living/carbon/brain)) if(!istype(M, /mob/living/carbon/slime)) @@ -42,76 +42,72 @@ -/mob/living/carbon/slime/proc/Feedon(var/mob/living/carbon/M) +/mob/living/carbon/slime/proc/Feedon(var/mob/living/M) Victim = M src.loc = M.loc canmove = 0 anchored = 1 var/lastnut = nutrition - //if(M.client) M << "\red You legs become paralyzed!" - if(istype(src, /mob/living/carbon/slime/adult)) + var/fed_succesfully = 0 + if(is_adult) icon_state = "[colour] adult slime eat" else icon_state = "[colour] baby slime eat" while(Victim && M.health > -70 && stat != 2) - // M.canmove = 0 canmove = 0 - if(M in view(1, src)) + if(Adjacent(M)) loc = M.loc if(prob(15) && M.client && istype(M, /mob/living/carbon)) - M << "\red [pick("You can feel your body becoming weak!", \ + M << "[pick("You can feel your body becoming weak!", \ "You feel like you're about to die!", \ "You feel every part of your body screaming in agony!", \ "A low, rolling pain passes through your body!", \ "Your body feels as if it's falling apart!", \ "You feel extremely weak!", \ - "A sharp, deep pain bathes every inch of your body!")]" + "A sharp, deep pain bathes every inch of your body!")]" if(istype(M, /mob/living/carbon)) - Victim.adjustCloneLoss(rand(1,10)) + Victim.adjustCloneLoss(rand(5,6)) Victim.adjustToxLoss(rand(1,2)) if(Victim.health <= 0) Victim.adjustToxLoss(rand(2,4)) - // Heal yourself - adjustToxLoss(-10) - adjustOxyLoss(-10) - adjustBruteLoss(-10) - adjustFireLoss(-10) - adjustCloneLoss(-10) + fed_succesfully = 1 - if(Victim) - for(var/mob/living/carbon/slime/slime in view(1,M)) - if(slime.Victim == M && slime != src) - slime.Feedstop() + else if(istype(M, /mob/living/simple_animal)) + Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12)) + fed_succesfully = 1 - nutrition += rand(10,25) + else + if(prob(25)) + src << "[pick("This subject is incompatable", \ + "This subject does not have a life energy", "This subject is empty", \ + "I am not satisified", "I can not feed from this subject", \ + "I do not feel nourished", "This subject is not food")]..." + + if(fed_succesfully) + //I have no idea why this is not in handle_nutrition() + nutrition += rand(15,30) if(nutrition >= lastnut + 50) if(prob(80)) lastnut = nutrition powerlevel++ if(powerlevel > 10) powerlevel = 10 + adjustToxLoss(-10) - if(istype(src, /mob/living/carbon/slime/adult)) - if(nutrition > 1200) - nutrition = 1200 - else - if(nutrition > 1000) - nutrition = 1000 - - Victim.updatehealth() + //Heal yourself. + adjustOxyLoss(-10) + adjustBruteLoss(-10) + adjustFireLoss(-10) + adjustCloneLoss(-10) + updatehealth() - - else - if(prob(25)) - src << "\red [pick("This subject is incompatable", \ - "This subject does not have a life energy", "This subject is empty", \ - "I am not satisified", "I can not feed from this subject", \ - "I do not feel nourished", "This subject is not food")]..." + if(Victim) + Victim.updatehealth() sleep(rand(15,45)) @@ -119,11 +115,11 @@ break if(stat == 2) - if(!istype(src, /mob/living/carbon/slime/adult)) + if(!is_adult) icon_state = "[colour] baby slime dead" else - if(istype(src, /mob/living/carbon/slime/adult)) + if(is_adult) icon_state = "[colour] adult slime" else icon_state = "[colour] baby slime" @@ -139,7 +135,11 @@ if(Victim.LAssailant && Victim.LAssailant != Victim) if(prob(50)) if(!(Victim.LAssailant in Friends)) - Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator + Friends[Victim.LAssailant] = 1 + //Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator + else + ++Friends[Victim.LAssailant] + if(M.client && istype(src, /mob/living/carbon/human)) if(prob(85)) @@ -173,16 +173,13 @@ if(stat) src << "I must be conscious to do this..." return - if(!istype(src, /mob/living/carbon/slime/adult)) + if(!is_adult) if(amount_grown >= 10) - var/mob/living/carbon/slime/adult/new_slime = new adulttype(loc) - new_slime.nutrition = nutrition - new_slime.powerlevel = max(0, powerlevel-1) - new_slime.a_intent = "hurt" - new_slime.key = key - new_slime.universal_speak = universal_speak - new_slime << "You are now an adult slime." - del(src) + is_adult = 1 + maxHealth = 200 + amount_grown = 0 + regenerate_icons() + name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])") else src << "I am not ready to evolve yet..." else @@ -190,15 +187,14 @@ /mob/living/carbon/slime/verb/Reproduce() set category = "Slime" - set desc = "This will make you split into four Slimes. NOTE: this will KILL you, but you will be transferred into one of the babies." + set desc = "This will make you split into four Slimes." if(stat) src << "I must be conscious to do this..." return - if(istype(src, /mob/living/carbon/slime/adult)) + if(is_adult) if(amount_grown >= 10) - //if(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced slime.") in list("Yes","No")=="Yes") if(stat) src << "I must be conscious to do this..." return @@ -207,54 +203,30 @@ var/new_nutrition = round(nutrition * 0.9) var/new_powerlevel = round(powerlevel / 4) for(var/i=1,i<=4,i++) - if(prob(80)) - var/mob/living/carbon/slime/M = new primarytype(loc) - M.nutrition = new_nutrition - M.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += M + var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc) + if(prob(mutation_chance)) + M.colour = slime_mutation[rand(1,4)] else - var/mutations = pick("one","two","three","four") - switch(mutations) - if("one") - var/mob/living/carbon/slime/M = new mutationone(loc) - M.nutrition = new_nutrition - M.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += M - if("two") - var/mob/living/carbon/slime/M = new mutationtwo(loc) - M.nutrition = new_nutrition - M.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += M - if("three") - var/mob/living/carbon/slime/M = new mutationthree(loc) - M.nutrition = new_nutrition - M.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += M - if("four") - var/mob/living/carbon/slime/M = new mutationfour(loc) - M.nutrition = new_nutrition - M.powerlevel = new_powerlevel - if(i != 1) step_away(M,src) - babies += M + M.colour = colour + if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature! + M.powerlevel = new_powerlevel + if(i != 1) step_away(M,src) + M.Friends = Friends.Copy() + babies += M + feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/carbon/slime/new_slime = pick(babies) - new_slime.a_intent = "hurt" new_slime.universal_speak = universal_speak - new_slime.key = key - - new_slime << "You are now a slime!" + if(src.mind) + src.mind.transfer_to(new_slime) + else + new_slime.key = src.key del(src) else src << "I am not ready to reproduce yet..." else src << "I am not old enough to reproduce yet..." - - /mob/living/carbon/slime/verb/ventcrawl() set name = "Crawl through Vent" set desc = "Enter an air vent and crawl through the pipe system." diff --git a/code/modules/mob/living/carbon/metroid/say.dm b/code/modules/mob/living/carbon/metroid/say.dm new file mode 100644 index 0000000000..89708595da --- /dev/null +++ b/code/modules/mob/living/carbon/metroid/say.dm @@ -0,0 +1,23 @@ +/mob/living/carbon/slime/say(var/message) + var/verb = say_quote(message) + + if(copytext(message,1,2) == "*") + return emote(copytext(message,2)) + + return ..(message, null, verb) + +/mob/living/carbon/slime/say_quote(var/text) + var/ending = copytext(text, length(text)) + + if (ending == "?") + return "telepathically asks"; + else if (ending == "!") + return "telepathically cries"; + + return "telepathically chirps"; + +/mob/living/carbon/slime/say_understands(var/other) + if (istype(other, /mob/living/carbon/slime)) + return 1 + return ..() + diff --git a/code/modules/mob/living/carbon/metroid/subtypes.dm b/code/modules/mob/living/carbon/metroid/subtypes.dm index 4eb4087f6e..3b7e0107ab 100644 --- a/code/modules/mob/living/carbon/metroid/subtypes.dm +++ b/code/modules/mob/living/carbon/metroid/subtypes.dm @@ -1,372 +1,79 @@ - -////////////////Tier 2 - -/mob/living/carbon/slime/purple - colour = "purple" - icon_state = "purple baby slime" - primarytype = /mob/living/carbon/slime/purple - mutationone = /mob/living/carbon/slime/darkpurple - mutationtwo = /mob/living/carbon/slime/darkblue - mutationthree = /mob/living/carbon/slime/green - mutationfour = /mob/living/carbon/slime/green - adulttype = /mob/living/carbon/slime/adult/purple - coretype = /obj/item/slime_extract/purple - -/mob/living/carbon/slime/adult/purple - icon_state = "purple adult slime" - colour = "purple" - primarytype = /mob/living/carbon/slime/purple - mutationone = /mob/living/carbon/slime/darkpurple - mutationtwo = /mob/living/carbon/slime/darkblue - mutationthree = /mob/living/carbon/slime/green - mutationfour = /mob/living/carbon/slime/green - adulttype = /mob/living/carbon/slime/adult/purple - coretype = /obj/item/slime_extract/purple - -/mob/living/carbon/slime/metal - colour = "metal" - icon_state = "metal baby slime" - primarytype = /mob/living/carbon/slime/metal - mutationone = /mob/living/carbon/slime/silver - mutationtwo = /mob/living/carbon/slime/yellow - mutationthree = /mob/living/carbon/slime/gold - mutationfour = /mob/living/carbon/slime/gold - adulttype = /mob/living/carbon/slime/adult/metal - coretype = /obj/item/slime_extract/metal - -/mob/living/carbon/slime/adult/metal - icon_state = "metal adult slime" - colour = "metal" - primarytype = /mob/living/carbon/slime/metal - mutationone = /mob/living/carbon/slime/silver - mutationtwo = /mob/living/carbon/slime/yellow - mutationthree = /mob/living/carbon/slime/gold - mutationfour = /mob/living/carbon/slime/gold - adulttype = /mob/living/carbon/slime/adult/metal - coretype = /obj/item/slime_extract/metal - -/mob/living/carbon/slime/orange - colour = "orange" - icon_state = "orange baby slime" - primarytype = /mob/living/carbon/slime/orange - mutationone = /mob/living/carbon/slime/red - mutationtwo = /mob/living/carbon/slime/red - mutationthree = /mob/living/carbon/slime/darkpurple - mutationfour = /mob/living/carbon/slime/yellow - adulttype = /mob/living/carbon/slime/adult/orange - coretype = /obj/item/slime_extract/orange - -/mob/living/carbon/slime/adult/orange - colour = "orange" - icon_state = "orange adult slime" - primarytype = /mob/living/carbon/slime/orange - mutationone = /mob/living/carbon/slime/red - mutationtwo = /mob/living/carbon/slime/red - mutationthree = /mob/living/carbon/slime/darkpurple - mutationfour = /mob/living/carbon/slime/yellow - adulttype = /mob/living/carbon/slime/adult/orange - coretype = /obj/item/slime_extract/orange - -/mob/living/carbon/slime/blue - colour = "blue" - icon_state = "blue baby slime" - primarytype = /mob/living/carbon/slime/blue - mutationone = /mob/living/carbon/slime/darkblue - mutationtwo = /mob/living/carbon/slime/pink - mutationthree = /mob/living/carbon/slime/pink - mutationfour = /mob/living/carbon/slime/silver - adulttype = /mob/living/carbon/slime/adult/blue - coretype = /obj/item/slime_extract/blue - -/mob/living/carbon/slime/adult/blue - icon_state = "blue adult slime" - colour = "blue" - primarytype = /mob/living/carbon/slime/blue - mutationone = /mob/living/carbon/slime/darkblue - mutationtwo = /mob/living/carbon/slime/pink - mutationthree = /mob/living/carbon/slime/silver - mutationfour = /mob/living/carbon/slime/pink - adulttype = /mob/living/carbon/slime/adult/blue - coretype = /obj/item/slime_extract/blue - - - - -//Tier 3 - -/mob/living/carbon/slime/darkblue - colour = "dark blue" - icon_state = "dark blue baby slime" - primarytype = /mob/living/carbon/slime/darkblue - mutationone = /mob/living/carbon/slime/purple - mutationtwo = /mob/living/carbon/slime/purple - mutationthree = /mob/living/carbon/slime/blue - mutationfour = /mob/living/carbon/slime/blue - adulttype = /mob/living/carbon/slime/adult/darkblue - coretype = /obj/item/slime_extract/darkblue - -/mob/living/carbon/slime/adult/darkblue - icon_state = "dark blue adult slime" - colour = "dark blue" - primarytype = /mob/living/carbon/slime/darkblue - mutationone = /mob/living/carbon/slime/purple - mutationtwo = /mob/living/carbon/slime/purple - mutationthree = /mob/living/carbon/slime/blue - mutationfour = /mob/living/carbon/slime/blue - adulttype = /mob/living/carbon/slime/adult/darkblue - coretype = /obj/item/slime_extract/darkblue - -/mob/living/carbon/slime/darkpurple - colour = "dark purple" - icon_state = "dark purple baby slime" - primarytype = /mob/living/carbon/slime/darkpurple - mutationone = /mob/living/carbon/slime/purple - mutationtwo = /mob/living/carbon/slime/purple - mutationthree = /mob/living/carbon/slime/orange - mutationfour = /mob/living/carbon/slime/orange - adulttype = /mob/living/carbon/slime/adult/darkpurple - coretype = /obj/item/slime_extract/darkpurple - -/mob/living/carbon/slime/adult/darkpurple - icon_state = "dark purple adult slime" - colour = "dark purple" - primarytype = /mob/living/carbon/slime/darkpurple - mutationone = /mob/living/carbon/slime/purple - mutationtwo = /mob/living/carbon/slime/purple - mutationthree = /mob/living/carbon/slime/orange - mutationfour = /mob/living/carbon/slime/orange - adulttype = /mob/living/carbon/slime/adult/darkpurple - coretype = /obj/item/slime_extract/darkpurple - - -/mob/living/carbon/slime/yellow - icon_state = "yellow baby slime" - colour = "yellow" - primarytype = /mob/living/carbon/slime/yellow - mutationone = /mob/living/carbon/slime/metal - mutationtwo = /mob/living/carbon/slime/metal - mutationthree = /mob/living/carbon/slime/orange - mutationfour = /mob/living/carbon/slime/orange - adulttype = /mob/living/carbon/slime/adult/yellow - coretype = /obj/item/slime_extract/yellow - -/mob/living/carbon/slime/adult/yellow - icon_state = "yellow adult slime" - colour = "yellow" - primarytype = /mob/living/carbon/slime/yellow - mutationone = /mob/living/carbon/slime/metal - mutationtwo = /mob/living/carbon/slime/metal - mutationthree = /mob/living/carbon/slime/orange - mutationfour = /mob/living/carbon/slime/orange - adulttype = /mob/living/carbon/slime/adult/yellow - coretype = /obj/item/slime_extract/yellow - - -/mob/living/carbon/slime/silver - colour = "silver" - icon_state = "silver baby slime" - primarytype = /mob/living/carbon/slime/silver - mutationone = /mob/living/carbon/slime/metal - mutationtwo = /mob/living/carbon/slime/metal - mutationthree = /mob/living/carbon/slime/blue - mutationfour = /mob/living/carbon/slime/blue - adulttype = /mob/living/carbon/slime/adult/silver - coretype = /obj/item/slime_extract/silver - -/mob/living/carbon/slime/adult/silver - icon_state = "silver adult slime" - colour = "silver" - primarytype = /mob/living/carbon/slime/silver - mutationone = /mob/living/carbon/slime/metal - mutationtwo = /mob/living/carbon/slime/metal - mutationthree = /mob/living/carbon/slime/blue - mutationfour = /mob/living/carbon/slime/blue - adulttype = /mob/living/carbon/slime/adult/silver - coretype = /obj/item/slime_extract/silver - - - -/////////////Tier 4 - - -/mob/living/carbon/slime/pink - colour = "pink" - icon_state = "pink baby slime" - primarytype = /mob/living/carbon/slime/pink - mutationone = /mob/living/carbon/slime/pink - mutationtwo = /mob/living/carbon/slime/pink - mutationthree = /mob/living/carbon/slime/lightpink - mutationfour = /mob/living/carbon/slime/lightpink - adulttype = /mob/living/carbon/slime/adult/pink - coretype = /obj/item/slime_extract/pink - -/mob/living/carbon/slime/adult/pink - icon_state = "pink adult slime" - colour = "pink" - primarytype = /mob/living/carbon/slime/pink - mutationone = /mob/living/carbon/slime/pink - mutationtwo = /mob/living/carbon/slime/pink - mutationthree = /mob/living/carbon/slime/lightpink - mutationfour = /mob/living/carbon/slime/lightpink - adulttype = /mob/living/carbon/slime/adult/pink - coretype = /obj/item/slime_extract/pink - -/mob/living/carbon/slime/red - colour = "red" - icon_state = "red baby slime" - primarytype = /mob/living/carbon/slime/red - mutationone = /mob/living/carbon/slime/red - mutationtwo = /mob/living/carbon/slime/red - mutationthree = /mob/living/carbon/slime/oil - mutationfour = /mob/living/carbon/slime/oil - adulttype = /mob/living/carbon/slime/adult/red - coretype = /obj/item/slime_extract/red - -/mob/living/carbon/slime/adult/red - icon_state = "red adult slime" - colour = "red" - primarytype = /mob/living/carbon/slime/red - mutationone = /mob/living/carbon/slime/red - mutationtwo = /mob/living/carbon/slime/red - mutationthree = /mob/living/carbon/slime/oil - mutationfour = /mob/living/carbon/slime/oil - adulttype = /mob/living/carbon/slime/adult/red - coretype = /obj/item/slime_extract/red - -/mob/living/carbon/slime/gold - colour = "gold" - icon_state = "gold baby slime" - primarytype = /mob/living/carbon/slime/gold - mutationone = /mob/living/carbon/slime/gold - mutationtwo = /mob/living/carbon/slime/gold - mutationthree = /mob/living/carbon/slime/adamantine - mutationfour = /mob/living/carbon/slime/adamantine - adulttype = /mob/living/carbon/slime/adult/gold - coretype = /obj/item/slime_extract/gold - -/mob/living/carbon/slime/adult/gold - icon_state = "gold adult slime" - colour = "gold" - primarytype = /mob/living/carbon/slime/gold - mutationone = /mob/living/carbon/slime/gold - mutationtwo = /mob/living/carbon/slime/gold - mutationthree = /mob/living/carbon/slime/adamantine - mutationfour = /mob/living/carbon/slime/adamantine - adulttype = /mob/living/carbon/slime/adult/gold - coretype = /obj/item/slime_extract/gold - -/mob/living/carbon/slime/green - colour = "green" - icon_state = "green baby slime" - primarytype = /mob/living/carbon/slime/green - mutationone = /mob/living/carbon/slime/green - mutationtwo = /mob/living/carbon/slime/green - mutationthree = /mob/living/carbon/slime/black - mutationfour = /mob/living/carbon/slime/black - adulttype = /mob/living/carbon/slime/adult/green - coretype = /obj/item/slime_extract/green - -/mob/living/carbon/slime/adult/green - icon_state = "green adult slime" - colour = "green" - primarytype = /mob/living/carbon/slime/green - mutationone = /mob/living/carbon/slime/green - mutationtwo = /mob/living/carbon/slime/green - mutationthree = /mob/living/carbon/slime/black - mutationfour = /mob/living/carbon/slime/black - adulttype = /mob/living/carbon/slime/adult/green - coretype = /obj/item/slime_extract/green - - - -// Tier 5 - -/mob/living/carbon/slime/lightpink - colour = "light pink" - icon_state = "light pink baby slime" - primarytype = /mob/living/carbon/slime/lightpink - mutationone = /mob/living/carbon/slime/lightpink - mutationtwo = /mob/living/carbon/slime/lightpink - mutationthree = /mob/living/carbon/slime/lightpink - mutationfour = /mob/living/carbon/slime/lightpink - adulttype = /mob/living/carbon/slime/adult/lightpink - coretype = /obj/item/slime_extract/lightpink - -/mob/living/carbon/slime/adult/lightpink - icon_state = "light pink adult slime" - colour = "light pink" - primarytype = /mob/living/carbon/slime/lightpink - mutationone = /mob/living/carbon/slime/lightpink - mutationtwo = /mob/living/carbon/slime/lightpink - mutationthree = /mob/living/carbon/slime/lightpink - mutationfour = /mob/living/carbon/slime/lightpink - adulttype = /mob/living/carbon/slime/adult/lightpink - coretype = /obj/item/slime_extract/lightpink - - -/mob/living/carbon/slime/oil - icon_state = "oil baby slime" - colour = "oil" - primarytype = /mob/living/carbon/slime/oil - mutationone = /mob/living/carbon/slime/oil - mutationtwo = /mob/living/carbon/slime/oil - mutationthree = /mob/living/carbon/slime/oil - mutationfour = /mob/living/carbon/slime/oil - adulttype = /mob/living/carbon/slime/adult/oil - coretype = /obj/item/slime_extract/oil - -/mob/living/carbon/slime/adult/oil - icon_state = "oil adult slime" - colour = "oil" - primarytype = /mob/living/carbon/slime/oil - mutationone = /mob/living/carbon/slime/oil - mutationtwo = /mob/living/carbon/slime/oil - mutationthree = /mob/living/carbon/slime/oil - mutationfour = /mob/living/carbon/slime/oil - adulttype = /mob/living/carbon/slime/adult/oil - coretype = /obj/item/slime_extract/oil - - -/mob/living/carbon/slime/black - icon_state = "black baby slime" - colour = "black" - primarytype = /mob/living/carbon/slime/black - mutationone = /mob/living/carbon/slime/black - mutationtwo = /mob/living/carbon/slime/black - mutationthree = /mob/living/carbon/slime/black - mutationfour = /mob/living/carbon/slime/black - adulttype = /mob/living/carbon/slime/adult/black - coretype = /obj/item/slime_extract/black - -/mob/living/carbon/slime/adult/black - icon_state = "black adult slime" - colour = "black" - primarytype = /mob/living/carbon/slime/black - mutationone = /mob/living/carbon/slime/black - mutationtwo = /mob/living/carbon/slime/black - mutationthree = /mob/living/carbon/slime/black - mutationfour = /mob/living/carbon/slime/black - adulttype = /mob/living/carbon/slime/adult/black - coretype = /obj/item/slime_extract/black - -/mob/living/carbon/slime/adamantine - icon_state = "adamantine baby slime" - colour = "adamantine" - primarytype = /mob/living/carbon/slime/adamantine - mutationone = /mob/living/carbon/slime/adamantine - mutationtwo = /mob/living/carbon/slime/adamantine - mutationthree = /mob/living/carbon/slime/adamantine - mutationfour = /mob/living/carbon/slime/adamantine - adulttype = /mob/living/carbon/slime/adult/adamantine - coretype = /obj/item/slime_extract/adamantine - -/mob/living/carbon/slime/adult/adamantine - icon_state = "adamantine adult slime" - colour = "adamantine" - primarytype = /mob/living/carbon/slime/adamantine - mutationone = /mob/living/carbon/slime/adamantine - mutationtwo = /mob/living/carbon/slime/adamantine - mutationthree = /mob/living/carbon/slime/adamantine - mutationfour = /mob/living/carbon/slime/adamantine - adulttype = /mob/living/carbon/slime/adult/adamantine - coretype = /obj/item/slime_extract/adamantine \ No newline at end of file +proc/mutation_table(var/colour) + var/list/slime_mutation[4] + switch(colour) + //Tier 1 + if("grey") + slime_mutation[1] = "orange" + slime_mutation[2] = "metal" + slime_mutation[3] = "blue" + slime_mutation[4] = "purple" + //Tier 2 + if("purple") + slime_mutation[1] = "dark purple" + slime_mutation[2] = "dark blue" + slime_mutation[3] = "green" + slime_mutation[4] = "green" + if("metal") + slime_mutation[1] = "silver" + slime_mutation[2] = "yellow" + slime_mutation[3] = "gold" + slime_mutation[4] = "gold" + if("orange") + slime_mutation[1] = "dark purple" + slime_mutation[2] = "yellow" + slime_mutation[3] = "red" + slime_mutation[4] = "red" + if("blue") + slime_mutation[1] = "dark blue" + slime_mutation[2] = "silver" + slime_mutation[3] = "pink" + slime_mutation[4] = "pink" + //Tier 3 + if("dark blue") + slime_mutation[1] = "purple" + slime_mutation[2] = "blue" + slime_mutation[3] = "cerulean" + slime_mutation[4] = "cerulean" + if("dark purple") + slime_mutation[1] = "purple" + slime_mutation[2] = "orange" + slime_mutation[3] = "sepia" + slime_mutation[4] = "sepia" + if("yellow") + slime_mutation[1] = "metal" + slime_mutation[2] = "orange" + slime_mutation[3] = "bluespace" + slime_mutation[4] = "bluespace" + if("silver") + slime_mutation[1] = "metal" + slime_mutation[2] = "blue" + slime_mutation[3] = "pyrite" + slime_mutation[4] = "pyrite" + //Tier 4 + if("pink") + slime_mutation[1] = "pink" + slime_mutation[2] = "pink" + slime_mutation[3] = "light pink" + slime_mutation[4] = "light pink" + if("red") + slime_mutation[1] = "red" + slime_mutation[2] = "red" + slime_mutation[3] = "oil" + slime_mutation[4] = "oil" + if("gold") + slime_mutation[1] = "gold" + slime_mutation[2] = "gold" + slime_mutation[3] = "adamantine" + slime_mutation[4] = "adamantine" + if("green") + slime_mutation[1] = "green" + slime_mutation[2] = "green" + slime_mutation[3] = "black" + slime_mutation[4] = "black" + // Tier 5 + else + slime_mutation[1] = colour + slime_mutation[2] = colour + slime_mutation[3] = colour + slime_mutation[4] = colour + return(slime_mutation) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 4eb294c8a4..1892128c29 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -403,7 +403,7 @@ var/damage = rand(1, 3) - if(istype(src, /mob/living/carbon/slime/adult)) + if(M.is_adult) damage = rand(20, 40) else damage = rand(5, 35) diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index feb74deb54..7bd6805966 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -200,7 +200,7 @@ breath_type = "nitrogen" poison_type = "oxygen" - flags = NO_SCAN | IS_WHITELISTED + flags = NO_SCAN blood_color = "#2299FC" flesh_color = "#808D11" diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0b7be48153..8b9bfccb87 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -65,58 +65,69 @@ P.on_hit(src, absorb, def_zone) return absorb +//this proc handles being hit by a thrown atom /mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve if(istype(AM,/obj/)) var/obj/O = AM - var/zone = ran_zone("chest",75)//Hits a random part of the body, geared towards the chest var/dtype = BRUTE if(istype(O,/obj/item/weapon)) var/obj/item/weapon/W = O dtype = W.damtype + var/throw_damage = O.throwforce*(speed/5) + + var/miss_chance = 15 + if (O.throw_source) + var/distance = get_dist(O.throw_source, loc) + miss_chance = min(15*(distance-2), 0) + + if (prob(miss_chance)) + visible_message("\blue \The [O] misses [src] narrowly!") + return + src.visible_message("\red [src] has been hit by [O].") - var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].") + var/armor = run_armor_check(null, "melee") if(armor < 2) - apply_damage(O.throwforce*(speed/5), dtype, zone, armor, is_sharp(O), has_edge(O), O) + apply_damage(throw_damage, dtype, null, armor, is_sharp(O), has_edge(O), O) - if(!O.fingerprintslast) - return + O.throwing = 0 //it hit, so stop moving + + if(ismob(O.thrower)) + var/mob/M = O.thrower + var/client/assailant = M.client + if(assailant) + src.attack_log += text("\[[time_stamp()]\] Has been hit with a [O], thrown by [M.name] ([assailant.ckey])") + M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") + if(!istype(src,/mob/living/simple_animal/mouse)) + msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (JMP)") - var/client/assailant = directory[ckey(O.fingerprintslast)] - if(assailant && assailant.mob && istype(assailant.mob,/mob)) - var/mob/M = assailant.mob + // Begin BS12 momentum-transfer code. + if(O.throw_source && speed >= 15) + var/obj/item/weapon/W = O + var/momentum = speed/2 + var/dir = get_dir(O.throw_source, src) - src.attack_log += text("\[[time_stamp()]\] Has been hit with a thrown [O], last touched by [M.name] ([assailant.ckey])") - M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with a thrown [O]") - if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[src.name] ([src.ckey]) was hit by a thrown [O], last touched by [M.name] ([assailant.ckey]) (JMP)") + visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!") + src.throw_at(get_edge_target_turf(src,dir),1,momentum) - // Begin BS12 momentum-transfer code. + if(!W || !src) return + + if(W.sharp) //Projectile is suitable for pinning. + //Handles embedding for non-humans and simple_animals. + O.loc = src + src.embedded += O - if(speed >= 15) - var/obj/item/weapon/W = O - var/momentum = speed/2 - var/dir = get_dir(M,src) + var/turf/T = near_wall(dir,2) - visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!") - src.throw_at(get_edge_target_turf(src,dir),1,momentum) - - if(!W || !src) return - - if(istype(W.loc,/mob/living) && W.sharp) //Projectile is embedded and suitable for pinning. - - if(!istype(src,/mob/living/carbon/human)) //Handles embedding for non-humans and simple_animals. - O.loc = src - src.embedded += O - - var/turf/T = near_wall(dir,2) - - if(T) - src.loc = T - visible_message("[src] is pinned to the wall by [O]!","You are pinned to the wall by [O]!") - src.anchored = 1 - src.pinned += O + if(T) + src.loc = T + visible_message("[src] is pinned to the wall by [O]!","You are pinned to the wall by [O]!") + src.anchored = 1 + src.pinned += O +//This is called when the mob is thrown into a dense turf +/mob/living/proc/turf_collision(var/turf/T, var/speed) + src.take_organ_damage(speed*5) /mob/living/proc/near_wall(var/direction,var/distance=1) var/turf/T = get_step(get_turf(src),direction) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 4fd99b4293..a0166e34cb 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -1,4 +1,3 @@ -#define SAY_MINIMUM_PRESSURE 10 var/list/department_radio_keys = list( ":r" = "right ear", "#r" = "right ear", ".r" = "right ear", ":l" = "left ear", "#l" = "left ear", ".l" = "left ear", @@ -84,35 +83,36 @@ var/list/department_radio_keys = list( /mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list(), var/sound/speech_sound, var/sound_vol) var/turf/T = get_turf(src) - + //handle nonverbal and sign languages here if (speaking) if (speaking.flags & NONVERBAL) if (prob(30)) src.custom_emote(1, "[pick(speaking.signlang_verb)].") - + if (speaking.flags & SIGNLANG) say_signlang(message, pick(speaking.signlang_verb), speaking) return - + //speaking into radios if(used_radios.len) italics = 1 message_range = 1 - - for(var/mob/living/M in hearers(5, src)) - if(M != src) - M.show_message("[src] talks into [used_radios.len ? used_radios[1] : "the radio."]") - if (speech_sound) - src.playsound_local(get_turf(src), speech_sound, sound_vol * 0.5, 1) - + + if (!istype(src, /mob/living/silicon/ai)) // Atlantis: Prevents nearby people from hearing the AI when it talks using it's integrated radio. + for(var/mob/living/M in hearers(5, src)) + if(M != src) + M.show_message("[src] talks into [used_radios.len ? used_radios[1] : "the radio."]") + if (speech_sound) + src.playsound_local(get_turf(src), speech_sound, sound_vol * 0.5, 1) + speech_sound = null //so we don't play it twice. //make sure the air can transmit speech var/datum/gas_mixture/environment = T.return_air() if(environment) var/pressure = environment.return_pressure() - if(pressure < SAY_MINIMUM_PRESSURE) + if(pressure < SOUND_MINIMUM_PRESSURE) italics = 1 message_range = 1 @@ -133,10 +133,17 @@ var/list/department_radio_keys = list( hearturfs += M.locs[1] for(var/obj/O in M.contents) listening_obj |= O + if (isslime(I)) + var/mob/living/carbon/slime/S = I + if (src in S.Friends) + S.speech_buffer = list() + S.speech_buffer.Add(src) + S.speech_buffer.Add(lowertext(html_decode(message))) else if(istype(I, /obj/)) var/obj/O = I hearturfs += O.locs[1] listening_obj |= O + for(var/mob/M in player_list) if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b34f7aa641..44da5d74af 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -30,6 +30,7 @@ var/list/ai_list = list() var/icon/holo_icon//Default is assigned when AI is created. var/obj/item/device/pda/ai/aiPDA = null var/obj/item/device/multitool/aiMulti = null + var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null var/custom_sprite = 0 //For our custom sprites //Hud stuff @@ -87,12 +88,14 @@ var/list/ai_list = list() aiPDA.name = name + " (" + aiPDA.ownjob + ")" aiMulti = new(src) + aiRadio = new(src) + aiRadio.myAi = src if (istype(loc, /turf)) verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \ /mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \ /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \ - /mob/living/silicon/ai/proc/toggle_camera_light) + /mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/control_integrateed_radio) //Languages add_language("Sol Common", 0) @@ -738,3 +741,12 @@ var/list/ai_list = list() return else return ..() + +/mob/living/silicon/ai/proc/control_integrateed_radio() + set name = "Radio Settings" + set desc = "Allows you to change settings of your radio." + set category = "AI Commands" + + src << "Accessing Subspace Transceiver control..." + if (src.aiRadio) + src.aiRadio.interact(src) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm index 32e0c8d346..a95a754eae 100644 --- a/code/modules/mob/living/silicon/login.dm +++ b/code/modules/mob/living/silicon/login.dm @@ -1,4 +1,5 @@ /mob/living/silicon/Login() + sleeping = 0 if(mind && ticker && ticker.mode) ticker.mode.remove_cultist(mind, 1) ticker.mode.remove_revolutionary(mind, 1) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 8d1823f0c5..273df70dd9 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -897,7 +897,7 @@ var/damage = rand(1, 3) - if(istype(src, /mob/living/carbon/slime/adult)) + if(M.is_adult) damage = rand(20, 40) else damage = rand(5, 35) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 00caecb8f0..bca9a928f6 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -58,6 +58,7 @@ /obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R) R.add_language("Tradeband", 1) R.add_language("Sol Common", 1) + R.add_language("Gutter", 0) /obj/item/weapon/robot_module/standard diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 0811a52cd8..67ca178e89 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -109,7 +109,11 @@ if("general") switch(bot_type) if(IS_AI) - src << "Yeah, not yet, sorry" + if (AI.aiRadio.disabledAi) + src << "\red System Error - Transceiver Disabled" + else + log_say("[key_name(src)] : [message]") + AI.aiRadio.talk_into(src,message,null,verb,speaking) if(IS_ROBOT) log_say("[key_name(src)] : [message]") R.radio.talk_into(src,message,null,verb,speaking) @@ -122,8 +126,11 @@ if(message_mode && message_mode in radiochannels) switch(bot_type) if(IS_AI) - src << "You don't have this function yet, I'm working on it" - return + if (AI.aiRadio.disabledAi) + src << "\red System Error - Transceiver Disabled" + else + log_say("[key_name(src)] : [message]") + AI.aiRadio.talk_into(src,message,message_mode,verb,speaking) if(IS_ROBOT) log_say("[key_name(src)] : [message]") R.radio.talk_into(src,message,message_mode,verb,speaking) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 906acdbfb2..d9b9693a86 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -341,7 +341,7 @@ var/damage = rand(1, 3) - if(istype(src, /mob/living/carbon/slime/adult)) + if(M.is_adult) damage = rand(20, 40) else damage = rand(5, 35) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 345274dd2d..4c39c683b8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -950,7 +950,7 @@ mob/proc/yank_out_object() if(S == U) self = 1 // Removing object from yourself. - valid_objects = get_visible_implants(1) + valid_objects = get_visible_implants(0) if(!valid_objects.len) if(self) src << "You have nothing stuck in your body that is large enough to remove." @@ -961,9 +961,9 @@ mob/proc/yank_out_object() var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects if(self) - src << "You attempt to get a good grip on the [selection] in your body." + src << "You attempt to get a good grip on [selection] in your body." else - U << "You attempt to get a good grip on the [selection] in [S]'s body." + U << "You attempt to get a good grip on [selection] in [S]'s body." if(!do_after(U, 80)) return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 314a4026ab..63bee83e9b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -35,11 +35,6 @@ return 1 return 0 -/proc/isslimeadult(A) - if(istype(A, /mob/living/carbon/slime/adult)) - return 1 - return 0 - /proc/isrobot(A) if(istype(A, /mob/living/silicon/robot)) return 1 @@ -147,7 +142,11 @@ proc/hasorgans(A) */ return zone - +// Returns zone with a certain probability. +// If the probability misses, returns "chest" instead. +// If "chest" was passed in as zone, then on a "miss" will return "head", "l_arm", or "r_arm" +// Do not use this if someone is intentionally trying to hit a specific body part. +// Use get_zone_with_miss_chance() for that. /proc/ran_zone(zone, probability) zone = check_zone(zone) if(!probability) probability = 90 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b4d3f02196..0f18e02cf3 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -134,6 +134,7 @@ return 1 if(href_list["late_join"]) + if(!ticker || ticker.current_state != GAME_STATE_PLAYING) usr << "\red The round is either not ready, or has already finished..." return @@ -143,6 +144,11 @@ src << alert("You are currently not whitelisted to play [client.prefs.species].") return 0 + var/datum/species/S = all_species[client.prefs.species] + if(!(S.flags & IS_WHITELISTED)) + src << alert("Your current species,[client.prefs.species], is not available for play on the station.") + return 0 + LateChoices() if(href_list["manifest"]) @@ -159,6 +165,11 @@ src << alert("You are currently not whitelisted to play [client.prefs.species].") return 0 + var/datum/species/S = all_species[client.prefs.species] + if(!(S.flags & IS_WHITELISTED)) + src << alert("Your current species,[client.prefs.species], is not available for play on the station.") + return 0 + AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint) return diff --git a/code/modules/mob/new_player/skill.dm b/code/modules/mob/new_player/skill.dm index 09de8abffe..3eb1c6a246 100644 --- a/code/modules/mob/new_player/skill.dm +++ b/code/modules/mob/new_player/skill.dm @@ -62,7 +62,7 @@ datum/skill/management datum/skill/knowledge/law ID = "law" name = "NanoTrasen Law" - desc = "Your knowledge of NanoTrasen law and procedures. This includes Space Law, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for captains." + desc = "Your knowledge of NanoTrasen law and procedures. This includes Corporate Regulations, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for captains." field = "Security" secondary = 1 @@ -232,4 +232,4 @@ mob/living/carbon/human/verb/show_skills() set category = "IC" set name = "Show Own Skills" - show_skill_window(src, src) \ No newline at end of file + show_skill_window(src, src) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index b063cb7bc1..18693966cf 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -245,11 +245,10 @@ babies += M new_slime = pick(babies) else + new_slime = new /mob/living/carbon/slime(loc) if(adult) - new_slime = new /mob/living/carbon/slime/adult(loc) + new_slime.is_adult = 1 else - new_slime = new /mob/living/carbon/slime(loc) - new_slime.a_intent = "hurt" new_slime.key = key new_slime << "You are now a slime. Skreee!" diff --git a/code/modules/nano/nanoexternal.dm b/code/modules/nano/nanoexternal.dm index 2331debd9b..50e2b706f8 100644 --- a/code/modules/nano/nanoexternal.dm +++ b/code/modules/nano/nanoexternal.dm @@ -32,11 +32,12 @@ * * @param user /mob The mob who is interacting with this ui * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui + * @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui + * @param force_open boolean Force the UI to (re)open, even if it's already open * * @return nothing */ -/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) return // Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index a10965a448..f3396ecd3f 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -39,19 +39,23 @@ * @param ui_key string A string key used for the ui * @param ui /datum/nanoui An existing instance of the ui (can be null) * @param data list The data to be passed to the ui, if it exists + * @param force_open boolean The ui is being forced to (re)open, so close ui if it exists (instead of updating) * * @return /nanoui Returns the found ui, for null if none exists */ -/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data) +/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0) if (isnull(ui)) // no ui has been passed, so we'll search for one { ui = get_open_ui(user, src_object, ui_key) - } + } if (!isnull(ui)) - // The UI is already open so push the data to it - ui.push_data(data) - return ui - + // The UI is already open + if (!force_open) + ui.push_data(data) + return ui + else + //testing("nanomanager/try_update_ui mob [user.name] [src_object:name] [ui_key] [force_open] - forcing opening of ui") + ui.close() return null /** @@ -66,14 +70,17 @@ /datum/nanomanager/proc/get_open_ui(var/mob/user, src_object, ui_key) var/src_object_key = "\ref[src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) + //testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - there are no uis open") return null - else if (isnull(open_uis[src_object_key][ui_key]) || !istype(open_uis[src_object_key][ui_key], /list)) + else if (isnull(open_uis[src_object_key][ui_key]) || !istype(open_uis[src_object_key][ui_key], /list)) + //testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - there are no uis open for this object") return null for (var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) if (ui.user == user) return ui - + + //testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - ui not found") return null /** @@ -83,7 +90,7 @@ * * @return int The number of uis updated */ -/datum/nanomanager/proc/update_uis(src_object) +/datum/nanomanager/proc/update_uis(src_object) var/src_object_key = "\ref[src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 @@ -128,7 +135,8 @@ */ /datum/nanomanager/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null) if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) - return 0 // has no open uis + //testing("nanomanager/close_user_uis mob [user.name] has no open uis") + return 0 // has no open uis var/close_count = 0 for (var/datum/nanoui/ui in user.open_uis) @@ -136,6 +144,8 @@ ui.close() close_count++ + //testing("nanomanager/close_user_uis mob [user.name] closed [open_uis.len] of [close_count] uis") + return close_count /** @@ -157,6 +167,7 @@ var/list/uis = open_uis[src_object_key][ui.ui_key] uis.Add(ui) processing_uis.Add(ui) + //testing("nanomanager/ui_opened mob [ui.user.name] [ui.src_object:name] [ui.ui_key] - user.open_uis [ui.user.open_uis.len] | uis [uis.len] | processing_uis [processing_uis.len]") /** * Remove a /nanoui ui from the list of open uis @@ -176,7 +187,11 @@ processing_uis.Remove(ui) ui.user.open_uis.Remove(ui) var/list/uis = open_uis[src_object_key][ui.ui_key] - return uis.Remove(ui) + uis.Remove(ui) + + //testing("nanomanager/ui_closed mob [ui.user.name] [ui.src_object:name] [ui.ui_key] - user.open_uis [ui.user.open_uis.len] | uis [uis.len] | processing_uis [processing_uis.len]") + + return 1 /** * This is called on user logout @@ -189,6 +204,7 @@ // /datum/nanomanager/proc/user_logout(var/mob/user) + //testing("nanomanager/user_logout user [user.name]") return close_user_uis(user) /** @@ -201,7 +217,9 @@ * @return nothing */ /datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) + //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) + //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") return 0 // has no open uis if (isnull(newMob.open_uis) || !istype(newMob.open_uis, /list)) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 1a3257ed24..f788d0eeea 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -41,6 +41,8 @@ nanoui is used to open and update nano browser uis // the body content for this ui, do not change unless you know what you're doing // the #mainTemplate div will contain the compiled "main" template html var/content = "
" + // the title of this ui + var/state_key = "default" // initial data, containing the full data structure, must be sent to the ui (the data structure cannot be extended later on) var/list/initial_data[0] // set to 1 to update the ui automatically every master_controller tick @@ -86,14 +88,18 @@ nanoui is used to open and update nano browser uis add_common_assets() /** - * Use this proc to add assets which are common to all nano uis + * Use this proc to add assets which are common to (and required by) all nano uis * * @return nothing */ /datum/nanoui/proc/add_common_assets() - add_script("libraries.min.js") // The jQuery library - add_script("nano_config.js") // The NanoConfig JS, this is used to store configuration values. - add_script("nano_update.js") // The NanoUpdate JS, this is used to receive updates and apply them. + add_script("libraries.min.js") // A JS file comprising of jQuery, doT.js and jQuery Timer libraries (compressed together) + add_script("nano_utility.js") // The NanoUtility JS, this is used to store utility functions. + add_script("nano_template.js") // The NanoTemplate JS, this is used to render templates. + add_script("nano_state_manager.js") // The NanoStateManager JS, it handles updates from the server and passes data to the current state + add_script("nano_state.js") // The NanoState JS, this is the base state which all states must inherit from + add_script("nano_state_default.js") // The NanoStateDefault JS, this is the "default" state (used by all UIs by default), which inherits from NanoState + add_script("nano_base_callbacks.js") // The NanoBaseCallbacks JS, this is used to set up (before and after update) callbacks which are common to all templates add_script("nano_base_helpers.js") // The NanoBaseHelpers JS, this is used to set up template helpers which are common to all templates add_stylesheet("shared.css") // this CSS sheet is common to all UIs add_stylesheet("icons.css") // this CSS sheet is common to all UIs @@ -107,12 +113,15 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/set_status(state, push_update) - if (state != status) - status = state - if (push_update || !status) - push_data(list(), 1) // Update the UI, force the update in case the status is 0 - else - status = state + if (state != status) // Only update if it is different + if (status == STATUS_DISABLED) + status = state + if (push_update) + update() + else + status = state + if (push_update || status == 0) + push_data(null, 1) // Update the UI, force the update in case the status is 0, data is null so that previous data is used /** * Update the status (visibility) of this ui based on the user's status @@ -121,7 +130,7 @@ nanoui is used to open and update nano browser uis * * @return nothing */ -/datum/nanoui/proc/update_status(push_update = 0) +/datum/nanoui/proc/update_status(var/push_update = 0) if (istype(user, /mob/living/silicon/ai)) set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else if (istype(user, /mob/living/silicon/robot)) @@ -169,21 +178,39 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/set_initial_data(list/data) - initial_data = add_default_data(data) + initial_data = data /** - * Add default data to the data being sent to the ui. + * Get config data to sent to the ui. * - * @param data /list The list of data to be modified - * - * @return /list modified data + * @return /list config data */ -/datum/nanoui/proc/add_default_data(list/data) - data["ui"] = list( +/datum/nanoui/proc/get_config_data() + var/list/config_data = list( + "title" = title, + "srcObject" = list("name" = src_object.name), + "stateKey" = state_key, "status" = status, "user" = list("name" = user.name) ) - return data + return config_data + + /** + * Get data to sent to the ui. + * + * @param data /list The list of general data for this ui (can be null to use previous data sent) + * + * @return /list data to send to the ui + */ +/datum/nanoui/proc/get_send_data(var/list/data) + var/list/config_data = get_config_data() + + var/list/send_data = list("config" = config_data) + + if (!isnull(data)) + send_data["data"] = data + + return send_data /** * Set the browser window options for this ui @@ -239,7 +266,17 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/set_content(ncontent) - content = ncontent + content = ncontent + + /** + * Set the state key for use in the frontend Javascript + * + * @param nstate_key string The new HTML content for this UI + * + * @return nothing + */ +/datum/nanoui/proc/set_state_key(nstate_key) + state_key = nstate_key /** * Set whether or not to use the "old" on close logic (mainly unset_machine()) @@ -273,9 +310,8 @@ nanoui is used to open and update nano browser uis if (templatel_data.len > 0) template_data_json = list2json(templatel_data) - var/initial_data_json = "{}" // An empty JSON object - if (initial_data.len > 0) - initial_data_json = list2json(initial_data) + var/list/send_data = get_send_data(initial_data) + var/initial_data_json = list2json(send_data) var/url_parameters_json = list2json(list("src" = "\ref[src]")) @@ -286,11 +322,11 @@ nanoui is used to open and update nano browser uis @@ -300,7 +336,14 @@ nanoui is used to open and update nano browser uis
[title ? "
[title]
" : ""]
-
Initiating...
+
Initiating...
+ "} /** @@ -377,9 +420,10 @@ nanoui is used to open and update nano browser uis if (status == STATUS_DISABLED && !force_push) return // Cannot update UI, no visibility - data = add_default_data(data) + var/list/send_data = get_send_data(data) + //user << list2json(data) // used for debugging - user << output(list2params(list(list2json(data))),"[window_id].browser:receiveUpdateData") + user << output(list2params(list(list2json(send_data))),"[window_id].browser:receiveUpdateData") /** * This Topic() proc is called whenever a user clicks on a link within a Nano UI @@ -410,7 +454,15 @@ nanoui is used to open and update nano browser uis return if (status && (update || is_auto_updating)) - src_object.ui_interact(user, ui_key, src) // Update the UI (update_status() is called whenever a UI is updated) + update() // Update the UI (update_status() is called whenever a UI is updated) else update_status(1) // Not updating UI, so lets check here if status has changed + + /** + * Update the UI + * + * @return nothing + */ +/datum/nanoui/proc/update(var/force_open = 0) + src_object.ui_interact(user, ui_key, src, force_open) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index e9f1563c15..1459098db7 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -63,7 +63,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 // Damaged heart virtually reduces the blood volume, as the blood isn't // being pumped properly anymore. - var/datum/organ/internal/heart/heart = internal_organs["heart"] + var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"] if(heart.damage > 1 && heart.damage < heart.min_bruised_damage) blood_volume *= 0.8 diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index f75f9e055d..a483a43d0f 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -21,7 +21,7 @@ /datum/organ/proc/handle_antibiotics() var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - if (antibiotics < 5) + if (!germ_level || antibiotics < 5) return if (germ_level < INFECTION_LEVEL_ONE) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index cd6ac2b7dd..1628361435 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -32,6 +32,7 @@ var/damage_msg = "\red You feel an intense pain" var/broken_description + var/vital //Lose a vital limb, die immediately. var/status = 0 var/open = 0 var/stage = 0 @@ -90,13 +91,6 @@ brute *= brmod //~2/3 damage for ROBOLIMBS burn *= bumod //~2/3 damage for ROBOLIMBS - //If limb took enough damage, try to cut or tear it off - if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. - if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) - if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) - droplimb(1) - return - // High brute damage or sharp objects may damage internal organs if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5)) // Damage an internal organ @@ -161,6 +155,14 @@ // sync the organ's damage with its wounds src.update_damages() + + //If limb took enough damage, try to cut or tear it off + if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. + if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) + if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) + droplimb(1) + return + owner.updatehealth() var/result = update_icon() @@ -363,7 +365,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs //** Syncing germ levels with external wounds handle_germ_sync() - + //** Handle antibiotics and curing infections handle_antibiotics() @@ -386,10 +388,10 @@ Note that amputating the affected organ does in fact remove the infection from t /datum/organ/external/proc/handle_germ_effects() var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - + if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE && prob(60)) //this could be an else clause, but it looks cleaner this way germ_level-- //since germ_level increases at a rate of 1 per second with dirty wounds, prob(60) should give us about 5 minutes before level one. - + if(germ_level >= INFECTION_LEVEL_ONE) //having an infection raises your body temperature var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature @@ -400,7 +402,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(prob(round(germ_level/10))) if (antibiotics < 5) germ_level++ - + if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections owner.adjustToxLoss(1) @@ -411,7 +413,7 @@ Note that amputating the affected organ does in fact remove the infection from t if (I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one if (!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level target_organ = I - + if (!target_organ) //figure out which organs we can spread germs to and pick one at random var/list/candidate_organs = list() @@ -420,7 +422,7 @@ Note that amputating the affected organ does in fact remove the infection from t candidate_organs += I if (candidate_organs.len) target_organ = pick(candidate_organs) - + if (target_organ) target_organ.germ_level++ @@ -666,6 +668,9 @@ Note that amputating the affected organ does in fact remove the infection from t // OK so maybe your limb just flew off, but if it was attached to a pair of cuffs then hooray! Freedom! release_restraints() + if(vital) + owner.death() + /**************************************************** HELPERS ****************************************************/ @@ -800,8 +805,8 @@ Note that amputating the affected organ does in fact remove the infection from t owner.u_equip(c_hand) owner.emote("me", 1, "drops what they were holding, their [hand_name] malfunctioning!") var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src) - spark_system.attach(src) + spark_system.set_up(5, 0, owner) + spark_system.attach(owner) spark_system.start() spawn(10) del(spark_system) @@ -829,7 +834,7 @@ Note that amputating the affected organ does in fact remove the infection from t max_damage = 75 min_broken_damage = 40 body_part = UPPER_TORSO - + vital = 1 /datum/organ/external/groin name = "groin" @@ -838,6 +843,7 @@ Note that amputating the affected organ does in fact remove the infection from t max_damage = 50 min_broken_damage = 30 body_part = LOWER_TORSO + vital = 1 /datum/organ/external/l_arm name = "l_arm" @@ -931,6 +937,7 @@ Note that amputating the affected organ does in fact remove the infection from t min_broken_damage = 40 body_part = HEAD var/disfigured = 0 + vital = 1 /datum/organ/external/head/get_icon() if (!owner) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 3721633dce..4ad6e328af 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -27,14 +27,12 @@ var/datum/organ/external/E = H.organs_by_name[src.parent_organ] if(E.internal_organs == null) E.internal_organs = list() - E.internal_organs += src - H.internal_organs[src.name] = src + E.internal_organs |= src + H.internal_organs |= src src.owner = H /datum/organ/internal/process() //Process infections - if (!germ_level) - return if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag germ_level = 0 @@ -47,7 +45,7 @@ //** Handle the effects of infections var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - if (germ_level < INFECTION_LEVEL_ONE/2 && prob(30)) + if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30)) germ_level-- if (germ_level >= INFECTION_LEVEL_ONE/2) diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index 250e9b984d..49cc2073df 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -102,8 +102,7 @@ mob/living/carbon/human/proc/handle_pain() pain(damaged_organ.display_name, maxdam, 0) // Damage to internal organs hurts a lot. - for(var/organ_name in internal_organs) - var/datum/organ/internal/I = internal_organs[organ_name] + for(var/datum/organ/internal/I in internal_organs) if(I.damage > 2) if(prob(2)) var/datum/organ/external/parent = get_organ(I.parent_organ) src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 42ab0a1812..b76b152284 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -673,7 +673,7 @@ return // do APC interaction - user.set_machine(src) + //user.set_machine(src) src.interact(user) /obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user) @@ -741,7 +741,7 @@ else return 0 // 0 = User is not a Malf AI -/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(!user) return @@ -752,7 +752,7 @@ "powerCellStatus" = cell ? cell.percent() : null, "chargeMode" = chargemode, "chargingStatus" = charging, - "totalLoad" = lastused_equip + lastused_light + lastused_environ, + "totalLoad" = round(lastused_equip + lastused_light + lastused_environ), "coverLocked" = coverlocked, "siliconUser" = istype(user, /mob/living/silicon), "malfStatus" = get_malf_status(user), @@ -760,7 +760,7 @@ "powerChannels" = list( list( "title" = "Equipment", - "powerLoad" = lastused_equip, + "powerLoad" = round(lastused_equip), "status" = equipment, "topicParams" = list( "auto" = list("eqp" = 3), @@ -770,7 +770,7 @@ ), list( "title" = "Lighting", - "powerLoad" = lastused_light, + "powerLoad" = round(lastused_light), "status" = lighting, "topicParams" = list( "auto" = list("lgt" = 3), @@ -780,7 +780,7 @@ ), list( "title" = "Environment", - "powerLoad" = lastused_environ, + "powerLoad" = round(lastused_environ), "status" = environ, "topicParams" = list( "auto" = list("env" = 3), @@ -792,7 +792,7 @@ ) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -961,14 +961,14 @@ /obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1) if(!(isrobot(usr) && (href_list["apcwires"] || href_list["pulse"]))) if(!can_use(usr, 1)) - return + return 0 src.add_fingerprint(usr) if (href_list["apcwires"]) var/t1 = text2num(href_list["apcwires"]) if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) )) usr << "You need wirecutters!" - return + return 0 if (src.isWireColorCut(t1)) src.mend(t1) else @@ -977,10 +977,10 @@ var/t1 = text2num(href_list["pulse"]) if (!istype(usr.get_active_hand(), /obj/item/device/multitool)) usr << "You need a multitool!" - return + return 0 if (src.isWireColorCut(t1)) usr << "You can't pulse a cut wire." - return + return 0 else src.pulse(t1) else if (href_list["lock"]) @@ -1027,11 +1027,11 @@ else if( href_list["close"] ) nanomanager.close_user_uis(usr, src) - return + return 0 else if (href_list["close2"]) usr << browse(null, "window=apcwires") - return + return 0 else if (href_list["overload"]) if( istype(usr, /mob/living/silicon) && !src.aidisabled ) @@ -1042,7 +1042,7 @@ if( istype(malfai, /mob/living/silicon/ai) && !src.aidisabled ) if (malfai.malfhacking) malfai << "You are already hacking an APC." - return + return 0 malfai << "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process." malfai.malfhack = src malfai.malfhacking = 1 @@ -1071,7 +1071,7 @@ if(usingUI) src.updateDialog() - return + return 1 /*/obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf) if(!istype(malf)) @@ -1288,6 +1288,7 @@ chargecount++ else chargecount = 0 + charging = 0 if(chargecount == 10) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 9baafac676..92e7f8240a 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -250,7 +250,7 @@ building_terminal = 0 -/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & BROKEN) return @@ -269,7 +269,7 @@ data["outputLoad"] = round(loaddemand) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/projectiles/guns/alien.dm b/code/modules/projectiles/guns/alien.dm index f192873090..9ac058bc88 100644 --- a/code/modules/projectiles/guns/alien.dm +++ b/code/modules/projectiles/guns/alien.dm @@ -110,7 +110,7 @@ user.visible_message("\red [user] fires [src]!", "\red You fire [src]!") spike.loc = get_turf(src) - spike.throw_at(target,10,fire_force) + spike.throw_at(target,10,fire_force,user) spike = null update_icon() diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm index 912b5f2f1e..7788d35627 100644 --- a/code/modules/projectiles/guns/projectile/bow.dm +++ b/code/modules/projectiles/guns/projectile/bow.dm @@ -191,7 +191,7 @@ var/obj/item/weapon/arrow/A = arrow A.loc = get_turf(user) - A.throw_at(target,10,tension*release_speed) + A.throw_at(target,10,tension*release_speed,user) arrow = null tension = 0 icon_state = "crossbow" diff --git a/code/modules/projectiles/guns/projectile/pneumatic.dm b/code/modules/projectiles/guns/projectile/pneumatic.dm index 43c1fed24a..7f1de5e43c 100644 --- a/code/modules/projectiles/guns/projectile/pneumatic.dm +++ b/code/modules/projectiles/guns/projectile/pneumatic.dm @@ -131,7 +131,7 @@ user.visible_message("[user] fires [src] and launches [object] at [target]!","You fire [src] and launch [object] at [target]!") src.remove_from_storage(object,user.loc) - object.throw_at(target,10,speed) + object.throw_at(target,10,speed,user) var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100) var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount) diff --git a/code/modules/projectiles/guns/projectile/rocket.dm b/code/modules/projectiles/guns/projectile/rocket.dm index a1575b937c..0cf732c9c2 100644 --- a/code/modules/projectiles/guns/projectile/rocket.dm +++ b/code/modules/projectiles/guns/projectile/rocket.dm @@ -43,7 +43,7 @@ var/obj/item/missile/M = new projectile(user.loc) playsound(user.loc, 'sound/effects/bang.ogg', 50, 1) M.primed = 1 - M.throw_at(target, missile_range, missile_speed) + M.throw_at(target, missile_range, missile_speed,user) message_admins("[key_name_admin(user)] fired a rocket from a rocket launcher ([src.name]).") log_game("[key_name_admin(user)] used a rocket launcher ([src.name]).") rockets -= I diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index cc38efa29e..446d762727 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -15,8 +15,7 @@ /obj/item/projectile/bullet/weakbullet // "rubber" bullets damage = 10 - stun = 5 - weaken = 5 + agony = 40 embed = 0 sharp = 0 @@ -28,8 +27,6 @@ /obj/item/projectile/bullet/midbullet damage = 20 - stun = 5 - weaken = 5 /obj/item/projectile/bullet/midbullet2 damage = 25 @@ -56,8 +53,7 @@ /obj/item/projectile/bullet/stunshot name = "stunshot" damage = 5 - stun = 10 - weaken = 10 + agony = 80 stutter = 10 embed = 0 sharp = 0 @@ -67,4 +63,4 @@ /obj/item/projectile/bullet/chameleon damage = 1 // stop trying to murderbone with a fake gun dumbass!!! - embed = 0 // nope \ No newline at end of file + embed = 0 // nope diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index aee7b1f6d8..fc88f6b519 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -49,8 +49,7 @@ Robot.mmi = new /obj/item/device/mmi(new_mob) Robot.mmi.transfer_identity(M) //Does not transfer key/client. if("slime") - if(prob(50)) new_mob = new /mob/living/carbon/slime/adult(M.loc) - else new_mob = new /mob/living/carbon/slime(M.loc) + new_mob = new /mob/living/carbon/slime(M.loc) new_mob.universal_speak = 1 if("xeno") var/alien_caste = pick("Hunter","Sentinel","Drone","Larva") diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 37703e0912..17ff42ed65 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -104,7 +104,7 @@ * * @return nothing */ -/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null) +/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1) if(broken_requirements.len) user << "[src] is broken. [broken_requirements[broken_requirements[1]]]" return @@ -114,8 +114,8 @@ // this is the data which will be sent to the ui var/data[0] data["amount"] = amount - data["energy"] = energy - data["maxEnergy"] = max_energy + data["energy"] = round(energy) + data["maxEnergy"] = round(max_energy) data["isBeakerLoaded"] = beaker ? 1 : 0 data["glass"] = accept_glass var beakerContents[0] @@ -141,7 +141,7 @@ data["chemicals"] = chemicals // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 2bb33f891a..4d27805381 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -234,7 +234,7 @@ datum T.wet_overlay = null for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,20)) + M.apply_water() var/hotspot = (locate(/obj/fire) in T) if(hotspot && !istype(T, /turf/space)) @@ -1312,7 +1312,7 @@ datum M.eye_blind = max(M.eye_blind-5 , 0) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/internal/eyes/E = H.internal_organs["eyes"] + var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] if(istype(E)) if(E.damage > 0) E.damage -= 1 @@ -1332,8 +1332,9 @@ datum if(!M) M = holder.my_atom if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/external/chest/C = H.get_organ("chest") - for(var/datum/organ/internal/I in C.internal_organs) + + //Peridaxon is hard enough to get, it's probably fair to make this all internal organs + for(var/datum/organ/internal/I in H.internal_organs) if(I.damage > 0) I.damage -= 0.20 ..() @@ -3036,7 +3037,7 @@ datum M:drowsyness = max(M:drowsyness, 30) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/internal/liver/L = H.internal_organs["liver"] + var/datum/organ/internal/liver/L = H.internal_organs_by_name["liver"] if (istype(L)) L.take_damage(0.1, 1) H.adjustToxLoss(0.1) @@ -3273,13 +3274,13 @@ datum if(prob(30)) M.adjustToxLoss(2) if(prob(5)) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/internal/heart/L = H.internal_organs["heart"] + var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"] if (istype(L)) L.take_damage(5, 0) if (300 to INFINITY) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/datum/organ/internal/heart/L = H.internal_organs["heart"] + var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"] if (istype(L)) L.take_damage(100, 0) holder.remove_reagent(src.id, FOOD_METABOLISM) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index fbc3488d91..2fab5c9400 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1230,7 +1230,7 @@ datum O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1) var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime F.loc = get_turf(holder.my_atom) - + //Purple slimepsteroid @@ -1292,7 +1292,6 @@ datum required_other = 1 on_reaction(var/datum/reagents/holder) for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null)) - slime.tame = 0 slime.rabid = 1 for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("\red The [slime] is driven into a frenzy!."), 1) diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm index 5545883c2f..b69f428410 100644 --- a/code/modules/reagents/grenade_launcher.dm +++ b/code/modules/reagents/grenade_launcher.dm @@ -56,7 +56,7 @@ var/obj/item/weapon/grenade/chem_grenade/F = grenades[1] //Now with less copypasta! grenades -= F F.loc = user.loc - F.throw_at(target, 30, 2) + F.throw_at(target, 30, 2, user) message_admins("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).") log_game("[key_name_admin(user)] used a grenade ([src.name]).") F.active = 1 diff --git a/code/modules/reagents/reagent_containers/food.dm b/code/modules/reagents/reagent_containers/food.dm index 07f98a014e..99261d81d9 100644 --- a/code/modules/reagents/reagent_containers/food.dm +++ b/code/modules/reagents/reagent_containers/food.dm @@ -6,7 +6,29 @@ volume = 50 //Sets the default container amount for all food items. var/filling_color = "#FFFFFF" //Used by sandwiches. + var/list/center_of_mass = newlist() //Center of mass + /obj/item/weapon/reagent_containers/food/New() - ..() - src.pixel_x = rand(-10.0, 10) //Randomizes postion - src.pixel_y = rand(-10.0, 10) \ No newline at end of file + ..() + if (!pixel_x && !pixel_y) + src.pixel_x = rand(-6.0, 6) //Randomizes postion + src.pixel_y = rand(-6.0, 6) + +/obj/item/weapon/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params) + if(proximity && params && istype(A, /obj/structure/table) && center_of_mass.len) + //Places the item on a grid + var/list/mouse_control = params2list(params) + var/cellnumber = 4 + + var/mouse_x = text2num(mouse_control["icon-x"]) + var/mouse_y = text2num(mouse_control["icon-y"]) + + var/grid_x = round(mouse_x, 32/cellnumber) + var/grid_y = round(mouse_y, 32/cellnumber) + + if(mouse_control["icon-x"]) + var/sign = mouse_x - grid_x != 0 ? sign(mouse_x - grid_x) : -1 //positive if rounded down, else negative + pixel_x = grid_x - center_of_mass["x"] + sign*16/cellnumber //center of the cell + if(mouse_control["icon-y"]) + var/sign = mouse_y - grid_y != 0 ? sign(mouse_y - grid_y) : -1 + pixel_y = grid_y - center_of_mass["y"] + sign*16/cellnumber \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 2cc1c1ffda..b83b7623f5 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -32,7 +32,7 @@ return 1 else if( istype(M, /mob/living/carbon/human) ) if (canopened == 0) - user << " You need to open the drink!" + user << "You need to open the drink!" return else if (canopened == 1) @@ -66,6 +66,9 @@ if(!proximity) return if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. + if (canopened == 0) + user << "You need to open the drink!" + return if(!target.reagents.total_volume) user << "\red [target] is empty." @@ -77,10 +80,19 @@ var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) user << "\blue You fill [src] with [trans] units of the contents of [target]." - if (canopened == 0) - user << "You need to open the drink!" + else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. + if (canopened == 0) + user << "You need to open the drink!" + return + + if (istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans)) + var/obj/item/weapon/reagent_containers/food/drinks/cans/cantarget = target + if(cantarget.canopened == 0) + user << "You need to open the drink you want to pour into!" + return + if(!reagents.total_volume) user << "\red [src] is empty." return @@ -135,129 +147,118 @@ name = "Space Cola" desc = "Cola. in space." icon_state = "cola" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("cola", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle name = "Bottled Water" desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles." icon_state = "waterbottle" + center_of_mass = list("x"=15, "y"=8) New() ..() reagents.add_reagent("water", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/beer name = "Space Beer" desc = "Contains only water, malt and hops." icon_state = "beer" + center_of_mass = list("x"=16, "y"=12) New() ..() reagents.add_reagent("beer", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/ale name = "Magm-Ale" desc = "A true dorf's drink of choice." icon_state = "alebottle" item_state = "beer" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("ale", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind name = "Space Mountain Wind" desc = "Blows right through you like a space wind." icon_state = "space_mountain_wind" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("spacemountainwind", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko name = "Thirteen Loko" desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly." icon_state = "thirteen_loko" + center_of_mass = list("x"=16, "y"=8) New() ..() reagents.add_reagent("thirteenloko", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb name = "Dr. Gibb" desc = "A delicious mixture of 42 different flavors." icon_state = "dr_gibb" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("dr_gibb", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/starkist name = "Star-kist" desc = "The taste of a star in liquid form. And, a bit of tuna...?" icon_state = "starkist" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("cola", 15) reagents.add_reagent("orangejuice", 15) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/space_up name = "Space-Up" desc = "Tastes like a hull breach in your mouth." icon_state = "space-up" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("space_up", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime name = "Lemon-Lime" desc = "You wanted ORANGE. It gave you Lemon Lime." icon_state = "lemon-lime" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("lemon_lime", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea name = "Vrisk Serket Iced Tea" desc = "That sweet, refreshing southern earthy flavor. That's where it's from, right? South Earth?" icon_state = "ice_tea_can" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("icetea", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice name = "Grapel Juice" desc = "500 pages of rules of how to appropriately enter into a combat with this juice!" icon_state = "purple_can" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("grapejuice", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/cans/tonic name = "T-Borg's Tonic Water" desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." icon_state = "tonic" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("tonic", 50) @@ -266,6 +267,7 @@ name = "Soda Water" desc = "A can of soda water. Still water's more refreshing cousin." icon_state = "sodawater" + center_of_mass = list("x"=16, "y"=10) New() ..() reagents.add_reagent("sodawater", 50) diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index 740d50754b..dccb59a3e7 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -12,6 +12,7 @@ icon_state = "emptycondiment" flags = FPRINT | TABLEPASS | OPENCONTAINER possible_transfer_amounts = list(1,5,10) + center_of_mass = list("x"=16, "y"=6) volume = 50 attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -90,37 +91,46 @@ name = "Ketchup" desc = "You feel more American already." icon_state = "ketchup" + center_of_mass = list("x"=16, "y"=6) if("capsaicin") name = "Hotsauce" desc = "You can almost TASTE the stomach ulcers now!" icon_state = "hotsauce" + center_of_mass = list("x"=16, "y"=6) if("enzyme") name = "Universal Enzyme" desc = "Used in cooking various dishes." icon_state = "enzyme" + center_of_mass = list("x"=16, "y"=6) if("soysauce") name = "Soy Sauce" desc = "A salty soy-based flavoring." icon_state = "soysauce" + center_of_mass = list("x"=16, "y"=6) if("frostoil") name = "Coldsauce" desc = "Leaves the tongue numb in its passage." icon_state = "coldsauce" + center_of_mass = list("x"=16, "y"=6) if("sodiumchloride") name = "Salt Shaker" desc = "Salt. From space oceans, presumably." icon_state = "saltshaker" + center_of_mass = list("x"=16, "y"=10) if("blackpepper") name = "Pepper Mill" desc = "Often used to flavor food or make people sneeze." icon_state = "peppermillsmall" + center_of_mass = list("x"=16, "y"=10) if("cornoil") name = "Corn Oil" desc = "A delicious oil used in cooking. Made from corn." icon_state = "oliveoil" + center_of_mass = list("x"=16, "y"=6) if("sugar") name = "Sugar" desc = "Tastey space sugar!" + center_of_mass = list("x"=16, "y"=6) else name = "Misc Condiment Bottle" if (reagents.reagent_list.len==1) @@ -128,10 +138,12 @@ else desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." icon_state = "mixedcondiments" + center_of_mass = list("x"=16, "y"=6) else icon_state = "emptycondiment" name = "Condiment Bottle" desc = "An empty condiment bottle." + center_of_mass = list("x"=16, "y"=6) return /obj/item/weapon/reagent_containers/food/condiment/enzyme diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 4117defbbd..a9aa234060 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -120,7 +120,7 @@ reagents.add_reagent(refill, trans) user << "Cyborg [src] refilled." - return + return ..() examine() set src in view() @@ -169,11 +169,10 @@ desc = "It's milk. White and nutritious goodness!" icon_state = "milk" item_state = "carton" + center_of_mass = list("x"=16, "y"=9) New() ..() reagents.add_reagent("milk", 50) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /* Flour is no longer a reagent /obj/item/weapon/reagent_containers/food/drinks/flour @@ -194,63 +193,57 @@ desc = "It's soy milk. White and nutritious goodness!" icon_state = "soymilk" item_state = "carton" + center_of_mass = list("x"=16, "y"=9) New() ..() reagents.add_reagent("soymilk", 50) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/coffee name = "Robust Coffee" desc = "Careful, the beverage you're about to enjoy is extremely hot." icon_state = "coffee" + center_of_mass = list("x"=15, "y"=10) New() ..() reagents.add_reagent("coffee", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/tea name = "Duke Purple Tea" desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea." icon_state = "teacup" item_state = "coffee" + center_of_mass = list("x"=16, "y"=14) New() ..() reagents.add_reagent("tea", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(0, 20) // the teacup is very low on the 32x32 grid so if it's -y then it clips into the tile below it. /obj/item/weapon/reagent_containers/food/drinks/ice name = "Ice Cup" desc = "Careful, cold ice, do not chew." icon_state = "coffee" + center_of_mass = list("x"=15, "y"=10) New() ..() reagents.add_reagent("ice", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/h_chocolate name = "Dutch Hot Coco" desc = "Made in Space South America." icon_state = "hot_coco" item_state = "coffee" + center_of_mass = list("x"=15, "y"=13) New() ..() reagents.add_reagent("hot_coco", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/dry_ramen name = "Cup Ramen" desc = "Just add 10ml water, self heats! A taste that reminds you of your school years." icon_state = "ramen" + center_of_mass = list("x"=16, "y"=11) New() ..() reagents.add_reagent("dry_ramen", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) /obj/item/weapon/reagent_containers/food/drinks/sillycup @@ -259,10 +252,9 @@ icon_state = "water_cup_e" possible_transfer_amounts = null volume = 10 + center_of_mass = list("x"=16, "y"=12) New() ..() - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) on_reagent_change() if(reagents.total_volume) icon_state = "water_cup" @@ -281,33 +273,39 @@ icon_state = "shaker" amount_per_transfer_from_this = 10 volume = 100 + center_of_mass = list("x"=17, "y"=10) /obj/item/weapon/reagent_containers/food/drinks/flask name = "Captain's Flask" desc = "A metal flask belonging to the captain" icon_state = "flask" volume = 60 + center_of_mass = list("x"=17, "y"=7) /obj/item/weapon/reagent_containers/food/drinks/flask/detflask name = "Detective's Flask" desc = "A metal flask with a leather band and golden badge belonging to the detective." icon_state = "detflask" volume = 60 + center_of_mass = list("x"=17, "y"=8) /obj/item/weapon/reagent_containers/food/drinks/flask/barflask name = "flask" desc = "For those who can't be bothered to hang out at the bar to drink." icon_state = "barflask" volume = 60 + center_of_mass = list("x"=17, "y"=7) /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask name = "vacuum flask" desc = "Keeping your drinks at the perfect temperature since 1892." icon_state = "vacuumflask" volume = 60 + center_of_mass = list("x"=15, "y"=4) /obj/item/weapon/reagent_containers/food/drinks/britcup name = "cup" desc = "A cup with the British flag emblazoned on it." icon_state = "britcup" volume = 30 + center_of_mass = list("x"=15, "y"=13) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 93c61ece1c..35b776af28 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -138,6 +138,7 @@ name = "Griffeater Gin" desc = "A bottle of high quality gin, produced in the New London Space Station." icon_state = "ginbottle" + center_of_mass = list("x"=16, "y"=4) New() ..() reagents.add_reagent("gin", 100) @@ -146,6 +147,7 @@ name = "Uncle Git's Special Reserve" desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES." icon_state = "whiskeybottle" + center_of_mass = list("x"=16, "y"=3) New() ..() reagents.add_reagent("whiskey", 100) @@ -154,6 +156,7 @@ name = "Tunguska Triple Distilled" desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide." icon_state = "vodkabottle" + center_of_mass = list("x"=17, "y"=3) New() ..() reagents.add_reagent("vodka", 100) @@ -162,6 +165,7 @@ name = "Caccavo Guaranteed Quality Tequilla" desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!" icon_state = "tequillabottle" + center_of_mass = list("x"=16, "y"=3) New() ..() reagents.add_reagent("tequilla", 100) @@ -170,6 +174,7 @@ name = "Bottle of Nothing" desc = "A bottle filled with nothing" icon_state = "bottleofnothing" + center_of_mass = list("x"=17, "y"=5) New() ..() reagents.add_reagent("nothing", 100) @@ -178,6 +183,7 @@ name = "Wrapp Artiste Patron" desc = "Silver laced tequilla, served in space night clubs across the galaxy." icon_state = "patronbottle" + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("patron", 100) @@ -186,6 +192,7 @@ name = "Captain Pete's Cuban Spiced Rum" desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle." icon_state = "rumbottle" + center_of_mass = list("x"=16, "y"=8) New() ..() reagents.add_reagent("rum", 100) @@ -194,6 +201,7 @@ name = "Flask of Holy Water" desc = "A flask of the chaplain's holy water." icon_state = "holyflask" + center_of_mass = list("x"=17, "y"=10) New() ..() reagents.add_reagent("holywater", 100) @@ -202,6 +210,7 @@ name = "Goldeneye Vermouth" desc = "Sweet, sweet dryness~" icon_state = "vermouthbottle" + center_of_mass = list("x"=17, "y"=3) New() ..() reagents.add_reagent("vermouth", 100) @@ -210,6 +219,7 @@ name = "Robert Robust's Coffee Liqueur" desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK" icon_state = "kahluabottle" + center_of_mass = list("x"=17, "y"=3) New() ..() reagents.add_reagent("kahlua", 100) @@ -218,6 +228,7 @@ name = "College Girl Goldschlager" desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps." icon_state = "goldschlagerbottle" + center_of_mass = list("x"=15, "y"=3) New() ..() reagents.add_reagent("goldschlager", 100) @@ -226,6 +237,7 @@ name = "Chateau De Baton Premium Cognac" desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time." icon_state = "cognacbottle" + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("cognac", 100) @@ -234,6 +246,7 @@ name = "Doublebeard Bearded Special Wine" desc = "A faint aura of unease and asspainery surrounds the bottle." icon_state = "winebottle" + center_of_mass = list("x"=16, "y"=4) New() ..() reagents.add_reagent("wine", 100) @@ -242,6 +255,7 @@ name = "Jailbreaker Verte" desc = "One sip of this and you just know you're gonna have a good time." icon_state = "absinthebottle" + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("absinthe", 100) @@ -250,6 +264,7 @@ name = "Emeraldine Melon Liquor" desc = "A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light." icon_state = "alco-green" //Placeholder. + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("melonliquor", 100) @@ -258,6 +273,7 @@ name = "Miss Blue Curacao" desc = "A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic." icon_state = "alco-blue" //Placeholder. + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("bluecuracao", 100) @@ -266,6 +282,7 @@ name = "Briar Rose Grenadine Syrup" desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." icon_state = "grenadinebottle" + center_of_mass = list("x"=16, "y"=6) New() ..() reagents.add_reagent("grenadine", 100) @@ -274,6 +291,7 @@ name = "Warlock's Velvet" desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!" icon_state = "pwinebottle" + center_of_mass = list("x"=16, "y"=4) New() ..() reagents.add_reagent("pwine", 100) @@ -285,6 +303,7 @@ desc = "Full of vitamins and deliciousness!" icon_state = "orangejuice" item_state = "carton" + center_of_mass = list("x"=16, "y"=7) isGlass = 0 New() ..() @@ -295,6 +314,7 @@ desc = "It's cream. Made from milk. What else did you think you'd find in there?" icon_state = "cream" item_state = "carton" + center_of_mass = list("x"=16, "y"=8) isGlass = 0 New() ..() @@ -305,6 +325,7 @@ desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness." icon_state = "tomatojuice" item_state = "carton" + center_of_mass = list("x"=16, "y"=8) isGlass = 0 New() ..() @@ -315,6 +336,7 @@ desc = "Sweet-sour goodness." icon_state = "limejuice" item_state = "carton" + center_of_mass = list("x"=16, "y"=8) isGlass = 0 New() ..() diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm index 171fcc9335..c2bb90ddb8 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm @@ -1,11 +1,12 @@ - - + + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass name = "glass" desc = "Your standard drinking glass." icon_state = "glass_empty" amount_per_transfer_from_this = 10 volume = 50 + center_of_mass = list("x"=16, "y"=10) on_reagent_change() /*if(reagents.reagent_list.len > 1 ) @@ -22,142 +23,177 @@ icon_state = "beerglass" name = "Beer glass" desc = "A freezing pint of beer" + center_of_mass = list("x"=16, "y"=8) if("beer2") icon_state = "beerglass" name = "Beer glass" desc = "A freezing pint of beer" + center_of_mass = list("x"=16, "y"=8) if("ale") icon_state = "aleglass" name = "Ale glass" desc = "A freezing pint of delicious Ale" + center_of_mass = list("x"=16, "y"=8) if("milk") icon_state = "glass_white" name = "Glass of milk" desc = "White and nutritious goodness!" + center_of_mass = list("x"=16, "y"=10) if("cream") icon_state = "glass_white" name = "Glass of cream" desc = "Ewwww..." + center_of_mass = list("x"=16, "y"=10) if("chocolate") icon_state = "chocolateglass" name = "Glass of chocolate" desc = "Tasty" + center_of_mass = list("x"=16, "y"=10) if("lemonjuice") icon_state = "lemonglass" name = "Glass of lemonjuice" desc = "Sour..." + center_of_mass = list("x"=16, "y"=10) if("cola") icon_state = "glass_brown" name = "Glass of Space Cola" desc = "A glass of refreshing Space Cola" + center_of_mass = list("x"=16, "y"=10) if("nuka_cola") icon_state = "nuka_colaglass" name = "Nuka Cola" desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" + center_of_mass = list("x"=16, "y"=6) if("orangejuice") icon_state = "glass_orange" name = "Glass of Orange juice" desc = "Vitamins! Yay!" + center_of_mass = list("x"=16, "y"=10) if("tomatojuice") icon_state = "glass_red" name = "Glass of Tomato juf" desc = "Are you sure this is tomato juice?" + center_of_mass = list("x"=16, "y"=10) if("blood") icon_state = "glass_red" name = "Glass of Tomato juice" desc = "Are you sure this is tomato juice?" + center_of_mass = list("x"=16, "y"=10) if("limejuice") icon_state = "glass_green" name = "Glass of Lime juice" desc = "A glass of sweet-sour lime juice." + center_of_mass = list("x"=16, "y"=10) if("whiskey") icon_state = "whiskeyglass" name = "Glass of whiskey" desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." + center_of_mass = list("x"=16, "y"=12) if("gin") icon_state = "ginvodkaglass" name = "Glass of gin" desc = "A crystal clear glass of Griffeater gin." + center_of_mass = list("x"=16, "y"=12) if("vodka") icon_state = "ginvodkaglass" name = "Glass of vodka" desc = "The glass contain wodka. Xynta." + center_of_mass = list("x"=16, "y"=12) if("sake") icon_state = "ginvodkaglass" name = "Glass of Sake" desc = "A glass of Sake." + center_of_mass = list("x"=16, "y"=12) if("goldschlager") icon_state = "ginvodkaglass" name = "Glass of goldschlager" desc = "100 proof that teen girls will drink anything with gold in it." + center_of_mass = list("x"=16, "y"=12) if("wine") icon_state = "wineglass" name = "Glass of wine" desc = "A very classy looking drink." + center_of_mass = list("x"=15, "y"=7) if("cognac") icon_state = "cognacglass" name = "Glass of cognac" desc = "Damn, you feel like some kind of French aristocrat just by holding this." + center_of_mass = list("x"=16, "y"=6) if ("kahlua") icon_state = "kahluaglass" name = "Glass of RR coffee Liquor" desc = "DAMN, THIS THING LOOKS ROBUST" + center_of_mass = list("x"=15, "y"=7) if("vermouth") icon_state = "vermouthglass" name = "Glass of Vermouth" desc = "You wonder why you're even drinking this straight." + center_of_mass = list("x"=16, "y"=12) if("tequilla") icon_state = "tequillaglass" name = "Glass of Tequilla" desc = "Now all that's missing is the weird colored shades!" + center_of_mass = list("x"=16, "y"=12) if("patron") icon_state = "patronglass" name = "Glass of Patron" desc = "Drinking patron in the bar, with all the subpar ladies." + center_of_mass = list("x"=7, "y"=8) if("rum") icon_state = "rumglass" name = "Glass of Rum" desc = "Now you want to Pray for a pirate suit, don't you?" + center_of_mass = list("x"=16, "y"=12) if("gintonic") icon_state = "gintonicglass" name = "Gin and Tonic" desc = "A mild but still great cocktail. Drink up, like a true Englishman." + center_of_mass = list("x"=16, "y"=7) if("whiskeycola") icon_state = "whiskeycolaglass" name = "Whiskey Cola" desc = "An innocent-looking mixture of cola and Whiskey. Delicious." + center_of_mass = list("x"=16, "y"=9) if("whiterussian") icon_state = "whiterussianglass" name = "White Russian" desc = "A very nice looking drink. But that's just, like, your opinion, man." + center_of_mass = list("x"=16, "y"=9) if("screwdrivercocktail") icon_state = "screwdriverglass" name = "Screwdriver" desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." + center_of_mass = list("x"=15, "y"=10) if("bloodymary") icon_state = "bloodymaryglass" name = "Bloody Mary" desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." + center_of_mass = list("x"=16, "y"=10) if("martini") icon_state = "martiniglass" name = "Classic Martini" desc = "Damn, the bartender even stirred it, not shook it." + center_of_mass = list("x"=17, "y"=8) if("vodkamartini") icon_state = "martiniglass" name = "Vodka martini" desc ="A bastardisation of the classic martini. Still great." + center_of_mass = list("x"=17, "y"=8) if("gargleblaster") icon_state = "gargleblasterglass" name = "Pan-Galactic Gargle Blaster" desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." + center_of_mass = list("x"=17, "y"=6) if("bravebull") icon_state = "bravebullglass" name = "Brave Bull" desc = "Tequilla and Coffee liquor, brought together in a mouthwatering mixture. Drink up." + center_of_mass = list("x"=15, "y"=8) if("tequillasunrise") icon_state = "tequillasunriseglass" name = "Tequilla Sunrise" desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." + center_of_mass = list("x"=16, "y"=10) if("phoronspecial") icon_state = "phoronspecialglass" name = "Toxins Special" @@ -166,330 +202,412 @@ icon_state = "beepskysmashglass" name = "Beepsky Smash" desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + center_of_mass = list("x"=18, "y"=10) if("doctorsdelight") icon_state = "doctorsdelightglass" name = "Doctor's Delight" desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." + center_of_mass = list("x"=16, "y"=8) if("manlydorf") icon_state = "manlydorfglass" name = "The Manly Dorf" desc = "A manly concotion made from Ale and Beer. Intended for true men only." + center_of_mass = list("x"=16, "y"=10) if("irishcream") icon_state = "irishcreamglass" name = "Irish Cream" desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" + center_of_mass = list("x"=16, "y"=9) if("cubalibre") icon_state = "cubalibreglass" name = "Cuba Libre" desc = "A classic mix of rum and cola." + center_of_mass = list("x"=16, "y"=8) if("b52") icon_state = "b52glass" name = "B-52" desc = "Kahlua, Irish Cream, and congac. You will get bombed." + center_of_mass = list("x"=16, "y"=10) if("atomicbomb") icon_state = "atomicbombglass" name = "Atomic Bomb" desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." + center_of_mass = list("x"=15, "y"=7) if("longislandicedtea") icon_state = "longislandicedteaglass" name = "Long Island Iced Tea" desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + center_of_mass = list("x"=16, "y"=8) if("threemileisland") icon_state = "threemileislandglass" name = "Three Mile Island Ice Tea" desc = "A glass of this is sure to prevent a meltdown." + center_of_mass = list("x"=16, "y"=2) if("margarita") icon_state = "margaritaglass" name = "Margarita" desc = "On the rocks with salt on the rim. Arriba~!" + center_of_mass = list("x"=16, "y"=8) if("blackrussian") icon_state = "blackrussianglass" name = "Black Russian" desc = "For the lactose-intolerant. Still as classy as a White Russian." + center_of_mass = list("x"=16, "y"=9) if("vodkatonic") icon_state = "vodkatonicglass" name = "Vodka and Tonic" desc = "For when a gin and tonic isn't russian enough." + center_of_mass = list("x"=16, "y"=7) if("manhattan") icon_state = "manhattanglass" name = "Manhattan" desc = "The Detective's undercover drink of choice. He never could stomach gin..." + center_of_mass = list("x"=17, "y"=8) if("manhattan_proj") icon_state = "proj_manhattanglass" name = "Manhattan Project" desc = "A scienitst drink of choice, for thinking how to blow up the station." + center_of_mass = list("x"=17, "y"=8) if("ginfizz") icon_state = "ginfizzglass" name = "Gin Fizz" desc = "Refreshingly lemony, deliciously dry." + center_of_mass = list("x"=16, "y"=7) if("irishcoffee") icon_state = "irishcoffeeglass" name = "Irish Coffee" desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." + center_of_mass = list("x"=15, "y"=10) if("hooch") icon_state = "glass_brown2" name = "Hooch" desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + center_of_mass = list("x"=16, "y"=10) if("whiskeysoda") icon_state = "whiskeysodaglass2" name = "Whiskey Soda" desc = "Ultimate refreshment." + center_of_mass = list("x"=16, "y"=9) if("tonic") icon_state = "glass_clear" name = "Glass of Tonic Water" desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." + center_of_mass = list("x"=16, "y"=10) if("sodawater") icon_state = "glass_clear" name = "Glass of Soda Water" desc = "Soda water. Why not make a scotch and soda?" + center_of_mass = list("x"=16, "y"=10) if("water") icon_state = "glass_clear" name = "Glass of Water" desc = "The father of all refreshments." + center_of_mass = list("x"=16, "y"=10) if("spacemountainwind") icon_state = "Space_mountain_wind_glass" name = "Glass of Space Mountain Wind" desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." + center_of_mass = list("x"=16, "y"=10) if("thirteenloko") icon_state = "thirteen_loko_glass" name = "Glass of Thirteen Loko" desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass" + center_of_mass = list("x"=16, "y"=10) if("dr_gibb") icon_state = "dr_gibb_glass" name = "Glass of Dr. Gibb" desc = "Dr. Gibb. Not as dangerous as the name might imply." + center_of_mass = list("x"=16, "y"=10) if("space_up") icon_state = "space-up_glass" name = "Glass of Space-up" desc = "Space-up. It helps keep your cool." + center_of_mass = list("x"=16, "y"=10) if("moonshine") icon_state = "glass_clear" name = "Moonshine" desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + center_of_mass = list("x"=16, "y"=10) if("soymilk") icon_state = "glass_white" name = "Glass of soy milk" desc = "White and nutritious soy goodness!" + center_of_mass = list("x"=16, "y"=10) if("berryjuice") icon_state = "berryjuice" name = "Glass of berry juice" desc = "Berry juice. Or maybe its jam. Who cares?" + center_of_mass = list("x"=16, "y"=10) if("poisonberryjuice") icon_state = "poisonberryjuice" name = "Glass of poison berry juice" desc = "A glass of deadly juice." + center_of_mass = list("x"=16, "y"=10) if("carrotjuice") icon_state = "carrotjuice" name = "Glass of carrot juice" desc = "It is just like a carrot but without crunching." + center_of_mass = list("x"=16, "y"=10) if("banana") icon_state = "banana" name = "Glass of banana juice" desc = "The raw essence of a banana. HONK" + center_of_mass = list("x"=16, "y"=10) if("bahama_mama") icon_state = "bahama_mama" name = "Bahama Mama" desc = "Tropic cocktail" + center_of_mass = list("x"=16, "y"=5) if("singulo") icon_state = "singulo" name = "Singulo" desc = "A blue-space beverage." + center_of_mass = list("x"=17, "y"=4) if("alliescocktail") icon_state = "alliescocktail" name = "Allies cocktail" desc = "A drink made from your allies." + center_of_mass = list("x"=17, "y"=8) if("antifreeze") icon_state = "antifreeze" name = "Anti-freeze" desc = "The ultimate refreshment." + center_of_mass = list("x"=16, "y"=8) if("barefoot") icon_state = "b&p" name = "Barefoot" desc = "Barefoot and pregnant" + center_of_mass = list("x"=17, "y"=8) if("demonsblood") icon_state = "demonsblood" name = "Demons Blood" desc = "Just looking at this thing makes the hair at the back of your neck stand up." + center_of_mass = list("x"=16, "y"=2) if("booger") icon_state = "booger" name = "Booger" desc = "Ewww..." + center_of_mass = list("x"=16, "y"=10) if("snowwhite") icon_state = "snowwhite" name = "Snow White" desc = "A cold refreshment." + center_of_mass = list("x"=16, "y"=8) if("aloe") icon_state = "aloe" name = "Aloe" desc = "Very, very, very good." + center_of_mass = list("x"=17, "y"=8) if("andalusia") icon_state = "andalusia" name = "Andalusia" desc = "A nice, strange named drink." + center_of_mass = list("x"=16, "y"=9) if("sbiten") icon_state = "sbitenglass" name = "Sbiten" desc = "A spicy mix of Vodka and Spice. Very hot." + center_of_mass = list("x"=17, "y"=8) if("red_mead") icon_state = "red_meadglass" name = "Red Mead" desc = "A True Vikings Beverage, though its color is strange." + center_of_mass = list("x"=17, "y"=10) if("mead") icon_state = "meadglass" name = "Mead" desc = "A Vikings Beverage, though a cheap one." + center_of_mass = list("x"=17, "y"=10) if("iced_beer") icon_state = "iced_beerglass" name = "Iced Beer" desc = "A beer so frosty, the air around it freezes." + center_of_mass = list("x"=16, "y"=7) if("grog") icon_state = "grogglass" name = "Grog" desc = "A fine and cepa drink for Space." + center_of_mass = list("x"=16, "y"=10) if("soy_latte") icon_state = "soy_latte" name = "Soy Latte" desc = "A nice and refrshing beverage while you are reading." + center_of_mass = list("x"=15, "y"=9) if("cafe_latte") icon_state = "cafe_latte" name = "Cafe Latte" desc = "A nice, strong and refreshing beverage while you are reading." + center_of_mass = list("x"=15, "y"=9) if("acidspit") icon_state = "acidspitglass" name = "Acid Spit" desc = "A drink from Nanotrasen. Made from live aliens." + center_of_mass = list("x"=16, "y"=7) if("amasec") icon_state = "amasecglass" name = "Amasec" desc = "Always handy before COMBAT!!!" + center_of_mass = list("x"=16, "y"=9) if("neurotoxin") icon_state = "neurotoxinglass" name = "Neurotoxin" desc = "A drink that is guaranteed to knock you silly." + center_of_mass = list("x"=16, "y"=8) if("hippiesdelight") icon_state = "hippiesdelightglass" name = "Hippie's Delight" desc = "A drink enjoyed by people during the 1960's." + center_of_mass = list("x"=16, "y"=8) if("bananahonk") icon_state = "bananahonkglass" name = "Banana Honk" desc = "A drink from Banana Heaven." + center_of_mass = list("x"=16, "y"=8) if("silencer") icon_state = "silencerglass" name = "Silencer" desc = "A drink from mime Heaven." + center_of_mass = list("x"=16, "y"=9) if("nothing") icon_state = "nothing" name = "Nothing" desc = "Absolutely nothing." + center_of_mass = list("x"=16, "y"=10) if("devilskiss") icon_state = "devilskiss" name = "Devils Kiss" desc = "Creepy time!" + center_of_mass = list("x"=16, "y"=8) if("changelingsting") icon_state = "changelingsting" name = "Changeling Sting" desc = "A stingy drink." + center_of_mass = list("x"=16, "y"=10) if("irishcarbomb") icon_state = "irishcarbomb" name = "Irish Car Bomb" desc = "An irish car bomb." + center_of_mass = list("x"=16, "y"=8) if("syndicatebomb") icon_state = "syndicatebomb" name = "Syndicate Bomb" desc = "A syndicate bomb." + center_of_mass = list("x"=16, "y"=4) if("erikasurprise") icon_state = "erikasurprise" name = "Erika Surprise" desc = "The surprise is, it's green!" + center_of_mass = list("x"=16, "y"=9) if("driestmartini") icon_state = "driestmartiniglass" name = "Driest Martini" desc = "Only for the experienced. You think you see sand floating in the glass." + center_of_mass = list("x"=17, "y"=8) if("ice") icon_state = "iceglass" name = "Glass of ice" desc = "Generally, you're supposed to put something else in there too..." + center_of_mass = list("x"=16, "y"=10) if("icecoffee") icon_state = "icedcoffeeglass" name = "Iced Coffee" desc = "A drink to perk you up and refresh you!" + center_of_mass = list("x"=16, "y"=10) if("coffee") icon_state = "glass_brown" name = "Glass of coffee" desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + center_of_mass = list("x"=16, "y"=10) if("bilk") icon_state = "glass_brown" name = "Glass of bilk" desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." + center_of_mass = list("x"=16, "y"=10) if("fuel") icon_state = "dr_gibb_glass" name = "Glass of welder fuel" desc = "Unless you are an industrial tool, this is probably not safe for consumption." + center_of_mass = list("x"=16, "y"=10) if("brownstar") icon_state = "brownstar" name = "Brown Star" desc = "It's not what it sounds like..." + center_of_mass = list("x"=16, "y"=10) if("grapejuice") icon_state = "grapejuice" name = "Glass of grape juice" desc = "It's grrrrrape!" + center_of_mass = list("x"=16, "y"=10) if("grapesoda") icon_state = "grapesoda" name = "Can of Grape Soda" desc = "Looks like a delicious drank!" + center_of_mass = list("x"=16, "y"=10) if("icetea") icon_state = "icedteaglass" name = "Iced Tea" desc = "No relation to a certain rap artist/ actor." + center_of_mass = list("x"=15, "y"=10) if("grenadine") icon_state = "grenadineglass" name = "Glass of grenadine syrup" desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." + center_of_mass = list("x"=17, "y"=6) if("milkshake") icon_state = "milkshake" name = "Milkshake" desc = "Glorious brainfreezing mixture." + center_of_mass = list("x"=16, "y"=7) if("lemonade") icon_state = "lemonadeglass" name = "Lemonade" desc = "Oh the nostalgia..." + center_of_mass = list("x"=16, "y"=10) if("kiraspecial") icon_state = "kiraspecial" name = "Kira Special" desc = "Long live the guy who everyone had mistaken for a girl. Baka!" + center_of_mass = list("x"=16, "y"=12) if("rewriter") icon_state = "rewriter" name = "Rewriter" desc = "The secret of the sanctuary of the Libarian..." + center_of_mass = list("x"=16, "y"=9) if("suidream") icon_state = "sdreamglass" name = "Sui Dream" desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame." + center_of_mass = list("x"=16, "y"=5) if("melonliquor") icon_state = "emeraldglass" name = "Glass of Melon Liquor" desc = "A relatively sweet and fruity 46 proof liquor." + center_of_mass = list("x"=16, "y"=5) if("bluecuracao") icon_state = "curacaoglass" name = "Glass of Blue Curacao" desc = "Exotically blue, fruity drink, distilled from oranges." + center_of_mass = list("x"=16, "y"=5) if("absinthe") icon_state = "absintheglass" name = "Glass of Absinthe" desc = "Wormwood, anise, oh my." + center_of_mass = list("x"=16, "y"=5) if("pwine") icon_state = "pwineglass" name = "Glass of ???" desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" + center_of_mass = list("x"=16, "y"=5) else icon_state ="glass_brown" name = "Glass of ..what?" desc = "You can't really tell what this is." + center_of_mass = list("x"=16, "y"=10) else icon_state = "glass_empty" name = "Drinking glass" desc = "Your standard drinking glass" + center_of_mass = list("x"=16, "y"=10) return // for /obj/machinery/vending/sovietsoda diff --git a/code/modules/reagents/reagent_containers/food/drinks/jar.dm b/code/modules/reagents/reagent_containers/food/drinks/jar.dm index 6a75c65852..7cca924261 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/jar.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/jar.dm @@ -7,6 +7,7 @@ desc = "A jar. You're not sure what it's supposed to hold." icon_state = "jar" item_state = "beaker" + center_of_mass = list("x"=15, "y"=8) New() ..() reagents.add_reagent("slime", 50) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 853ee5b149..29001d9723 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -9,6 +9,7 @@ var/trash = null var/slice_path var/slices_num + center_of_mass = list("x"=15, "y"=15) //Placeholder for effect that trigger on eating that aren't tied to reagents. /obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) @@ -107,7 +108,7 @@ return 0 /obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user, proximity) - return + return ..() /obj/item/weapon/reagent_containers/food/snacks/examine() set src in view() diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 002888e61e..38fb4994fa 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1358,6 +1358,7 @@ datum/design/nanopaste materials = list("$metal" = 7000, "$glass" = 7000) build_path = "/obj/item/stack/nanopaste" +/* // Removal of loyalty implants. Can't think of a way to add this to the config option. datum/design/implant_loyal name = "loyalty implant" desc = "Makes you loyal or such." @@ -1366,6 +1367,7 @@ datum/design/implant_loyal build_type = PROTOLATHE materials = list("$metal" = 7000, "$glass" = 7000) build_path = "/obj/item/weapon/implant/loyalty" +*/ datum/design/implant_chem name = "chemical implant" diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm index bddd133ade..6a44fbe72d 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -114,7 +114,7 @@ if(total_purity && fresh_coolant) coolant_purity = total_purity / fresh_coolant -/obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(user.stat) return @@ -146,7 +146,7 @@ data["rad_shield_on"] = rad_shield // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index 5b13f0e66b..a5b08a0bf7 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -18,7 +18,7 @@ ui_interact(user) -/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag] if (!istype(shuttle)) @@ -57,7 +57,7 @@ "can_force" = shuttle.can_force(), ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "shuttle_control_console.tmpl", "[shuttle_tag] Shuttle Control", 470, 310) diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index a16b98db1e..98f0223247 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -153,7 +153,7 @@ read_authorization(W) ..() -/obj/machinery/computer/shuttle_control/emergency/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/shuttle_control/emergency/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/datum/shuttle/ferry/emergency/shuttle = shuttle_controller.shuttles[shuttle_tag] if (!istype(shuttle)) @@ -211,7 +211,7 @@ "user" = debug? user : null, ) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "escape_shuttle_control_console.tmpl", "Shuttle Control", 470, 420) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index f8a0ca0829..079bc797da 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -123,20 +123,22 @@ shift_light(5, warning_color) if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY) var/stability = num2text(round((damage / explosion_point) * 100)) + var/alert_msg if(damage > emergency_point) shift_light(7, emergency_color) - radio.autosay(addtext(emergency_alert, " Instability: ",stability,"%"), "Supermatter Monitor") + alert_msg = addtext(emergency_alert, " Instability: ",stability,"%") lastwarning = world.timeofday - else if(damage >= damage_archived) // The damage is still going up - radio.autosay(addtext(warning_alert," Instability: ",stability,"%"), "Supermatter Monitor") + alert_msg = addtext(warning_alert," Instability: ",stability,"%") lastwarning = world.timeofday - 150 - - else // Phew, we're safe - radio.autosay(safe_alert, "Supermatter Monitor") + else // Phew, we're safe + alert_msg = safe_alert lastwarning = world.timeofday + if(!istype(L, /turf/space) && alert_msg) + radio.autosay(alert_msg, "Supermatter Monitor") + if(damage > explosion_point) for(var/mob/living/mob in living_mob_list) if(istype(mob, /mob/living/carbon/human)) diff --git a/code/modules/surgery/braincore.dm b/code/modules/surgery/braincore.dm index b89c48275b..267e989a41 100644 --- a/code/modules/surgery/braincore.dm +++ b/code/modules/surgery/braincore.dm @@ -107,6 +107,7 @@ B.transfer_identity(target) target.internal_organs -= B + target.internal_organs_by_name -= "brain" target:brain_op_stage = 4.0 target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice. @@ -173,7 +174,7 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \ "\blue You mend hematoma in [target]'s brain with \the [tool].") - var/datum/organ/internal/brain/sponge = target.internal_organs["brain"] + var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"] if (sponge) sponge.damage = 0 @@ -187,9 +188,12 @@ // SLIME CORE EXTRACTION // ////////////////////////////////////////////////////////////////// -/datum/surgery_step/slime/ +/datum/surgery_step/slime + is_valid_target(mob/living/carbon/slime/target) + return istype(target, /mob/living/carbon/slime/) + can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool) - return istype(target, /mob/living/carbon/slime/) && target.stat == 2 + return target.stat == 2 /datum/surgery_step/slime/cut_flesh allowed_tools = list( @@ -267,8 +271,7 @@ if(target.cores >= 0) new target.coretype(target.loc) if(target.cores <= 0) - var/origstate = initial(target.icon_state) - target.icon_state = "[origstate] dead-nocore" + target.icon_state = "[target.colour] baby slime dead-nocore" fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/eye.dm b/code/modules/surgery/eye.dm index 9977271c76..69e238679e 100644 --- a/code/modules/surgery/eye.dm +++ b/code/modules/surgery/eye.dm @@ -39,7 +39,7 @@ target.blinded += 1.5 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"] var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \ "\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" ) @@ -69,7 +69,7 @@ target.op_stage.eyes = 2 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"] var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \ "\red Your hand slips, damaging [target]'s eyes with \the [tool]!") @@ -100,7 +100,7 @@ target.op_stage.eyes = 3 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"] var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \ "\red Your hand slips, stabbing \the [tool] into [target]'s eye!") @@ -126,7 +126,7 @@ "You are beginning to cauterize the incision around [target]'s eyes with \the [tool].") end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"] user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \ "\blue You cauterize the incision around [target]'s eyes with \the [tool].") if (target.op_stage.eyes == 3) @@ -136,7 +136,7 @@ target.op_stage.eyes = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"] + var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"] var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \ "\red Your hand slips, searing [target]'s eyes with \the [tool]!") diff --git a/code/modules/surgery/ribcage.dm b/code/modules/surgery/ribcage.dm index 1532dda210..ab16f56915 100644 --- a/code/modules/surgery/ribcage.dm +++ b/code/modules/surgery/ribcage.dm @@ -202,9 +202,10 @@ var/is_chest_organ_damaged = 0 var/datum/organ/external/chest/chest = target.get_organ("chest") - for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0) - is_chest_organ_damaged = 1 - break + for(var/datum/organ/internal/I in chest.internal_organs) + if(I.damage > 0) + is_chest_organ_damaged = 1 + break return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -285,7 +286,7 @@ return 0 var/is_chest_organ_damaged = 0 - var/datum/organ/internal/heart/heart = target.internal_organs["heart"] + var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"] var/datum/organ/external/chest/chest = target.get_organ("chest") for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0) is_chest_organ_damaged = 1 @@ -293,7 +294,7 @@ return ..() && is_chest_organ_damaged && heart.robotic == 2 && target.op_stage.ribcage == 2 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/heart/heart = target.internal_organs["heart"] + var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"] if(heart.damage > 0) user.visible_message("[user] starts mending the mechanisms on [target]'s heart with \the [tool].", \ @@ -302,14 +303,14 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/heart/heart = target.internal_organs["heart"] + var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"] if(heart.damage > 0) user.visible_message("\blue [user] repairs [target]'s heart with \the [tool].", \ "\blue You repair [target]'s heart with \the [tool]." ) heart.damage = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/internal/heart/heart = target.internal_organs["heart"] + var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"] user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!!" , \ "\red Your hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!") heart.take_damage(5, 0) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 8e94c03ddc..5b0bccbaaa 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -25,8 +25,10 @@ return allowed_tools[T] return 0 - // Checks if this step applies to the mutantrace of the user. - proc/is_valid_mutantrace(mob/living/carbon/human/target) + // Checks if this step applies to the user mob at all + proc/is_valid_target(mob/living/carbon/human/target) + if(!hasorgans(target)) + return 0 if(allowed_species) for(var/species in allowed_species) @@ -40,6 +42,7 @@ return 1 + // checks whether this step can be applied with the given user and target proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) return 0 @@ -81,7 +84,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool) return 0 for(var/datum/surgery_step/S in surgery_steps) //check if tool is right or close enough and if this step is possible - if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool) && S.is_valid_mutantrace(M)) + if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool) && S.is_valid_target(M)) S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it //We had proper tools! (or RNG smiled.) and User did not move or change hands. if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration))) diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index 0a239f82df..b36e63ff3a 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -36,7 +36,7 @@ if(..()) return ui_interact(user) -/obj/machinery/computer/centrifuge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/centrifuge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -70,7 +70,7 @@ data["antibodies"] = A && A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : null data["is_antibody_sample"] = 1 - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "isolation_centrifuge.tmpl", src.name, 400, 500) ui.set_initial_data(data) diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index a8ba0af399..47a4402ab4 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -43,7 +43,7 @@ if(..()) return ui_interact(user) -/obj/machinery/computer/diseasesplicer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/computer/diseasesplicer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -81,7 +81,7 @@ else data["info"] = "No dish loaded." - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "disease_splicer.tmpl", src.name, 400, 600) ui.set_initial_data(data) diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index 53f6688ef8..f3f339f895 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -50,7 +50,7 @@ if(stat & (NOPOWER|BROKEN)) return ui_interact(user) -/obj/machinery/disease2/incubator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/disease2/incubator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -82,7 +82,7 @@ for (var/ID in virus) data["blood_already_infected"] = virus[ID] - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "dish_incubator.tmpl", src.name, 400, 600) ui.set_initial_data(data) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index e5600b7633..41fda7a150 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -202,7 +202,7 @@ activate(var/mob/living/carbon/mob,var/multiplier) if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob - var/datum/organ/internal/brain/B = H.internal_organs["brain"] + var/datum/organ/internal/brain/B = H.internal_organs_by_name["brain"] if (B.damage < B.min_broken_damage) B.take_damage(5) else diff --git a/code/modules/virus2/isolator.dm b/code/modules/virus2/isolator.dm index e3a68c9949..09f07793c9 100644 --- a/code/modules/virus2/isolator.dm +++ b/code/modules/virus2/isolator.dm @@ -49,7 +49,7 @@ if(stat & (NOPOWER|BROKEN)) return ui_interact(user) -/obj/machinery/disease2/isolator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/disease2/isolator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) var/data[0] @@ -100,7 +100,7 @@ "name" = entry.fields["name"], \ "description" = replacetext(desc, "\n", "")) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "pathogenic_isolator.tmpl", src.name, 400, 500) ui.set_initial_data(data) diff --git a/code/setup.dm b/code/setup.dm index 3023a7b551..49fe78f68b 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -30,6 +30,8 @@ #define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 //Amount of air needed before pass out/suffocation commences +#define SOUND_MINIMUM_PRESSURE 10 + // Pressure limits. #define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) #define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 4fdc0f5f3f..614e696df2 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -56,3 +56,11 @@ MONKEY_DELAY 0 ALIEN_DELAY 0 METROID_DELAY 0 ANIMAL_DELAY 0 + + +### Miscellaneous ### + +## Config options which, of course, don't fit into previous categories. + +## Remove the # in front of this config option to have loyalty implants spawn by default on your server. +#USE_LOYALTY_IMPLANTS diff --git a/icons/mob/species/tajaran/helmet.dmi b/icons/mob/species/tajaran/helmet.dmi index dc431a835a..7316d42bb3 100644 Binary files a/icons/mob/species/tajaran/helmet.dmi and b/icons/mob/species/tajaran/helmet.dmi differ diff --git a/icons/mob/species/tajaran/suit.dmi b/icons/mob/species/tajaran/suit.dmi index d0eca318fd..13eb7174d9 100644 Binary files a/icons/mob/species/tajaran/suit.dmi and b/icons/mob/species/tajaran/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 47d928e2d1..311d8494de 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 31be71e8e9..901928b414 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi index 9da8b5ecf1..8ae9ced1f9 100644 Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index 4866a35ec0..cf1e440e45 100644 Binary files a/icons/obj/food.dmi and b/icons/obj/food.dmi differ diff --git a/icons/obj/radio.dmi b/icons/obj/radio.dmi index 9c4830d273..b0b250a18b 100644 Binary files a/icons/obj/radio.dmi and b/icons/obj/radio.dmi differ diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index 04ed457678..00eb139f60 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -109,7 +109,7 @@ "ace" = (/turf/simulated/wall,/area/security/main) "acf" = (/turf/simulated/wall/r_wall,/area/security/main) "acg" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "redcorner"; dir = 1},/area/security/brig) -"ach" = (/obj/machinery/computer/security/telescreen{desc = "Used for watching Prison Wing holding areas."; name = "Prison Monitor"; network = list("Prison"); pixel_x = 0; pixel_y = 30},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor{icon_state = "red"; dir = 8},/area/security/prison) +"ach" = (/obj/structure/rack,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "aci" = (/obj/machinery/door_timer/cell_1{dir = 4; pixel_x = 32; pixel_y = 0},/obj/machinery/light/small{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/security/brig) "acj" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 6},/obj/machinery/light_switch{pixel_x = -25; pixel_y = 0},/turf/simulated/floor{icon_state = "dark"},/area/security/brig) "ack" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/security/brig) @@ -134,7 +134,7 @@ "acD" = (/obj/structure/stool/bed/chair{dir = 1},/obj/machinery/firealarm{dir = 4; pixel_x = 24},/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101.325; on = 1; pressure_checks = 1},/turf/simulated/floor{icon_state = "red"; dir = 6},/area/security/prison) "acE" = (/obj/structure/rack,/obj/item/weapon/gun/energy/laser,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/machinery/door/window/brigdoor{dir = 4; name = "Weapons locker"; req_access_txt = "3"},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "acF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/camera{c_tag = "Brig East"; dir = 8},/turf/simulated/floor{icon_state = "redcorner"; dir = 4},/area/security/brig) -"acG" = (/obj/structure/rack,/obj/item/weapon/storage/lockbox/loyalty,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) +"acG" = (/obj/machinery/suit_cycler/mining,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) "acH" = (/obj/machinery/flasher/portable,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "acI" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/security/brig) "acJ" = (/obj/structure/rack,/obj/item/clothing/suit/armor/riot,/obj/item/weapon/melee/baton,/obj/item/weapon/shield/riot,/obj/item/clothing/head/helmet/riot,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/window/brigdoor{dir = 8; name = "Weapons locker"; req_access_txt = "3"},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) @@ -1270,7 +1270,7 @@ "ayv" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/wood,/area/library) "ayw" = (/turf/simulated/floor{dir = 5; icon_state = "warning"},/area/ai_monitored/storage/eva) "ayx" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass_security{name = "Security Hardsuits"; req_access_txt = "1"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) -"ayy" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) +"ayy" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/camera{c_tag = "EVA South"; dir = 1},/obj/structure/dispenser/oxygen,/turf/simulated/floor,/area/ai_monitored/storage/eva) "ayz" = (/turf/simulated/floor{dir = 8; icon_state = "bluecorner"},/area/hallway/primary/fore) "ayA" = (/turf/simulated/floor{icon_state = "bluecorner"},/area/hallway/primary/fore) "ayB" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/hydroponics,/obj/machinery/light{tag = "icon-tube1 (NORTH)"; icon_state = "tube1"; dir = 1},/turf/simulated/floor{icon_state = "dark"},/area/hydroponics) @@ -1315,8 +1315,8 @@ "azo" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) "azp" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) "azq" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; on = 1},/turf/simulated/floor{icon_state = "floorgrime"},/area/quartermaster/storage) -"azr" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) -"azs" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) +"azr" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/portable_atmospherics/canister/oxygen,/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) +"azs" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) "azt" = (/obj/structure/rack,/obj/item/clothing/suit/space/rig/security,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/rig/security,/obj/item/clothing/shoes/magboots,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) "azu" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/turf/simulated/floor{icon_state = "bluecorner"},/area/hallway/primary/fore) "azv" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor{icon_state = "neutralcorner"; dir = 2},/area/crew_quarters/sleep) @@ -1545,7 +1545,7 @@ "aDK" = (/obj/structure/table/woodentable,/obj/item/weapon/deck,/turf/simulated/floor{icon_state = "grimy"},/area/hallway/secondary/entry) "aDL" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plating,/area/maintenance/fpmaint) "aDM" = (/obj/item/device/radio/intercom{freerange = 1; frequency = 1459; name = "Station Intercom (General)"; pixel_x = -30},/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/table/reinforced,/obj/item/weapon/storage/toolbox/electrical{pixel_x = 1; pixel_y = -1},/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva) -"aDN" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) +"aDN" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) "aDO" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) "aDP" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/turf/simulated/floor,/area/hallway/primary/starboard) "aDQ" = (/obj/machinery/suit_storage_unit/standard_unit,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) @@ -1622,9 +1622,9 @@ "aFj" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/stool/bed/chair/wood/wings{icon_state = "wooden_chair_wings"; dir = 4},/turf/simulated/floor/wood,/area/crew_quarters/bar) "aFk" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plating,/area/maintenance/port) "aFl" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor/wood,/area/bridge/meeting_room) -"aFm" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/device/radio/off,/obj/item/device/radio/off,/obj/item/device/radio/off,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) -"aFn" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva) -"aFo" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) +"aFm" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/device/radio/off,/obj/item/device/radio/off,/obj/item/device/radio/off,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva) +"aFn" = (/obj/machinery/suit_cycler/medical,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) +"aFo" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass_command{name = "E.V.A. Cycler Access"; req_access_txt = "0"; req_one_access_txt = "1;5;11;18;24"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) "aFp" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/tank/oxygen,/obj/item/weapon/tank/oxygen,/obj/item/clothing/mask/breath,/obj/item/clothing/mask/breath,/obj/item/device/flashlight,/obj/item/device/flashlight,/obj/item/weapon/storage/box/lights/mixed,/turf/simulated/floor/plating,/area/storage/emergency2) "aFq" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 5},/obj/structure/disposalpipe/segment,/turf/simulated/floor{dir = 5; icon_state = "green"},/area/hydroponics) "aFr" = (/obj/machinery/light_switch{pixel_y = 28},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; icon_state = "off"; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/wood,/area/bridge/meeting_room) @@ -1715,7 +1715,7 @@ "aGY" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0},/turf/simulated/wall/r_wall,/area/turret_protected/ai) "aGZ" = (/obj/machinery/door/firedoor/border_only{dir = 8; name = "Firelock West"},/obj/machinery/door/airlock/glass{name = "Holodeck Door"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/turf/simulated/floor,/area/crew_quarters/fitness) "aHa" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/wall/r_wall,/area/crew_quarters/captain) -"aHb" = (/obj/machinery/light/small{dir = 8},/obj/structure/dispenser/oxygen,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) +"aHb" = (/obj/machinery/suit_cycler/engineering,/obj/machinery/light/small{dir = 8},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) "aHc" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor,/area/storage/tools) "aHd" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/head/helmet/space/skrell/black,/obj/item/clothing/mask/breath,/obj/item/clothing/suit/space/skrell/black,/obj/item/clothing/head/helmet/space/skrell/white,/obj/item/clothing/mask/breath,/obj/item/clothing/suit/space/skrell/white,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) "aHe" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor{icon_state = "blue"; dir = 10},/area/bridge) @@ -1796,12 +1796,12 @@ "aIB" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor,/area/hallway/primary/central) "aIC" = (/obj/structure/table/woodentable,/obj/machinery/recharger{pixel_y = 0},/turf/simulated/floor/plating,/area/security/vacantoffice) "aID" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; icon_state = "off"; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/structure/stool/bed,/obj/item/weapon/bedsheet/mime,/turf/simulated/floor/carpet{icon_state = "carpetnoconnect"},/area/crew_quarters/sleep/bedrooms) -"aIE" = (/obj/machinery/portable_atmospherics/canister/oxygen,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) +"aIE" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) "aIF" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva) "aIG" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor,/area/ai_monitored/storage/eva) "aIH" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) -"aII" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/camera{c_tag = "EVA South"; dir = 1},/turf/simulated/floor,/area/ai_monitored/storage/eva) -"aIJ" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) +"aII" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) +"aIJ" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) "aIK" = (/obj/machinery/door/firedoor/border_only{dir = 2},/obj/structure/cable,/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) "aIL" = (/obj/machinery/light,/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva) "aIM" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/head/helmet/space/unathi/helmet_cheap,/obj/item/clothing/mask/breath,/obj/item/clothing/suit/space/unathi/rig_cheap,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) @@ -2463,7 +2463,7 @@ "aVs" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 9},/turf/simulated/floor/plating,/area/maintenance/fsmaint2) "aVt" = (/obj/structure/lattice,/obj/machinery/access_button{command = "cycle_exterior"; frequency = 1380; master_tag = "escape_dock_north_airlock"; name = "exterior access button"; pixel_x = 5; pixel_y = 25; req_access_txt = "0"; req_one_access_txt = "13"},/turf/space,/area) "aVu" = (/obj/structure/table,/obj/machinery/reagentgrinder,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) -"aVv" = (/obj/machinery/door/firedoor/border_only{dir = 2},/obj/structure/cable,/obj/structure/cable{d2 = 2; icon_state = "0-2"; pixel_y = 0},/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva) +"aVv" = (/obj/machinery/suit_cycler/security,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) "aVw" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/wall,/area/hallway/primary/fore) "aVx" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/wall,/area/crew_quarters/toilet) "aVy" = (/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 1},/turf/simulated/floor{icon_state = "freezerfloor"},/area/crew_quarters/toilet) @@ -3300,7 +3300,7 @@ "blx" = (/obj/structure/table/reinforced,/obj/machinery/ignition_switch{id = "Xenobio"; pixel_x = -6; pixel_y = 4},/obj/machinery/atmospherics/pipe/manifold/visible{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab) "bly" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2) "blz" = (/obj/structure/table/reinforced,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab) -"blA" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/device/modkit/tajaran,/obj/item/device/modkit/tajaran,/obj/item/device/modkit/tajaran,/obj/item/device/suit_cooling_unit,/obj/item/device/suit_cooling_unit,/obj/item/device/suit_cooling_unit,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/ai_monitored/storage/eva) +"blA" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table/reinforced,/obj/item/stack/sheet/rglass{amount = 50},/obj/item/stack/rods{amount = 50},/obj/structure/extinguisher_cabinet{pixel_x = 27; pixel_y = 0},/obj/machinery/camera{c_tag = "EVA East"; dir = 8},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) "blB" = (/obj/machinery/atmospherics/pipe/simple{dir = 6; icon_state = "intact"; level = 2},/turf/simulated/floor{icon_state = "redcorner"; dir = 1},/area/medical/sleeper) "blC" = (/obj/machinery/atmospherics/unary/cryo_cell,/turf/simulated/floor{icon_state = "red"; dir = 9},/area/medical/sleeper) "blD" = (/obj/machinery/atmospherics/pipe/simple{dir = 4; icon_state = "intact"; level = 2},/turf/simulated/floor,/area/medical/sleeper) @@ -3386,7 +3386,7 @@ "bnf" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{dir = 4; icon_state = "arrival"},/area/hallway/secondary/entry) "bng" = (/turf/simulated/wall,/area/rnd/mixing) "bnh" = (/obj/machinery/requests_console{department = "EVA"; pixel_x = -32; pixel_y = 0},/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/table/reinforced,/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/item/device/multitool,/obj/machinery/camera/motion{c_tag = "EVA Motion Sensor"; dir = 4},/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva) -"bni" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table/reinforced,/obj/item/stack/sheet/rglass{amount = 50},/obj/item/stack/rods{amount = 50},/obj/structure/extinguisher_cabinet{pixel_x = 27; pixel_y = 0},/obj/machinery/camera{c_tag = "EVA East"; dir = 8},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) +"bni" = (/obj/structure/table/reinforced,/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) "bnj" = (/turf/simulated/floor/plating/airless,/area/rnd/mixing) "bnk" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/machinery/atmospherics/pipe/simple/visible{icon_state = "intact"; dir = 6},/turf/simulated/floor/plating,/area/maintenance/asmaint2) "bnl" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0},/obj/machinery/door/airlock/external{frequency = 1379; icon_state = "door_locked"; id_tag = "toxin_test_inner"; locked = 1; name = "Engineering External Access"; req_access = null; req_access_txt = "13"},/obj/machinery/atmospherics/pipe/simple/visible{dir = 4},/turf/simulated/floor/plating,/area/maintenance/asmaint2) @@ -3516,7 +3516,7 @@ "bpF" = (/obj/structure/table,/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/device/radio/intercom{freerange = 0; frequency = 1459; name = "Station Intercom (General)"; pixel_x = 29},/turf/simulated/floor{icon_state = "white"},/area/assembly/robotics) "bpG" = (/obj/structure/closet/firecloset,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor{dir = 10; icon_state = "warnwhite"},/area/medical/research{name = "Research Division"}) "bpH" = (/obj/structure/sink{dir = 4; icon_state = "sink"; pixel_x = 11; pixel_y = 0},/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor{dir = 6; icon_state = "warnwhite"},/area/medical/research{name = "Research Division"}) -"bpI" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/ai_monitored/storage/eva) +"bpI" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/unary/heater{dir = 2; icon_state = "heater"},/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/atmos) "bpJ" = (/obj/machinery/gateway,/obj/structure/cable{d2 = 2; icon_state = "0-2"; pixel_y = 0},/obj/effect/landmark{name = "JoinLateGateway"},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/gateway) "bpK" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0},/obj/machinery/door/airlock/external{name = "Toxins Test Chamber"; req_access_txt = "0"},/turf/simulated/floor/plating/airless,/area/rnd/test_area) "bpL" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0},/turf/simulated/floor/plating/airless,/area/rnd/test_area) @@ -5915,7 +5915,7 @@ "cjM" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/maintenance/portsolar) "cjN" = (/turf/simulated/wall/r_wall,/area/maintenance/portsolar) "cjO" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 1},/turf/simulated/floor,/area/atmos) -"cjP" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/unary/heater{dir = 2; icon_state = "heater"},/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/atmos) +"cjP" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped,/obj/item/weapon/reagent_containers/spray/cleaner,/obj/item/clothing/gloves/latex,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/obj/item/device/slime_scanner,/obj/item/device/slime_scanner,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cjQ" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/unary/cold_sink/freezer{dir = 2; icon_state = "freezer"},/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/atmos) "cjR" = (/obj/machinery/atmospherics/binary/pump{dir = 2; icon_state = "intact_off"; name = "Filter to Port"; on = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/atmos) "cjS" = (/obj/machinery/atmospherics/binary/pump{dir = 1; icon_state = "intact_off"; name = "Port to Filter"; on = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/atmos) @@ -6153,7 +6153,7 @@ "coq" = (/obj/machinery/optable{name = "Xenobiology Operating Table"},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "whitehall"; dir = 2},/area/rnd/xenobiology) "cor" = (/obj/structure/stool/bed/chair{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cos" = (/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/reagentgrinder,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) -"cot" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped,/obj/item/weapon/reagent_containers/spray/cleaner,/obj/item/clothing/gloves/latex,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) +"cot" = (/obj/machinery/camera{c_tag = "Engineering EVA Storage"; dir = 1; network = list("SS13")},/obj/machinery/suit_cycler/engineering,/turf/simulated/floor,/area/engine/engine_eva) "cou" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cov" = (/obj/structure/stool/bed/chair{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/disposalpipe/segment,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cow" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/machinery/smartfridge/secure/extract,/turf/simulated/floor{dir = 2; icon_state = "whitecorner"},/area/rnd/xenobiology) @@ -6383,7 +6383,7 @@ "csM" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/shoes/magboots,/obj/item/clothing/suit/space/rig/atmos,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/rig/atmos,/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/window/northleft{name = "Atmospherics Hardsuits"; req_access_txt = "24"},/turf/simulated/floor,/area/engine/engine_eva) "csN" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/light/small{dir = 4},/obj/structure/disposalpipe/junction{dir = 1; icon_state = "pipe-j2"},/turf/simulated/floor{icon_state = "floorgrime"},/area/engine/engine_eva_maintenance) "csO" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "floorgrime"},/area/engine/engine_eva_maintenance) -"csP" = (/obj/machinery/camera{c_tag = "Engineering EVA Storage"; dir = 1; network = list("SS13")},/obj/structure/table/reinforced{icon_state = "table"},/obj/item/device/modkit/tajaran,/turf/simulated/floor,/area/engine/engine_eva) +"csP" = (/obj/machinery/atmospherics/unary/heater{dir = 1},/turf/simulated/floor/plating,/area/research_outpost/maint) "csQ" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "csR" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "csS" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/virology) @@ -9669,7 +9669,9 @@ "dDW" = (/obj/machinery/conveyor{dir = 4; id = "QMLoad"},/turf/simulated/shuttle/floor,/area/supply/dock) "dDX" = (/obj/structure/cable,/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/turf/simulated/floor{icon_state = "white"},/area/research_outpost/med) "dDY" = (/turf/simulated/wall,/area/research_outpost/tempstorage) +"dDZ" = (/obj/machinery/suit_cycler/mining,/turf/simulated/floor,/area/mine/eva) "dEa" = (/obj/machinery/conveyor{dir = 1; id = "anosample"},/obj/structure/plasticflaps/mining,/turf/simulated/floor/plating,/area/research_outpost/maint) +"dEb" = (/obj/structure/rack,/obj/item/clothing/suit/space/rig/mining,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/rig/mining,/obj/item/weapon/mining_scanner,/turf/simulated/floor,/area/mine/eva) "dEc" = (/obj/machinery/computer/security/telescreen{desc = "Used for watching the isolation room cameras."; layer = 4; name = "Isolation Room Telescreen"; network = list("Anomaly Isolation"); pixel_x = 32; pixel_y = 0},/obj/machinery/atmospherics/binary/pump{dir = 8},/turf/simulated/floor/plating,/area/research_outpost/maint) "dEd" = (/obj/machinery/shower{icon_state = "shower"; dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/research_outpost/hallway) "dEe" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/wall,/area/research_outpost/hallway) @@ -9677,6 +9679,7 @@ "dEg" = (/obj/machinery/door_control{id = "rbath"; name = "Door Bolt Control"; normaldoorcontrol = 1; pixel_x = 0; pixel_y = -25; req_access_txt = "0"; specialfunctions = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/research_outpost/hallway) "dEh" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; layer = 2.4; on = 1},/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/turf/simulated/floor/plating,/area/research_outpost/maintstore2) "dEi" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/research_outpost/hallway) +"dEj" = (/obj/machinery/alarm{pixel_y = 24},/obj/structure/table,/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/turf/simulated/floor,/area/mine/production) "dEk" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/turf/simulated/floor{icon_state = "vault"; dir = 5},/area/research_outpost/longtermstorage) "dEl" = (/turf/simulated/floor{icon_state = "vault"; dir = 5},/area/research_outpost/longtermstorage) "dEm" = (/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/research_outpost/longtermstorage) @@ -9692,12 +9695,15 @@ "dEw" = (/obj/structure/transit_tube{icon_state = "N-S"},/turf/simulated/floor{icon_state = "delivery"; name = "floor"},/area/mine/explored) "dEx" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/lattice,/turf/space,/area) "dEy" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; layer = 2.4; on = 1},/turf/simulated/floor,/area/research_outpost/gearstore) +"dEz" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/floor,/area/mine/eva) "dEA" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/research_outpost/maintstore1) "dEB" = (/obj/machinery/hydroponics/soil,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor/grass,/area/research_outpost/maintstore1) "dEC" = (/turf/simulated/floor,/area/research_outpost/gearstore) "dED" = (/obj/machinery/recharge_station,/turf/simulated/floor,/area/research_outpost/gearstore) "dEE" = (/obj/machinery/mineral/unloading_machine,/turf/simulated/floor{icon_state = "floorgrime"},/area/research_outpost/tempstorage) +"dEF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/obj/structure/table,/obj/item/weapon/storage/belt/utility,/obj/item/weapon/pickaxe,/turf/simulated/floor,/area/mine/production) "dEG" = (/obj/machinery/conveyor{dir = 2; id = "anotempload"},/turf/simulated/floor/airless{icon_state = "asteroidwarning"; dir = 1},/area/mine/explored) +"dEH" = (/obj/structure/table,/obj/item/weapon/storage/backpack/satchel,/turf/simulated/floor,/area/mine/production) "dEI" = (/obj/machinery/conveyor{dir = 1; id = "anosample"},/turf/simulated/floor/airless{icon_state = "asteroidwarning"; dir = 1},/area/mine/explored) "dEJ" = (/obj/machinery/atmospherics/binary/pump{dir = 4},/turf/simulated/floor/plating,/area/research_outpost/maint) "dEK" = (/obj/machinery/artifact_analyser,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/bluegrid,/area/research_outpost/anomaly) @@ -9750,7 +9756,6 @@ "dFS" = (/obj/machinery/access_button{command = "cycle_interior"; frequency = 1379; master_tag = "research_airlock"; name = "interior access button"; pixel_x = -25; pixel_y = -25; req_access_txt = null},/turf/simulated/floor,/area/research_outpost/gearstore) "dFT" = (/obj/structure/table,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/weapon/wrench,/obj/item/device/measuring_tape,/turf/simulated/floor,/area/research_outpost/gearstore) "dFV" = (/obj/machinery/atmospherics/unary/cold_sink/freezer{dir = 1},/turf/simulated/floor/plating,/area/research_outpost/maint) -"dFW" = (/obj/machinery/atmospherics/unary/heater{dir = 1},/turf/simulated/floor/plating,/area/research_outpost/maint) "dFX" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/research_outpost/iso1) "dFY" = (/obj/machinery/artifact_scanpad,/turf/simulated/floor/bluegrid,/area/research_outpost/iso1) "dFZ" = (/obj/machinery/artifact_analyser,/turf/simulated/floor/bluegrid,/area/research_outpost/iso1) @@ -9967,8 +9972,6 @@ "dKl" = (/obj/machinery/light{dir = 4},/turf/simulated/floor{icon_state = "bar"},/area/mine/living_quarters) "dKm" = (/turf/simulated/floor,/area/mine/living_quarters) "dKn" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor,/area/mine/living_quarters) -"dKo" = (/obj/structure/rack,/obj/item/clothing/suit/space/rig/mining,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/rig/mining,/turf/simulated/floor,/area/mine/eva) -"dKp" = (/obj/structure/rack,/obj/item/weapon/storage/backpack/satchel,/obj/item/weapon/pickaxe,/obj/item/weapon/storage/belt/utility,/turf/simulated/floor,/area/mine/eva) "dKq" = (/obj/machinery/light,/turf/simulated/floor/plating/airless/asteroid,/area/mine/explored) "dKr" = (/obj/structure/table,/obj/item/weapon/storage/backpack/satchel,/obj/item/clothing/glasses/meson,/obj/machinery/light/small{dir = 8},/turf/simulated/floor,/area/mine/west_outpost) "dKs" = (/obj/machinery/door/airlock/glass_mining{name = "Break Room"; req_access_txt = "54"},/turf/simulated/floor,/area/mine/west_outpost) @@ -9998,7 +10001,6 @@ "dKW" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/mine/living_quarters) "dKX" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/mine/living_quarters) "dKY" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/mine/production) -"dKZ" = (/obj/machinery/alarm{pixel_y = 24},/turf/simulated/floor,/area/mine/production) "dLa" = (/turf/simulated/floor,/area/mine/production) "dLb" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/turf/simulated/floor,/area/medical/surgeryprep) "dLc" = (/obj/machinery/door/firedoor/border_only{dir = 4; layer = 2.6; name = "Firelock East"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{dir = 8; icon_state = "barber"},/area/research_outpost/hallway) @@ -10087,9 +10089,7 @@ "dMM" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/mine/west_outpost) "dMN" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/turf/simulated/floor,/area/mine/west_outpost) "dMO" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/mine/living_quarters) -"dMQ" = (/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/floor,/area/mine/eva) "dMR" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/disposalpipe/segment,/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/mine/eva) -"dMS" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/floor,/area/mine/production) "dMT" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/mine/eva) "dMU" = (/obj/structure/dispenser/oxygen,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/mine/eva) "dMV" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/simulated/floor,/area/mine/eva) @@ -10825,8 +10825,8 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaadaadaadaadaadaadaadaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaafaaiabKaaPabIabJaaPabSabRabMabMabNaaPabOaaiaafaafaagaafaafabPabuabsabuabPaafaagaaaaaaaafaagaagaagaafaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaacaacaacaacaaaaacaacaacaacaacaaaaacaacaacaacaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaadaadaadaadaadaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaiabKaaPabIabQaaPabLabHaaaaaaaaaaaPabTabTabTabTabTaafaafabUabsabuabsabVaafaafaafaafaafaafaafaafaafaafaafaafaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaacaacaacaacaaaaacaacaacaacaacaaaaacaacaacaacaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaadaadaadaadaadaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaiamSaaPabXabYaaiamTamUaaiaaaaaaabTabTacbaccacdabTabTaafaaVabsabsabuaaVaceaceaceaceaceaceapRapRapRapRapRapRaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaacaacaacaacaaaaaaaaaaaaaaaaaaaaaaacaacaacaacaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafaagaaiamXachancamZaneandanfaaPaaaabTabTapeacoacoacoapVabTabTaaVacqabsacraaVaceacsactaqNacvacwapRavoavoavoavoapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaiacxamvalBamuamnamkacDaaPaaaabTacEalbacGacoacHalaacJabTacKacLacMacNacOaceacsacPamJapjapjapnanKarLasvaejapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaadaadaadaadaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafaagaaiamXahSancamZaneandanfaaPaaaabTabTapeacoacoacoapVabTabTaaVacqabsacraaVaceacsactaqNacvacwapRavoavoavoavoapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaiacxamvalBamuamnamkacDaaPaaaabTacEalbachacoacHalaacJabTacKacLacMacNacOaceacsacPamJapjapjapnanKarLasvaejapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaiaaiaaiaaiakAamIamDamCaaPaaPaaPaaPaaaabTacYalbacZacoacHalaadaabTadbadcaddadeadfaceacsactapQacRaqcapRapCavgatFaurapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiadiadjadkadlaldalcaloalhaavadqadraaPaaaabTadsalbadtacoacHalaaduabTadvadwadxadyalGaceaceaceakSakWaceapRaqnaqPaqWarfapRaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiadCadDadEadDalxalvalBalAadIadJanJaaPaaaabTabTalralsacoalKalUabTabTadOalVadxalWaaVaceadRadSalFalMadVadWadWalqarnadWadWaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -10864,15 +10864,15 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatHavsavtavuatHavsavtavuatHaYnaYgaXWaXWaXWaXWaYQaYHarwaaaaaaalPaaaaafaaaaafaafaaaaaaavAaaaaaaaafaaaaaaaafaaaalPaafaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafaafaagapxapxapxapxaHDapxarbarbarbarbarbaYRaHIaHHaHGaHGaHGaHGaHKaHJaNqapEaJmalNaIjaIkaIhaIiaHYaIfaHNaHVaNQaLlavPavRavRaTIavRaKSavVavWavhaKPaviaviaKPaLcaKXaLaawbasRasRasRasRasRawbawcawdaweaaaalQalQalPaaaaaaaafaaaaaaaoPaaaaafaafaafaafalPalPalPaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaasSatHaZAawgasSatHaZyawgasSatKaZzatKatKatKatKatKaZeaspaaaaaaalPalPalPaaaaaaaafaaaawjawkawjaafaafaafaafalPalPalPaafapxapxapxapxawlawmawmawmawmawmawmawmawnapxapxawoawpawqapxawrawsaNJawwaZCaJfaJfaJfaJfaJfaZBaJfaJpaLDaJfaJfaJeaJeaJlaIYaJaaJnahmaIxaIAaIDaITaIvaHravdaIwawLawLbcxawMawNaVcawLauiawPawQaLQayMayMayMayMaMdaMmaMqawUasRasRasRasRasRawUawVawdaweaaaaaaaaaaafaafaaaaafaaaaaaawWaaaaaaaafaaaaaaaafaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaawXawYbaUawYawZawYaZOawYbaRaxcbaiaxbaxbaxbbaVatKbbEaspaaaaafaafaaaaaaaaaaaaaafaaaaxgbbFaKgaafaaaaafaaaaaaaaaaaaaaaapxapaapaaxjapaapaapaapaapaapaapaapaaxkaxlaxmaxnaxnaxnaxnaxnaxnaxoaJBaMMaxraxraxraxraxsaJAaxraMIaxraxsaxraxraxraxraxwaxxaxyaKdaKaaHxaJRaJRaJRaHrauhaJQawLawOawMaxCawMaVeaxEaWraxGaxHaMuaMmaMmaMmaMBaMEaMGaMHaJwasRasRasRasRasRaJxaJyaxNaxOaaaaaaaaaaaaaafaaaaafaaaaxPaxQaxPaaaaafaaaaaaaafaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxRaxSaxTaxUaxVaxTaxTaxWaxUaxTaxXaxYaxZaxZbmzatKbbEatLaafaafaaaaaaaaaaaaaaaaafaybaycaydbdBayfaaaaafaaaaaaaaaaaaaaaapxapaapxaygayhayiayiayiayiayiayiayiayjaygaykaylaylaylaylaylaylaylaQnaynaxrayoaypayqayrbdCbbraPaaPdaywayxaypayyaxrayzapEayAalNaQvaNFaNIbdEaHqaHravdbdFayDaxFaxFayEayFayGbeDayIavVbdHbdcbbUbbUbbUbaNbaTaPnbavbdGasRasRasRasRasRbdIasPasPasPaaaaaaaaaaafaafaafaafaaaaySbmRaySaaaaafaaaaaaaafaaaaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafatHayUayVayUayWaxTaxTayXayUayVayUayYaxSaxVbnfatHbbEatKatKazaatOatOatOatOatPatKazbazcazdazeazbapxapxawoawpawqapxapxapxapaaryaygaaaaafaaaaafaaaaafaaaaafaaaaygaykaylazfazgazhaziazjaylaQnapaaxrazkazkazlazmaznazoaPpaBdazrazsaztaztaxrayzapEazualNaQvaNFaHybdEaHqaHrauhazvbbOazxazyazzazAazBazBazCazBasPbeXbfGbeFbeGbeHbeObeEasPbdLasRasRasRasRasRbdKasPaafaaaaaaaaaaaaaafaafaaaaafazLazMbdMazOazPaafaaaaaaaafaaaaaaaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafazQasSazRavtazSazTazUazVazWazSavtazXazYasSazZbnnatHbnPboUboUboUboUboUboUaYHbezaAeazbaAfaAgaAhazbbghapaapaapaapaapaapaapaapaaAjaygaafaAkaAkaAkaAkaAkaAkaAkaafaygaykaylaAlaAmaAnaAoaAlaylaQnaApaxraxraxraxrbnhaAraypaAsaArbniaxraxraxraxrayzapEaAualNaQvaNFaHybdEaHqaHravdaEhazBazBazBazBazBazBaAwaAxaAyazBasPasPasPasPbgobgrasPasPbdKasRasRasRasRasRbdKasPaaaaaaaaaaaeaaaaaaaaaaaaaafaAAaABbdTaADaAAaafaaaaaaaafaaaaaaaaaaaaaaaaaaaafaafaaaaaaaaaaaaaafaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxRayVaAEaAFaAFaAFaAFaAGayVaxRaAHasSaAIbqOaAKaAKaAKaAKaAKaAKaAKaAKaZebfxbfzazbbckaANaAOazbaAPaAQaAPaAPaAPaAPaAPaAPaAPaAPaARaaaaAkaASaATaAUbbTaAWaAkaaaaygaykaylaAlbqMbpJbqBaAlaylaQnapxaxraBaaBbazlbpdaBdazoazpaBdbpIazsaBfaBfaxrayzapEayAalNbdZaIkaIhbdEbejbelavdaEiaHraBiaAxaBjaBjazBaAwaBkaAyazBaBlaBmaBnaBobhDaULaBqaafbfBbfdbfdbfdbfdbfdbfgaafaaaaaaaaaaaaaaaaaaaaaaaaaafaAAaBuaBvaBwaAAaafaaaaaaaBqaBqaBqaBqaBqbhqbhCaBqaBqaBqaBqaBqaBqaBqbgHaBFaBFaBFaBGaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaBHaBIaBJaBIaBIaDRaDSaBIaBIaBJaBMaBNasSbewbeAaQlbebbeuaBSaBTaBUaxeaAKaZeaPOatKazbazbaBXaBYaARaBZaCaaCbaCcaCdaCeaCfaCgaXEaCiaARaafaAkaQmaCkaClaCmaCnaAkaafaygaykaylbfCaAlbfFaAlaCraylaQnaCsaxrayoaypaCtaCuaAraCvaAsaAraCwaCxaypaCyaxrayzapEayAalNaQvaIAaIDaQxaIvaHraCAaEoaHraEpaAxaAxaAxazCaCDaCEaCFazBaCGaCHaCIaCJaYFaULaBqaaaaafaaaaafaaaaafaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaAAaZbaCMaCNaAAaBqaCOaCPaBqaQSaQDaQDaQDaQDaQDaQDaQFaRdaRdaRdaRdaRfaRdaRdaRdaRhaDaaafaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBHaBMaBIaDbaDcaDcaDdaDeaDfaDgaDhaDcaDcaDiaDjayUayWaZuaAKbgsbiraDnaDoaDnaBVaDpbfVaDsaqYaZnaDuaDvaAcaDwaDxaDyaDzaDzaDzaDAaDzaDzaDBbjWaARaaaaAkaRAaRTaRVaCmaSaaAkaaaaygaykaylbjgbjoaDIbjobjVaylaQnaDLaxraxraxraxraDMaAraypaDNaBdaDOaTuaypaDQaVHaVzaVAaVpaVwaKJaVGaShaShaShaSEaScaFRbjYaTnbabaSPaSPaSPaUgaSPaTFaTTaTUaTVaUkaUGaVQaULaBqaBqaBqaBqaBqaBqaBqaBqaBqaCOaCPaBqaBqaBqaCOaEjaEkaBqaBqaAAaAAaElaEmaAAaEnaVqaVoaVoaVsaEsaEsaEsaEsaEsaWyaVraEuaEuaEuaEuaUNaEuaEyaEyaVnaEyaEyaEyaEyaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDiaEBaECaEDaDcaEEaDcaEEaDcaEEaDcaEEaDcaEFaEGazSayWaEHaAKblwblyaEKaELaEMaENaAKbjZbkiaAcaEQaAcaERaqYaAPaESaDBaDzaDzaDzaDzaDzaDzaETaWjaWgaVJaVIaWMaWNaWKaWLaWJaAkaafaygaWIaWpblGaWxaWqaWsblEaWpaZdaZcaxraFmaypazlaFnaBdazoaFoaAraCwaVvaypblAaVHaWTaFsaFtaXcbdZagjagjagjagjaVEaVFaWSaVxaVybazaVxaXfaVxaXeaVxaXgaXhaFGaFHaFIaBoaXjaXmaXXaXVaXVaXCaYcaXYaXYaXYaXYaXYbaCaXYaXYaYwaYeaXnaRdaRdaYGaYxblNaWPaWQaWQaWQaWRaEsaEsaGeaEsaGfaGgaGhaEsaEuaWUaEuaGjaXlaXkaGmaGnaGoaIbasHaGraGsaGtaGuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaGvaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaXoaDcaDcaBJaDcaEEaDcaEEaGxaEEaDcaEEaDcaEFaEGazSayWaGyaAKaAKblVaYKaYPaYKaQlaQlaYJaYNaYOaYLaYMaYLaYLbakbajaGKaGLaGLaGLaGMaGLaGLaGNaGOaARaaaaZXaAkayJbmqayJaAkaAkaaaaygavOaylbmjaZIaZiaZqaZDaZEaZhbglaxraHbaypaCxaCuaAraypaAsaAraCwaZgaypaHdawGaYhaHfaHgaUnaYfalNalNalNalNalNaHjaYbazBaHlaAxazBaHmazBaHnazBaHobcvbcwbcNbczbdNbcXaYUbdlbdmbbvbdAbbwbbvbbvbbxbbzbbybbAbbybbybbybbibcubcbbawbawbawbmxbaSbawbaxbawbaWaYIaHOaHPaHQaHRaHSaHTaEsaHUbaXaEuaHWaHXaYiaHZaGnaIaaIbasHaIcaEyaEyaEyaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDiaIdaECaEDaDcaEEaDcaEEaDcaEEaDcaEEaDcaEFaEGazSaIeawzawyawxawuawuawuawzawCawDawzawAaImaInawBauKauKaAPaGOaIpaCaaIqaBOaGOaIraIsaItaIuaARaaaawaaaaavMavNavMaaaaafaaaaygavOaylaAZaAXavZaBeaBcaylaAtaAJaxraIEaypazlaIFaIGazoaIHaIIaIJaIKaILaIMawGaBsaIOaIPaAqaBKaISaaaaaaaUnaIUaIVaBLazBaIXaAxaAxaAxaCEaAxaAxaAxauOaBoaKyaBoaBoavJaBoaJcaBoaJdavHavGaJgaJhaJiaJjaJkavFaJjaJjaJjaJjaJjavDaJjaJjaJjaJjaJjaJjaJjaJjasIayRayvaAzaAiaBraBpazHbMsazIavpavlavmavnazFayNayPazDazEasHaIbaJDaJEaJFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxRaxSaxTaxUaxVaxTaxTaxWaxUaxTaxXaxYaxZaxZbmzatKbbEatLaafaafaaaaaaaaaaaaaaaaafaybaycaydbdBayfaaaaafaaaaaaaaaaaaaaaapxapaapxaygayhayiayiayiayiayiayiayiayjaygaykaylaylaylaylaylaylaylaQnaynaxrayoaypayqayrbdCbbraPaaPdaywayxaypaztaxrayzapEayAalNaQvaNFaNIbdEaHqaHravdbdFayDaxFaxFayEayFayGbeDayIavVbdHbdcbbUbbUbbUbaNbaTaPnbavbdGasRasRasRasRasRbdIasPasPasPaaaaaaaaaaafaafaafaafaaaaySbmRaySaaaaafaaaaaaaafaaaaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafatHayUayVayUayWaxTaxTayXayUayVayUayYaxSaxVbnfatHbbEatKatKazaatOatOatOatOatPatKazbazcazdazeazbapxapxawoawpawqapxapxapxapaaryaygaaaaafaaaaafaaaaafaaaaafaaaaygaykaylazfazgazhaziazjaylaQnapaaxrazkazkazlazmaznazoaPpaBdaIEaIIaypaztaxrayzapEazualNaQvaNFaHybdEaHqaHrauhazvbbOazxazyazzazAazBazBazCazBasPbeXbfGbeFbeGbeHbeObeEasPbdLasRasRasRasRasRbdKasPaafaaaaaaaaaaaaaafaafaaaaafazLazMbdMazOazPaafaaaaaaaafaaaaaaaaaaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafazQasSazRavtazSazTazUazVazWazSavtazXazYasSazZbnnatHbnPboUboUboUboUboUboUaYHbezaAeazbaAfaAgaAhazbbghapaapaapaapaapaapaapaapaaAjaygaafaAkaAkaAkaAkaAkaAkaAkaafaygaykaylaAlaAmaAnaAoaAlaylaQnaApaxraxraxraxrbnhaAraypaAsaArblAaIJaypaVvaxrayzapEaAualNaQvaNFaHybdEaHqaHravdaEhazBazBazBazBazBazBaAwaAxaAyazBasPasPasPasPbgobgrasPasPbdKasRasRasRasRasRbdKasPaaaaaaaaaaaeaaaaaaaaaaaaaafaAAaABbdTaADaAAaafaaaaaaaafaaaaaaaaaaaaaaaaaaaafaafaaaaaaaaaaaaaafaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxRayVaAEaAFaAFaAFaAFaAGayVaxRaAHasSaAIbqOaAKaAKaAKaAKaAKaAKaAKaAKaZebfxbfzazbbckaANaAOazbaAPaAQaAPaAPaAPaAPaAPaAPaAPaAPaARaaaaAkaASaATaAUbbTaAWaAkaaaaygaykaylaAlbqMbpJbqBaAlaylaQnapxaxraBaaBbazlbpdaBdazoazpaBdbniaxraxraxraxrayzapEayAalNbdZaIkaIhbdEbejbelavdaEiaHraBiaAxaBjaBjazBaAwaBkaAyazBaBlaBmaBnaBobhDaULaBqaafbfBbfdbfdbfdbfdbfdbfgaafaaaaaaaaaaaaaaaaaaaaaaaaaafaAAaBuaBvaBwaAAaafaaaaaaaBqaBqaBqaBqaBqbhqbhCaBqaBqaBqaBqaBqaBqaBqbgHaBFaBFaBFaBGaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaBHaBIaBJaBIaBIaDRaDSaBIaBIaBJaBMaBNasSbewbeAaQlbebbeuaBSaBTaBUaxeaAKaZeaPOatKazbazbaBXaBYaARaBZaCaaCbaCcaCdaCeaCfaCgaXEaCiaARaafaAkaQmaCkaClaCmaCnaAkaafaygaykaylbfCaAlbfFaAlaCraylaQnaCsaxrayoaypaCtaCuaAraCvaAsaArazsaDNaBfaBfaxrayzapEayAalNaQvaIAaIDaQxaIvaHraCAaEoaHraEpaAxaAxaAxazCaCDaCEaCFazBaCGaCHaCIaCJaYFaULaBqaaaaafaaaaafaaaaafaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaAAaZbaCMaCNaAAaBqaCOaCPaBqaQSaQDaQDaQDaQDaQDaQDaQFaRdaRdaRdaRdaRfaRdaRdaRdaRhaDaaafaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBHaBMaBIaDbaDcaDcaDdaDeaDfaDgaDhaDcaDcaDiaDjayUayWaZuaAKbgsbiraDnaDoaDnaBVaDpbfVaDsaqYaZnaDuaDvaAcaDwaDxaDyaDzaDzaDzaDAaDzaDzaDBbjWaARaaaaAkaRAaRTaRVaCmaSaaAkaaaaygaykaylbjgbjoaDIbjobjVaylaQnaDLaxraxraxraxraDMaAraypaAsaAraCwaCxaypaCyaVHaVzaVAaVpaVwaKJaVGaShaShaShaSEaScaFRbjYaTnbabaSPaSPaSPaUgaSPaTFaTTaTUaTVaUkaUGaVQaULaBqaBqaBqaBqaBqaBqaBqaBqaBqaCOaCPaBqaBqaBqaCOaEjaEkaBqaBqaAAaAAaElaEmaAAaEnaVqaVoaVoaVsaEsaEsaEsaEsaEsaWyaVraEuaEuaEuaEuaUNaEuaEyaEyaVnaEyaEyaEyaEyaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDiaEBaECaEDaDcaEEaDcaEEaDcaEEaDcaEEaDcaEFaEGazSayWaEHaAKblwblyaEKaELaEMaENaAKbjZbkiaAcaEQaAcaERaqYaAPaESaDBaDzaDzaDzaDzaDzaDzaETaWjaWgaVJaVIaWMaWNaWKaWLaWJaAkaafaygaWIaWpblGaWxaWqaWsblEaWpaZdaZcaxraFnaypazlaFmaBdazoazpaBdaDOaTuaypaDQaVHaWTaFsaFtaXcbdZagjagjagjagjaVEaVFaWSaVxaVybazaVxaXfaVxaXeaVxaXgaXhaFGaFHaFIaBoaXjaXmaXXaXVaXVaXCaYcaXYaXYaXYaXYaXYbaCaXYaXYaYwaYeaXnaRdaRdaYGaYxblNaWPaWQaWQaWQaWRaEsaEsaGeaEsaGfaGgaGhaEsaEuaWUaEuaGjaXlaXkaGmaGnaGoaIbasHaGraGsaGtaGuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaGvaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaXoaDcaDcaBJaDcaEEaDcaEEaGxaEEaDcaEEaDcaEFaEGazSayWaGyaAKaAKblVaYKaYPaYKaQlaQlaYJaYNaYOaYLaYMaYLaYLbakbajaGKaGLaGLaGLaGMaGLaGLaGNaGOaARaaaaZXaAkayJbmqayJaAkaAkaaaaygavOaylbmjaZIaZiaZqaZDaZEaZhbglaxraHbaypaFoaCuaAraypaAsaAraCwaZgaypaHdawGaYhaHfaHgaUnaYfalNalNalNalNalNaHjaYbazBaHlaAxazBaHmazBaHnazBaHobcvbcwbcNbczbdNbcXaYUbdlbdmbbvbdAbbwbbvbbvbbxbbzbbybbAbbybbybbybbibcubcbbawbawbawbmxbaSbawbaxbawbaWaYIaHOaHPaHQaHRaHSaHTaEsaHUbaXaEuaHWaHXaYiaHZaGnaIaaIbasHaIcaEyaEyaEyaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDiaIdaECaEDaDcaEEaDcaEEaDcaEEaDcaEEaDcaEFaEGazSaIeawzawyawxawuawuawuawzawCawDawzawAaImaInawBauKauKaAPaGOaIpaCaaIqaBOaGOaIraIsaItaIuaARaaaawaaaaavMavNavMaaaaafaaaaygavOaylaAZaAXavZaBeaBcaylaAtaAJaxracGaypazlaIFaIGazoaIHayyazraIKaILaIMawGaBsaIOaIPaAqaBKaISaaaaaaaUnaIUaIVaBLazBaIXaAxaAxaAxaCEaAxaAxaAxauOaBoaKyaBoaBoavJaBoaJcaBoaJdavHavGaJgaJhaJiaJjaJkavFaJjaJjaJjaJjaJjavDaJjaJjaJjaJjaJjaJjaJjaJjasIayRayvaAzaAiaBraBpazHbMsazIavpavlavmavnazFayNayPazDazEasHaIbaJDaJEaJFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJHaJIaBIaDbaDcaDcaDcaJJaDcaDcaJKaDcaDcaDiaJLaJMayWaxTaJNaJOaJOaJOaJOaJOaJOaJOaJPasDatKatKavkatKatKaAPaJSaJTaJUaJVaJVaJVaJVaJWaJXaJYaARaJZavaaKbaKcavbaKeaKbaKbaKfaygavcaylaylazJaAbaAaayLawGaUnazGaxraxraxraxraKlaKmaCxaCxaKnayHawGawGaxraxraIOaIOaIOaIOaKpaKqaKraKsaUnaKtaIVaKuazBazBazBazBazBazBazBazBazBauOaKwaKvaKxaIZauMavIaKBaKCaJdauyauWauXaKGaKHaJjayOayQayZayCaIyaPbayKaxDaxJayaayBaxBaJbaxfaDqaJjauwauvaKYaJraxdaxaaJuaysaEsaLbauuaLdavfauoaveaunaEuaEyaLhasHaIbaLiaLjaLkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaJHaBIaBJaBIaBIaDRaDSaBIaBIaBJaJIaLmasSaLnaxTawXaLoaLoaLpaLoaLqatHaLraLsasDaLtaLuaACaLwazwaLyaLzaLAaLzaLzaLzaLzaLzaLzaLzaLBaLCazNaAdaLFaLFayTaLHaLFaLFaLFaLIazKaLJaLKaLzaxtaNmaLOaLPaIOaIBaMkaLSaLWaLUaLTaLTaLTaLTaLTaLTaOraLVaOAaLXaLYaLZaMaaMbaMcaIOaIOaIOaOBaMeaMfaMeaMgaMhaLSaMjaIzaMkaGQaBoaMlaxMaOOaMoaMnaMpaxKaMraMsaMtaJdaxLaMvaMwaMwaMxaJjaGwaFTaEJaEJaEJaEJaEJaFqaFNaEOaEUaHLaEJaEJaHMaJjasIarZaHPaHPaCXaDFaHPaHPaEsaMOaMPaEuaytaMRaHZavTaEuaMSaymayeaIbaEyaEyaEyaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaawXayVaMVaAFaAFaAFaAFaMWayVawXaAHasSaAIaMXaMYaDKavSaNbaNbaNcatHaNdaLsaxAaNfaLuaxzaNhaNiaNjaNkaNlaLzaLzaLzaLzaLzaLzaLzaxhaxiaxuaLzaLzaLzaxpayuaLzaLzaLzaLzaxvaLzaLzaLzaxtaNmaLuaLPaIOaIOaIOaIOaIOaIOaIOaIOaIOaIOaIOaIOaNsaNtaNuaNvaNwaNxaNyaNzaNAaIOaIOaIOaLPaIOaIOaIOaIOaIOaIOaIOaIOaNBbNwaCjaCWaCQaMpaNEaMpaMpawEaNGaMsaCoaJdawFawJawSaNLaNMaJjaDraDHaCpaCpaCpaCpaCpaCqaCTaDlaDmaCpaCpaDJaNRaJjasIarZaNVaHPaHPaNWaHPaNXaEsaEuaEuaEuaEuaEuaEuavQaEuaIbaIbasHaIbaNZaOaaEyaaaaafaaaaaaaaaaaaaaaaaaaaaaJGaJGaJGaJGaJGaJGaJGaJGaJGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -10923,7 +10923,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaafaafaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafbSFbSGcnjcngcnhcnQbSFdgmdgldgkdgjcrEcrCcrrcrrcrucnEcnEcnDcnFbAkbYpbjqbjxcnCbwMcnzctfcnBcnwcnxcnybfNbtVcnpcnqdTTbfNbkjbqZdZLdZOdZOdZMdZNbqZdYtdgpdZQbiDdZTdZRdZSdZHbiDdZGbtBcrVbwUbxPbtKbxQbiKdZKdZJbiKcrXbPwbiddgCbssdZVdZWbidbfMdWwdXGbGKaaaaafaaaaaabwwctuctjdgrdgqdgtdgsdgvdgudgxdgwdgzdgydgodgAdfQdfQdgBdgodgodgodgndfTbYUcoebYWbYUaaaaaaaaaaafaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafcrLbEQbEQbFgbtybtybjBbjBbjBbjBbEOaafaafaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaafaafaafbTebTebTebTebTebTebTebTebTebTebTebTebTeaaaaaacmobSGbSGbSGbSGcmAbSFdfNdfMdfLdfKcqdcpVcqccpVcpUcpTcpScpQcpOcpLcqjcqwcmCdfPbgXbgXbgXbgXbgXbgXbgXbfNbfNcmBbfNbfNbfNbkjbqZbqZdZrdZsdZtdZubqZdfUcqDcqTbiDbkdbiDbiDbiDbiDbwUdZydZzbwUcqXcqWcqXbiKbXLdZBbiKbPybPybiddZDbssbidbidbidbfMcpWcmNbGKaaaaafaaaaaedfXdfVdfWdgbdgadfZdfYdggdgfdgedgcdfQdfQdfQdfQdgidghdfQdfQdfQdfRdfSdfTcqQcmGbZVbYUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaafaafaafaafaaaaaaaaaaaaaafaafaafaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaabTecnScqacnSbTecnOcpYcnObTecnMcpZcnMbTeaaaaaacphbSGcpXbSGbSGcpRbSFcFVcFUcQKcFXcRqcRpcFMcFKcFRbqVbqVcFTbqVbqKcFIcFJbjxcpCcpDcpucpucpEdgZdhadgGdhbdhcdhddhedhfdgGbkjbEaeaxbMXbMXeaveaweaDeaEdLbdPueazeaAeayeaeeaeeaudXBbwUbwUbwUdhtcZLdhubiKbiKbiKbiKbPybPybiddZDbsseareasbidbfMbGKbGKbGKaaaaafaaaaaadhqdhrdhsdhldhkdhmcWQdQSdhgdhidhhdfQdfQdfQdfQdhodhndfQdhpdfQdfRdghdfTcaycqbcaAbYUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaabTecnScnRcnSbTecnOcnPcnObTecnMcnNcnMbTeaaaaaacphbSGbSGbSGcpicoIcoHcsOcsNcvgcuVcsWcsPcsMcsEcsmcoycoEcoDdgFbAkbYpcpdcpbcpccpgcpfcpecpfdgIcoWdgGdgHdgKdgLdgJdgHdgGbkjbEaeabbMXbOsbMXeaaeageahcCNeajeaceadeaeeafeaeeandXBciZboNcDacEycExdgYcFGboNboNboNboNcEzbidbidbidbidbidbidbfMbGKaafaafaafcbfaafaafdgRdgPdgQdgQdgQccQbudcCKcyldgTdgSdgMdgMdgMdgXdgWdgWdgVdgMdgMdgNdgOdfTcbjcpjcblbYUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaabTecnScnRcnSbTecnOcnPcnObTecnMcnNcnMbTeaaaaaacphbSGbSGbSGcpicoIcoHcsOcsNcvgcuVcsWcotcsMcsEcsmcoycoEcoDdgFbAkbYpcpdcpbcpccpgcpfcpecpfdgIcoWdgGdgHdgKdgLdgJdgHdgGbkjbEaeabbMXbOsbMXeaaeageahcCNeajeaceadeaeeafeaeeandXBciZboNcDacEycExdgYcFGboNboNboNboNcEzbidbidbidbidbidbidbfMbGKaafaafaafcbfaafaafdgRdgPdgQdgQdgQccQbudcCKcyldgTdgSdgMdgMdgMdgXdgWdgWdgVdgMdgMdgNdgOdfTcbjcpjcblbYUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaabTecrgcnicrebTecrccnfcrbbTecracnccqZbTeaaaaafcphcrdbSGbSGcqqbWbbSFdPYdPVcvgcvgdPTcvgcvgcvgcvgcrzbYpcrxcrybAkbYpdRPcrlbyOcrhcricrkcridhIcrqdhKdhLdhGdhHdgGdgGdgGbkjbEadhOebrdBIebpebqebiebjdQhebhebmebnebkdBNebcdhNebadQabJNebfdQedQddhMbCTbyDbXPbXQbGKbvKboNboNboNboNboNboNciNbGKaaaaaaaaaaafaaaaaabwwdhWdhUdBXdhTbuddQidQSdQRdfTdhVbyYbyYbyYdhPcvudhQdhSbyYbyYbyYdhYdfTdhXcrNcccccdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaafaafbTecqocdMcqpbTecdWcdMcdXbTecdLcdMcdNbTeaaaaafcqrbSGbSGbSIcqqcqybSFdPAdPvcqvcqucqtcqscqAcqAdhvcqBcqAcmpcqzbAkbAkbjqcqIcqJcpDcqCcqCcqHdhBdhCdgGdhAdhydhzdhwdhxdgGbkjbEadhDeaMdCpeaOeaPbEaeaFdPDeaHdXBeaIeaJdCqeaSdhEdXBbfMbPydXFeaUeaTeaQdXFaaaaaaaaabGKbGKbGKbXObXPbXPbXQbGKbGKbGKaaaaaaaaabudbudbudbudbudbudbudbudbuddPHdPSdPPdfTdfTbZPbOwcdqdfTdfTdfTdfTcoTbOwcdqdfTdfTccSdhFccSaafaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaGvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaachdaafaafaafaaaaafcsLaafcsLaafcdmaafcdlaafcdmaafcdlaafaafaaabSFcsKbUXcsIdbicszbQGcsBcsAbQGcsCcsDcmJcmJdTDcmJchBcsGcsFchBcsHcstcsucsvcswcaOcaOcaOcaOcsxcsycaOcjXcjXcjXcjXcjXcjXbkjbEaebRdibdCyebNebObEaeaFdTLebMdXBebKebIdCzdiaebGdXBbfMbPydXFebFebEdhZdXFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaabudcnbcmXcmYdTJdTKcdydTHcfcdTIdTFdTEdTGcrHaaaaaaaafaafaaaaaaaaaaaaaaaaaaaaaaafcebceccebaafaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -10932,8 +10932,8 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaafcfqcfpcfmcbDcfmcbDcfmcbDcfocbDcfmcbDcfncbkcbkcbkcflbSZbSZcfkbSZcgccbkcgbcgacfZcfTcfSckyckxckuckqcfJcfGcfFcfAcfzcducfycfxcaOcgocfvcfvcfvcftcfucaOckgcfgcfgcfgcfrcjXbkjdaLbEadXJdXKdXLdXLdXMdXNcjxdXPdXQdXRdXRdXSdXCdXBciZciNbGKbZJbVucZgbVubZJaaaaaaaafaaaaaaaaabVuceuccOccYbVuaafaafaaaaaaaaabudcfccfccfccfcckfcbWcjFcjEcjyckeckdcjWbudaaaaaaaaaaaaaaachcchcchcchdaafaafaafaafcfVaafaafaafaafaafampchcchcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaafaafaafcbMciccibbSZcibciYchYciXciabSZcibbSZbSZbSZbSZbSZciUcbkciWciVcbkciqcipciscirciucitciwcnLcnHcnvcnIchBcindeKciochBcnKciMciQciRciSciSciTciTchqcixcaOcnAcfgcizcfgcnTcjXbkjdeCbEaciydDxdXLdYnbEadYtcnodYtdXBdYrdXRdDyciLdXBbfMbGKbGKbVucnucntdeIbVubVubVucnJbVubVubVubVucsjbXKcbdbVubVubVubZJaaaaaabudcnbcmXcmYcmZcnacdycnlcnncnmcnecbWcnkbudaaaaaaaaaaaaaaachcaaaaafaaaaafaaaaaaaaachWaaaaafaafaaaaaaaaaaaachcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaafaafaaaaaacbMciccibbSZcidchUchXchHchGchHchYchZciachLchHchHchRchHchSchTchHchIchIchHchGcfTchKbWldeBdcxdbebQGchBchFchBchBchBchvchwchtchuchzchAchxchychqdypcaOchpcfgchscfgcfgcjXbkjbPybEabEadDBbEabEabEadYkbPycmFdXBdXBdXBdDCdXBdXBbfMbGKaaabVudaXdYFdbacaZdbdcmzcmwcilcmycmxbVudWFbXKdWLbVudaWcfCbVuaafaafbudccCccCccCcmDcmEcbWcmscmrcmqcmicbWcmcbudbudbudbudaaaaaachcaaaciOciOciOciOciOaafciPaafciOciOciOciOciOaaachcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMciccidchHchHchHchHchHchGchHchHchHchGchYckockmcknckkcklckhckickwckwckickGbSZckpckvclqckMdTzckNckHckIckHckKckJckHckQdYJckSckOckPckPckPckVckPckWckXckTckUclHclHcjXboodeMcocbondDEcodcokboNboNboNboNboNboNboNdDFboNcomciNbGKaaacaZdeObsxdZpcaZdeNdZnbXKbXKdZmcbbdZkdWqdZldWsdZjbXKbXKbVuaaaaaabudccCccCccCcmZconcdycorcotcoscovcoucoucowcoqcopbudaafaafchcaafcjGcjHcjHcjHcjHcjIciPcjJcjKcjKcjKcjKcjLaafchcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaactvctvctvctvctvctvctvctvctvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMcjlbSZbSZcjjcjbcjbcjbcjdcjbcjbcjbcjdcjbcjbcjhcjicjecjdcjfcjgcjScjRcjbcjQcjPcjOcjCcjBdYIcjZcjYcjqcjVcjUcjTcjqcjqcjrcjncjocjmcjkcjkckacjkcjkcjAcjscjscjzclHclHcjXbPybfMbTBbTBbTBbTBdYHbTBbTBbTBbTBbPybPybGKbGKbGKbGKbGKbGKaaacaZdXmdZicaZcaZdeLdZgdZddZcdZfdZedZadZbcspcsqdYZbXKdYYbVuaaaaaabudcfccfccfccfccnYcbWcmscnWcnVcmicbWcbWcnXcbWcnUbudaaaaaachcaafckzckzckzckzckzaaaciPaaackzckzckzckzckzaafchcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMciccidchHchHchHchHchHchGchHchHchHchGchYckockmcknckkcklckhckickwckwckickGbSZckpckvclqckMdTzckNckHckIckHckKckJckHckQdYJckSckOckPckPckPckVckPckWckXckTckUclHclHcjXboodeMcocbondDEcodcokboNboNboNboNboNboNboNdDFboNcomciNbGKaaacaZdeObsxdZpcaZdeNdZnbXKbXKdZmcbbdZkdWqdZldWsdZjbXKbXKbVuaaaaaabudccCccCccCcmZconcdycorcjPcoscovcoucoucowcoqcopbudaafaafchcaafcjGcjHcjHcjHcjHcjIciPcjJcjKcjKcjKcjKcjLaafchcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaactvctvctvctvctvctvctvctvctvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMcjlbSZbSZcjjcjbcjbcjbcjdcjbcjbcjbcjdcjbcjbcjhcjicjecjdcjfcjgcjScjRcjbcjQbpIcjOcjCcjBdYIcjZcjYcjqcjVcjUcjTcjqcjqcjrcjncjocjmcjkcjkckacjkcjkcjAcjscjscjzclHclHcjXbPybfMbTBbTBbTBbTBdYHbTBbTBbTBbTBbPybPybGKbGKbGKbGKbGKbGKaaacaZdXmdZicaZcaZdeLdZgdZddZcdZfdZedZadZbcspcsqdYZbXKdYYbVuaaaaaabudcfccfccfccfccnYcbWcmscnWcnVcmicbWcbWcnXcbWcnUbudaaaaaachcaafckzckzckzckzckzaaaciPaaackzckzckzckzckzaafchcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaactvctvctvctvctvctvctvctvctvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaachdaaaaaaaaaaaacbMcicbSZbSZbSZbSZbSZbSZcmmbSZbSZbSZcmmbSZbSZcmmcicbSZcmmcidcmnclTcaiclUcljcbsclVbSZbSZcpJcpBbQGbQGbQGbQGclXclrcaTcaSccsciRclYcaPcmbcmjcaPcmkcaOcpKcmlcfgcqGcencjXcpIbfMbTBcpHbhMbhLbYhbhKcoAbhPbTBbSabhObGKaaaaaaaaaaaaaaaaaabVudfIdWicwJcoJdWjcsidWndWodfzcsTcsQdWdcsRdWedWfbVudWgbVuaaaaaabudcnbcmXcmYccLcnacdycpFcoBcpGcpmcplcpAcprcpkcoUbudaaaaaachcaaaaafaaaaafaafaafaaaciPaaaaafaaaaafaaaaafaaachcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaactvctvctvctvctvctvctvctvctvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMcicbSZbSZclKckickickiclBckickickiclBckickiclDclGckiclIckiclJclhcljcliclhclnclnclnclncoPclpclocbwclAclzclxclrclbcdzccsclacldcaPcaPclccaPclecaOcqhcqhclfcqGcencjXbPybfMbTBbvhbvibVTbVSbvmbVSbvbbTBbTfbvgbGKaaaaaaaaaaaaaaaaaabVudfxdfwdfmcoGdWxdWydWzdWAdWqdWBcgidWrdWqdWpdWsbVubVubVuaaaaaabudccCcoLccCcoKcmEcbWcoFcoBcozcbUcbWcoxcfccfccfcbudaaaaaachcaaaciOciOciOciOciOaafciPaafciOciOciOciOciOaafchcaaaaaaaaaaaaaaaaaaaaaaaacmdaaaaaaaaacmdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaactvctvctvctvctvctvctvctvctvaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalQaaaaaaaaaaaacbMcbJcbKcbDcbIcbDcbHcbDcbGcbDcbFcbDcbEcbDcbDcbCcbBcbAcbzcbwcbvcbscbubSZcbmcbmcbqcbrcbrbWlcbhcbicbgcazcaVcaXcaYcaTcaScaUcaOcaQcaPcaRcaPcaNcaMcaOcjXcjXcjXcjXcjXcjXbPybfMbTBbyGbyIbvibYgbvibVSbyFbTBbyEbUjbGKaaaaaaaaaaaaaaaaaabVudWDdWEcaZcaZcVPdWIcVQcgTdWFbXKdWLdWMdWFbXKdWLbVuaaaaaaaaaaaabudccCccCccCccLccGcbLcbRcbScbTcbUcbWcbUcbWcbXcbWccBaafaafchcaafcjGcjHcjHcjHcjHcjIciPcjJcjKcjKcjKcjKcjLaafchcaaaaaaaaaaaaaaaaaaaaaaaacmdcmdcmdcmdcmdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -11861,7 +11861,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadvcdCOdvIduBdxUdzzdCWdBodDLdBodDMduBduBdDNdxuduBdvIdvIdvcdtbdDOdvIduBdvcdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdBvdBvdCidCidCidCidCidCidCidCidCidCidDPdDQdDRdDQaaaaaaaaaaaaaaaaaaaaaaaaaafdDbdDcdDSdvudvsdDVdvpdxgdDYdDYdpadpbdBMdCtdBMdEadBMdoZdEcdvodBOdvndBOdBRdBRdvmdBRdBUdBUdvldBUdBUdEhdvkdvjdEkdEldEldEmdCKdEndqWdrsdrsdEodEpaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadvcdCOdEqdvIdvIdzzdvIdChdwTdvIdErdDMdChdBudEsdvIdEtdwodvcdBodtbdCWduBdvcdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdDQdCidCidCidCidCidCidCidCidCidCidCidEudEvdEwdExaaaaaaaaaaaaaaaaaaaaaaaaaafdDbdDcdEydvQdvRdvQdvPdECdEDdDYdpfdyUdyUdEGdpddEIdBMdpcdEJdvFdvNdvBdvCdvDdvEdvvdvwdvxdvydvOdEVdBUdEWdpedCKdEYdEZdEYdEZdCKdFadFbdsaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadvcdCOdFcdxUdxsdvcdFddvcdFedFfdvcdxWdvcdFedFfdvcdxVdCWdvcdDNdFgdtbdAwdvcdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdFhdCidCidCidCidCidCidCidCidCidCidCidCidFidFjdExaaaaaaaaaaaaaaaaaaaaaaaaaafdDbdoVdECdECdFkdFldFmdECdFndDYdEEdyUdMCdFqdFpdFsdBMdoWdviduWdFwdFxdFydBRdFzdFAdFBdBUdFCdFDdFEdBUdFFdwFdFHdCKdCKdCKdCKdFIdFJdqTdsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadsadsadsadvcdvcdvcdvcdvcdvcdFddvcdFKdxudxWdAwdwodxVdBrdxVdzBdxUdvcdFedFLdFMdFNdvcdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdDPdCidCidCidCidCidCidCidCidCidCidCidCidFidEwdExaaaaaaaaaaaaaaaaaaaaaaafaafdDbdFOdFPdFPdFQdFRdECdFSdFTdDYdFodyUdoXdFqdoYdFsdBMdFVdFWdBOdFXdFYdFZdBRdGadGbdGcdBUdGddGedGfdBUdGgdGhdFHdqTdsadqTdGidGjdGkdqTdsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadsadsadsadvcdvcdvcdvcdvcdvcdFddvcdFKdxudxWdAwdwodxVdBrdxVdzBdxUdvcdFedFLdFMdFNdvcdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdDPdCidCidCidCidCidCidCidCidCidCidCidCidFidEwdExaaaaaaaaaaaaaaaaaaaaaaafaafdDbdFOdFPdFPdFQdFRdECdFSdFTdDYdFodyUdoXdFqdoYdFsdBMdFVcsPdBOdFXdFYdFZdBRdGadGbdGcdBUdGddGedGfdBUdGgdGhdFHdqTdsadqTdGidGjdGkdqTdsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadsadsadsadsadsadsadsadsadsadvcdFddvcdxudAwdGldzydtWdxUdxudvcdxVdwodvcdGmdGndGndGodvcdGpdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdBvdCidCidCidoPdCidCidCidCidCidCidCidCidGqdGraafaaaaaaaaaaaaaaaaaaaafaafaafdDbdDbdGsdGtdDbduSdGvduTdGvdDbdoOdGTdCidCidCidCidBMdBMdBMdBOdBOdBOdBOdBRdBRdBRdBRdBUdBUdBUdBUdBUdFHdFHdGydGzdrndrndGAdFbdqTdqTdsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadsadsadsadsadsadsadsadsadsadvcdFddvcdAwduBdzBdxudxVdwodzBdvcdFddvcdvcdAydtbdGndGBdGCdGpdGpdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdoFdoJdCidoUdoFdoKdCidCidCidCidCidCidCidCidGDdGEaaaaaaaaaaaaaaaaafdGFdGGdGHdGIdGJdoSdoRdoQduVdoTdGPdGQdDbdGxdCidCidCidCidCidGRdGSdGTdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdrldGUdFbdGVdqTdqTdqTdqTdqTdsadsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsadsadsadsadsadsadsadsadsadsadsadsadsadvcdFddvcdvcdvcdvcdvcdvcdvcdvcdvcdFddvcdAydtbdAzdtbdGodGWdGpdGpdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdBvdoFdCidCidCidoFdoKdCidCidCidCidCidCidCidGXdGYdGZdHadHadHadHadHadHadHbdHcdHddHedHedoLdFrdFrdDbduQduRdHjdDbdGxdCidCidCidCidCidFidHkdHldqTdqTdsadsadsadsadsadsadqTdqTdqTdqTdqTdrldGUdFbdHmdGpdHmdqTdqTdqTdqTdsadsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -11969,9 +11969,9 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndH aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHVdHVdHVdHVdHVdHVdHVdHVdHndHndHndHndHndHndHndHVdHVdHVdHVdHVdHVdHndHndHndHndHndHndHndHndHndCidCidCidCidCidCidCidCidJjdJkdJldCidCidCidBvdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdqTdBvdBvdBvdBvdBvdBvdBvdqTdqTdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadIPdJmdIPdIPdIPdIPdIPdIPdMvdJndCidCidCidCidCidCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaadqTdqTdqTdqTdqTdDQdysdMCdytdytdyudCidIedHIdHJdCidCidCidCidCidCidCidGpdGpdBvdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHVdHVdHVdHVdHVdHVdHndHndHndHndHndHndHndHVdHVdHVdHVdHVdHVdHndHndHndHndCidCidJodJodJodJodJodJodJpdJqdJrdJodJodJodJodJodCidCidCidBvdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdqTdqTdBvdBvdCidCidCidCidCidBvdBvdBvdBvdBvdqTdqTdqTdqTdqTdqTdqTdsadsadsadsadIPdIPdIPdIPdJsdJtdJudIPdITdJvdIPdRxdIPdIPdIPdJwdJxdJydIPdCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaadqTdqTdqTdBvdDQdyndFpdyodyodOsdCidHEdHOdHGdCidCidCidCidCidCidCidCidCidBvdBvdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadqTdsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHVdHVdHVdHVdHVdHVdHndHndHndHndHndHndHndHVdHVdHVdHVdHVdHndHndBvdCidCidCidJodJzdwgdJBdJCdJDdMfdMcdMtdMpdMudJJdJKdJLdHJdCidCidBvdBvdBvdBvdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdqTdBvdBvdCidCidCidCidCidCidCidCidCidCidBvdBvdBvdBvdBvdqTdqTdqTdqTdsadsadsadIPdJMdJNdJOdJPdJNdJNdIPdIXdIYdJQdMvdIPdJRdJSdJTdJTdJTdJedCidCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaadBvdBvdBvdDQdwydNbdwkdwkdHGdCidCidJUdJVdJWdJXdJVdJVdCidCidCidCidCidCidBvdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHVdHVdHVdHndHndHndHndHndHndHndHndHVdHVdHVdHndHndqTdBvdCidCidCidJodJYdJAdJZdKadJAdMydJAdJAdMwdKddKedJKdKfdKgdCidCidCidCidCidBvdBvdBvdqTdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdBvdBvdDQdCidCidCidCidCidCidCidCidCidCidCidCidCidCidCidBvdBvdqTdqTdqTdqTdqTdqTdIPdTwdJNdKidTxdKkdKldIPdIPdIPdIPdMvdIPdJRdKmdKmdKndKmdJidCidCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaadCidCidCidCidCidCidCidCidCidCidCidJUdKodKodKodKpdJVdCidKqdCidCidCidEudDQdBvdqTdqTdsadsadsadsadsadsadsadsadsadsadqTdqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHVdHVdHVdHndHndHndHndHndHndHndHndHVdHVdHVdHndHndqTdBvdCidCidCidJodJYdJAdJZdKadJAdMydJAdJAdMwdKddKedJKdKfdKgdCidCidCidCidCidBvdBvdBvdqTdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadsadsadsadqTdqTdBvdBvdDQdCidCidCidCidCidCidCidCidCidCidCidCidCidCidCidBvdBvdqTdqTdqTdqTdqTdqTdIPdTwdJNdKidTxdKkdKldIPdIPdIPdIPdMvdIPdJRdKmdKmdKndKmdJidCidCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaadCidCidCidCidCidCidCidCidCidCidCidJUdEbdEbdEbdDZdJVdCidKqdCidCidCidEudDQdBvdqTdqTdsadsadsadsadsadsadsadsadsadsadqTdqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHVdHVdHVdHndHndHndHndHndHndHndHndHndHndHndHndHndqTdBvdCidCidCidJodKrdJAdJAdKsdJAdMydJAdJAdMEdMFdwzdKvdJLdHGdCidCidCidCidCidCidCidBvdBvdBvdBvdqTdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadsadsadqTdqTdBvdBvdCidJfdCidCidCidCidCidCidCidCidCidCidCidCidCidCidCidCidBvdBvdBvdBvdqTdqTdqTdIPdKwdJNdKxdJNdKydJNdKzdKndKAdKBdMHdIPdJRdKmdKDdMIdwIdJndCidCidCidCidCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadCidCidCidCidCidKFdKFdKGdKHdJUdMJdMLdMKdKLdJVdJVdJVdJVdCidCidCidCidBvdBvdqTdqTdsadsadsadsadsadsadsadsadsadqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHndHndHndHndHndHndHndHndHndHndHndHndsadsadBvdBvdCidCidJodKMdJAdKNdMMdMpdMNdKRdJAdJodJodJodJodJodJodIedHJdCidCidCidCidCidCidCidCidBvdBvdBvdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadqTdqTdqTdBvdCidCidCidCidCidCidCidCidCidCidCidIedHJdCidCidCidCidCidCidCidCidCidBvdBvdqTdqTdIPdIPdIPdIPdIPdIPdIPdKSdMOdKUdKSdMOdIPdIPdIPdIPdwJdIPdIPdIPdKWdKXdCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadCidCidKYdKHdKZdLadMSdMRdMQdLedMVdMUdMTdLidLjdLkdHJdCidCidCidDPdBvdqTdqTdsadsadsadsadsadsadsadqTdqTdqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHndHndHndHndHndHndHndHndHndHndHndHndsadsadBvdBvdCidCidJodKMdJAdKNdMMdMpdMNdKRdJAdJodJodJodJodJodJodIedHJdCidCidCidCidCidCidCidCidBvdBvdBvdqTdqTdqTdqTdqTdsadsadsadsadsadsadsadqTdqTdqTdBvdCidCidCidCidCidCidCidCidCidCidCidIedHJdCidCidCidCidCidCidCidCidCidBvdBvdqTdqTdIPdIPdIPdIPdIPdIPdIPdKSdMOdKUdKSdMOdIPdIPdIPdIPdwJdIPdIPdIPdKWdKXdCidCiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadCidCidKYdKHdEjdEHdEFdMRdEzdLedMVdMUdMTdLidLjdLkdHJdCidCidCidDPdBvdqTdqTdsadsadsadsadsadsadsadqTdqTdqTdsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHndHndHndHndHndHndHndHndsadsadqTdBvdCidCidJodLldJAdLmdKadOFdLodLpdJAdLqdLrdLsdLtdLudLvdIkdIldIcdIcdIcdIcdIcdIbdCidCidCidCidBvdBvdBvdqTdqTdqTdqTdqTdsadsadsadqTdqTdqTdqTdBvdBvdCidCidIhdIcdIcdIcdIcdIcdIcdIcdIcdIkdIldIcdIcdIcdIcdIbdCidCidCidCidCidBvdqTdqTdqTdqTdqTdIPdLwdLxdLydKmdMIdLzdKndMIdKzdRudwNdLCdMIdwKdKmdKmdLDdLEdJxdJydLFdLGdLGdLGdLGdLGdLGdLGdLHdLHdLHdLHdLHdLHdLHdKGdLIdLJdLKdLadLLdMYdLNdLOdLedMXdLPdLQdLRdLSdLTdLUdCidCidCidDPdBvdqTdqTdsadsadsadsadsadsadqTdqTdqTdsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndHndHndsadsadqTdBvdCidCidJodJodJodJodJodNldLWdLXdJodJodLYdJodJodJodJodHEdHGdCidCidCidCidCidHSdCidCidCidCidBvdCidBvdBvdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdBvdBvdCidCidCidHSdCidCidCidCidCidCidCidCidHEdHGdCidCidCidCidHSdCidCidCidCidCidBvdBvdDQdBvdBvdqTdIPdIPdIPdIPdLZdMIdMadOkdNWdKBdMddMedMedNKdNKdMgdMedMhdMidMedMidMjdMjdMjdMjdMjdMjdMjdMjdMkdMkdMkdMkdMkdMkdMkdMldMmdMldMndMmdModNGdMqdUtdMsdNCdNrdNndwOdMxdLkdHGdCidCidCidCidBvdBvdqTdqTdsadsadsadsadsadqTdqTdqTdsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadHndHndsadsadqTdBvdBvdCidCidCidCidCidJodOndMzdMAdwPdJodMCdMDdFrdCidCidCidCidCidHUdCidCidCidIadIcdIcdIbdCidCidCidCidBvdqTdqTdqTdqTdqTdqTdqTdqTdqTdqTdBvdCidCidIhdIcdIidCidCidCidCidBvdCidCidHUdCidCidCidCidCidCidHSdCidCidCidCidCidCidCidJfdCidBvdBvdBvdBvdBvdIPdKmdPLdPEdPJdPJdPEdPCdPzdPydPJdPIdPGdPzdOSdPadOQdORdOodOodOodOodOodOodOodOodOLdOLdOLdOLdOLdOLdPRdPOdPXdPWdQldQbdPNdPMdMZdKFdKFdKFdKFdKFdKFdKFdKFdNadNbdNcdNbdFrdDPdBvdqTdqTdsadsadsadsadqTdqTdqTdqTdsadsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/nano/To BYOND Cache.bat b/nano/To BYOND Cache.bat new file mode 100644 index 0000000000..486b8d1bea --- /dev/null +++ b/nano/To BYOND Cache.bat @@ -0,0 +1,4 @@ +copy css\* "%USERPROFILE%\Documents\BYOND\cache" /y +copy images\* "%USERPROFILE%\Documents\BYOND\cache" /y +copy js\* "%USERPROFILE%\Documents\BYOND\cache" /y +copy templates\* "%USERPROFILE%\Documents\BYOND\cache" /y diff --git a/nano/css/shared.css b/nano/css/shared.css index ac4657db34..3dbe05bc1f 100644 --- a/nano/css/shared.css +++ b/nano/css/shared.css @@ -149,7 +149,7 @@ h4 { clear: both; padding: 8px; } -#uiNoJavaScript { +#uiLoadingNotice { position: relative; background: url(uiNoticeBackground.jpg) 50% 50%; color: #000000; @@ -159,6 +159,22 @@ h4 { padding: 3px 4px 3px 4px; margin: 4px 0 4px 0; } +#uiNoScript { + position: fixed; + top: 50%; + left: 50%; + margin: -60px 0 0 -150px; + width: 280px; + height: 120px; + background: #ffffff; + border: 2px solid #ff0000; + color: #000000; + font-size: 10px; + font-weight: bold; + z-index: 9999; + padding: 0px 10px; + text-align: center; +} .white { color: white; @@ -261,7 +277,6 @@ div.notice { color: #e9c183; } - .itemContentWide { float: left; width: 79%; diff --git a/nano/js/libraries.min.js b/nano/js/libraries.min.js index 11c9ffb918..7b19cd3a5d 100644 --- a/nano/js/libraries.min.js +++ b/nano/js/libraries.min.js @@ -1 +1 @@ -(function(e,t){function H(e){var t=e.length,n=w.type(e);if(w.isWindow(e)){return false}if(e.nodeType===1&&t){return true}return n==="array"||n!=="function"&&(t===0||typeof t==="number"&&t>0&&t-1 in e)}function j(e){var t=B[e]={};w.each(e.match(S)||[],function(e,n){t[n]=true});return t}function q(e,n,r,i){if(!w.acceptData(e)){return}var s,o,u=w.expando,a=e.nodeType,f=a?w.cache:e,l=a?e[u]:e[u]&&u;if((!l||!f[l]||!i&&!f[l].data)&&r===t&&typeof n==="string"){return}if(!l){if(a){l=e[u]=c.pop()||w.guid++}else{l=u}}if(!f[l]){f[l]=a?{}:{toJSON:w.noop}}if(typeof n==="object"||typeof n==="function"){if(i){f[l]=w.extend(f[l],n)}else{f[l].data=w.extend(f[l].data,n)}}o=f[l];if(!i){if(!o.data){o.data={}}o=o.data}if(r!==t){o[w.camelCase(n)]=r}if(typeof n==="string"){s=o[n];if(s==null){s=o[w.camelCase(n)]}}else{s=o}return s}function R(e,t,n){if(!w.acceptData(e)){return}var r,i,s=e.nodeType,o=s?w.cache:e,u=s?e[w.expando]:w.expando;if(!o[u]){return}if(t){r=n?o[u]:o[u].data;if(r){if(!w.isArray(t)){if(t in r){t=[t]}else{t=w.camelCase(t);if(t in r){t=[t]}else{t=t.split(" ")}}}else{t=t.concat(w.map(t,w.camelCase))}i=t.length;while(i--){delete r[t[i]]}if(n?!z(r):!w.isEmptyObject(r)){return}}}if(!n){delete o[u].data;if(!z(o[u])){return}}if(s){w.cleanData([e],true)}else if(w.support.deleteExpando||o!=o.window){delete o[u]}else{o[u]=null}}function U(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r==="string"){try{r=r==="true"?true:r==="false"?false:r==="null"?null:+r+""===r?+r:F.test(r)?w.parseJSON(r):r}catch(s){}w.data(e,n,r)}else{r=t}}return r}function z(e){var t;for(t in e){if(t==="data"&&w.isEmptyObject(e[t])){continue}if(t!=="toJSON"){return false}}return true}function it(){return true}function st(){return false}function ot(){try{return o.activeElement}catch(e){}}function ct(e,t){do{e=e[t]}while(e&&e.nodeType!==1);return e}function ht(e,t,n){if(w.isFunction(t)){return w.grep(e,function(e,r){return!!t.call(e,r,e)!==n})}if(t.nodeType){return w.grep(e,function(e){return e===t!==n})}if(typeof t==="string"){if(ut.test(t)){return w.filter(t,e,n)}t=w.filter(t,e)}return w.grep(e,function(e){return w.inArray(e,t)>=0!==n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement){while(t.length){n.createElement(t.pop())}}return n}function Mt(e,t){return w.nodeName(e,"table")&&w.nodeName(t.nodeType===1?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _t(e){e.type=(w.find.attr(e,"type")!==null)+"/"+e.type;return e}function Dt(e){var t=Ct.exec(e.type);if(t){e.type=t[1]}else{e.removeAttribute("type")}return e}function Pt(e,t){var n,r=0;for(;(n=e[r])!=null;r++){w._data(n,"globalEval",!t||w._data(t[r],"globalEval"))}}function Ht(e,t){if(t.nodeType!==1||!w.hasData(e)){return}var n,r,i,s=w._data(e),o=w._data(t,s),u=s.events;if(u){delete o.handle;o.events={};for(n in u){for(r=0,i=u[n].length;r").css("cssText","display:block !important")).appendTo(t.documentElement);t=(It[0].contentWindow||It[0].contentDocument).document;t.write("");t.close();n=fn(e,t);It.detach()}Qt[e]=n}return n}function fn(e,t){var n=w(t.createElement(e)).appendTo(t.body),r=w.css(n[0],"display");n.remove();return r}function vn(e,t,n,r){var i;if(w.isArray(t)){w.each(t,function(t,i){if(n||cn.test(e)){r(e,i)}else{vn(e+"["+(typeof i==="object"?t:"")+"]",i,n,r)}})}else if(!n&&w.type(t)==="object"){for(i in t){vn(e+"["+i+"]",t[i],n,r)}}else{r(e,t)}}function _n(e){return function(t,n){if(typeof t!=="string"){n=t;t="*"}var r,i=0,s=t.toLowerCase().match(S)||[];if(w.isFunction(n)){while(r=s[i++]){if(r[0]==="+"){r=r.slice(1)||"*";(e[r]=e[r]||[]).unshift(n)}else{(e[r]=e[r]||[]).push(n)}}}}}function Dn(e,t,n,r){function o(u){var a;i[u]=true;w.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f==="string"&&!s&&!i[f]){t.dataTypes.unshift(f);o(f);return false}else if(s){return!(a=f)}});return a}var i={},s=e===An;return o(t.dataTypes[0])||!i["*"]&&o("*")}function Pn(e,n){var r,i,s=w.ajaxSettings.flatOptions||{};for(i in n){if(n[i]!==t){(s[i]?e:r||(r={}))[i]=n[i]}}if(r){w.extend(true,e,r)}return e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes;while(f[0]==="*"){f.shift();if(s===t){s=e.mimeType||n.getResponseHeader("Content-Type")}}if(s){for(u in a){if(a[u]&&a[u].test(s)){f.unshift(u);break}}}if(f[0]in r){o=f[0]}else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}if(!i){i=u}}o=o||i}if(o){if(o!==f[0]){f.unshift(o)}return r[o]}}function Bn(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1]){for(o in e.converters){f[o.toLowerCase()]=e.converters[o]}}s=l.shift();while(s){if(e.responseFields[s]){n[e.responseFields[s]]=t}if(!a&&r&&e.dataFilter){t=e.dataFilter(t,e.dataType)}a=s;s=l.shift();if(s){if(s==="*"){s=a}else if(a!=="*"&&a!==s){o=f[a+" "+s]||f["* "+s];if(!o){for(i in f){u=i.split(" ");if(u[1]===s){o=f[a+" "+u[0]]||f["* "+u[0]];if(o){if(o===true){o=f[i]}else if(f[i]!==true){s=u[0];l.unshift(u[1])}break}}}}if(o!==true){if(o&&e["throws"]){t=o(t)}else{try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}}}}}return{state:"success",data:t}}function zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){setTimeout(function(){Xn=t});return Xn=w.now()}function Zn(e,t,n){var r,i=(Gn[t]||[]).concat(Gn["*"]),s=0,o=i.length;for(;s)[^>]*|#([\w-]*))$/,N=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,C=/^[\],:{}\s]*$/,k=/(?:^|:|,)(?:\s*\[)+/g,L=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,O=/^-ms-/,M=/-([\da-z])/gi,_=function(e,t){return t.toUpperCase()},D=function(e){if(o.addEventListener||e.type==="load"||o.readyState==="complete"){P();w.ready()}},P=function(){if(o.addEventListener){o.removeEventListener("DOMContentLoaded",D,false);e.removeEventListener("load",D,false)}else{o.detachEvent("onreadystatechange",D);e.detachEvent("onload",D)}};w.fn=w.prototype={jquery:h,constructor:w,init:function(e,n,r){var i,s;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){i=[null,e,null]}else{i=T.exec(e)}if(i&&(i[1]||!n)){if(i[1]){n=n instanceof w?n[0]:n;w.merge(this,w.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,true));if(N.test(i[1])&&w.isPlainObject(n)){for(i in n){if(w.isFunction(this[i])){this[i](n[i])}else{this.attr(i,n[i])}}}return this}else{s=o.getElementById(i[2]);if(s&&s.parentNode){if(s.id!==i[2]){return r.find(e)}this.length=1;this[0]=s}this.context=o;this.selector=e;return this}}else if(!n||n.jquery){return(n||r).find(e)}else{return this.constructor(n).find(e)}}else if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else if(w.isFunction(e)){return r.ready(e)}if(e.selector!==t){this.selector=e.selector;this.context=e.context}return w.makeArray(e,this)},selector:"",length:0,toArray:function(){return v.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);t.prevObject=this;t.context=this.context;return t},each:function(e,t){return w.each(this,e,t)},ready:function(e){w.ready.promise().done(e);return this},slice:function(){return this.pushStack(v.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0){return}n.resolveWith(o,[w]);if(w.fn.trigger){w(o).trigger("ready").off("ready")}},isFunction:function(e){return w.type(e)==="function"},isArray:Array.isArray||function(e){return w.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){if(e==null){return String(e)}return typeof e==="object"||typeof e==="function"?l[g.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||w.type(e)!=="object"||e.nodeType||w.isWindow(e)){return false}try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf")){return false}}catch(r){return false}if(w.support.ownLast){for(n in e){return y.call(e,n)}}for(n in e){}return n===t||y.call(e,n)},isEmptyObject:function(e){var t;for(t in e){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!=="string"){return null}if(typeof t==="boolean"){n=t;t=false}t=t||o;var r=N.exec(e),i=!n&&[];if(r){return[t.createElement(r[1])]}r=w.buildFragment([e],t,i);if(i){w(i).remove()}return w.merge([],r.childNodes)},parseJSON:function(t){if(e.JSON&&e.JSON.parse){return e.JSON.parse(t)}if(t===null){return t}if(typeof t==="string"){t=w.trim(t);if(t){if(C.test(t.replace(L,"@").replace(A,"]").replace(k,""))){return(new Function("return "+t))()}}}w.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!=="string"){return null}try{if(e.DOMParser){i=new DOMParser;r=i.parseFromString(n,"text/xml")}else{r=new ActiveXObject("Microsoft.XMLDOM");r.async="false";r.loadXML(n)}}catch(s){r=t}if(!r||!r.documentElement||r.getElementsByTagName("parsererror").length){w.error("Invalid XML: "+n)}return r},noop:function(){},globalEval:function(t){if(t&&w.trim(t)){(e.execScript||function(t){e["eval"].call(e,t)})(t)}},camelCase:function(e){return e.replace(O,"ms-").replace(M,_)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=H(e);if(n){if(o){for(;is.cacheLength){delete t[e.shift()]}return t[n]=r}var e=[];return t}function at(e){e[b]=true;return e}function ft(e){var t=h.createElement("div");try{return!!e(t)}catch(n){return false}finally{if(t.parentNode){t.parentNode.removeChild(t)}t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--){s.attrHandle[n[r]]=t}}function ct(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||O)-(~e.sourceIndex||O);if(r){return r}if(n){while(n=n.nextSibling){if(n===t){return-1}}}return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function dt(e){return at(function(t){t=+t;return at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--){if(n[i=s[o]]){n[i]=!(r[i]=n[i])}}})})}function vt(){}function mt(e,t){var n,r,i,o,u,a,f,l=N[e+" "];if(l){return t?0:l.slice(0)}u=e;a=[];f=s.preFilter;while(u){if(!n||(r=X.exec(u))){if(r){u=u.slice(r[0].length)||u}a.push(i=[])}n=false;if(r=V.exec(u)){n=r.shift();i.push({value:n,type:r[0].replace(W," ")});u=u.slice(n.length)}for(o in s.filter){if((r=G[o].exec(u))&&(!f[o]||(r=f[o](r)))){n=r.shift();i.push({value:n,type:o,matches:r});u=u.slice(n.length)}}if(!n){break}}return t?u.length:u?ot.error(e):N(e,a).slice(0)}function gt(e){var t=0,n=e.length,r="";for(;t1?function(t,n,r){var i=e.length;while(i--){if(!e[i](t,n,r)){return false}}return true}:e[0]}function wt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1){s[f]=!(o[f]=c)}}}}else{g=wt(g===o?g.splice(d,g.length):g);if(i){i(null,o,g,a)}else{H.apply(o,g)}}})}function St(e){var t,n,r,i=e.length,o=s.relative[e[0].type],u=o||s.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,true),c=yt(function(e){return j.call(t,e)>-1},u,true),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a1&&bt(h),a>1&>(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(W,"$1"),n,a0,o=e.length>0,u=function(u,a,l,c,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=p!=null,x=f,T=u||o&&s.find["TAG"]("*",p&&a.parentNode||a),N=S+=x==null?1:Math.random()||.1;if(E){f=a!==h&&a;i=n}for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++]){if(m(d,a,l)){c.push(d);break}}if(E){S=N;i=++n}}if(r){if(d=!m&&d){y--}if(u){w.push(d)}}}y+=b;if(r&&b!==y){v=0;while(m=t[v++]){m(w,g,a,l)}if(u){if(y>0){while(b--){if(!(w[b]||g[b])){g[b]=D.call(c)}}}g=wt(g)}H.apply(c,g);if(E&&!u&&g.length>0&&y+t.length>1){ot.uniqueSort(c)}}if(E){S=N;f=x}return w};return r?at(u):u}function Tt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&r.getById&&t.nodeType===9&&d&&s.relative[u[1].type]){t=(s.find["ID"](f.matches[0].replace(rt,it),t)||[])[0];if(!t){return n}e=e.slice(u.shift().value.length)}o=G["needsContext"].test(e)?0:u.length;while(o--){f=u[o];if(s.relative[l=f.type]){break}if(c=s.find[l]){if(i=c(f.matches[0].replace(rt,it),$.test(u[0].type)&&t.parentNode||t)){u.splice(o,1);e=i.length&>(u);if(!e){H.apply(n,i);return n}break}}}}}a(e,h)(i,t,!d,n,$.test(e));return n}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b="sizzle"+ -(new Date),E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=false,L=function(e,t){if(e===t){k=true;return 0}return 0},A=typeof t,O=1<<31,M={}.hasOwnProperty,_=[],D=_.pop,P=_.push,H=_.push,B=_.slice,j=_.indexOf||function(e){var t=0,n=this.length;for(;t+~]|"+I+")"+I+"*"),$=new RegExp(I+"*[+~]"),J=new RegExp("="+I+"*([^\\]'\"]*)"+I+"*\\]","g"),K=new RegExp(z),Q=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q.replace("w","w*")+")"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{H.apply(_=B.call(E.childNodes),E.childNodes);_[E.childNodes.length].nodeType}catch(st){H={apply:_.length?function(e,t){P.apply(e,B.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]){}e.length=n-1}}}u=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":false};r=ot.support={};c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:E,n=t.defaultView;if(t===h||t.nodeType!==9||!t.documentElement){return h}h=t;p=t.documentElement;d=!u(t);if(n&&n.attachEvent&&n!==n.top){n.attachEvent("onbeforeunload",function(){c()})}r.attributes=ft(function(e){e.className="i";return!e.getAttribute("className")});r.getElementsByTagName=ft(function(e){e.appendChild(t.createComment(""));return!e.getElementsByTagName("*").length});r.getElementsByClassName=ft(function(e){e.innerHTML="
";e.firstChild.className="i";return e.getElementsByClassName("i").length===2});r.getById=ft(function(e){p.appendChild(e).id=b;return!t.getElementsByName||!t.getElementsByName(b).length});if(r.getById){s.find["ID"]=function(e,t){if(typeof t.getElementById!==A&&d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}};s.filter["ID"]=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}}else{delete s.find["ID"];s.filter["ID"]=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}}s.find["TAG"]=r.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==A){return t.getElementsByTagName(e)}}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++]){if(n.nodeType===1){r.push(n)}}return r}return s};s.find["CLASS"]=r.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==A&&d){return t.getElementsByClassName(e)}};m=[];v=[];if(r.qsa=Y.test(t.querySelectorAll)){ft(function(e){e.innerHTML="";if(!e.querySelectorAll("[selected]").length){v.push("\\["+I+"*(?:value|"+F+")")}if(!e.querySelectorAll(":checked").length){v.push(":checked")}});ft(function(e){var n=t.createElement("input");n.setAttribute("type","hidden");e.appendChild(n).setAttribute("t","");if(e.querySelectorAll("[t^='']").length){v.push("[*^$]="+I+"*(?:''|\"\")")}if(!e.querySelectorAll(":enabled").length){v.push(":enabled",":disabled")}e.querySelectorAll("*,:x");v.push(",.*:")})}if(r.matchesSelector=Y.test(g=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector)){ft(function(e){r.disconnectedMatch=g.call(e,"div");g.call(e,"[s!='']:x");m.push("!=",z)})}v=v.length&&new RegExp(v.join("|"));m=m.length&&new RegExp(m.join("|"));y=Y.test(p.contains)||p.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16))}:function(e,t){if(t){while(t=t.parentNode){if(t===e){return true}}}return false};L=p.compareDocumentPosition?function(e,n){if(e===n){k=true;return 0}var i=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);if(i){if(i&1||!r.sortDetached&&n.compareDocumentPosition(e)===i){if(e===t||y(E,e)){return-1}if(n===t||y(E,n)){return 1}return l?j.call(l,e)-j.call(l,n):0}return i&4?-1:1}return e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,s=e.parentNode,o=n.parentNode,u=[e],a=[n];if(e===n){k=true;return 0}else if(!s||!o){return e===t?-1:n===t?1:s?-1:o?1:l?j.call(l,e)-j.call(l,n):0}else if(s===o){return ct(e,n)}r=e;while(r=r.parentNode){u.unshift(r)}r=n;while(r=r.parentNode){a.unshift(r)}while(u[i]===a[i]){i++}return i?ct(u[i],a[i]):u[i]===E?-1:a[i]===E?1:0};return t};ot.matches=function(e,t){return ot(e,null,null,t)};ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h){c(e)}t=t.replace(J,"='$1']");if(r.matchesSelector&&d&&(!m||!m.test(t))&&(!v||!v.test(t))){try{var n=g.call(e,t);if(n||r.disconnectedMatch||e.document&&e.document.nodeType!==11){return n}}catch(i){}}return ot(t,h,null,[e]).length>0};ot.contains=function(e,t){if((e.ownerDocument||e)!==h){c(e)}return y(e,t)};ot.attr=function(e,n){if((e.ownerDocument||e)!==h){c(e)}var i=s.attrHandle[n.toLowerCase()],o=i&&M.call(s.attrHandle,n.toLowerCase())?i(e,n,!d):t;return o===t?r.attributes||!d?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o};ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};ot.uniqueSort=function(e){var t,n=[],i=0,s=0;k=!r.detectDuplicates;l=!r.sortStable&&e.slice(0);e.sort(L);if(k){while(t=e[s++]){if(t===e[s]){i=n.push(s)}}while(i--){e.splice(n[i],1)}}return e};o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i){for(;t=e[r];r++){n+=o(t)}}else if(i===1||i===9||i===11){if(typeof e.textContent==="string"){return e.textContent}else{for(e=e.firstChild;e;e=e.nextSibling){n+=o(e)}}}else if(i===3||i===4){return e.nodeValue}return n};s=ot.selectors={cacheLength:50,createPseudo:at,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(rt,it);e[3]=(e[4]||e[5]||"").replace(rt,it);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){ot.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+(e[7]+e[8]||e[3]==="odd")}else if(e[3]){ot.error(e[0])}return e},PSEUDO:function(e){var n,r=!e[5]&&e[2];if(G["CHILD"].test(e[0])){return null}if(e[3]&&e[4]!==t){e[2]=e[4]}else if(r&&K.test(r)&&(n=mt(r,true))&&(n=r.indexOf(")",r.length-n)-r.length)){e[0]=e[0].slice(0,n);e[2]=r.slice(0,n)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return e==="*"?function(){return true}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&T(e,function(e){return t.test(typeof e.className==="string"&&e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);if(i==null){return t==="!="}if(!t){return true}i+="";return t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":false}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v]){if(u?c.nodeName.toLowerCase()===g:c.nodeType===1){return false}}d=v=e==="only"&&!d&&"nextSibling"}return true}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[b]||(m[b]={});f=l[e]||[];p=f[0]===S&&f[1];h=f[0]===S&&f[2];c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if(c.nodeType===1&&++h&&c===t){l[e]=[S,p,h];break}}}else if(y&&(f=(t[b]||(t[b]={}))[e])&&f[0]===S){h=f[1]}else{while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){if(y){(c[b]||(c[b]={}))[e]=[S,h]}if(c===t){break}}}}h-=i;return h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);if(r[b]){return r(t)}if(r.length>1){n=[e,e,"",t];return s.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,s=r(e,t),o=s.length;while(o--){i=j.call(e,s[o]);e[i]=!(n[i]=s[o])}}):function(e){return r(e,0,n)}}return r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(W,"$1"));return r[b]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--){if(s=o[u]){e[u]=!(t[u]=s)}}}):function(e,i,s){t[0]=e;r(t,null,s,n);return!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){if(!Q.test(e||"")){ot.error("unsupported lang: "+e)}e=e.replace(rt,it).toLowerCase();return function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return n===e||n.indexOf(e+"-")===0}}while((t=t.parentNode)&&t.nodeType===1);return false}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},parent:function(e){return!s.pseudos["empty"](e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[n<0?n+t:n]}),even:dt(function(e,t){var n=0;for(;n=0;){e.push(r)}return e}),gt:dt(function(e,t,n){var r=n<0?n+t:n;for(;++r";e.firstChild.setAttribute("value","");return e.firstChild.getAttribute("value")===""})){lt("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input"){return e.defaultValue}})}if(!ft(function(e){return e.getAttribute("disabled")==null})){lt(F,function(e,t,n){var r;if(!n){return(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===true?t.toLowerCase():null}})}w.find=ot;w.expr=ot.selectors;w.expr[":"]=w.expr.pseudos;w.unique=ot.uniqueSort;w.text=ot.getText;w.isXMLDoc=ot.isXML;w.contains=ot.contains})(e);var B={};w.Callbacks=function(e){e=typeof e==="string"?B[e]||j(e):w.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){r=e.memory&&t;i=true;o=u||0;u=0;s=a.length;n=true;for(;a&&o-1){a.splice(r,1);if(n){if(r<=s){s--}if(r<=o){o--}}}})}return this},has:function(e){return e?w.inArray(e,a)>-1:!!(a&&a.length)},empty:function(){a=[];s=0;return this},disable:function(){a=f=r=t;return this},disabled:function(){return!a},lock:function(){f=t;if(!r){c.disable()}return this},locked:function(){return!f},fireWith:function(e,t){if(a&&(!i||f)){t=t||[];t=[e,t.slice?t.slice():t];if(n){f.push(t)}else{l(t)}}return this},fire:function(){c.fireWith(this,arguments);return this},fired:function(){return!!i}};return c};w.extend({Deferred:function(e){var t=[["resolve","done",w.Callbacks("once memory"),"resolved"],["reject","fail",w.Callbacks("once memory"),"rejected"],["notify","progress",w.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){i.done(arguments).fail(arguments);return this},then:function(){var e=arguments;return w.Deferred(function(n){w.each(t,function(t,s){var o=s[0],u=w.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);if(e&&w.isFunction(e.promise)){e.promise().done(n.resolve).fail(n.reject).progress(n.notify)}else{n[o+"With"](this===r?n.promise():this,u?[e]:arguments)}})});e=null}).promise()},promise:function(e){return e!=null?w.extend(e,r):r}},i={};r.pipe=r.then;w.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add;if(u){o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock)}i[s[0]]=function(){i[s[0]+"With"](this===i?r:this,arguments);return this};i[s[0]+"With"]=o.fireWith});r.promise(i);if(e){e.call(i,i)}return i},when:function(e){var t=0,n=v.call(arguments),r=n.length,i=r!==1||e&&w.isFunction(e.promise)?r:0,s=i===1?e:w.Deferred(),o=function(e,t,n){return function(r){t[e]=this;n[e]=arguments.length>1?v.call(arguments):r;if(n===u){s.notifyWith(t,n)}else if(!--i){s.resolveWith(t,n)}}},u,a,f;if(r>1){u=new Array(r);a=new Array(r);f=new Array(r);for(;t
a";n=p.getElementsByTagName("*")||[];r=p.getElementsByTagName("a")[0];if(!r||!r.style||!n.length){return t}u=o.createElement("select");f=u.appendChild(o.createElement("option"));s=p.getElementsByTagName("input")[0];r.style.cssText="top:1px;float:left;opacity:.5";t.getSetAttribute=p.className!=="t";t.leadingWhitespace=p.firstChild.nodeType===3;t.tbody=!p.getElementsByTagName("tbody").length;t.htmlSerialize=!!p.getElementsByTagName("link").length;t.style=/top/.test(r.getAttribute("style"));t.hrefNormalized=r.getAttribute("href")==="/a";t.opacity=/^0.5/.test(r.style.opacity);t.cssFloat=!!r.style.cssFloat;t.checkOn=!!s.value;t.optSelected=f.selected;t.enctype=!!o.createElement("form").enctype;t.html5Clone=o.createElement("nav").cloneNode(true).outerHTML!=="<:nav>";t.inlineBlockNeedsLayout=false;t.shrinkWrapBlocks=false;t.pixelPosition=false;t.deleteExpando=true;t.noCloneEvent=true;t.reliableMarginRight=true;t.boxSizingReliable=true;s.checked=true;t.noCloneChecked=s.cloneNode(true).checked;u.disabled=true;t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=false}s=o.createElement("input");s.setAttribute("value","");t.input=s.getAttribute("value")==="";s.value="t";s.setAttribute("type","radio");t.radioValue=s.value==="t";s.setAttribute("checked","t");s.setAttribute("name","t");a=o.createDocumentFragment();a.appendChild(s);t.appendChecked=s.checked;t.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;if(p.attachEvent){p.attachEvent("onclick",function(){t.noCloneEvent=false});p.cloneNode(true).click()}for(h in{submit:true,change:true,focusin:true}){p.setAttribute(l="on"+h,"t");t[h+"Bubbles"]=l in e||p.attributes[l].expando===false}p.style.backgroundClip="content-box";p.cloneNode(true).style.backgroundClip="";t.clearCloneStyle=p.style.backgroundClip==="content-box";for(h in w(t)){break}t.ownLast=h!=="0";w(function(){var n,r,s,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=o.getElementsByTagName("body")[0];if(!a){return}n=o.createElement("div");n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";a.appendChild(n).appendChild(p);p.innerHTML="
t
";s=p.getElementsByTagName("td");s[0].style.cssText="padding:0;margin:0;border:0;display:none";c=s[0].offsetHeight===0;s[0].style.display="";s[1].style.display="none";t.reliableHiddenOffsets=c&&s[0].offsetHeight===0;p.innerHTML="";p.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%;";w.swap(a,a.style.zoom!=null?{zoom:1}:{},function(){t.boxSizing=p.offsetWidth===4});if(e.getComputedStyle){t.pixelPosition=(e.getComputedStyle(p,null)||{}).top!=="1%";t.boxSizingReliable=(e.getComputedStyle(p,null)||{width:"4px"}).width==="4px";r=p.appendChild(o.createElement("div"));r.style.cssText=p.style.cssText=u;r.style.marginRight=r.style.width="0";p.style.width="1px";t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)}if(typeof p.style.zoom!==i){p.innerHTML="";p.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1";t.inlineBlockNeedsLayout=p.offsetWidth===3;p.style.display="block";p.innerHTML="
";p.firstChild.style.width="5px";t.shrinkWrapBlocks=p.offsetWidth!==3;if(t.inlineBlockNeedsLayout){a.style.zoom=1}}a.removeChild(n);n=p=s=r=null});n=u=a=f=r=s=null;return t}({});var F=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;w.extend({cache:{},noData:{applet:true,embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){e=e.nodeType?w.cache[e[w.expando]]:e[w.expando];return!!e&&!z(e)},data:function(e,t,n){return q(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return q(e,t,n,true)},_removeData:function(e,t){return R(e,t,true)},acceptData:function(e){if(e.nodeType&&e.nodeType!==1&&e.nodeType!==9){return false}var t=e.nodeName&&w.noData[e.nodeName.toLowerCase()];return!t||t!==true&&e.getAttribute("classid")===t}});w.fn.extend({data:function(e,n){var r,i,s=null,o=0,u=this[0];if(e===t){if(this.length){s=w.data(u);if(u.nodeType===1&&!w._data(u,"parsedAttrs")){r=u.attributes;for(;o1?this.each(function(){w.data(this,e,n)}):u?U(u,e,w.data(u,e)):null},removeData:function(e){return this.each(function(){w.removeData(this,e)})}});w.extend({queue:function(e,t,n){var r;if(e){t=(t||"fx")+"queue";r=w._data(e,t);if(n){if(!r||w.isArray(n)){r=w._data(e,t,w.makeArray(n))}else{r.push(n)}}return r||[]}},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),s=w._queueHooks(e,t),o=function(){w.dequeue(e,t)};if(i==="inprogress"){i=n.shift();r--}if(i){if(t==="fx"){n.unshift("inprogress")}delete s.stop;i.call(e,o,s)}if(!r&&s){s.empty.fire()}},_queueHooks:function(e,t){var n=t+"queueHooks";return w._data(e,n)||w._data(e,n,{empty:w.Callbacks("once memory").add(function(){w._removeData(e,t+"queue");w._removeData(e,n)})})}});w.fn.extend({queue:function(e,n){var r=2;if(typeof e!=="string"){n=e;e="fx";r--}if(arguments.length1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})},prop:function(e,t){return w.access(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){e=w.propFix[e]||e;return this.each(function(){try{this[e]=t;delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=typeof e==="string"&&e;if(w.isFunction(e)){return this.each(function(t){w(this).addClass(e.call(this,t,this.className))})}if(a){t=(e||"").match(S)||[];for(;o=0){r=r.replace(" "+i+" "," ")}}n.className=e?w.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e;if(typeof t==="boolean"&&n==="string"){return t?this.addClass(e):this.removeClass(e)}if(w.isFunction(e)){return this.each(function(n){w(this).toggleClass(e.call(this,n,this.className,t),t)})}return this.each(function(){if(n==="string"){var t,r=0,s=w(this),o=e.match(S)||[];while(t=o[r++]){if(s.hasClass(t)){s.removeClass(t)}else{s.addClass(t)}}}else if(n===i||n==="boolean"){if(this.className){w._data(this,"__className__",this.className)}this.className=this.className||e===false?"":w._data(this,"__className__")||""}})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0){return true}}return false},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s){r=w.valHooks[s.type]||w.valHooks[s.nodeName.toLowerCase()];if(r&&"get"in r&&(n=r.get(s,"value"))!==t){return n}n=s.value;return typeof n==="string"?n.replace($,""):n==null?"":n}return}i=w.isFunction(e);return this.each(function(n){var s;if(this.nodeType!==1){return}if(i){s=e.call(this,n,w(this).val())}else{s=e}if(s==null){s=""}else if(typeof s==="number"){s+=""}else if(w.isArray(s)){s=w.map(s,function(e){return e==null?"":e+""})}r=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()];if(!r||!("set"in r)||r.set(this,s,"value")===t){this.value=s}})}});w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return t!=null?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0){n=true}}if(!n){e.selectedIndex=-1}return s}}},attr:function(e,n,r){var s,o,u=e.nodeType;if(!e||u===3||u===8||u===2){return}if(typeof e.getAttribute===i){return w.prop(e,n,r)}if(u!==1||!w.isXMLDoc(e)){n=n.toLowerCase();s=w.attrHooks[n]||(w.expr.match.bool.test(n)?X:W)}if(r!==t){if(r===null){w.removeAttr(e,n)}else if(s&&"set"in s&&(o=s.set(e,r,n))!==t){return o}else{e.setAttribute(n,r+"");return r}}else if(s&&"get"in s&&(o=s.get(e,n))!==null){return o}else{o=w.find.attr(e,n);return o==null?t:o}},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(S);if(s&&e.nodeType===1){while(n=s[i++]){r=w.propFix[n]||n;if(w.expr.match.bool.test(n)){if(Y&&G||!Q.test(n)){e[r]=false}else{e[w.camelCase("default-"+n)]=e[r]=false}}else{w.attr(e,n,"")}e.removeAttribute(G?n:r)}}},attrHooks:{type:{set:function(e,t){if(!w.support.radioValue&&t==="radio"&&w.nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);if(n){e.value=n}return t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2){return}o=u!==1||!w.isXMLDoc(e);if(o){n=w.propFix[n]||n;s=w.propHooks[n]}if(r!==t){return s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r}else{return s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]}},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):J.test(e.nodeName)||K.test(e.nodeName)&&e.href?0:-1}}}});X={set:function(e,t,n){if(t===false){w.removeAttr(e,n)}else if(Y&&G||!Q.test(n)){e.setAttribute(!G&&w.propFix[n]||n,n)}else{e[w.camelCase("default-"+n)]=e[n]=true}return n}};w.each(w.expr.match.bool.source.match(/\w+/g),function(e,n){var r=w.expr.attrHandle[n]||w.find.attr;w.expr.attrHandle[n]=Y&&G||!Q.test(n)?function(e,n,i){var s=w.expr.attrHandle[n],o=i?t:(w.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;w.expr.attrHandle[n]=s;return o}:function(e,n,r){return r?t:e[w.camelCase("default-"+n)]?n.toLowerCase():null}});if(!Y||!G){w.attrHooks.value={set:function(e,t,n){if(w.nodeName(e,"input")){e.defaultValue=t}else{return W&&W.set(e,t,n)}}}}if(!G){W={set:function(e,n,r){var i=e.getAttributeNode(r);if(!i){e.setAttributeNode(i=e.ownerDocument.createAttribute(r))}i.value=n+="";return r==="value"||n===e.getAttribute(r)?n:t}};w.expr.attrHandle.id=w.expr.attrHandle.name=w.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.value!==""?i.value:null};w.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:W.set};w.attrHooks.contenteditable={set:function(e,t,n){W.set(e,t===""?false:t,n)}};w.each(["width","height"],function(e,t){w.attrHooks[t]={set:function(e,n){if(n===""){e.setAttribute(t,"auto");return n}}}})}if(!w.support.hrefNormalized){w.each(["href","src"],function(e,t){w.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})}if(!w.support.style){w.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}}if(!w.support.optSelected){w.propHooks.selected={get:function(e){var t=e.parentNode;if(t){t.selectedIndex;if(t.parentNode){t.parentNode.selectedIndex}}return null}}}w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});if(!w.support.enctype){w.propFix.enctype="encoding"}w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(w.isArray(t)){return e.checked=w.inArray(w(e).val(),t)>=0}}};if(!w.support.checkOn){w.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value}}});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;w.event={global:{},add:function(e,n,r,s,o){var u,a,f,l,c,h,p,d,v,m,g,y=w._data(e);if(!y){return}if(r.handler){l=r;r=l.handler;o=l.selector}if(!r.guid){r.guid=w.guid++}if(!(a=y.events)){a=y.events={}}if(!(h=y.handle)){h=y.handle=function(e){return typeof w!==i&&(!e||w.event.triggered!==e.type)?w.event.dispatch.apply(h.elem,arguments):t};h.elem=e}n=(n||"").match(S)||[""];f=n.length;while(f--){u=rt.exec(n[f])||[];v=g=u[1];m=(u[2]||"").split(".").sort();if(!v){continue}c=w.event.special[v]||{};v=(o?c.delegateType:c.bindType)||v;c=w.event.special[v]||{};p=w.extend({type:v,origType:g,data:s,handler:r,guid:r.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:m.join(".")},l);if(!(d=a[v])){d=a[v]=[];d.delegateCount=0;if(!c.setup||c.setup.call(e,s,m,h)===false){if(e.addEventListener){e.addEventListener(v,h,false)}else if(e.attachEvent){e.attachEvent("on"+v,h)}}}if(c.add){c.add.call(e,p);if(!p.handler.guid){p.handler.guid=r.guid}}if(o){d.splice(d.delegateCount++,0,p)}else{d.push(p)}w.event.global[v]=true}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=w.hasData(e)&&w._data(e);if(!m||!(l=m.events)){return}t=(t||"").match(S)||[""];f=t.length;while(f--){u=rt.exec(t[f])||[];p=v=u[1];d=(u[2]||"").split(".").sort();if(!p){for(p in l){w.event.remove(e,p+t[f],n,r,true)}continue}c=w.event.special[p]||{};p=(r?c.delegateType:c.bindType)||p;h=l[p]||[];u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)");a=s=h.length;while(s--){o=h[s];if((i||v===o.origType)&&(!n||n.guid===o.guid)&&(!u||u.test(o.namespace))&&(!r||r===o.selector||r==="**"&&o.selector)){h.splice(s,1);if(o.selector){h.delegateCount--}if(c.remove){c.remove.call(e,o)}}}if(a&&!h.length){if(!c.teardown||c.teardown.call(e,d,m.handle)===false){w.removeEvent(e,p,m.handle)}delete l[p]}}if(w.isEmptyObject(l)){delete m.handle;w._removeData(e,"events")}},trigger:function(n,r,i,s){var u,a,f,l,c,h,p,d=[i||o],v=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];f=h=i=i||o;if(i.nodeType===3||i.nodeType===8){return}if(nt.test(v+w.event.triggered)){return}if(v.indexOf(".")>=0){m=v.split(".");v=m.shift();m.sort()}a=v.indexOf(":")<0&&"on"+v;n=n[w.expando]?n:new w.Event(v,typeof n==="object"&&n);n.isTrigger=s?2:3;n.namespace=m.join(".");n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;n.result=t;if(!n.target){n.target=i}r=r==null?[n]:w.makeArray(r,[n]);c=w.event.special[v]||{};if(!s&&c.trigger&&c.trigger.apply(i,r)===false){return}if(!s&&!c.noBubble&&!w.isWindow(i)){l=c.delegateType||v;if(!nt.test(l+v)){f=f.parentNode}for(;f;f=f.parentNode){d.push(f);h=f}if(h===(i.ownerDocument||o)){d.push(h.defaultView||h.parentWindow||e)}}p=0;while((f=d[p++])&&!n.isPropagationStopped()){n.type=p>1?l:c.bindType||v;u=(w._data(f,"events")||{})[n.type]&&w._data(f,"handle");if(u){u.apply(f,r)}u=a&&f[a];if(u&&w.acceptData(f)&&u.apply&&u.apply(f,r)===false){n.preventDefault()}}n.type=v;if(!s&&!n.isDefaultPrevented()){if((!c._default||c._default.apply(d.pop(),r)===false)&&w.acceptData(i)){if(a&&i[v]&&!w.isWindow(i)){h=i[a];if(h){i[a]=null}w.event.triggered=v;try{i[v]()}catch(g){}w.event.triggered=t;if(h){i[a]=h}}}}return n.result},dispatch:function(e){e=w.event.fix(e);var n,r,i,s,o,u=[],a=v.call(arguments),f=(w._data(this,"events")||{})[e.type]||[],l=w.event.special[e.type]||{};a[0]=e;e.delegateTarget=this;if(l.preDispatch&&l.preDispatch.call(this,e)===false){return}u=w.event.handlers.call(this,e,f);n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem;o=0;while((i=s.handlers[o++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(i.namespace)){e.handleObj=i;e.data=i.data;r=((w.event.special[i.origType]||{}).handle||i.handler).apply(s.elem,a);if(r!==t){if((e.result=r)===false){e.preventDefault();e.stopPropagation()}}}}}if(l.postDispatch){l.postDispatch.call(this,e)}return e.result},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||e.type!=="click")){for(;f!=this;f=f.parentNode||this){if(f.nodeType===1&&(f.disabled!==true||e.type!=="click")){s=[];for(o=0;o=0:w.find(r,this,null,[f]).length}if(s[r]){s.push(i)}}if(s.length){u.push({elem:f,handlers:s})}}}}if(a1?w.unique(n):n);n.selector=this.selector?this.selector+" "+e:e;return n},has:function(e){var t,n=w(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:n.nodeType===1&&w.find.matchesSelector(n,e))){n=s.push(n);break}}}return this.pushStack(s.length>1?w.unique(s):s)},index:function(e){if(!e){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof e==="string"){return w.inArray(this[0],w(e))}return w.inArray(e.jquery?e[0]:e,this)},add:function(e,t){var n=typeof e==="string"?w(e,t):w.makeArray(e&&e.nodeType?[e]:e),r=w.merge(this.get(),n);return this.pushStack(w.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});w.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return w.dir(e,"parentNode")},parentsUntil:function(e,t,n){return w.dir(e,"parentNode",n)},next:function(e){return ct(e,"nextSibling")},prev:function(e){return ct(e,"previousSibling")},nextAll:function(e){return w.dir(e,"nextSibling")},prevAll:function(e){return w.dir(e,"previousSibling")},nextUntil:function(e,t,n){return w.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return w.dir(e,"previousSibling",n)},siblings:function(e){return w.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return w.sibling(e.firstChild)},contents:function(e){return w.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:w.merge([],e.childNodes)}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);if(e.slice(-5)!=="Until"){r=n}if(r&&typeof r==="string"){i=w.filter(r,i)}if(this.length>1){if(!lt[e]){i=w.unique(i)}if(at.test(e)){i=i.reverse()}}return this.pushStack(i)}});w.extend({filter:function(e,t,n){var r=t[0];if(n){e=":not("+e+")"}return t.length===1&&r.nodeType===1?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return e.nodeType===1}))},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!w(s).is(r))){if(s.nodeType===1){i.push(s)}s=s[n]}return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling){if(e.nodeType===1&&e!==t){n.push(e)}}return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:null|\d+)"/g,mt=new RegExp("<(?:"+dt+")[\\s/>]","i"),gt=/^\s+/,yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,wt=/\s*$/g,Lt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:w.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},At=pt(o),Ot=At.appendChild(o.createElement("div"));Lt.optgroup=Lt.option;Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead;Lt.th=Lt.td;w.fn.extend({text:function(e){return w.access(this,function(e){return e===t?w.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Mt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Mt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},remove:function(e,t){var n,r=e?w.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++){if(!t&&n.nodeType===1){w.cleanData(jt(n))}if(n.parentNode){if(t&&w.contains(n.ownerDocument,n)){Pt(jt(n,"script"))}n.parentNode.removeChild(n)}}return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){if(e.nodeType===1){w.cleanData(jt(e,false))}while(e.firstChild){e.removeChild(e.firstChild)}if(e.options&&w.nodeName(e,"select")){e.options.length=0}}return this},clone:function(e,t){e=e==null?false:e;t=t==null?e:t;return this.map(function(){return w.clone(this,e,t)})},html:function(e){return w.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t){return n.nodeType===1?n.innerHTML.replace(vt,""):t}if(typeof e==="string"&&!St.test(e)&&(w.support.htmlSerialize||!mt.test(e))&&(w.support.leadingWhitespace||!gt.test(e))&&!Lt[(bt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(yt,"<$1>");try{for(;r")){s=e.cloneNode(true)}else{Ot.innerHTML=e.outerHTML;Ot.removeChild(s=Ot.firstChild)}if((!w.support.noCloneEvent||!w.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!w.isXMLDoc(e)){r=jt(s);u=jt(e);for(o=0;(i=u[o])!=null;++o){if(r[o]){Bt(i,r[o])}}}if(t){if(n){u=u||jt(e);r=r||jt(s);for(o=0;(i=u[o])!=null;o++){Ht(i,r[o])}}else{Ht(e,s)}}r=jt(s,"script");if(r.length>0){Pt(r,!a&&jt(e,"script"))}r=u=i=null;return s},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=pt(t),p=[],d=0;for(;d")+l[2];i=l[0];while(i--){u=u.lastChild}if(!w.support.leadingWhitespace&>.test(s)){p.push(t.createTextNode(gt.exec(s)[0]))}if(!w.support.tbody){s=a==="table"&&!wt.test(s)?u.firstChild:l[1]===""&&!wt.test(s)?u:0;i=s&&s.childNodes.length;while(i--){if(w.nodeName(f=s.childNodes[i],"tbody")&&!f.childNodes.length){s.removeChild(f)}}}w.merge(p,u.childNodes);u.textContent="";while(u.firstChild){u.removeChild(u.firstChild)}u=h.lastChild}}}if(u){h.removeChild(u)}if(!w.support.appendChecked){w.grep(jt(p,"input"),Ft)}d=0;while(s=p[d++]){if(r&&w.inArray(s,r)!==-1){continue}o=w.contains(s.ownerDocument,s);u=jt(h.appendChild(s),"script");if(o){Pt(u)}if(n){i=0;while(s=u[i++]){if(Nt.test(s.type||"")){n.push(s)}}}}u=null;return h},cleanData:function(e,t){var n,r,s,o,u=0,a=w.expando,f=w.cache,l=w.support.deleteExpando,h=w.event.special;for(;(n=e[u])!=null;u++){if(t||w.acceptData(n)){s=n[a];o=s&&f[s];if(o){if(o.events){for(r in o.events){if(h[r]){w.event.remove(n,r)}else{w.removeEvent(n,r,o.handle)}}}if(f[s]){delete f[s];if(l){delete n[a]}else if(typeof n.removeAttribute!==i){n.removeAttribute(a)}else{n[a]=null}c.push(s)}}}}},_evalUrl:function(e){return w.ajax({url:e,type:"GET",dataType:"script",async:false,global:false,"throws":true})}});w.fn.extend({wrapAll:function(e){if(w.isFunction(e)){return this.each(function(t){w(this).wrapAll(e.call(this,t))})}if(this[0]){var t=w(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){t.insertBefore(this[0])}t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1){e=e.firstChild}return e}).append(this)}return this},wrapInner:function(e){if(w.isFunction(e)){return this.each(function(t){w(this).wrapInner(e.call(this,t))})}return this.each(function(){var t=w(this),n=t.contents();if(n.length){n.wrapAll(e)}else{t.append(e)}})},wrap:function(e){var t=w.isFunction(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){if(!w.nodeName(this,"body")){w(this).replaceWith(this.childNodes)}}).end()}});var It,qt,Rt,Ut=/alpha\([^)]*\)/i,zt=/opacity\s*=\s*([^)]*)/,Wt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Vt=/^margin/,$t=new RegExp("^("+E+")(.*)$","i"),Jt=new RegExp("^("+E+")(?!px)[a-z%]+$","i"),Kt=new RegExp("^([+-])=("+E+")","i"),Qt={BODY:"block"},Gt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];w.fn.extend({css:function(e,n){return w.access(this,function(e,n,r){var i,s,o={},u=0;if(w.isArray(n)){s=qt(e);i=n.length;for(;u1)},show:function(){return rn(this,true)},hide:function(){return rn(this)},toggle:function(e){if(typeof e==="boolean"){return e?this.show():this.hide()}return this.each(function(){if(nn(this)){w(this).show()}else{w(this).hide()}})}});w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Rt(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:true,fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":w.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style){return}var s,o,u,a=w.camelCase(n),f=e.style;n=w.cssProps[a]||(w.cssProps[a]=tn(f,a));u=w.cssHooks[n]||w.cssHooks[a];if(r!==t){o=typeof r;if(o==="string"&&(s=Kt.exec(r))){r=(s[1]+1)*s[2]+parseFloat(w.css(e,n));o="number"}if(r==null||o==="number"&&isNaN(r)){return}if(o==="number"&&!w.cssNumber[a]){r+="px"}if(!w.support.clearCloneStyle&&r===""&&n.indexOf("background")===0){f[n]="inherit"}if(!u||!("set"in u)||(r=u.set(e,r,i))!==t){try{f[n]=r}catch(l){}}}else{if(u&&"get"in u&&(s=u.get(e,false,i))!==t){return s}return f[n]}},css:function(e,n,r,i){var s,o,u,a=w.camelCase(n);n=w.cssProps[a]||(w.cssProps[a]=tn(e.style,a));u=w.cssHooks[n]||w.cssHooks[a];if(u&&"get"in u){o=u.get(e,true,r)}if(o===t){o=Rt(e,n,i)}if(o==="normal"&&n in Yt){o=Yt[n]}if(r===""||r){s=parseFloat(o);return r===true||w.isNumeric(s)?s||0:o}return o}});if(e.getComputedStyle){qt=function(t){return e.getComputedStyle(t,null)};Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;if(u){if(a===""&&!w.contains(e.ownerDocument,e)){a=w.style(e,n)}if(Jt.test(a)&&Vt.test(n)){i=f.width;s=f.minWidth;o=f.maxWidth;f.minWidth=f.maxWidth=f.width=a;a=u.width;f.width=i;f.minWidth=s;f.maxWidth=o}}return a}}else if(o.documentElement.currentStyle){qt=function(e){return e.currentStyle};Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u[n]:t,f=e.style;if(a==null&&f&&f[n]){a=f[n]}if(Jt.test(a)&&!Wt.test(n)){i=f.left;s=e.runtimeStyle;o=s&&s.left;if(o){s.left=e.currentStyle.left}f.left=n==="fontSize"?"1em":a;a=f.pixelLeft+"px";f.left=i;if(o){s.left=o}}return a===""?"auto":a}}w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n){return e.offsetWidth===0&&Xt.test(w.css(e,"display"))?w.swap(e,Gt,function(){return un(e,t,r)}):un(e,t,r)}},set:function(e,n,r){var i=r&&qt(e);return sn(e,n,r?on(e,t,r,w.support.boxSizing&&w.css(e,"boxSizing",false,i)==="border-box",i):0)}}});if(!w.support.opacity){w.cssHooks.opacity={get:function(e,t){return zt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=w.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||t==="")&&w.trim(s.replace(Ut,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(t===""||r&&!r.filter){return}}n.filter=Ut.test(s)?s.replace(Ut,i):s+" "+i}}}w(function(){if(!w.support.reliableMarginRight){w.cssHooks.marginRight={get:function(e,t){if(t){return w.swap(e,{display:"inline-block"},Rt,[e,"marginRight"])}}}}if(!w.support.pixelPosition&&w.fn.position){w.each(["top","left"],function(e,t){w.cssHooks[t]={get:function(e,n){if(n){n=Rt(e,t);return Jt.test(n)?w(e).position()[t]+"px":n}}}})}});if(w.expr&&w.expr.filters){w.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!w.support.reliableHiddenOffsets&&(e.style&&e.style.display||w.css(e,"display"))==="none"};w.expr.filters.visible=function(e){return!w.expr.filters.hidden(e)}}w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n==="string"?n.split(" "):[n];for(;r<4;r++){i[e+Zt[r]+t]=s[r]||s[r-2]||s[0]}return i}};if(!Vt.test(e)){w.cssHooks[e+t].set=sn}});var ln=/%20/g,cn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,dn=/^(?:input|select|textarea|keygen)/i;w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&dn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!xt.test(e))}).map(function(e,t){var n=w(this).val();return n==null?null:w.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}});w.param=function(e,n){var r,i=[],s=function(e,t){t=w.isFunction(t)?t():t==null?"":t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t){n=w.ajaxSettings&&w.ajaxSettings.traditional}if(w.isArray(e)||e.jquery&&!w.isPlainObject(e)){w.each(e,function(){s(this.name,this.value)})}else{for(r in e){vn(r,e[r],n,s)}}return i.join("&").replace(ln,"+")};w.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,gn,yn=w.now(),bn=/\?/,wn=/#.*$/,En=/([?&])_=[^&]*/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,xn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tn=/^(?:GET|HEAD)$/,Nn=/^\/\//,Cn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,kn=w.fn.load,Ln={},An={},On="*/".concat("*");try{gn=s.href}catch(Mn){gn=o.createElement("a");gn.href="";gn=gn.href}mn=Cn.exec(gn.toLowerCase())||[];w.fn.load=function(e,n,r){if(typeof e!=="string"&&kn){return kn.apply(this,arguments)}var i,s,o,u=this,a=e.indexOf(" ");if(a>=0){i=e.slice(a,e.length);e=e.slice(0,a)}if(w.isFunction(n)){r=n;n=t}else if(n&&typeof n==="object"){o="POST"}if(u.length>0){w.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments;u.html(i?w("
").append(w.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,s||[e.responseText,t,e])})}return this};w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}});w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gn,type:"GET",isLocal:xn.test(mn[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":On,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":w.parseJSON,"text xml":w.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(e,t){return t?Pn(Pn(e,w.ajaxSettings),t):Pn(w.ajaxSettings,e)},ajaxPrefilter:_n(Ln),ajaxTransport:_n(An),ajax:function(e,n){function N(e,n,r,i){var l,g,y,E,S,T=n;if(b===2){return}b=2;if(u){clearTimeout(u)}f=t;o=i||"";x.readyState=e>0?4:0;l=e>=200&&e<300||e===304;if(r){E=Hn(c,x,r)}E=Bn(c,E,x,l);if(l){if(c.ifModified){S=x.getResponseHeader("Last-Modified");if(S){w.lastModified[s]=S}S=x.getResponseHeader("etag");if(S){w.etag[s]=S}}if(e===204||c.type==="HEAD"){T="nocontent"}else if(e===304){T="notmodified"}else{T=E.state;g=E.data;y=E.error;l=!y}}else{y=T;if(e||!T){T="error";if(e<0){e=0}}}x.status=e;x.statusText=(n||T)+"";if(l){d.resolveWith(h,[g,T,x])}else{d.rejectWith(h,[x,T,y])}x.statusCode(m);m=t;if(a){p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:y])}v.fireWith(h,[x,T]);if(a){p.trigger("ajaxComplete",[x,c]);if(!--w.active){w.event.trigger("ajaxStop")}}}if(typeof e==="object"){n=e;e=t}n=n||{};var r,i,s,o,u,a,f,l,c=w.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?w(h):w.event,d=w.Deferred(),v=w.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,E="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(b===2){if(!l){l={};while(t=Sn.exec(o)){l[t[1].toLowerCase()]=t[2]}}t=l[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return b===2?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();if(!b){e=y[n]=y[n]||e;g[e]=t}return this},overrideMimeType:function(e){if(!b){c.mimeType=e}return this},statusCode:function(e){var t;if(e){if(b<2){for(t in e){m[t]=[m[t],e[t]]}}else{x.always(e[x.status])}}return this},abort:function(e){var t=e||E;if(f){f.abort(t)}N(0,t);return this}};d.promise(x).complete=v.add;x.success=x.done;x.error=x.fail;c.url=((e||c.url||gn)+"").replace(wn,"").replace(Nn,mn[1]+"//");c.type=n.method||n.type||c.method||c.type;c.dataTypes=w.trim(c.dataType||"*").toLowerCase().match(S)||[""];if(c.crossDomain==null){r=Cn.exec(c.url.toLowerCase());c.crossDomain=!!(r&&(r[1]!==mn[1]||r[2]!==mn[2]||(r[3]||(r[1]==="http:"?"80":"443"))!==(mn[3]||(mn[1]==="http:"?"80":"443"))))}if(c.data&&c.processData&&typeof c.data!=="string"){c.data=w.param(c.data,c.traditional)}Dn(Ln,c,n,x);if(b===2){return x}a=c.global;if(a&&w.active++===0){w.event.trigger("ajaxStart")}c.type=c.type.toUpperCase();c.hasContent=!Tn.test(c.type);s=c.url;if(!c.hasContent){if(c.data){s=c.url+=(bn.test(s)?"&":"?")+c.data;delete c.data}if(c.cache===false){c.url=En.test(s)?s.replace(En,"$1_="+yn++):s+(bn.test(s)?"&":"?")+"_="+yn++}}if(c.ifModified){if(w.lastModified[s]){x.setRequestHeader("If-Modified-Since",w.lastModified[s])}if(w.etag[s]){x.setRequestHeader("If-None-Match",w.etag[s])}}if(c.data&&c.hasContent&&c.contentType!==false||n.contentType){x.setRequestHeader("Content-Type",c.contentType)}x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+On+"; q=0.01":""):c.accepts["*"]);for(i in c.headers){x.setRequestHeader(i,c.headers[i])}if(c.beforeSend&&(c.beforeSend.call(h,x,c)===false||b===2)){return x.abort()}E="abort";for(i in{success:1,error:1,complete:1}){x[i](c[i])}f=Dn(An,c,n,x);if(!f){N(-1,"No Transport")}else{x.readyState=1;if(a){p.trigger("ajaxSend",[x,c])}if(c.async&&c.timeout>0){u=setTimeout(function(){x.abort("timeout")},c.timeout)}try{b=1;f.send(g,N)}catch(T){if(b<2){N(-1,T)}else{throw T}}}return x},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,n){return w.get(e,t,n,"script")}});w.each(["get","post"],function(e,n){w[n]=function(e,r,i,s){if(w.isFunction(r)){s=s||i;i=r;r=t}return w.ajax({url:e,type:n,dataType:s,data:r,success:i})}});w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){w.globalEval(e);return e}}});w.ajaxPrefilter("script",function(e){if(e.cache===t){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});w.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||w("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script");n.async=true;if(e.scriptCharset){n.charset=e.scriptCharset}n.src=e.url;n.onload=n.onreadystatechange=function(e,t){if(t||!n.readyState||/loaded|complete/.test(n.readyState)){n.onload=n.onreadystatechange=null;if(n.parentNode){n.parentNode.removeChild(n)}n=null;if(!t){i(200,"success")}}};r.insertBefore(n,r.firstChild)},abort:function(){if(n){n.onload(t,true)}}}}});var jn=[],Fn=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jn.pop()||w.expando+"_"+yn++;this[e]=true;return e}});w.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==false&&(Fn.test(n.url)?"url":typeof n.data==="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fn.test(n.data)&&"data");if(a||n.dataTypes[0]==="jsonp"){s=n.jsonpCallback=w.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback;if(a){n[a]=n[a].replace(Fn,"$1"+s)}else if(n.jsonp!==false){n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+s}n.converters["script json"]=function(){if(!u){w.error(s+" was not called")}return u[0]};n.dataTypes[0]="json";o=e[s];e[s]=function(){u=arguments};i.always(function(){e[s]=o;if(n[s]){n.jsonpCallback=r.jsonpCallback;jn.push(s)}if(u&&w.isFunction(o)){o(u[0])}u=o=t});return"script"}});var In,qn,Rn=0,Un=e.ActiveXObject&&function(){var e;for(e in In){In[e](t,true)}};w.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&zn()||Wn()}:zn;qn=w.ajaxSettings.xhr();w.support.cors=!!qn&&"withCredentials"in qn;qn=w.support.ajax=!!qn;if(qn){w.ajaxTransport(function(n){if(!n.crossDomain||w.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();if(n.username){a.open(n.type,n.url,n.async,n.username,n.password)}else{a.open(n.type,n.url,n.async)}if(n.xhrFields){for(u in n.xhrFields){a[u]=n.xhrFields[u]}}if(n.mimeType&&a.overrideMimeType){a.overrideMimeType(n.mimeType)}if(!n.crossDomain&&!i["X-Requested-With"]){i["X-Requested-With"]="XMLHttpRequest"}try{for(u in i){a.setRequestHeader(u,i[u])}}catch(f){}a.send(n.hasContent&&n.data||null);r=function(e,i){var u,f,l,c;try{if(r&&(i||a.readyState===4)){r=t;if(o){a.onreadystatechange=w.noop;if(Un){delete In[o]}}if(i){if(a.readyState!==4){a.abort()}}else{c={};u=a.status;f=a.getAllResponseHeaders();if(typeof a.responseText==="string"){c.text=a.responseText}try{l=a.statusText}catch(h){l=""}if(!u&&n.isLocal&&!n.crossDomain){u=c.text?200:404}else if(u===1223){u=204}}}}catch(p){if(!i){s(-1,p)}}if(c){s(u,l,c,f)}};if(!n.async){r()}else if(a.readyState===4){setTimeout(r)}else{o=++Rn;if(Un){if(!In){In={};w(e).unload(Un)}In[o]=r}a.onreadystatechange=r}},abort:function(){if(r){r(t,true)}}}}})}var Xn,Vn,$n=/^(?:toggle|show|hide)$/,Jn=new RegExp("^(?:([+-])=|)("+E+")([a-z%]*)$","i"),Kn=/queueHooks$/,Qn=[nr],Gn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Jn.exec(t),s=i&&i[3]||(w.cssNumber[e]?"":"px"),o=(w.cssNumber[e]||s!=="px"&&+r)&&Jn.exec(w.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3];i=i||[];o=+r||1;do{u=u||".5";o=o/u;w.style(n.elem,e,o+s)}while(u!==(u=n.cur()/r)&&u!==1&&--a)}if(i){o=n.start=+o||+r||0;n.unit=s;n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]}return n}]};w.Animation=w.extend(er,{tweener:function(e,t){if(w.isFunction(e)){t=e;e=["*"]}else{e=e.split(" ")}var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;if(a){l=i.position();c=l.top;h=l.left}else{c=parseFloat(o)||0;h=parseFloat(u)||0}if(w.isFunction(t)){t=t.call(e,n,s)}if(t.top!=null){f.top=t.top-s.top+c}if(t.left!=null){f.left=t.left-s.left+h}if("using"in t){t.using.call(e,f)}else{i.css(f)}}};w.fn.extend({position:function(){if(!this[0]){return}var e,t,n={top:0,left:0},r=this[0];if(w.css(r,"position")==="fixed"){t=r.getBoundingClientRect()}else{e=this.offsetParent();t=this.offset();if(!w.nodeName(e[0],"html")){n=e.offset()}n.top+=w.css(e[0],"borderTopWidth",true);n.left+=w.css(e[0],"borderLeftWidth",true)}return{top:t.top-n.top-w.css(r,"marginTop",true),left:t.left-n.left-w.css(r,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||u;while(e&&!w.nodeName(e,"html")&&w.css(e,"position")==="static"){e=e.offsetParent}return e||u})}});w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);w.fn[e]=function(i){return w.access(this,function(e,i,s){var o=sr(e);if(s===t){return o?n in o?o[n]:o.document.documentElement[i]:e[i]}if(o){o.scrollTo(!r?s:w(o).scrollLeft(),r?s:w(o).scrollTop())}else{e[i]=s}},e,i,arguments.length,null)}});w.each({Height:"height",Width:"width"},function(e,n){w.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){w.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!=="boolean"),u=r||(i===true||s===true?"margin":"border");return w.access(this,function(n,r,i){var s;if(w.isWindow(n)){return n.document.documentElement["client"+e]}if(n.nodeType===9){s=n.documentElement;return Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])}return i===t?w.css(n,r,u):w.style(n,r,i,u)},n,o?i:t,o,null)}})});w.fn.size=function(){return this.length};w.fn.andSelf=w.fn.addBack;if(typeof module==="object"&&module&&typeof module.exports==="object"){module.exports=w}else{e.jQuery=e.$=w;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return w})}}})(window);(function(e,t,n){"use strict";function O(e,t){if(t&&t.onError){if(t.onError(e)===false){return}}this.name="JsRender Error";this.message=e||"JsRender error"}function M(e,t){var n;e=e||{};for(n in t){e[n]=t[n]}return e}function _(e,t,n){if(!it.rTag||e){a=e?e.charAt(0):a;f=e?e.charAt(1):f;l=t?t.charAt(0):l;c=t?t.charAt(1):c;h=n||h;e="\\"+a+"(\\"+h+")?\\"+f;t="\\"+l+"\\"+c;o="(?:(?:(\\w+(?=[\\/\\s\\"+l+"]))|(?:(\\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\\*)))"+"\\s*((?:[^\\"+l+"]|\\"+l+"(?!\\"+c+"))*?)";it.rTag=o+")";o=new RegExp(e+o+"(\\/)?|(?:\\/(\\w+)))"+t,"g");u=new RegExp("<.*>|([^\\\\]|^)[{}]|"+e+".*"+t)}return[a,f,l,c,h]}function D(e,t){if(!t){t=e;e=n}var r,i,s,o,u=this,a=!t||t==="root";if(e){o=u.type===t?u:n;if(!o){r=u.views;if(u._.useKey){for(i in r){if(o=r[i].get(e,t)){break}}}else for(i=0,s=r.length;!o&&i0){try{h=n.nodeType>0?n:!u.test(n)&&t&&t(e.document).find(n)[0]}catch(i){}if(h){n=h.getAttribute(C);r=r||n;n=et[n];if(!n){r=r||"_"+x++;h.setAttribute(C,r);n=et[r]=z(r,h.innerHTML,s,o,a,f)}}return n}}var c,h;i=i||"";c=l(i);f=f||(i.markup?i:{});f.tmplName=r;if(s){f._parentTmpl=s}if(!c&&i.markup&&(c=l(i.markup))){if(c.fn&&(c.debug!==i.debug||c.allowCode!==i.allowCode)){c=c.markup}}if(c!==n){if(r&&!s){k[r]=function(){return i.render.apply(i,arguments)}}if(c.fn||i.fn){if(c.fn){if(r&&r!==c.tmplName){i=Y(f,c)}else{i=c}}}else{i=W(c,f);K(c.replace(g,"\\$&"),i)}R(f);return i}}function W(e,t){var n,r=st.wrapMap||{},s=M({markup:e,tmpls:[],links:{},tags:{},bnds:[],_is:"template",render:V},t);if(!t.htmlTag){n=w.exec(e);s.htmlTag=n?n[1].toLowerCase():""}n=r[s.htmlTag];if(n&&n!==r.div){s.markup=i.trim(s.markup)}return s}function X(e,t){function r(s,o,u){var a,f,l,c;if(s&&""+s!==s&&!s.nodeType&&!s.markup){for(l in s){r(l,s[l],o)}return A}if(o===n){o=s;s=n}if(s&&""+s!==s){u=o;o=s;s=n}c=u?u[i]=u[i]||{}:r;f=t.compile;if(a=it.onBeforeStoreItem){f=a(c,s,o,f)||f}if(!s){o=f(n,o)}else if(o===null){delete c[s]}else{c[s]=f?o=f(s,o,u,e,t):o}if(f&&o){o._is=e}if(a=it.onStoreItem){a(c,s,o,f)}return o}var i=e+"s";A[i]=r;L[e]=t}function V(e,t,r,s,o,u){var a,f,l,c,h,p,d,v,m,g,y,b,w,E=this,S=!E.attr||E.attr==="html",x="";if(s===true){d=true;s=0}if(E.tag){v=E;E=E.tag;g=E._;b=E.tagName;w=v.tmpl;t=Y(t,E.ctx);m=v.content;if(v.props.link===false){t=t||{};t.link=false}r=r||v.view;e=e===n?r:e}else{w=E.jquery&&(E[0]||$('Unknown template: "'+E.selector+'"'))||E}if(w){if(!r&&e&&e._is==="view"){r=e}if(r){m=m||r.content;u=u||r._.onRender;if(e===r){e=r.data;o=true}t=Y(t,r.ctx)}if(!r||r.data===n){(t=t||{}).root=e}if(!w.fn){w=et[w]||et(w)}if(w){u=(t&&t.link)!==false&&S&&u;y=u;if(u===true){y=n;u=r._.onRender}t=w.helpers?Y(w.helpers,t):t;if(i.isArray(e)&&!o){c=d?r:s!==n&&r||q(t,"array",r,e,w,s,m,u);for(a=0,f=e.length;a":u+o}if(_){L="prm"+i;_="try{var "+L+"=["+a+"][0];}catch(e){"+L+'="";}\n';a=L}}else{if(S){w=W(x,D);w.tmplName=b+"/"+o;Q(S,w);y.push(w)}if(!C){E=o;N=M;M=""}T=e[i+1];T=T&&T[0]==="else"}f+=",args:["+a+"]}";if(k&&g||u&&o!==">"){A=new Function("data,view,j,u"," // "+b+" "+O+" "+o+"\n"+_+"return {"+f+";");A.paths=g;A._ctxs=o;if(r){return A}d=1}M+=k?"\n"+(g?"":_)+(r?"return ":"ret+=")+(d?(d=0,p=true,'c("'+u+'",view,'+(g?(m[O-1]=A,O):"{"+f)+");"):o===">"?(c=true,"h("+a+");"):(h=true,"(v="+a+")!="+(r?"=":"")+'u?v:"";')):(l=true,"{view:view,tmpl:"+(S?y.length:"0")+","+f+",");if(E&&!T){M="["+M.slice(0,-1)+"]";if(r||g){M=new Function("data,view,j,u"," // "+b+" "+O+" "+E+"\nreturn "+M+";");if(g){(m[O-1]=M).paths=g}M._ctxs=o;if(r){return M}}M=N+'\nret+=t("'+E+'",view,this,'+(O||M)+");";g=0;E=0}}}}M="// "+b+"\nvar j=j||"+(t?"jQuery.":"js")+"views"+(h?",v":"")+(l?",t=j._tag":"")+(p?",c=j._cnvt":"")+(c?",h=j.converters.html":"")+(r?";\n":',ret="";\n')+(st.tryCatch?"try{\n":"")+(D.debug?"debugger;":"")+M+(r?"\n":"\nreturn ret;\n")+(st.tryCatch?"\n}catch(e){return j._err(e);}":"");try{M=new Function("data,view,j,u",M)}catch(H){J("Compiled template code:\n\n"+M,H)}if(n){n.fn=M}return M}function G(e,t,n){function r(r,d,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B){function F(e,n,r,u,a,f,l,c){if(r){if(t){if(i==="linkTo"){s=t._jsvto=t._jsvto||[];s.push(E)}if(!i||o){t.push(E.slice(n.length))}}if(r!=="."){var h=(u?'view.hlp("'+u+'")':a?"view":"data")+(c?(f?"."+f:u?"":a?"":"."+r)+(l||""):(c=u?"":a?f||"":r,""));h=h+(c?"."+c:"");return n+(h.slice(0,9)==="view.data"?h.slice(5):h)}}return e}var j;S=S||"";b=b||d||L;E=E||N;C=C||D||"";if(x){J(e)}else{if(t&&_&&!y&&!g){if(!i||o||s){j=v[m];if(B.length-1>H-j){j=B.slice(j,H+1);_=f+":"+j+l;_=u[_]=u[_]||K(a+_+c,n,true);if(!_.paths){G(j,_.paths=[],n)}(s||t).push({_jsvOb:_})}}}return y?(y=!A,y?r:'"'):g?(g=!O,g?r:'"'):(b?(m++,v[m]=H++,b):"")+(P?m?"":i?(i=o=s=false,"\b"):",":T?(m&&J(e),i=E,o=w,"\b"+E+":"):E?E.split("^").join(".").replace(p,F)+(C?(h[++m]=true,E.charAt(0)!=="."&&(v[m]=H),C):S):S?S:M?(h[m--]=false,M)+(C?(h[++m]=true,C):""):k?(h[m]||J(e),","):d?"":(y=A,g=O,'"'))}}var i,s,o,u=n.links,h={},v={0:-1},m=0,g=false,y=false;return(e+" ").replace(/\)\^/g,").").replace(d,r)}function Y(e,t){return e&&e!==t?t?M(M({},t),e):e:t&&M({},t)}function Z(e){return N[e]||(N[e]="&#"+e.charCodeAt(0)+";")}function ut(e){var t=this,r=t.tagCtx,s=!arguments.length,o="",u=s||0;if(!t.rendering.done){if(s){o=n}else if(e!==n){e=t.prep?t.prep(e):e;o+=r.render(e);u+=i.isArray(e)?e.length:1}if(t.rendering.done=u){t.selected=r.index}}return o}if(t&&t.views||e.jsviews){return}var r="v1.0.0-beta",i,s,o,u,a="{",f="{",l="}",c="}",h="^",p=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,d=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^|\s*$)|[)\]])([([]?))|(\s+)/g,v=/[ \t]*(\r\n|\n|\r)/g,m=/\\(['"])/g,g=/['"\\]/g,y=/\x08(~)?([^\x08]+)\x08/g,b=/^if\s/,w=/<(\w+)[>\s]/,E=/[\x00`><"'&]/g,S=E,x=0,T=0,N={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`"},C="data-jsv-tmpl",k={},L={template:{compile:z},tag:{compile:U},helper:{},converter:{}},A={jsviews:r,render:k,settings:{delimiters:_,debugMode:true,tryCatch:true},sub:{View:q,Error:O,tmplFn:K,parse:G,extend:M,error:$,syntaxError:J},_cnvt:j,_tag:I,_err:function(e){return st.debugMode?"Error: "+(e.message||e)+". ":""}};(O.prototype=new Error).constructor=O;P.depends=function(){return[this.get("item"),"index"]};H.depends=function(){return["index"]};for(s in L){X(s,L[s])}var et=A.templates,tt=A.converters,nt=A.helpers,rt=A.tags,it=A.sub,st=A.settings,ot="Error: #index in nested view: use #getIndex()";if(t){i=t;i.fn.render=V}else{i=e.jsviews={};i.isArray=Array&&Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}}i.render=k;i.views=A;i.templates=et=A.templates;rt({"else":function(){},"if":{render:function(e){var t=this,n=t.rendering.done||!e&&(arguments.length||!t.tagCtx.index)?"":(t.rendering.done=true,t.selected=t.tagCtx.index,t.tagCtx.render());return n},onUpdate:function(e,t,n){var r,i,s;for(r=0;(i=this.tagCtxs[r])&&i.args.length;r++){i=i.args[0];s=!i!==!n[r].args[0];if(!!i||s){return s}}return false},flow:true},"for":{render:ut,onArrayChange:function(e,t){var n,r=this,i=t.change;if(this.tagCtxs[1]&&(i==="insert"&&e.target.length===t.items.length||i==="remove"&&!e.target.length||i==="refresh"&&!t.oldItems.length!==!e.target.length)){this.refresh()}else{for(n in r._.arrVws){n=r._.arrVws[n];if(n.data===e.target){n._.onArrayChange.apply(n,arguments)}}}e.done=true},flow:true},props:{prep:function(e){var t,n=[];for(t in e){n.push({key:t,prop:e[t]})}return n},render:ut,flow:true},include:{flow:true},"*":{render:function(e){return e},flow:true}});tt({html:function(e){return e!=n?String(e).replace(S,Z):""},attr:function(e){return e!=n?String(e).replace(E,Z):e===null?e:""},url:function(e){return e!=n?encodeURI(String(e)):e===null?e:""}});_()})(this,this.jQuery);jQuery.fn.extend({everyTime:function(e,t,n,r){return this.each(function(){jQuery.timer.add(this,e,t,n,r)})},oneTime:function(e,t,n){return this.each(function(){jQuery.timer.add(this,e,t,n,1)})},stopTime:function(e,t){return this.each(function(){jQuery.timer.remove(this,e,t)})}});jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1e3,das:1e4,hs:1e5,ks:1e6},timeParse:function(e){if(e==undefined||e==null)return null;var t=this.regex.exec(jQuery.trim(e.toString()));return t[2]?parseFloat(t[1])*(this.powers[t[2]]||1):e},add:function(e,t,n,r,i){var s=0;if(jQuery.isFunction(n)){i||(i=r);r=n;n=t}t=jQuery.timer.timeParse(t);if(!(typeof t!="number"||isNaN(t)||t<0)){if(typeof i!="number"||isNaN(i)||i<0)i=0;i=i||0;var o=jQuery.data(e,this.dataKey)||jQuery.data(e,this.dataKey,{});o[n]||(o[n]={});r.timerID=r.timerID||this.guid++;var u=function(){if(++s>i&&i!==0||r.call(e,s)===false)jQuery.timer.remove(e,n,r)};u.timerID=r.timerID;o[n][r.timerID]||(o[n][r.timerID]=window.setInterval(u,t));this.global.push(e)}},remove:function(e,t,n){var r=jQuery.data(e,this.dataKey),i;if(r){if(t){if(r[t]){if(n){if(n.timerID){window.clearInterval(r[t][n.timerID]);delete r[t][n.timerID]}}else for(n in r[t]){window.clearInterval(r[t][n]);delete r[t][n]}for(i in r[t])break;if(!i){i=null;delete r[t]}}}else for(t in r)this.remove(e,t,n);for(i in r)break;i||jQuery.removeData(e,this.dataKey)}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(e,t){jQuery.timer.remove(t)})}) \ No newline at end of file +(function(e,t){function H(e){var t=e.length,n=w.type(e);if(w.isWindow(e)){return false}if(e.nodeType===1&&t){return true}return n==="array"||n!=="function"&&(t===0||typeof t==="number"&&t>0&&t-1 in e)}function j(e){var t=B[e]={};w.each(e.match(S)||[],function(e,n){t[n]=true});return t}function q(e,n,r,i){if(!w.acceptData(e)){return}var s,o,u=w.expando,a=e.nodeType,f=a?w.cache:e,l=a?e[u]:e[u]&&u;if((!l||!f[l]||!i&&!f[l].data)&&r===t&&typeof n==="string"){return}if(!l){if(a){l=e[u]=c.pop()||w.guid++}else{l=u}}if(!f[l]){f[l]=a?{}:{toJSON:w.noop}}if(typeof n==="object"||typeof n==="function"){if(i){f[l]=w.extend(f[l],n)}else{f[l].data=w.extend(f[l].data,n)}}o=f[l];if(!i){if(!o.data){o.data={}}o=o.data}if(r!==t){o[w.camelCase(n)]=r}if(typeof n==="string"){s=o[n];if(s==null){s=o[w.camelCase(n)]}}else{s=o}return s}function R(e,t,n){if(!w.acceptData(e)){return}var r,i,s=e.nodeType,o=s?w.cache:e,u=s?e[w.expando]:w.expando;if(!o[u]){return}if(t){r=n?o[u]:o[u].data;if(r){if(!w.isArray(t)){if(t in r){t=[t]}else{t=w.camelCase(t);if(t in r){t=[t]}else{t=t.split(" ")}}}else{t=t.concat(w.map(t,w.camelCase))}i=t.length;while(i--){delete r[t[i]]}if(n?!z(r):!w.isEmptyObject(r)){return}}}if(!n){delete o[u].data;if(!z(o[u])){return}}if(s){w.cleanData([e],true)}else if(w.support.deleteExpando||o!=o.window){delete o[u]}else{o[u]=null}}function U(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r==="string"){try{r=r==="true"?true:r==="false"?false:r==="null"?null:+r+""===r?+r:F.test(r)?w.parseJSON(r):r}catch(s){}w.data(e,n,r)}else{r=t}}return r}function z(e){var t;for(t in e){if(t==="data"&&w.isEmptyObject(e[t])){continue}if(t!=="toJSON"){return false}}return true}function it(){return true}function st(){return false}function ot(){try{return o.activeElement}catch(e){}}function ct(e,t){do{e=e[t]}while(e&&e.nodeType!==1);return e}function ht(e,t,n){if(w.isFunction(t)){return w.grep(e,function(e,r){return!!t.call(e,r,e)!==n})}if(t.nodeType){return w.grep(e,function(e){return e===t!==n})}if(typeof t==="string"){if(ut.test(t)){return w.filter(t,e,n)}t=w.filter(t,e)}return w.grep(e,function(e){return w.inArray(e,t)>=0!==n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement){while(t.length){n.createElement(t.pop())}}return n}function Mt(e,t){return w.nodeName(e,"table")&&w.nodeName(t.nodeType===1?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _t(e){e.type=(w.find.attr(e,"type")!==null)+"/"+e.type;return e}function Dt(e){var t=Ct.exec(e.type);if(t){e.type=t[1]}else{e.removeAttribute("type")}return e}function Pt(e,t){var n,r=0;for(;(n=e[r])!=null;r++){w._data(n,"globalEval",!t||w._data(t[r],"globalEval"))}}function Ht(e,t){if(t.nodeType!==1||!w.hasData(e)){return}var n,r,i,s=w._data(e),o=w._data(t,s),u=s.events;if(u){delete o.handle;o.events={};for(n in u){for(r=0,i=u[n].length;r").css("cssText","display:block !important")).appendTo(t.documentElement);t=(It[0].contentWindow||It[0].contentDocument).document;t.write("");t.close();n=fn(e,t);It.detach()}Qt[e]=n}return n}function fn(e,t){var n=w(t.createElement(e)).appendTo(t.body),r=w.css(n[0],"display");n.remove();return r}function vn(e,t,n,r){var i;if(w.isArray(t)){w.each(t,function(t,i){if(n||cn.test(e)){r(e,i)}else{vn(e+"["+(typeof i==="object"?t:"")+"]",i,n,r)}})}else if(!n&&w.type(t)==="object"){for(i in t){vn(e+"["+i+"]",t[i],n,r)}}else{r(e,t)}}function _n(e){return function(t,n){if(typeof t!=="string"){n=t;t="*"}var r,i=0,s=t.toLowerCase().match(S)||[];if(w.isFunction(n)){while(r=s[i++]){if(r[0]==="+"){r=r.slice(1)||"*";(e[r]=e[r]||[]).unshift(n)}else{(e[r]=e[r]||[]).push(n)}}}}}function Dn(e,t,n,r){function o(u){var a;i[u]=true;w.each(e[u]||[],function(e,u){var f=u(t,n,r);if(typeof f==="string"&&!s&&!i[f]){t.dataTypes.unshift(f);o(f);return false}else if(s){return!(a=f)}});return a}var i={},s=e===An;return o(t.dataTypes[0])||!i["*"]&&o("*")}function Pn(e,n){var r,i,s=w.ajaxSettings.flatOptions||{};for(i in n){if(n[i]!==t){(s[i]?e:r||(r={}))[i]=n[i]}}if(r){w.extend(true,e,r)}return e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes;while(f[0]==="*"){f.shift();if(s===t){s=e.mimeType||n.getResponseHeader("Content-Type")}}if(s){for(u in a){if(a[u]&&a[u].test(s)){f.unshift(u);break}}}if(f[0]in r){o=f[0]}else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}if(!i){i=u}}o=o||i}if(o){if(o!==f[0]){f.unshift(o)}return r[o]}}function Bn(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1]){for(o in e.converters){f[o.toLowerCase()]=e.converters[o]}}s=l.shift();while(s){if(e.responseFields[s]){n[e.responseFields[s]]=t}if(!a&&r&&e.dataFilter){t=e.dataFilter(t,e.dataType)}a=s;s=l.shift();if(s){if(s==="*"){s=a}else if(a!=="*"&&a!==s){o=f[a+" "+s]||f["* "+s];if(!o){for(i in f){u=i.split(" ");if(u[1]===s){o=f[a+" "+u[0]]||f["* "+u[0]];if(o){if(o===true){o=f[i]}else if(f[i]!==true){s=u[0];l.unshift(u[1])}break}}}}if(o!==true){if(o&&e["throws"]){t=o(t)}else{try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}}}}}return{state:"success",data:t}}function zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){setTimeout(function(){Xn=t});return Xn=w.now()}function Zn(e,t,n){var r,i=(Gn[t]||[]).concat(Gn["*"]),s=0,o=i.length;for(;s)[^>]*|#([\w-]*))$/,N=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,C=/^[\],:{}\s]*$/,k=/(?:^|:|,)(?:\s*\[)+/g,L=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,O=/^-ms-/,M=/-([\da-z])/gi,_=function(e,t){return t.toUpperCase()},D=function(e){if(o.addEventListener||e.type==="load"||o.readyState==="complete"){P();w.ready()}},P=function(){if(o.addEventListener){o.removeEventListener("DOMContentLoaded",D,false);e.removeEventListener("load",D,false)}else{o.detachEvent("onreadystatechange",D);e.detachEvent("onload",D)}};w.fn=w.prototype={jquery:h,constructor:w,init:function(e,n,r){var i,s;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){i=[null,e,null]}else{i=T.exec(e)}if(i&&(i[1]||!n)){if(i[1]){n=n instanceof w?n[0]:n;w.merge(this,w.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,true));if(N.test(i[1])&&w.isPlainObject(n)){for(i in n){if(w.isFunction(this[i])){this[i](n[i])}else{this.attr(i,n[i])}}}return this}else{s=o.getElementById(i[2]);if(s&&s.parentNode){if(s.id!==i[2]){return r.find(e)}this.length=1;this[0]=s}this.context=o;this.selector=e;return this}}else if(!n||n.jquery){return(n||r).find(e)}else{return this.constructor(n).find(e)}}else if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else if(w.isFunction(e)){return r.ready(e)}if(e.selector!==t){this.selector=e.selector;this.context=e.context}return w.makeArray(e,this)},selector:"",length:0,toArray:function(){return v.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);t.prevObject=this;t.context=this.context;return t},each:function(e,t){return w.each(this,e,t)},ready:function(e){w.ready.promise().done(e);return this},slice:function(){return this.pushStack(v.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0){return}n.resolveWith(o,[w]);if(w.fn.trigger){w(o).trigger("ready").off("ready")}},isFunction:function(e){return w.type(e)==="function"},isArray:Array.isArray||function(e){return w.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){if(e==null){return String(e)}return typeof e==="object"||typeof e==="function"?l[g.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||w.type(e)!=="object"||e.nodeType||w.isWindow(e)){return false}try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf")){return false}}catch(r){return false}if(w.support.ownLast){for(n in e){return y.call(e,n)}}for(n in e){}return n===t||y.call(e,n)},isEmptyObject:function(e){var t;for(t in e){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!=="string"){return null}if(typeof t==="boolean"){n=t;t=false}t=t||o;var r=N.exec(e),i=!n&&[];if(r){return[t.createElement(r[1])]}r=w.buildFragment([e],t,i);if(i){w(i).remove()}return w.merge([],r.childNodes)},parseJSON:function(t){if(e.JSON&&e.JSON.parse){return e.JSON.parse(t)}if(t===null){return t}if(typeof t==="string"){t=w.trim(t);if(t){if(C.test(t.replace(L,"@").replace(A,"]").replace(k,""))){return(new Function("return "+t))()}}}w.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!=="string"){return null}try{if(e.DOMParser){i=new DOMParser;r=i.parseFromString(n,"text/xml")}else{r=new ActiveXObject("Microsoft.XMLDOM");r.async="false";r.loadXML(n)}}catch(s){r=t}if(!r||!r.documentElement||r.getElementsByTagName("parsererror").length){w.error("Invalid XML: "+n)}return r},noop:function(){},globalEval:function(t){if(t&&w.trim(t)){(e.execScript||function(t){e["eval"].call(e,t)})(t)}},camelCase:function(e){return e.replace(O,"ms-").replace(M,_)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=H(e);if(n){if(o){for(;is.cacheLength){delete t[e.shift()]}return t[n]=r}var e=[];return t}function at(e){e[b]=true;return e}function ft(e){var t=h.createElement("div");try{return!!e(t)}catch(n){return false}finally{if(t.parentNode){t.parentNode.removeChild(t)}t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--){s.attrHandle[n[r]]=t}}function ct(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||O)-(~e.sourceIndex||O);if(r){return r}if(n){while(n=n.nextSibling){if(n===t){return-1}}}return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function dt(e){return at(function(t){t=+t;return at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--){if(n[i=s[o]]){n[i]=!(r[i]=n[i])}}})})}function vt(){}function mt(e,t){var n,r,i,o,u,a,f,l=N[e+" "];if(l){return t?0:l.slice(0)}u=e;a=[];f=s.preFilter;while(u){if(!n||(r=X.exec(u))){if(r){u=u.slice(r[0].length)||u}a.push(i=[])}n=false;if(r=V.exec(u)){n=r.shift();i.push({value:n,type:r[0].replace(W," ")});u=u.slice(n.length)}for(o in s.filter){if((r=G[o].exec(u))&&(!f[o]||(r=f[o](r)))){n=r.shift();i.push({value:n,type:o,matches:r});u=u.slice(n.length)}}if(!n){break}}return t?u.length:u?ot.error(e):N(e,a).slice(0)}function gt(e){var t=0,n=e.length,r="";for(;t1?function(t,n,r){var i=e.length;while(i--){if(!e[i](t,n,r)){return false}}return true}:e[0]}function wt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1){s[f]=!(o[f]=c)}}}}else{g=wt(g===o?g.splice(d,g.length):g);if(i){i(null,o,g,a)}else{H.apply(o,g)}}})}function St(e){var t,n,r,i=e.length,o=s.relative[e[0].type],u=o||s.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,true),c=yt(function(e){return j.call(t,e)>-1},u,true),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;a1&&bt(h),a>1&>(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(W,"$1"),n,a0,o=e.length>0,u=function(u,a,l,c,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=p!=null,x=f,T=u||o&&s.find["TAG"]("*",p&&a.parentNode||a),N=S+=x==null?1:Math.random()||.1;if(E){f=a!==h&&a;i=n}for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++]){if(m(d,a,l)){c.push(d);break}}if(E){S=N;i=++n}}if(r){if(d=!m&&d){y--}if(u){w.push(d)}}}y+=b;if(r&&b!==y){v=0;while(m=t[v++]){m(w,g,a,l)}if(u){if(y>0){while(b--){if(!(w[b]||g[b])){g[b]=D.call(c)}}}g=wt(g)}H.apply(c,g);if(E&&!u&&g.length>0&&y+t.length>1){ot.uniqueSort(c)}}if(E){S=N;f=x}return w};return r?at(u):u}function Tt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&r.getById&&t.nodeType===9&&d&&s.relative[u[1].type]){t=(s.find["ID"](f.matches[0].replace(rt,it),t)||[])[0];if(!t){return n}e=e.slice(u.shift().value.length)}o=G["needsContext"].test(e)?0:u.length;while(o--){f=u[o];if(s.relative[l=f.type]){break}if(c=s.find[l]){if(i=c(f.matches[0].replace(rt,it),$.test(u[0].type)&&t.parentNode||t)){u.splice(o,1);e=i.length&>(u);if(!e){H.apply(n,i);return n}break}}}}}a(e,h)(i,t,!d,n,$.test(e));return n}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b="sizzle"+ -(new Date),E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=false,L=function(e,t){if(e===t){k=true;return 0}return 0},A=typeof t,O=1<<31,M={}.hasOwnProperty,_=[],D=_.pop,P=_.push,H=_.push,B=_.slice,j=_.indexOf||function(e){var t=0,n=this.length;for(;t+~]|"+I+")"+I+"*"),$=new RegExp(I+"*[+~]"),J=new RegExp("="+I+"*([^\\]'\"]*)"+I+"*\\]","g"),K=new RegExp(z),Q=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q.replace("w","w*")+")"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{H.apply(_=B.call(E.childNodes),E.childNodes);_[E.childNodes.length].nodeType}catch(st){H={apply:_.length?function(e,t){P.apply(e,B.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]){}e.length=n-1}}}u=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":false};r=ot.support={};c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:E,n=t.defaultView;if(t===h||t.nodeType!==9||!t.documentElement){return h}h=t;p=t.documentElement;d=!u(t);if(n&&n.attachEvent&&n!==n.top){n.attachEvent("onbeforeunload",function(){c()})}r.attributes=ft(function(e){e.className="i";return!e.getAttribute("className")});r.getElementsByTagName=ft(function(e){e.appendChild(t.createComment(""));return!e.getElementsByTagName("*").length});r.getElementsByClassName=ft(function(e){e.innerHTML="
";e.firstChild.className="i";return e.getElementsByClassName("i").length===2});r.getById=ft(function(e){p.appendChild(e).id=b;return!t.getElementsByName||!t.getElementsByName(b).length});if(r.getById){s.find["ID"]=function(e,t){if(typeof t.getElementById!==A&&d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}};s.filter["ID"]=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}}else{delete s.find["ID"];s.filter["ID"]=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}}s.find["TAG"]=r.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==A){return t.getElementsByTagName(e)}}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++]){if(n.nodeType===1){r.push(n)}}return r}return s};s.find["CLASS"]=r.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==A&&d){return t.getElementsByClassName(e)}};m=[];v=[];if(r.qsa=Y.test(t.querySelectorAll)){ft(function(e){e.innerHTML="";if(!e.querySelectorAll("[selected]").length){v.push("\\["+I+"*(?:value|"+F+")")}if(!e.querySelectorAll(":checked").length){v.push(":checked")}});ft(function(e){var n=t.createElement("input");n.setAttribute("type","hidden");e.appendChild(n).setAttribute("t","");if(e.querySelectorAll("[t^='']").length){v.push("[*^$]="+I+"*(?:''|\"\")")}if(!e.querySelectorAll(":enabled").length){v.push(":enabled",":disabled")}e.querySelectorAll("*,:x");v.push(",.*:")})}if(r.matchesSelector=Y.test(g=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector)){ft(function(e){r.disconnectedMatch=g.call(e,"div");g.call(e,"[s!='']:x");m.push("!=",z)})}v=v.length&&new RegExp(v.join("|"));m=m.length&&new RegExp(m.join("|"));y=Y.test(p.contains)||p.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16))}:function(e,t){if(t){while(t=t.parentNode){if(t===e){return true}}}return false};L=p.compareDocumentPosition?function(e,n){if(e===n){k=true;return 0}var i=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);if(i){if(i&1||!r.sortDetached&&n.compareDocumentPosition(e)===i){if(e===t||y(E,e)){return-1}if(n===t||y(E,n)){return 1}return l?j.call(l,e)-j.call(l,n):0}return i&4?-1:1}return e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,s=e.parentNode,o=n.parentNode,u=[e],a=[n];if(e===n){k=true;return 0}else if(!s||!o){return e===t?-1:n===t?1:s?-1:o?1:l?j.call(l,e)-j.call(l,n):0}else if(s===o){return ct(e,n)}r=e;while(r=r.parentNode){u.unshift(r)}r=n;while(r=r.parentNode){a.unshift(r)}while(u[i]===a[i]){i++}return i?ct(u[i],a[i]):u[i]===E?-1:a[i]===E?1:0};return t};ot.matches=function(e,t){return ot(e,null,null,t)};ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h){c(e)}t=t.replace(J,"='$1']");if(r.matchesSelector&&d&&(!m||!m.test(t))&&(!v||!v.test(t))){try{var n=g.call(e,t);if(n||r.disconnectedMatch||e.document&&e.document.nodeType!==11){return n}}catch(i){}}return ot(t,h,null,[e]).length>0};ot.contains=function(e,t){if((e.ownerDocument||e)!==h){c(e)}return y(e,t)};ot.attr=function(e,n){if((e.ownerDocument||e)!==h){c(e)}var i=s.attrHandle[n.toLowerCase()],o=i&&M.call(s.attrHandle,n.toLowerCase())?i(e,n,!d):t;return o===t?r.attributes||!d?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o};ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};ot.uniqueSort=function(e){var t,n=[],i=0,s=0;k=!r.detectDuplicates;l=!r.sortStable&&e.slice(0);e.sort(L);if(k){while(t=e[s++]){if(t===e[s]){i=n.push(s)}}while(i--){e.splice(n[i],1)}}return e};o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i){for(;t=e[r];r++){n+=o(t)}}else if(i===1||i===9||i===11){if(typeof e.textContent==="string"){return e.textContent}else{for(e=e.firstChild;e;e=e.nextSibling){n+=o(e)}}}else if(i===3||i===4){return e.nodeValue}return n};s=ot.selectors={cacheLength:50,createPseudo:at,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(rt,it);e[3]=(e[4]||e[5]||"").replace(rt,it);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){ot.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+(e[7]+e[8]||e[3]==="odd")}else if(e[3]){ot.error(e[0])}return e},PSEUDO:function(e){var n,r=!e[5]&&e[2];if(G["CHILD"].test(e[0])){return null}if(e[3]&&e[4]!==t){e[2]=e[4]}else if(r&&K.test(r)&&(n=mt(r,true))&&(n=r.indexOf(")",r.length-n)-r.length)){e[0]=e[0].slice(0,n);e[2]=r.slice(0,n)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return e==="*"?function(){return true}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&T(e,function(e){return t.test(typeof e.className==="string"&&e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);if(i==null){return t==="!="}if(!t){return true}i+="";return t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":false}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v]){if(u?c.nodeName.toLowerCase()===g:c.nodeType===1){return false}}d=v=e==="only"&&!d&&"nextSibling"}return true}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[b]||(m[b]={});f=l[e]||[];p=f[0]===S&&f[1];h=f[0]===S&&f[2];c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if(c.nodeType===1&&++h&&c===t){l[e]=[S,p,h];break}}}else if(y&&(f=(t[b]||(t[b]={}))[e])&&f[0]===S){h=f[1]}else{while(c=++p&&c&&c[v]||(h=p=0)||d.pop()){if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){if(y){(c[b]||(c[b]={}))[e]=[S,h]}if(c===t){break}}}}h-=i;return h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);if(r[b]){return r(t)}if(r.length>1){n=[e,e,"",t];return s.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,s=r(e,t),o=s.length;while(o--){i=j.call(e,s[o]);e[i]=!(n[i]=s[o])}}):function(e){return r(e,0,n)}}return r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(W,"$1"));return r[b]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--){if(s=o[u]){e[u]=!(t[u]=s)}}}):function(e,i,s){t[0]=e;r(t,null,s,n);return!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){if(!Q.test(e||"")){ot.error("unsupported lang: "+e)}e=e.replace(rt,it).toLowerCase();return function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return n===e||n.indexOf(e+"-")===0}}while((t=t.parentNode)&&t.nodeType===1);return false}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},parent:function(e){return!s.pseudos["empty"](e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[n<0?n+t:n]}),even:dt(function(e,t){var n=0;for(;n=0;){e.push(r)}return e}),gt:dt(function(e,t,n){var r=n<0?n+t:n;for(;++r";e.firstChild.setAttribute("value","");return e.firstChild.getAttribute("value")===""})){lt("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input"){return e.defaultValue}})}if(!ft(function(e){return e.getAttribute("disabled")==null})){lt(F,function(e,t,n){var r;if(!n){return(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===true?t.toLowerCase():null}})}w.find=ot;w.expr=ot.selectors;w.expr[":"]=w.expr.pseudos;w.unique=ot.uniqueSort;w.text=ot.getText;w.isXMLDoc=ot.isXML;w.contains=ot.contains})(e);var B={};w.Callbacks=function(e){e=typeof e==="string"?B[e]||j(e):w.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){r=e.memory&&t;i=true;o=u||0;u=0;s=a.length;n=true;for(;a&&o-1){a.splice(r,1);if(n){if(r<=s){s--}if(r<=o){o--}}}})}return this},has:function(e){return e?w.inArray(e,a)>-1:!!(a&&a.length)},empty:function(){a=[];s=0;return this},disable:function(){a=f=r=t;return this},disabled:function(){return!a},lock:function(){f=t;if(!r){c.disable()}return this},locked:function(){return!f},fireWith:function(e,t){if(a&&(!i||f)){t=t||[];t=[e,t.slice?t.slice():t];if(n){f.push(t)}else{l(t)}}return this},fire:function(){c.fireWith(this,arguments);return this},fired:function(){return!!i}};return c};w.extend({Deferred:function(e){var t=[["resolve","done",w.Callbacks("once memory"),"resolved"],["reject","fail",w.Callbacks("once memory"),"rejected"],["notify","progress",w.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){i.done(arguments).fail(arguments);return this},then:function(){var e=arguments;return w.Deferred(function(n){w.each(t,function(t,s){var o=s[0],u=w.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);if(e&&w.isFunction(e.promise)){e.promise().done(n.resolve).fail(n.reject).progress(n.notify)}else{n[o+"With"](this===r?n.promise():this,u?[e]:arguments)}})});e=null}).promise()},promise:function(e){return e!=null?w.extend(e,r):r}},i={};r.pipe=r.then;w.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add;if(u){o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock)}i[s[0]]=function(){i[s[0]+"With"](this===i?r:this,arguments);return this};i[s[0]+"With"]=o.fireWith});r.promise(i);if(e){e.call(i,i)}return i},when:function(e){var t=0,n=v.call(arguments),r=n.length,i=r!==1||e&&w.isFunction(e.promise)?r:0,s=i===1?e:w.Deferred(),o=function(e,t,n){return function(r){t[e]=this;n[e]=arguments.length>1?v.call(arguments):r;if(n===u){s.notifyWith(t,n)}else if(!--i){s.resolveWith(t,n)}}},u,a,f;if(r>1){u=new Array(r);a=new Array(r);f=new Array(r);for(;t
a";n=p.getElementsByTagName("*")||[];r=p.getElementsByTagName("a")[0];if(!r||!r.style||!n.length){return t}u=o.createElement("select");f=u.appendChild(o.createElement("option"));s=p.getElementsByTagName("input")[0];r.style.cssText="top:1px;float:left;opacity:.5";t.getSetAttribute=p.className!=="t";t.leadingWhitespace=p.firstChild.nodeType===3;t.tbody=!p.getElementsByTagName("tbody").length;t.htmlSerialize=!!p.getElementsByTagName("link").length;t.style=/top/.test(r.getAttribute("style"));t.hrefNormalized=r.getAttribute("href")==="/a";t.opacity=/^0.5/.test(r.style.opacity);t.cssFloat=!!r.style.cssFloat;t.checkOn=!!s.value;t.optSelected=f.selected;t.enctype=!!o.createElement("form").enctype;t.html5Clone=o.createElement("nav").cloneNode(true).outerHTML!=="<:nav>";t.inlineBlockNeedsLayout=false;t.shrinkWrapBlocks=false;t.pixelPosition=false;t.deleteExpando=true;t.noCloneEvent=true;t.reliableMarginRight=true;t.boxSizingReliable=true;s.checked=true;t.noCloneChecked=s.cloneNode(true).checked;u.disabled=true;t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=false}s=o.createElement("input");s.setAttribute("value","");t.input=s.getAttribute("value")==="";s.value="t";s.setAttribute("type","radio");t.radioValue=s.value==="t";s.setAttribute("checked","t");s.setAttribute("name","t");a=o.createDocumentFragment();a.appendChild(s);t.appendChecked=s.checked;t.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;if(p.attachEvent){p.attachEvent("onclick",function(){t.noCloneEvent=false});p.cloneNode(true).click()}for(h in{submit:true,change:true,focusin:true}){p.setAttribute(l="on"+h,"t");t[h+"Bubbles"]=l in e||p.attributes[l].expando===false}p.style.backgroundClip="content-box";p.cloneNode(true).style.backgroundClip="";t.clearCloneStyle=p.style.backgroundClip==="content-box";for(h in w(t)){break}t.ownLast=h!=="0";w(function(){var n,r,s,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=o.getElementsByTagName("body")[0];if(!a){return}n=o.createElement("div");n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";a.appendChild(n).appendChild(p);p.innerHTML="
t
";s=p.getElementsByTagName("td");s[0].style.cssText="padding:0;margin:0;border:0;display:none";c=s[0].offsetHeight===0;s[0].style.display="";s[1].style.display="none";t.reliableHiddenOffsets=c&&s[0].offsetHeight===0;p.innerHTML="";p.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%;";w.swap(a,a.style.zoom!=null?{zoom:1}:{},function(){t.boxSizing=p.offsetWidth===4});if(e.getComputedStyle){t.pixelPosition=(e.getComputedStyle(p,null)||{}).top!=="1%";t.boxSizingReliable=(e.getComputedStyle(p,null)||{width:"4px"}).width==="4px";r=p.appendChild(o.createElement("div"));r.style.cssText=p.style.cssText=u;r.style.marginRight=r.style.width="0";p.style.width="1px";t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)}if(typeof p.style.zoom!==i){p.innerHTML="";p.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1";t.inlineBlockNeedsLayout=p.offsetWidth===3;p.style.display="block";p.innerHTML="
";p.firstChild.style.width="5px";t.shrinkWrapBlocks=p.offsetWidth!==3;if(t.inlineBlockNeedsLayout){a.style.zoom=1}}a.removeChild(n);n=p=s=r=null});n=u=a=f=r=s=null;return t}({});var F=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;w.extend({cache:{},noData:{applet:true,embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){e=e.nodeType?w.cache[e[w.expando]]:e[w.expando];return!!e&&!z(e)},data:function(e,t,n){return q(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return q(e,t,n,true)},_removeData:function(e,t){return R(e,t,true)},acceptData:function(e){if(e.nodeType&&e.nodeType!==1&&e.nodeType!==9){return false}var t=e.nodeName&&w.noData[e.nodeName.toLowerCase()];return!t||t!==true&&e.getAttribute("classid")===t}});w.fn.extend({data:function(e,n){var r,i,s=null,o=0,u=this[0];if(e===t){if(this.length){s=w.data(u);if(u.nodeType===1&&!w._data(u,"parsedAttrs")){r=u.attributes;for(;o1?this.each(function(){w.data(this,e,n)}):u?U(u,e,w.data(u,e)):null},removeData:function(e){return this.each(function(){w.removeData(this,e)})}});w.extend({queue:function(e,t,n){var r;if(e){t=(t||"fx")+"queue";r=w._data(e,t);if(n){if(!r||w.isArray(n)){r=w._data(e,t,w.makeArray(n))}else{r.push(n)}}return r||[]}},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),s=w._queueHooks(e,t),o=function(){w.dequeue(e,t)};if(i==="inprogress"){i=n.shift();r--}if(i){if(t==="fx"){n.unshift("inprogress")}delete s.stop;i.call(e,o,s)}if(!r&&s){s.empty.fire()}},_queueHooks:function(e,t){var n=t+"queueHooks";return w._data(e,n)||w._data(e,n,{empty:w.Callbacks("once memory").add(function(){w._removeData(e,t+"queue");w._removeData(e,n)})})}});w.fn.extend({queue:function(e,n){var r=2;if(typeof e!=="string"){n=e;e="fx";r--}if(arguments.length1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})},prop:function(e,t){return w.access(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){e=w.propFix[e]||e;return this.each(function(){try{this[e]=t;delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=typeof e==="string"&&e;if(w.isFunction(e)){return this.each(function(t){w(this).addClass(e.call(this,t,this.className))})}if(a){t=(e||"").match(S)||[];for(;o=0){r=r.replace(" "+i+" "," ")}}n.className=e?w.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e;if(typeof t==="boolean"&&n==="string"){return t?this.addClass(e):this.removeClass(e)}if(w.isFunction(e)){return this.each(function(n){w(this).toggleClass(e.call(this,n,this.className,t),t)})}return this.each(function(){if(n==="string"){var t,r=0,s=w(this),o=e.match(S)||[];while(t=o[r++]){if(s.hasClass(t)){s.removeClass(t)}else{s.addClass(t)}}}else if(n===i||n==="boolean"){if(this.className){w._data(this,"__className__",this.className)}this.className=this.className||e===false?"":w._data(this,"__className__")||""}})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0){return true}}return false},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s){r=w.valHooks[s.type]||w.valHooks[s.nodeName.toLowerCase()];if(r&&"get"in r&&(n=r.get(s,"value"))!==t){return n}n=s.value;return typeof n==="string"?n.replace($,""):n==null?"":n}return}i=w.isFunction(e);return this.each(function(n){var s;if(this.nodeType!==1){return}if(i){s=e.call(this,n,w(this).val())}else{s=e}if(s==null){s=""}else if(typeof s==="number"){s+=""}else if(w.isArray(s)){s=w.map(s,function(e){return e==null?"":e+""})}r=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()];if(!r||!("set"in r)||r.set(this,s,"value")===t){this.value=s}})}});w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return t!=null?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0){n=true}}if(!n){e.selectedIndex=-1}return s}}},attr:function(e,n,r){var s,o,u=e.nodeType;if(!e||u===3||u===8||u===2){return}if(typeof e.getAttribute===i){return w.prop(e,n,r)}if(u!==1||!w.isXMLDoc(e)){n=n.toLowerCase();s=w.attrHooks[n]||(w.expr.match.bool.test(n)?X:W)}if(r!==t){if(r===null){w.removeAttr(e,n)}else if(s&&"set"in s&&(o=s.set(e,r,n))!==t){return o}else{e.setAttribute(n,r+"");return r}}else if(s&&"get"in s&&(o=s.get(e,n))!==null){return o}else{o=w.find.attr(e,n);return o==null?t:o}},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(S);if(s&&e.nodeType===1){while(n=s[i++]){r=w.propFix[n]||n;if(w.expr.match.bool.test(n)){if(Y&&G||!Q.test(n)){e[r]=false}else{e[w.camelCase("default-"+n)]=e[r]=false}}else{w.attr(e,n,"")}e.removeAttribute(G?n:r)}}},attrHooks:{type:{set:function(e,t){if(!w.support.radioValue&&t==="radio"&&w.nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);if(n){e.value=n}return t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2){return}o=u!==1||!w.isXMLDoc(e);if(o){n=w.propFix[n]||n;s=w.propHooks[n]}if(r!==t){return s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r}else{return s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]}},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):J.test(e.nodeName)||K.test(e.nodeName)&&e.href?0:-1}}}});X={set:function(e,t,n){if(t===false){w.removeAttr(e,n)}else if(Y&&G||!Q.test(n)){e.setAttribute(!G&&w.propFix[n]||n,n)}else{e[w.camelCase("default-"+n)]=e[n]=true}return n}};w.each(w.expr.match.bool.source.match(/\w+/g),function(e,n){var r=w.expr.attrHandle[n]||w.find.attr;w.expr.attrHandle[n]=Y&&G||!Q.test(n)?function(e,n,i){var s=w.expr.attrHandle[n],o=i?t:(w.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;w.expr.attrHandle[n]=s;return o}:function(e,n,r){return r?t:e[w.camelCase("default-"+n)]?n.toLowerCase():null}});if(!Y||!G){w.attrHooks.value={set:function(e,t,n){if(w.nodeName(e,"input")){e.defaultValue=t}else{return W&&W.set(e,t,n)}}}}if(!G){W={set:function(e,n,r){var i=e.getAttributeNode(r);if(!i){e.setAttributeNode(i=e.ownerDocument.createAttribute(r))}i.value=n+="";return r==="value"||n===e.getAttribute(r)?n:t}};w.expr.attrHandle.id=w.expr.attrHandle.name=w.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.value!==""?i.value:null};w.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:W.set};w.attrHooks.contenteditable={set:function(e,t,n){W.set(e,t===""?false:t,n)}};w.each(["width","height"],function(e,t){w.attrHooks[t]={set:function(e,n){if(n===""){e.setAttribute(t,"auto");return n}}}})}if(!w.support.hrefNormalized){w.each(["href","src"],function(e,t){w.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})}if(!w.support.style){w.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}}if(!w.support.optSelected){w.propHooks.selected={get:function(e){var t=e.parentNode;if(t){t.selectedIndex;if(t.parentNode){t.parentNode.selectedIndex}}return null}}}w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});if(!w.support.enctype){w.propFix.enctype="encoding"}w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(w.isArray(t)){return e.checked=w.inArray(w(e).val(),t)>=0}}};if(!w.support.checkOn){w.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value}}});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;w.event={global:{},add:function(e,n,r,s,o){var u,a,f,l,c,h,p,d,v,m,g,y=w._data(e);if(!y){return}if(r.handler){l=r;r=l.handler;o=l.selector}if(!r.guid){r.guid=w.guid++}if(!(a=y.events)){a=y.events={}}if(!(h=y.handle)){h=y.handle=function(e){return typeof w!==i&&(!e||w.event.triggered!==e.type)?w.event.dispatch.apply(h.elem,arguments):t};h.elem=e}n=(n||"").match(S)||[""];f=n.length;while(f--){u=rt.exec(n[f])||[];v=g=u[1];m=(u[2]||"").split(".").sort();if(!v){continue}c=w.event.special[v]||{};v=(o?c.delegateType:c.bindType)||v;c=w.event.special[v]||{};p=w.extend({type:v,origType:g,data:s,handler:r,guid:r.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:m.join(".")},l);if(!(d=a[v])){d=a[v]=[];d.delegateCount=0;if(!c.setup||c.setup.call(e,s,m,h)===false){if(e.addEventListener){e.addEventListener(v,h,false)}else if(e.attachEvent){e.attachEvent("on"+v,h)}}}if(c.add){c.add.call(e,p);if(!p.handler.guid){p.handler.guid=r.guid}}if(o){d.splice(d.delegateCount++,0,p)}else{d.push(p)}w.event.global[v]=true}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=w.hasData(e)&&w._data(e);if(!m||!(l=m.events)){return}t=(t||"").match(S)||[""];f=t.length;while(f--){u=rt.exec(t[f])||[];p=v=u[1];d=(u[2]||"").split(".").sort();if(!p){for(p in l){w.event.remove(e,p+t[f],n,r,true)}continue}c=w.event.special[p]||{};p=(r?c.delegateType:c.bindType)||p;h=l[p]||[];u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)");a=s=h.length;while(s--){o=h[s];if((i||v===o.origType)&&(!n||n.guid===o.guid)&&(!u||u.test(o.namespace))&&(!r||r===o.selector||r==="**"&&o.selector)){h.splice(s,1);if(o.selector){h.delegateCount--}if(c.remove){c.remove.call(e,o)}}}if(a&&!h.length){if(!c.teardown||c.teardown.call(e,d,m.handle)===false){w.removeEvent(e,p,m.handle)}delete l[p]}}if(w.isEmptyObject(l)){delete m.handle;w._removeData(e,"events")}},trigger:function(n,r,i,s){var u,a,f,l,c,h,p,d=[i||o],v=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];f=h=i=i||o;if(i.nodeType===3||i.nodeType===8){return}if(nt.test(v+w.event.triggered)){return}if(v.indexOf(".")>=0){m=v.split(".");v=m.shift();m.sort()}a=v.indexOf(":")<0&&"on"+v;n=n[w.expando]?n:new w.Event(v,typeof n==="object"&&n);n.isTrigger=s?2:3;n.namespace=m.join(".");n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;n.result=t;if(!n.target){n.target=i}r=r==null?[n]:w.makeArray(r,[n]);c=w.event.special[v]||{};if(!s&&c.trigger&&c.trigger.apply(i,r)===false){return}if(!s&&!c.noBubble&&!w.isWindow(i)){l=c.delegateType||v;if(!nt.test(l+v)){f=f.parentNode}for(;f;f=f.parentNode){d.push(f);h=f}if(h===(i.ownerDocument||o)){d.push(h.defaultView||h.parentWindow||e)}}p=0;while((f=d[p++])&&!n.isPropagationStopped()){n.type=p>1?l:c.bindType||v;u=(w._data(f,"events")||{})[n.type]&&w._data(f,"handle");if(u){u.apply(f,r)}u=a&&f[a];if(u&&w.acceptData(f)&&u.apply&&u.apply(f,r)===false){n.preventDefault()}}n.type=v;if(!s&&!n.isDefaultPrevented()){if((!c._default||c._default.apply(d.pop(),r)===false)&&w.acceptData(i)){if(a&&i[v]&&!w.isWindow(i)){h=i[a];if(h){i[a]=null}w.event.triggered=v;try{i[v]()}catch(g){}w.event.triggered=t;if(h){i[a]=h}}}}return n.result},dispatch:function(e){e=w.event.fix(e);var n,r,i,s,o,u=[],a=v.call(arguments),f=(w._data(this,"events")||{})[e.type]||[],l=w.event.special[e.type]||{};a[0]=e;e.delegateTarget=this;if(l.preDispatch&&l.preDispatch.call(this,e)===false){return}u=w.event.handlers.call(this,e,f);n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem;o=0;while((i=s.handlers[o++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(i.namespace)){e.handleObj=i;e.data=i.data;r=((w.event.special[i.origType]||{}).handle||i.handler).apply(s.elem,a);if(r!==t){if((e.result=r)===false){e.preventDefault();e.stopPropagation()}}}}}if(l.postDispatch){l.postDispatch.call(this,e)}return e.result},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||e.type!=="click")){for(;f!=this;f=f.parentNode||this){if(f.nodeType===1&&(f.disabled!==true||e.type!=="click")){s=[];for(o=0;o=0:w.find(r,this,null,[f]).length}if(s[r]){s.push(i)}}if(s.length){u.push({elem:f,handlers:s})}}}}if(a1?w.unique(n):n);n.selector=this.selector?this.selector+" "+e:e;return n},has:function(e){var t,n=w(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:n.nodeType===1&&w.find.matchesSelector(n,e))){n=s.push(n);break}}}return this.pushStack(s.length>1?w.unique(s):s)},index:function(e){if(!e){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof e==="string"){return w.inArray(this[0],w(e))}return w.inArray(e.jquery?e[0]:e,this)},add:function(e,t){var n=typeof e==="string"?w(e,t):w.makeArray(e&&e.nodeType?[e]:e),r=w.merge(this.get(),n);return this.pushStack(w.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});w.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return w.dir(e,"parentNode")},parentsUntil:function(e,t,n){return w.dir(e,"parentNode",n)},next:function(e){return ct(e,"nextSibling")},prev:function(e){return ct(e,"previousSibling")},nextAll:function(e){return w.dir(e,"nextSibling")},prevAll:function(e){return w.dir(e,"previousSibling")},nextUntil:function(e,t,n){return w.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return w.dir(e,"previousSibling",n)},siblings:function(e){return w.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return w.sibling(e.firstChild)},contents:function(e){return w.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:w.merge([],e.childNodes)}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);if(e.slice(-5)!=="Until"){r=n}if(r&&typeof r==="string"){i=w.filter(r,i)}if(this.length>1){if(!lt[e]){i=w.unique(i)}if(at.test(e)){i=i.reverse()}}return this.pushStack(i)}});w.extend({filter:function(e,t,n){var r=t[0];if(n){e=":not("+e+")"}return t.length===1&&r.nodeType===1?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return e.nodeType===1}))},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!w(s).is(r))){if(s.nodeType===1){i.push(s)}s=s[n]}return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling){if(e.nodeType===1&&e!==t){n.push(e)}}return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:null|\d+)"/g,mt=new RegExp("<(?:"+dt+")[\\s/>]","i"),gt=/^\s+/,yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,wt=/\s*$/g,Lt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:w.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},At=pt(o),Ot=At.appendChild(o.createElement("div"));Lt.optgroup=Lt.option;Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead;Lt.th=Lt.td;w.fn.extend({text:function(e){return w.access(this,function(e){return e===t?w.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Mt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Mt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},remove:function(e,t){var n,r=e?w.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++){if(!t&&n.nodeType===1){w.cleanData(jt(n))}if(n.parentNode){if(t&&w.contains(n.ownerDocument,n)){Pt(jt(n,"script"))}n.parentNode.removeChild(n)}}return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){if(e.nodeType===1){w.cleanData(jt(e,false))}while(e.firstChild){e.removeChild(e.firstChild)}if(e.options&&w.nodeName(e,"select")){e.options.length=0}}return this},clone:function(e,t){e=e==null?false:e;t=t==null?e:t;return this.map(function(){return w.clone(this,e,t)})},html:function(e){return w.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t){return n.nodeType===1?n.innerHTML.replace(vt,""):t}if(typeof e==="string"&&!St.test(e)&&(w.support.htmlSerialize||!mt.test(e))&&(w.support.leadingWhitespace||!gt.test(e))&&!Lt[(bt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(yt,"<$1>");try{for(;r")){s=e.cloneNode(true)}else{Ot.innerHTML=e.outerHTML;Ot.removeChild(s=Ot.firstChild)}if((!w.support.noCloneEvent||!w.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!w.isXMLDoc(e)){r=jt(s);u=jt(e);for(o=0;(i=u[o])!=null;++o){if(r[o]){Bt(i,r[o])}}}if(t){if(n){u=u||jt(e);r=r||jt(s);for(o=0;(i=u[o])!=null;o++){Ht(i,r[o])}}else{Ht(e,s)}}r=jt(s,"script");if(r.length>0){Pt(r,!a&&jt(e,"script"))}r=u=i=null;return s},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=pt(t),p=[],d=0;for(;d")+l[2];i=l[0];while(i--){u=u.lastChild}if(!w.support.leadingWhitespace&>.test(s)){p.push(t.createTextNode(gt.exec(s)[0]))}if(!w.support.tbody){s=a==="table"&&!wt.test(s)?u.firstChild:l[1]===""&&!wt.test(s)?u:0;i=s&&s.childNodes.length;while(i--){if(w.nodeName(f=s.childNodes[i],"tbody")&&!f.childNodes.length){s.removeChild(f)}}}w.merge(p,u.childNodes);u.textContent="";while(u.firstChild){u.removeChild(u.firstChild)}u=h.lastChild}}}if(u){h.removeChild(u)}if(!w.support.appendChecked){w.grep(jt(p,"input"),Ft)}d=0;while(s=p[d++]){if(r&&w.inArray(s,r)!==-1){continue}o=w.contains(s.ownerDocument,s);u=jt(h.appendChild(s),"script");if(o){Pt(u)}if(n){i=0;while(s=u[i++]){if(Nt.test(s.type||"")){n.push(s)}}}}u=null;return h},cleanData:function(e,t){var n,r,s,o,u=0,a=w.expando,f=w.cache,l=w.support.deleteExpando,h=w.event.special;for(;(n=e[u])!=null;u++){if(t||w.acceptData(n)){s=n[a];o=s&&f[s];if(o){if(o.events){for(r in o.events){if(h[r]){w.event.remove(n,r)}else{w.removeEvent(n,r,o.handle)}}}if(f[s]){delete f[s];if(l){delete n[a]}else if(typeof n.removeAttribute!==i){n.removeAttribute(a)}else{n[a]=null}c.push(s)}}}}},_evalUrl:function(e){return w.ajax({url:e,type:"GET",dataType:"script",async:false,global:false,"throws":true})}});w.fn.extend({wrapAll:function(e){if(w.isFunction(e)){return this.each(function(t){w(this).wrapAll(e.call(this,t))})}if(this[0]){var t=w(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){t.insertBefore(this[0])}t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1){e=e.firstChild}return e}).append(this)}return this},wrapInner:function(e){if(w.isFunction(e)){return this.each(function(t){w(this).wrapInner(e.call(this,t))})}return this.each(function(){var t=w(this),n=t.contents();if(n.length){n.wrapAll(e)}else{t.append(e)}})},wrap:function(e){var t=w.isFunction(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){if(!w.nodeName(this,"body")){w(this).replaceWith(this.childNodes)}}).end()}});var It,qt,Rt,Ut=/alpha\([^)]*\)/i,zt=/opacity\s*=\s*([^)]*)/,Wt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Vt=/^margin/,$t=new RegExp("^("+E+")(.*)$","i"),Jt=new RegExp("^("+E+")(?!px)[a-z%]+$","i"),Kt=new RegExp("^([+-])=("+E+")","i"),Qt={BODY:"block"},Gt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];w.fn.extend({css:function(e,n){return w.access(this,function(e,n,r){var i,s,o={},u=0;if(w.isArray(n)){s=qt(e);i=n.length;for(;u1)},show:function(){return rn(this,true)},hide:function(){return rn(this)},toggle:function(e){if(typeof e==="boolean"){return e?this.show():this.hide()}return this.each(function(){if(nn(this)){w(this).show()}else{w(this).hide()}})}});w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Rt(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:true,fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":w.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style){return}var s,o,u,a=w.camelCase(n),f=e.style;n=w.cssProps[a]||(w.cssProps[a]=tn(f,a));u=w.cssHooks[n]||w.cssHooks[a];if(r!==t){o=typeof r;if(o==="string"&&(s=Kt.exec(r))){r=(s[1]+1)*s[2]+parseFloat(w.css(e,n));o="number"}if(r==null||o==="number"&&isNaN(r)){return}if(o==="number"&&!w.cssNumber[a]){r+="px"}if(!w.support.clearCloneStyle&&r===""&&n.indexOf("background")===0){f[n]="inherit"}if(!u||!("set"in u)||(r=u.set(e,r,i))!==t){try{f[n]=r}catch(l){}}}else{if(u&&"get"in u&&(s=u.get(e,false,i))!==t){return s}return f[n]}},css:function(e,n,r,i){var s,o,u,a=w.camelCase(n);n=w.cssProps[a]||(w.cssProps[a]=tn(e.style,a));u=w.cssHooks[n]||w.cssHooks[a];if(u&&"get"in u){o=u.get(e,true,r)}if(o===t){o=Rt(e,n,i)}if(o==="normal"&&n in Yt){o=Yt[n]}if(r===""||r){s=parseFloat(o);return r===true||w.isNumeric(s)?s||0:o}return o}});if(e.getComputedStyle){qt=function(t){return e.getComputedStyle(t,null)};Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;if(u){if(a===""&&!w.contains(e.ownerDocument,e)){a=w.style(e,n)}if(Jt.test(a)&&Vt.test(n)){i=f.width;s=f.minWidth;o=f.maxWidth;f.minWidth=f.maxWidth=f.width=a;a=u.width;f.width=i;f.minWidth=s;f.maxWidth=o}}return a}}else if(o.documentElement.currentStyle){qt=function(e){return e.currentStyle};Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u[n]:t,f=e.style;if(a==null&&f&&f[n]){a=f[n]}if(Jt.test(a)&&!Wt.test(n)){i=f.left;s=e.runtimeStyle;o=s&&s.left;if(o){s.left=e.currentStyle.left}f.left=n==="fontSize"?"1em":a;a=f.pixelLeft+"px";f.left=i;if(o){s.left=o}}return a===""?"auto":a}}w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n){return e.offsetWidth===0&&Xt.test(w.css(e,"display"))?w.swap(e,Gt,function(){return un(e,t,r)}):un(e,t,r)}},set:function(e,n,r){var i=r&&qt(e);return sn(e,n,r?on(e,t,r,w.support.boxSizing&&w.css(e,"boxSizing",false,i)==="border-box",i):0)}}});if(!w.support.opacity){w.cssHooks.opacity={get:function(e,t){return zt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=w.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||t==="")&&w.trim(s.replace(Ut,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(t===""||r&&!r.filter){return}}n.filter=Ut.test(s)?s.replace(Ut,i):s+" "+i}}}w(function(){if(!w.support.reliableMarginRight){w.cssHooks.marginRight={get:function(e,t){if(t){return w.swap(e,{display:"inline-block"},Rt,[e,"marginRight"])}}}}if(!w.support.pixelPosition&&w.fn.position){w.each(["top","left"],function(e,t){w.cssHooks[t]={get:function(e,n){if(n){n=Rt(e,t);return Jt.test(n)?w(e).position()[t]+"px":n}}}})}});if(w.expr&&w.expr.filters){w.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!w.support.reliableHiddenOffsets&&(e.style&&e.style.display||w.css(e,"display"))==="none"};w.expr.filters.visible=function(e){return!w.expr.filters.hidden(e)}}w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n==="string"?n.split(" "):[n];for(;r<4;r++){i[e+Zt[r]+t]=s[r]||s[r-2]||s[0]}return i}};if(!Vt.test(e)){w.cssHooks[e+t].set=sn}});var ln=/%20/g,cn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,dn=/^(?:input|select|textarea|keygen)/i;w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&dn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!xt.test(e))}).map(function(e,t){var n=w(this).val();return n==null?null:w.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}});w.param=function(e,n){var r,i=[],s=function(e,t){t=w.isFunction(t)?t():t==null?"":t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t){n=w.ajaxSettings&&w.ajaxSettings.traditional}if(w.isArray(e)||e.jquery&&!w.isPlainObject(e)){w.each(e,function(){s(this.name,this.value)})}else{for(r in e){vn(r,e[r],n,s)}}return i.join("&").replace(ln,"+")};w.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,gn,yn=w.now(),bn=/\?/,wn=/#.*$/,En=/([?&])_=[^&]*/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,xn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tn=/^(?:GET|HEAD)$/,Nn=/^\/\//,Cn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,kn=w.fn.load,Ln={},An={},On="*/".concat("*");try{gn=s.href}catch(Mn){gn=o.createElement("a");gn.href="";gn=gn.href}mn=Cn.exec(gn.toLowerCase())||[];w.fn.load=function(e,n,r){if(typeof e!=="string"&&kn){return kn.apply(this,arguments)}var i,s,o,u=this,a=e.indexOf(" ");if(a>=0){i=e.slice(a,e.length);e=e.slice(0,a)}if(w.isFunction(n)){r=n;n=t}else if(n&&typeof n==="object"){o="POST"}if(u.length>0){w.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments;u.html(i?w("
").append(w.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,s||[e.responseText,t,e])})}return this};w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}});w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gn,type:"GET",isLocal:xn.test(mn[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":On,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":w.parseJSON,"text xml":w.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(e,t){return t?Pn(Pn(e,w.ajaxSettings),t):Pn(w.ajaxSettings,e)},ajaxPrefilter:_n(Ln),ajaxTransport:_n(An),ajax:function(e,n){function N(e,n,r,i){var l,g,y,E,S,T=n;if(b===2){return}b=2;if(u){clearTimeout(u)}f=t;o=i||"";x.readyState=e>0?4:0;l=e>=200&&e<300||e===304;if(r){E=Hn(c,x,r)}E=Bn(c,E,x,l);if(l){if(c.ifModified){S=x.getResponseHeader("Last-Modified");if(S){w.lastModified[s]=S}S=x.getResponseHeader("etag");if(S){w.etag[s]=S}}if(e===204||c.type==="HEAD"){T="nocontent"}else if(e===304){T="notmodified"}else{T=E.state;g=E.data;y=E.error;l=!y}}else{y=T;if(e||!T){T="error";if(e<0){e=0}}}x.status=e;x.statusText=(n||T)+"";if(l){d.resolveWith(h,[g,T,x])}else{d.rejectWith(h,[x,T,y])}x.statusCode(m);m=t;if(a){p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:y])}v.fireWith(h,[x,T]);if(a){p.trigger("ajaxComplete",[x,c]);if(!--w.active){w.event.trigger("ajaxStop")}}}if(typeof e==="object"){n=e;e=t}n=n||{};var r,i,s,o,u,a,f,l,c=w.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?w(h):w.event,d=w.Deferred(),v=w.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,E="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(b===2){if(!l){l={};while(t=Sn.exec(o)){l[t[1].toLowerCase()]=t[2]}}t=l[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return b===2?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();if(!b){e=y[n]=y[n]||e;g[e]=t}return this},overrideMimeType:function(e){if(!b){c.mimeType=e}return this},statusCode:function(e){var t;if(e){if(b<2){for(t in e){m[t]=[m[t],e[t]]}}else{x.always(e[x.status])}}return this},abort:function(e){var t=e||E;if(f){f.abort(t)}N(0,t);return this}};d.promise(x).complete=v.add;x.success=x.done;x.error=x.fail;c.url=((e||c.url||gn)+"").replace(wn,"").replace(Nn,mn[1]+"//");c.type=n.method||n.type||c.method||c.type;c.dataTypes=w.trim(c.dataType||"*").toLowerCase().match(S)||[""];if(c.crossDomain==null){r=Cn.exec(c.url.toLowerCase());c.crossDomain=!!(r&&(r[1]!==mn[1]||r[2]!==mn[2]||(r[3]||(r[1]==="http:"?"80":"443"))!==(mn[3]||(mn[1]==="http:"?"80":"443"))))}if(c.data&&c.processData&&typeof c.data!=="string"){c.data=w.param(c.data,c.traditional)}Dn(Ln,c,n,x);if(b===2){return x}a=c.global;if(a&&w.active++===0){w.event.trigger("ajaxStart")}c.type=c.type.toUpperCase();c.hasContent=!Tn.test(c.type);s=c.url;if(!c.hasContent){if(c.data){s=c.url+=(bn.test(s)?"&":"?")+c.data;delete c.data}if(c.cache===false){c.url=En.test(s)?s.replace(En,"$1_="+yn++):s+(bn.test(s)?"&":"?")+"_="+yn++}}if(c.ifModified){if(w.lastModified[s]){x.setRequestHeader("If-Modified-Since",w.lastModified[s])}if(w.etag[s]){x.setRequestHeader("If-None-Match",w.etag[s])}}if(c.data&&c.hasContent&&c.contentType!==false||n.contentType){x.setRequestHeader("Content-Type",c.contentType)}x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+On+"; q=0.01":""):c.accepts["*"]);for(i in c.headers){x.setRequestHeader(i,c.headers[i])}if(c.beforeSend&&(c.beforeSend.call(h,x,c)===false||b===2)){return x.abort()}E="abort";for(i in{success:1,error:1,complete:1}){x[i](c[i])}f=Dn(An,c,n,x);if(!f){N(-1,"No Transport")}else{x.readyState=1;if(a){p.trigger("ajaxSend",[x,c])}if(c.async&&c.timeout>0){u=setTimeout(function(){x.abort("timeout")},c.timeout)}try{b=1;f.send(g,N)}catch(T){if(b<2){N(-1,T)}else{throw T}}}return x},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,n){return w.get(e,t,n,"script")}});w.each(["get","post"],function(e,n){w[n]=function(e,r,i,s){if(w.isFunction(r)){s=s||i;i=r;r=t}return w.ajax({url:e,type:n,dataType:s,data:r,success:i})}});w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){w.globalEval(e);return e}}});w.ajaxPrefilter("script",function(e){if(e.cache===t){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});w.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||w("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script");n.async=true;if(e.scriptCharset){n.charset=e.scriptCharset}n.src=e.url;n.onload=n.onreadystatechange=function(e,t){if(t||!n.readyState||/loaded|complete/.test(n.readyState)){n.onload=n.onreadystatechange=null;if(n.parentNode){n.parentNode.removeChild(n)}n=null;if(!t){i(200,"success")}}};r.insertBefore(n,r.firstChild)},abort:function(){if(n){n.onload(t,true)}}}}});var jn=[],Fn=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jn.pop()||w.expando+"_"+yn++;this[e]=true;return e}});w.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==false&&(Fn.test(n.url)?"url":typeof n.data==="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fn.test(n.data)&&"data");if(a||n.dataTypes[0]==="jsonp"){s=n.jsonpCallback=w.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback;if(a){n[a]=n[a].replace(Fn,"$1"+s)}else if(n.jsonp!==false){n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+s}n.converters["script json"]=function(){if(!u){w.error(s+" was not called")}return u[0]};n.dataTypes[0]="json";o=e[s];e[s]=function(){u=arguments};i.always(function(){e[s]=o;if(n[s]){n.jsonpCallback=r.jsonpCallback;jn.push(s)}if(u&&w.isFunction(o)){o(u[0])}u=o=t});return"script"}});var In,qn,Rn=0,Un=e.ActiveXObject&&function(){var e;for(e in In){In[e](t,true)}};w.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&zn()||Wn()}:zn;qn=w.ajaxSettings.xhr();w.support.cors=!!qn&&"withCredentials"in qn;qn=w.support.ajax=!!qn;if(qn){w.ajaxTransport(function(n){if(!n.crossDomain||w.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();if(n.username){a.open(n.type,n.url,n.async,n.username,n.password)}else{a.open(n.type,n.url,n.async)}if(n.xhrFields){for(u in n.xhrFields){a[u]=n.xhrFields[u]}}if(n.mimeType&&a.overrideMimeType){a.overrideMimeType(n.mimeType)}if(!n.crossDomain&&!i["X-Requested-With"]){i["X-Requested-With"]="XMLHttpRequest"}try{for(u in i){a.setRequestHeader(u,i[u])}}catch(f){}a.send(n.hasContent&&n.data||null);r=function(e,i){var u,f,l,c;try{if(r&&(i||a.readyState===4)){r=t;if(o){a.onreadystatechange=w.noop;if(Un){delete In[o]}}if(i){if(a.readyState!==4){a.abort()}}else{c={};u=a.status;f=a.getAllResponseHeaders();if(typeof a.responseText==="string"){c.text=a.responseText}try{l=a.statusText}catch(h){l=""}if(!u&&n.isLocal&&!n.crossDomain){u=c.text?200:404}else if(u===1223){u=204}}}}catch(p){if(!i){s(-1,p)}}if(c){s(u,l,c,f)}};if(!n.async){r()}else if(a.readyState===4){setTimeout(r)}else{o=++Rn;if(Un){if(!In){In={};w(e).unload(Un)}In[o]=r}a.onreadystatechange=r}},abort:function(){if(r){r(t,true)}}}}})}var Xn,Vn,$n=/^(?:toggle|show|hide)$/,Jn=new RegExp("^(?:([+-])=|)("+E+")([a-z%]*)$","i"),Kn=/queueHooks$/,Qn=[nr],Gn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Jn.exec(t),s=i&&i[3]||(w.cssNumber[e]?"":"px"),o=(w.cssNumber[e]||s!=="px"&&+r)&&Jn.exec(w.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3];i=i||[];o=+r||1;do{u=u||".5";o=o/u;w.style(n.elem,e,o+s)}while(u!==(u=n.cur()/r)&&u!==1&&--a)}if(i){o=n.start=+o||+r||0;n.unit=s;n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]}return n}]};w.Animation=w.extend(er,{tweener:function(e,t){if(w.isFunction(e)){t=e;e=["*"]}else{e=e.split(" ")}var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;if(a){l=i.position();c=l.top;h=l.left}else{c=parseFloat(o)||0;h=parseFloat(u)||0}if(w.isFunction(t)){t=t.call(e,n,s)}if(t.top!=null){f.top=t.top-s.top+c}if(t.left!=null){f.left=t.left-s.left+h}if("using"in t){t.using.call(e,f)}else{i.css(f)}}};w.fn.extend({position:function(){if(!this[0]){return}var e,t,n={top:0,left:0},r=this[0];if(w.css(r,"position")==="fixed"){t=r.getBoundingClientRect()}else{e=this.offsetParent();t=this.offset();if(!w.nodeName(e[0],"html")){n=e.offset()}n.top+=w.css(e[0],"borderTopWidth",true);n.left+=w.css(e[0],"borderLeftWidth",true)}return{top:t.top-n.top-w.css(r,"marginTop",true),left:t.left-n.left-w.css(r,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||u;while(e&&!w.nodeName(e,"html")&&w.css(e,"position")==="static"){e=e.offsetParent}return e||u})}});w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);w.fn[e]=function(i){return w.access(this,function(e,i,s){var o=sr(e);if(s===t){return o?n in o?o[n]:o.document.documentElement[i]:e[i]}if(o){o.scrollTo(!r?s:w(o).scrollLeft(),r?s:w(o).scrollTop())}else{e[i]=s}},e,i,arguments.length,null)}});w.each({Height:"height",Width:"width"},function(e,n){w.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){w.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!=="boolean"),u=r||(i===true||s===true?"margin":"border");return w.access(this,function(n,r,i){var s;if(w.isWindow(n)){return n.document.documentElement["client"+e]}if(n.nodeType===9){s=n.documentElement;return Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])}return i===t?w.css(n,r,u):w.style(n,r,i,u)},n,o?i:t,o,null)}})});w.fn.size=function(){return this.length};w.fn.andSelf=w.fn.addBack;if(typeof module==="object"&&module&&typeof module.exports==="object"){module.exports=w}else{e.jQuery=e.$=w;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return w})}}})(window);(function(){"use strict";function encodeHTMLSource(){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},t=/&(?!#?\w+;)|<|>|"|'|\//g;return function(){return this?this.replace(t,function(t){return e[t]||t}):this}}function resolveDefs(e,t,n){return(typeof t==="string"?t:t.toString()).replace(e.define||skip,function(t,r,i,s){if(r.indexOf("def.")===0){r=r.substring(4)}if(!(r in n)){if(i===":"){if(e.defineParams)s.replace(e.defineParams,function(e,t,i){n[r]={arg:t,text:i}});if(!(r in n))n[r]=s}else{(new Function("def","def['"+r+"']="+s))(n)}}return""}).replace(e.use||skip,function(t,r){if(e.useParams)r=r.replace(e.useParams,function(e,t,r,i){if(n[r]&&n[r].arg&&i){var s=(r+":"+i).replace(/'|\\/g,"_");n.__exp=n.__exp||{};n.__exp[s]=n[r].text.replace(new RegExp("(^|[^\\w$])"+n[r].arg+"([^\\w$])","g"),"$1"+i+"$2");return t+"def.__exp['"+s+"']"}});var i=(new Function("def","return "+r))(n);return i?resolveDefs(e,i,n):i})}function unescape(e){return e.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var doT={version:"1.0.1-nanoui",templateSettings:{evaluate:/\{\{([\s\S]+?)\}\}/g,interpolate:/\{\{:([\s\S]+?)\}\}/g,encode:/\{\{>([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,conditional:/\{\{\/?if\s*([\s\S]*?)\s*\}\}/g,conditionalElse:/\{\{else\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{\/?for\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g,props:/\{\{\/?props\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g,empty:/\{\{empty\}\}/g,varname:"data, config, helper",strip:true,append:true,selfcontained:false},template:undefined,compile:undefined},global;if(typeof module!=="undefined"&&module.exports){module.exports=doT}else if(typeof define==="function"&&define.amd){define(function(){return doT})}else{global=function(){return this||(0,eval)("this")}();global.doT=doT}String.prototype.encodeHTML=encodeHTMLSource();var startend={append:{start:"'+(",end:")+'",endencode:"||'').toString().encodeHTML()+'"},split:{start:"';out+=(",end:");out+='",endencode:"||'').toString().encodeHTML();out+='"}},skip=/$^/;doT.template=function(e,t,n){t=t||doT.templateSettings;var r=t.append?startend.append:startend.split,i,s=0,o=t.use||t.define?resolveDefs(t,e,n||{}):e;o=("var out='"+(t.strip?o.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):o).replace(/'|\\/g,"\\$&").replace(t.interpolate||skip,function(e,t){return r.start+unescape(t)+r.end}).replace(t.encode||skip,function(e,t){i=true;return r.start+unescape(t)+r.endencode}).replace(t.conditional||skip,function(e,t){return t?"';if("+unescape(t)+"){out+='":"';}out+='"}).replace(t.conditionalElse||skip,function(e,t){return t?"';}else if("+unescape(t)+"){out+='":"';}else{out+='"}).replace(t.iterate||skip,function(e,t,n,r){if(!t)return"';} } out+='";s+=1;n=n||"value";r=r||"index";t=unescape(t);var i="arr"+s;return"';var "+i+"="+t+";if("+i+" && "+i+".length > 0){var "+n+","+r+"=-1,l"+s+"="+i+".length-1;while("+r+" 0){var "+n+";for( var "+r+" in "+i+"){ if (!"+i+".hasOwnProperty("+r+")) continue; "+n+"="+i+"["+r+"];out+='"}).replace(t.empty||skip,function(e){return"';}}else{if(true){out+='"}).replace(t.evaluate||skip,function(e,t){return"';"+unescape(t)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,"").replace(/(\s|;|\}|^|\{)out\+=''\+/g,"$1out+=");if(i&&t.selfcontained){o="String.prototype.encodeHTML=("+encodeHTMLSource.toString()+"());"+o}try{return new Function(t.varname,o)}catch(u){if(typeof console!=="undefined")console.log("Could not create a template function: "+o);throw u}};doT.compile=function(e,t){return doT.template(e,null,t)}})();jQuery.fn.extend({everyTime:function(e,t,n,r){return this.each(function(){jQuery.timer.add(this,e,t,n,r)})},oneTime:function(e,t,n){return this.each(function(){jQuery.timer.add(this,e,t,n,1)})},stopTime:function(e,t){return this.each(function(){jQuery.timer.remove(this,e,t)})}});jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1e3,das:1e4,hs:1e5,ks:1e6},timeParse:function(e){if(e==undefined||e==null)return null;var t=this.regex.exec(jQuery.trim(e.toString()));return t[2]?parseFloat(t[1])*(this.powers[t[2]]||1):e},add:function(e,t,n,r,i){var s=0;if(jQuery.isFunction(n)){i||(i=r);r=n;n=t}t=jQuery.timer.timeParse(t);if(!(typeof t!="number"||isNaN(t)||t<0)){if(typeof i!="number"||isNaN(i)||i<0)i=0;i=i||0;var o=jQuery.data(e,this.dataKey)||jQuery.data(e,this.dataKey,{});o[n]||(o[n]={});r.timerID=r.timerID||this.guid++;var u=function(){if(++s>i&&i!==0||r.call(e,s)===false)jQuery.timer.remove(e,n,r)};u.timerID=r.timerID;o[n][r.timerID]||(o[n][r.timerID]=window.setInterval(u,t));this.global.push(e)}},remove:function(e,t,n){var r=jQuery.data(e,this.dataKey),i;if(r){if(t){if(r[t]){if(n){if(n.timerID){window.clearInterval(r[t][n.timerID]);delete r[t][n.timerID]}}else for(n in r[t]){window.clearInterval(r[t][n]);delete r[t][n]}for(i in r[t])break;if(!i){i=null;delete r[t]}}}else for(t in r)this.remove(e,t,n);for(i in r)break;i||jQuery.removeData(e,this.dataKey)}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(e,t){jQuery.timer.remove(t)})}) \ No newline at end of file diff --git a/nano/js/libraries/2-doT.js b/nano/js/libraries/2-doT.js new file mode 100644 index 0000000000..a0ec5520c0 --- /dev/null +++ b/nano/js/libraries/2-doT.js @@ -0,0 +1,157 @@ +(function () { + "use strict"; + + var doT = { + version: '1.0.1-nanoui', + templateSettings: { + evaluate: /\{\{([\s\S]+?)\}\}/g, + interpolate: /\{\{:([\s\S]+?)\}\}/g, + encode: /\{\{>([\s\S]+?)\}\}/g, + use: /\{\{#([\s\S]+?)\}\}/g, + define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, + conditional: /\{\{\/?if\s*([\s\S]*?)\s*\}\}/g, + conditionalElse: /\{\{else\s*([\s\S]*?)\s*\}\}/g, + iterate: /\{\{\/?for\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g, + props: /\{\{\/?props\s*(?:\}\}|([\s\S]+?)\s*(?:\:\s*([\w$]+))?\s*(?:\:\s*([\w$]+))?\s*\}\})/g, + empty: /\{\{empty\}\}/g, + varname: 'data, config, helper', + strip: true, + append: true, + selfcontained: false + }, + template: undefined, //fn, compile template + compile: undefined //fn, for express + }, global; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = doT; + } else if (typeof define === 'function' && define.amd) { + define(function () { + return doT; + }); + } else { + global = (function () { + return this || (0, eval)('this'); + }()); + global.doT = doT; + } + + function encodeHTMLSource() { + var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/' }, + matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g; + return function () { + return this ? this.replace(matchHTML, function (m) { + return encodeHTMLRules[m] || m; + }) : this; + }; + } + + String.prototype.encodeHTML = encodeHTMLSource(); + + var startend = { + append: { start: "'+(", end: ")+'", endencode: "||'').toString().encodeHTML()+'" }, + split: { start: "';out+=(", end: ");out+='", endencode: "||'').toString().encodeHTML();out+='"} + }, skip = /$^/; + + function resolveDefs(c, block, def) { + return ((typeof block === 'string') ? block : block.toString()) + .replace(c.define || skip, function (m, code, assign, value) { + if (code.indexOf('def.') === 0) { + code = code.substring(4); + } + if (!(code in def)) { + if (assign === ':') { + if (c.defineParams) value.replace(c.defineParams, function (m, param, v) { + def[code] = {arg: param, text: v}; + }); + if (!(code in def)) def[code] = value; + } else { + new Function("def", "def['" + code + "']=" + value)(def); + } + } + return ''; + }) + .replace(c.use || skip, function (m, code) { + if (c.useParams) code = code.replace(c.useParams, function (m, s, d, param) { + if (def[d] && def[d].arg && param) { + var rw = (d + ":" + param).replace(/'|\\/g, '_'); + def.__exp = def.__exp || {}; + def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); + return s + "def.__exp['" + rw + "']"; + } + }); + var v = new Function("def", "return " + code)(def); + return v ? resolveDefs(c, v, def) : v; + }); + } + + function unescape(code) { + return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, ' '); + } + + doT.template = function (tmpl, c, def) { + c = c || doT.templateSettings; + var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, + str = (c.use || c.define) ? resolveDefs(c, tmpl, def || {}) : tmpl; + + str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ') + .replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str) + .replace(/'|\\/g, '\\$&') + .replace(c.interpolate || skip, function (m, code) { + return cse.start + unescape(code) + cse.end; + }) + .replace(c.encode || skip, function (m, code) { + needhtmlencode = true; + return cse.start + unescape(code) + cse.endencode; + }) + .replace(c.conditional || skip, function (m, code) { + return (code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"); + }) + .replace(c.conditionalElse || skip, function (m, code) { + return (code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='"); + }) + .replace(c.iterate || skip, function (m, iterate, vname, iname) { + if (!iterate) return "';} } out+='"; + sid += 1; + vname = vname || "value"; + iname = iname || "index"; + iterate = unescape(iterate); + var arrayName = "arr" + sid; + return "';var " + arrayName + "=" + iterate + ";if(" + arrayName + " && " + arrayName + ".length > 0){var " + vname + "," + iname + "=-1,l" + sid + "=" + arrayName + ".length-1;while(" + iname + " 0){var " + vname + ";for( var " + iname + " in " + objectName + "){ if (!" + objectName + ".hasOwnProperty(" + iname + ")) continue; " + vname + "=" + objectName + "[" + iname + "];out+='"; + }) + .replace(c.empty || skip, function (m) { + return "';}}else{if(true){out+='"; // The "if(true)" condition is required to account for the for tag closing with two brackets + }) + .replace(c.evaluate || skip, function (m, code) { + return "';" + unescape(code) + "out+='"; + }) + + "';return out;") + .replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r') + .replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '') + .replace(/(\s|;|\}|^|\{)out\+=''\+/g, '$1out+='); + + if (needhtmlencode && c.selfcontained) { + str = "String.prototype.encodeHTML=(" + encodeHTMLSource.toString() + "());" + str; + } + try { + return new Function(c.varname, str); + } catch (e) { + if (typeof console !== 'undefined') console.log("Could not create a template function: " + str); + throw e; + } + }; + + doT.compile = function (tmpl, def) { + return doT.template(tmpl, null, def); + }; +}()); \ No newline at end of file diff --git a/nano/js/libraries/2-jsrender.js b/nano/js/libraries/2-jsrender.js deleted file mode 100644 index a2dd81e364..0000000000 --- a/nano/js/libraries/2-jsrender.js +++ /dev/null @@ -1,1520 +0,0 @@ -/*! JsRender v1.0.0-beta: http://github.com/BorisMoore/jsrender and http://jsviews.com/jsviews -informal pre V1.0 commit counter: 47 */ -/* - * Optimized version of jQuery Templates, for rendering to string. - * Does not require jQuery, or HTML DOM - * Integrates with JsViews (http://jsviews.com/jsviews) - * - * Copyright 2013, Boris Moore - * Released under the MIT License. - */ - -(function(global, jQuery, undefined) { - // global is the this object, which is window when running in the usual browser environment. - "use strict"; - - if (jQuery && jQuery.views || global.jsviews) { return; } // JsRender is already loaded - - //========================== Top-level vars ========================== - - var versionNumber = "v1.0.0-beta", - - $, jsvStoreName, rTag, rTmplString,// nodeJsModule, - -//TODO tmplFnsCache = {}, - delimOpenChar0 = "{", delimOpenChar1 = "{", delimCloseChar0 = "}", delimCloseChar1 = "}", linkChar = "^", - - rPath = /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g, - // none object helper view viewProperty pathTokens leafToken - - rParams = /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^|\s*$)|[)\]])([([]?))|(\s+)/g, - // lftPrn0 lftPrn bound path operator err eq path2 prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space - // (left paren? followed by (path? followed by operator) or (path followed by left paren?)) or comma or apos or quot or right paren or space - - rNewLine = /[ \t]*(\r\n|\n|\r)/g, - rUnescapeQuotes = /\\(['"])/g, - rEscapeQuotes = /['"\\]/g, // Escape quotes and \ character - rBuildHash = /\x08(~)?([^\x08]+)\x08/g, - rTestElseIf = /^if\s/, - rFirstElem = /<(\w+)[>\s]/, - rAttrEncode = /[\x00`><"'&]/g, // Includes > encoding since rConvertMarkers in JsViews does not skip > characters in attribute strings - rHtmlEncode = rAttrEncode, - autoTmplName = 0, - viewId = 0, - charEntities = { - "&": "&", - "<": "<", - ">": ">", - "\x00": "�", - "'": "'", - '"': """, - "`": "`" - }, - tmplAttr = "data-jsv-tmpl", - $render = {}, - jsvStores = { - template: { - compile: compileTmpl - }, - tag: { - compile: compileTag - }, - helper: {}, - converter: {} - }, - - // jsviews object ($.views if jQuery is loaded) - $views = { - jsviews: versionNumber, - render: $render, - settings: { - delimiters: $viewsDelimiters, - debugMode: true, - tryCatch: true - }, - sub: { - // subscription, e.g. JsViews integration - View: View, - Error: JsViewsError, - tmplFn: tmplFn, - parse: parseParams, - extend: $extend, - error: error, - syntaxError: syntaxError - }, - _cnvt: convertVal, - _tag: renderTag, - - _err: function(e) { - // Place a breakpoint here to intercept template rendering errors - return $viewsSettings.debugMode ? ("Error: " + (e.message || e)) + ". " : ''; - } - }; - - function JsViewsError(message, object) { - // Error exception type for JsViews/JsRender - // Override of $.views.sub.Error is possible - if (object && object.onError) { - if (object.onError(message) === false) { - return; - } - } - this.name = "JsRender Error"; - this.message = message || "JsRender error"; - } - - function $extend(target, source) { - var name; - target = target || {}; - for (name in source) { - target[name] = source[name]; - } - return target; - } - - (JsViewsError.prototype = new Error()).constructor = JsViewsError; - - //========================== Top-level functions ========================== - - //=================== - // jsviews.delimiters - //=================== - function $viewsDelimiters(openChars, closeChars, link) { - // Set the tag opening and closing delimiters and 'link' character. Default is "{{", "}}" and "^" - // openChars, closeChars: opening and closing strings, each with two characters - - if (!$viewsSub.rTag || openChars) { - delimOpenChar0 = openChars ? openChars.charAt(0) : delimOpenChar0; // Escape the characters - since they could be regex special characters - delimOpenChar1 = openChars ? openChars.charAt(1) : delimOpenChar1; - delimCloseChar0 = closeChars ? closeChars.charAt(0) : delimCloseChar0; - delimCloseChar1 = closeChars ? closeChars.charAt(1) : delimCloseChar1; - linkChar = link || linkChar; - openChars = "\\" + delimOpenChar0 + "(\\" + linkChar + ")?\\" + delimOpenChar1; // Default is "{^{" - closeChars = "\\" + delimCloseChar0 + "\\" + delimCloseChar1; // Default is "}}" - // Build regex with new delimiters - // tag (followed by / space or }) or cvtr+colon or html or code - rTag = "(?:(?:(\\w+(?=[\\/\\s\\" + delimCloseChar0 + "]))|(?:(\\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\\*)))" - + "\\s*((?:[^\\" + delimCloseChar0 + "]|\\" + delimCloseChar0 + "(?!\\" + delimCloseChar1 + "))*?)"; - - // make rTag available to JsViews (or other components) for parsing binding expressions - $viewsSub.rTag = rTag + ")"; - - rTag = new RegExp(openChars + rTag + "(\\/)?|(?:\\/(\\w+)))" + closeChars, "g"); - - // Default: bind tag converter colon html comment code params slash closeBlock - // /{(\^)?{(?:(?:(\w+(?=[\/\s}]))|(?:(\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\*)))\s*((?:[^}]|}(?!}))*?)(\/)?|(?:\/(\w+)))}}/g - - rTmplString = new RegExp("<.*>|([^\\\\]|^)[{}]|" + openChars + ".*" + closeChars); - // rTmplString looks for html tags or { or } char not preceded by \\, or JsRender tags {{xxx}}. Each of these strings are considered - // NOT to be jQuery selectors - } - return [delimOpenChar0, delimOpenChar1, delimCloseChar0, delimCloseChar1, linkChar]; - } - - //========= - // View.get - //========= - - function getView(inner, type) { //view.get(inner, type) - if (!type) { - // view.get(type) - type = inner; - inner = undefined; - } - - var views, i, l, found, - view = this, - root = !type || type === "root"; - // If type is undefined, returns root view (view under top view). - - if (inner) { - // Go through views - this one, and all nested ones, depth-first - and return first one with given type. - found = view.type === type ? view : undefined; - if (!found) { - views = view.views; - if (view._.useKey) { - for (i in views) { - if (found = views[i].get(inner, type)) { - break; - } - } - } else for (i = 0, l = views.length; !found && i < l; i++) { - found = views[i].get(inner, type); - } - } - } else if (root) { - // Find root view. (view whose parent is top view) - while (view.parent.parent) { - found = view = view.parent; - } - } else while (view && !found) { - // Go through views - this one, and all parent ones - and return first one with given type. - found = view.type === type ? view : undefined; - view = view.parent; - } - return found; - } - - function getNestedIndex() { - var view = this.get("item"); - return view ? view.index : undefined; - } - - getNestedIndex.depends = function() { - return [this.get("item"), "index"]; - }; - - function getIndex() { - return this.index; - } - - getIndex.depends = function() { - return ["index"]; - }; - - //========== - // View.hlp - //========== - - function getHelper(helper) { - // Helper method called as view.hlp(key) from compiled template, for helper functions or template parameters ~foo - var wrapped, - view = this, - ctx = view.linkCtx, - res = (view.ctx || {})[helper]; - - if (res === undefined && ctx && ctx.ctx) { - res = ctx.ctx[helper]; - } - if (res === undefined) { - res = $helpers[helper]; - } - - if (res) { - if (typeof res === "function") { - wrapped = function() { - // If it is of type function, we will wrap it, so if called with no this pointer it will be called with the view as 'this' context. - // If the helper ~foo() was in a data-link expression, the view will have a 'temporary' linkCtx property too. - // Note that helper functions on deeper paths will have specific this pointers, from the preceding path. - // For example, ~util.foo() will have the ~util object as 'this' pointer - return res.apply(this || view, arguments); - }; - $extend(wrapped, res); - } - } - return wrapped || res; - } - - //============== - // jsviews._cnvt - //============== - - function convertVal(converter, view, tagCtx) { - // self is template object or linkCtx object - var tmplConverter, tag, value, - boundTagCtx = +tagCtx === tagCtx && tagCtx, // if tagCtx is an integer, then it is the key for the boundTagCtx (compiled function to return the tagCtx) - linkCtx = view.linkCtx; // For data-link="{cvt:...}"... - - if (boundTagCtx) { - // This is a bound tag: {^{xx:yyy}}. Call compiled function which returns the tagCtxs for current data - tagCtx = (boundTagCtx = view.tmpl.bnds[boundTagCtx-1])(view.data, view, $views); - } - - value = tagCtx.args[0]; - - if (converter || boundTagCtx) { - tag = linkCtx && linkCtx.tag || { - _: { - inline: !linkCtx, - bnd: boundTagCtx - }, - tagName: converter + ":", - flow: true, - _is: "tag" - }; - - if (linkCtx) { - linkCtx.tag = tag; - tag.linkCtx = tag.linkCtx || linkCtx; - tagCtx.ctx = extendCtx(tagCtx.ctx, linkCtx.view.ctx); - } - tag.tagCtx = tagCtx; - tagCtx.view = view; - - tag.ctx = tagCtx.ctx || {}; - delete tagCtx.ctx; - // Provide this tag on view, for addBindingMarkers on bound tags to add the tag to view._.bnds, associated with the tag id, - view._.tag = tag; - - converter = converter !== "true" && converter; // If there is a convertBack but no convert, converter will be "true" - - if (converter && ((tmplConverter = view.getRsc("converters", converter)) || error("Unknown converter: {{"+ converter + ":"))) { - // A call to {{cnvt: ... }} or {^{cnvt: ... }} or data-link="{cnvt: ... }" - tag.depends = tmplConverter.depends; - value = tmplConverter.apply(tag, tagCtx.args); - } - // Call onRender (used by JsViews if present, to add binding annotations around rendered content) - value = boundTagCtx && view._.onRender - ? view._.onRender(value, view, boundTagCtx) - : value; - view._.tag = undefined; - } - return value; - } - - //============= - // jsviews._tag - //============= - - function getResource(resourceType, itemName) { - var res, store, - view = this; - while ((res === undefined) && view) { - store = view.tmpl[resourceType]; - res = store && store[itemName]; - view = view.parent; - } - return res || $views[resourceType][itemName]; - } - - function renderTag(tagName, parentView, tmpl, tagCtxs, isRefresh) { - // Called from within compiled template function, to render a template tag - // Returns the rendered tag - - var render, tag, tags, attr, parentTag, i, l, itemRet, tagCtx, tagCtxCtx, content, boundTagFn, tagDef, callInit, - ret = "", - boundTagKey = +tagCtxs === tagCtxs && tagCtxs, // if tagCtxs is an integer, then it is the boundTagKey - linkCtx = parentView.linkCtx || 0, - ctx = parentView.ctx, - parentTmpl = tmpl || parentView.tmpl, - parentView_ = parentView._; - - if (tagName._is === "tag") { - tag = tagName; - tagName = tag.tagName; - } - - // Provide tagCtx, linkCtx and ctx access from tag - if (boundTagKey) { - // if tagCtxs is an integer, we are data binding - // Call compiled function which returns the tagCtxs for current data - tagCtxs = (boundTagFn = parentTmpl.bnds[boundTagKey-1])(parentView.data, parentView, $views); - } - - l = tagCtxs.length; - tag = tag || linkCtx.tag; - for (i = 0; i < l; i++) { - tagCtx = tagCtxs[i]; - - // Set the tmpl property to the content of the block tag, unless set as an override property on the tag - content = tagCtx.tmpl; - content = tagCtx.content = content && parentTmpl.tmpls[content - 1]; - tmpl = tagCtx.props.tmpl; - if (!i && (!tmpl || !tag)) { - tagDef = parentView.getRsc("tags", tagName) || error("Unknown tag: {{"+ tagName + "}}"); - } - tmpl = tmpl || (tag ? tag : tagDef).template || content; - tmpl = "" + tmpl === tmpl // if a string - ? parentView.getRsc("templates", tmpl) || $templates(tmpl) - : tmpl; - - $extend(tagCtx, { - tmpl: tmpl, - render: renderContent, - index: i, - view: parentView, - ctx: extendCtx(tagCtx.ctx, ctx) // Extend parentView.ctx - }); // Extend parentView.ctx - - if (!tag) { - // This will only be hit for initial tagCtx (not for {{else}}) - if the tag instance does not exist yet - // Instantiate tag if it does not yet exist - if (tagDef._ctr) { - // If the tag has not already been instantiated, we will create a new instance. - // ~tag will access the tag, even within the rendering of the template content of this tag. - // From child/descendant tags, can access using ~tag.parent, or ~parentTags.tagName -// TODO provide error handling owned by the tag - using tag.onError -// try { - tag = new tagDef._ctr(); - callInit = !!tag.init; -// } -// catch(e) { -// tagDef.onError(e); -// } - // Set attr on linkCtx to ensure outputting to the correct target attribute. - tag.attr = tag.attr || tagDef.attr || undefined; - // Setting either linkCtx.attr or this.attr in the init() allows per-instance choice of target attrib. - } else { - // This is a simple tag declared as a function, or with init set to false. We won't instantiate a specific tag constructor - just a standard instance object. - tag = { - // tag instance object if no init constructor - render: tagDef.render - }; - } - tag._ = { - inline: !linkCtx - }; - if (linkCtx) { - // Set attr on linkCtx to ensure outputting to the correct target attribute. - linkCtx.attr = tag.attr = linkCtx.attr || tag.attr; - linkCtx.tag = tag; - tag.linkCtx = linkCtx; - } - if (tag._.bnd = boundTagFn || linkCtx.fn) { - // Bound if {^{tag...}} or data-link="{tag...}" - tag._.arrVws = {}; - } else if (tag.dataBoundOnly) { - error("{^{" + tagName + "}} tag must be data-bound"); - } - tag.tagName = tagName; - tag.parent = parentTag = ctx && ctx.tag; - tag._is = "tag"; - tag._def = tagDef; - //TODO better perf for childTags() - keep child tag.tags array, (and remove child, when disposed) - // tag.tags = []; - // Provide this tag on view, for addBindingMarkers on bound tags to add the tag to view._.bnds, associated with the tag id, - } - parentView_.tag = tag; - tagCtx.tag = tag; - tag.tagCtxs = tagCtxs; - if (!tag.flow) { - tagCtxCtx = tagCtx.ctx = tagCtx.ctx || {}; - - // tags hash: tag.ctx.tags, merged with parentView.ctx.tags, - tags = tag.parents = tagCtxCtx.parentTags = ctx && extendCtx(tagCtxCtx.parentTags, ctx.parentTags) || {}; - if (parentTag) { - tags[parentTag.tagName] = parentTag; - //TODO better perf for childTags: parentTag.tags.push(tag); - } - tagCtxCtx.tag = tag; - } - } - tag.rendering = {}; // Provide object for state during render calls to tag and elses. (Used by {{if}} and {{for}}...) - for (i = 0; i < l; i++) { - tagCtx = tag.tagCtx = tagCtxs[i]; - tag.ctx = tagCtx.ctx; - - if (!i && callInit) { - tag.init(tagCtx, linkCtx, tag.ctx); - callInit = undefined; - } - - itemRet = undefined; - if (render = tag.render) { - itemRet = render.apply(tag, tagCtx.args); - } - itemRet = itemRet !== undefined - ? itemRet // Return result of render function unless it is undefined, in which case return rendered template - : tagCtx.tmpl && tagCtx.render() || (isRefresh ? undefined : ""); - // No return value from render, and no template/content tagCtx.render(), so return undefined - ret = ret ? ret + (itemRet || "") : itemRet; // If no rendered content, this will be undefined - } - - delete tag.rendering; - - tag.tagCtx = tag.tagCtxs[0]; - tag.ctx= tag.tagCtx.ctx; - - if (tag._.inline && (attr = tag.attr) && attr !== "html") { - // inline tag with attr set to "text" will insert HTML-encoded content - as if it was element-based innerText - ret = attr === "text" - ? $converters.html(ret) - : ""; - } - return boundTagKey && parentView._.onRender - // Call onRender (used by JsViews if present, to add binding annotations around rendered content) - ? parentView._.onRender(ret, parentView, boundTagKey) - : ret; - } - - //================= - // View constructor - //================= - - function View(context, type, parentView, data, template, key, contentTmpl, onRender) { - // Constructor for view object in view hierarchy. (Augmented by JsViews if JsViews is loaded) - var views, parentView_, tag, - isArray = type === "array", - self_ = { - key: 0, - useKey: isArray ? 0 : 1, - id: "" + viewId++, - onRender: onRender, - bnds: {} - }, - self = { - data: data, - tmpl: template, - content: contentTmpl, - views: isArray ? [] : {}, - parent: parentView, - type: type, - // If the data is an array, this is an 'array view' with a views array for each child 'item view' - // If the data is not an array, this is an 'item view' with a views 'map' object for any child nested views - // ._.useKey is non zero if is not an 'array view' (owning a data array). Uuse this as next key for adding to child views map - get: getView, - getIndex: getIndex, - getRsc: getResource, - hlp: getHelper, - _: self_, - _is: "view" - }; - if (parentView) { - views = parentView.views; - parentView_ = parentView._; - if (parentView_.useKey) { - // Parent is an 'item view'. Add this view to its views object - // self._key = is the key in the parent view map - views[self_.key = "_" + parentView_.useKey++] = self; - self.index = $viewsSettings.debugMode ? noIndex : ""; - self.getIndex = getNestedIndex; - tag = parentView_.tag; - self_.bnd = isArray && (!tag || !!tag._.bnd && tag); // For array views that are data bound for collection change events, set the - // view._.bnd property to true for top-level link() or data-link="{for}", or to the tag instance for a data-bound tag, e.g. {^{for ...}} - } else { - // Parent is an 'array view'. Add this view to its views array - views.splice( - // self._.key = self.index - the index in the parent view array - self_.key = self.index = key, - 0, self); - } - // If no context was passed in, use parent context - // If context was passed in, it should have been merged already with parent context - self.ctx = context || parentView.ctx; - } else { - self.ctx = context; - } - return self; - } - - //============= - // Registration - //============= - - function compileChildResources(parentTmpl) { - var storeName, resources, resourceName, settings, compile; - for (storeName in jsvStores) { - settings = jsvStores[storeName]; - if ((compile = settings.compile) && (resources = parentTmpl[storeName + "s"])) { - for (resourceName in resources) { - // compile child resource declarations (templates, tags, converters or helpers) - resources[resourceName] = compile(resourceName, resources[resourceName], parentTmpl, storeName, settings); - } - } - } - } - - function compileTag(name, tagDef, parentTmpl) { - var init, tmpl; - if (typeof tagDef === "function") { - // Simple tag declared as function. No presenter instantation. - tagDef = { - depends: tagDef.depends, - render: tagDef - }; - } else { - // Tag declared as object, used as the prototype for tag instantiation (control/presenter) - if (tmpl = tagDef.template) { - tagDef.template = "" + tmpl === tmpl ? ($templates[tmpl] || $templates(tmpl)) : tmpl; - } - if (tagDef.init !== false) { - // Set int: false on tagDef if you want to provide just a render method, or render and template, but no constuctor or prototype. - // so equivalent to setting tag to render function, except you can also provide a template. - init = tagDef._ctr = function(tagCtx) {}; - (init.prototype = tagDef).constructor = init; - } - } - if (parentTmpl) { - tagDef._parentTmpl = parentTmpl; - } -//TODO tagDef.onError = function(e) { -// var error; -// if (error = this.prototype.onError) { -// error.call(this, e); -// } else { -// throw e; -// } -// } - return tagDef; - } - - function compileTmpl(name, tmpl, parentTmpl, storeName, storeSettings, options) { - // tmpl is either a template object, a selector for a template script block, the name of a compiled template, or a template object - - //==== nested functions ==== - function tmplOrMarkupFromStr(value) { - // If value is of type string - treat as selector, or name of compiled template - // Return the template object, if already compiled, or the markup string - - if (("" + value === value) || value.nodeType > 0) { - try { - elem = value.nodeType > 0 - ? value - : !rTmplString.test(value) - // If value is a string and does not contain HTML or tag content, then test as selector - && jQuery && jQuery(global.document).find(value)[0]; - // If selector is valid and returns at least one element, get first element - // If invalid, jQuery will throw. We will stay with the original string. - } catch (e) {} - - if (elem) { - // Generally this is a script element. - // However we allow it to be any element, so you can for example take the content of a div, - // use it as a template, and replace it by the same content rendered against data. - // e.g. for linking the content of a div to a container, and using the initial content as template: - // $.link("#content", model, {tmpl: "#content"}); - - value = elem.getAttribute(tmplAttr); - name = name || value; - value = $templates[value]; - if (!value) { - // Not already compiled and cached, so compile and cache the name - // Create a name for compiled template if none provided - name = name || "_" + autoTmplName++; - elem.setAttribute(tmplAttr, name); - // Use tmpl as options - value = $templates[name] = compileTmpl(name, elem.innerHTML, parentTmpl, storeName, storeSettings, options); - } - } - return value; - } - // If value is not a string, return undefined - } - - var tmplOrMarkup, elem; - - //==== Compile the template ==== - tmpl = tmpl || ""; - tmplOrMarkup = tmplOrMarkupFromStr(tmpl); - - // If options, then this was already compiled from a (script) element template declaration. - // If not, then if tmpl is a template object, use it for options - options = options || (tmpl.markup ? tmpl : {}); - options.tmplName = name; - if (parentTmpl) { - options._parentTmpl = parentTmpl; - } - // If tmpl is not a markup string or a selector string, then it must be a template object - // In that case, get it from the markup property of the object - if (!tmplOrMarkup && tmpl.markup && (tmplOrMarkup = tmplOrMarkupFromStr(tmpl.markup))) { - if (tmplOrMarkup.fn && (tmplOrMarkup.debug !== tmpl.debug || tmplOrMarkup.allowCode !== tmpl.allowCode)) { - // if the string references a compiled template object, but the debug or allowCode props are different, need to recompile - tmplOrMarkup = tmplOrMarkup.markup; - } - } - if (tmplOrMarkup !== undefined) { - if (name && !parentTmpl) { - $render[name] = function() { - return tmpl.render.apply(tmpl, arguments); - }; - } - if (tmplOrMarkup.fn || tmpl.fn) { - // tmpl is already compiled, so use it, or if different name is provided, clone it - if (tmplOrMarkup.fn) { - if (name && name !== tmplOrMarkup.tmplName) { - tmpl = extendCtx(options, tmplOrMarkup); - } else { - tmpl = tmplOrMarkup; - } - } - } else { - // tmplOrMarkup is a markup string, not a compiled template - // Create template object - tmpl = TmplObject(tmplOrMarkup, options); - // Compile to AST and then to compiled function - tmplFn(tmplOrMarkup.replace(rEscapeQuotes, "\\$&"), tmpl); - } - compileChildResources(options); - return tmpl; - } - } - //==== /end of function compile ==== - - function TmplObject(markup, options) { - // Template object constructor - var htmlTag, - wrapMap = $viewsSettings.wrapMap || {}, - tmpl = $extend( - { - markup: markup, - tmpls: [], - links: {}, // Compiled functions for link expressions - tags: {}, // Compiled functions for bound tag expressions - bnds: [], - _is: "template", - render: renderContent - }, - options - ); - - if (!options.htmlTag) { - // Set tmpl.tag to the top-level HTML tag used in the template, if any... - htmlTag = rFirstElem.exec(markup); - tmpl.htmlTag = htmlTag ? htmlTag[1].toLowerCase() : ""; - } - htmlTag = wrapMap[tmpl.htmlTag]; - if (htmlTag && htmlTag !== wrapMap.div) { - // When using JsViews, we trim templates which are inserted into HTML contexts where text nodes are not rendered (i.e. not 'Phrasing Content'). - // Currently not trimmed for
  • tag. (Not worth adding perf cost) - tmpl.markup = $.trim(tmpl.markup); - } - - return tmpl; - } - - function registerStore(storeName, storeSettings) { - - function theStore(name, item, parentTmpl) { - // The store is also the function used to add items to the store. e.g. $.templates, or $.views.tags - - // For store of name 'thing', Call as: - // $.views.things(items[, parentTmpl]), - // or $.views.things(name, item[, parentTmpl]) - - var onStore, compile, itemName, thisStore; - - if (name && "" + name !== name && !name.nodeType && !name.markup) { - // Call to $.views.things(items[, parentTmpl]), - - // Adding items to the store - // If name is a map, then item is parentTmpl. Iterate over map and call store for key. - for (itemName in name) { - theStore(itemName, name[itemName], item); - } - return $views; - } - // Adding a single unnamed item to the store - if (item === undefined) { - item = name; - name = undefined; - } - if (name && "" + name !== name) { // name must be a string - parentTmpl = item; - item = name; - name = undefined; - } - thisStore = parentTmpl ? parentTmpl[storeNames] = parentTmpl[storeNames] || {} : theStore; - compile = storeSettings.compile; - if (onStore = $viewsSub.onBeforeStoreItem) { - // e.g. provide an external compiler or preprocess the item. - compile = onStore(thisStore, name, item, compile) || compile; - } - if (!name) { - item = compile(undefined, item); - } else if (item === null) { - // If item is null, delete this entry - delete thisStore[name]; - } else { - thisStore[name] = compile ? (item = compile(name, item, parentTmpl, storeName, storeSettings)) : item; - } - if (compile && item) { - item._is = storeName; // Only do this for compiled objects (tags, templates...) - } - if (onStore = $viewsSub.onStoreItem) { - // e.g. JsViews integration - onStore(thisStore, name, item, compile); - } - return item; - } - - var storeNames = storeName + "s"; - - $views[storeNames] = theStore; - jsvStores[storeName] = storeSettings; - } - - //============== - // renderContent - //============== - - function renderContent(data, context, parentView, key, isLayout, onRender) { - // Render template against data as a tree of subviews (nested rendered template instances), or as a string (top-level template). - // If the data is the parent view, treat as layout template, re-render with the same data context. - var i, l, dataItem, newView, childView, itemResult, swapContent, tagCtx, contentTmpl, tag_, outerOnRender, tmplName, tmpl, - self = this, - allowDataLink = !self.attr || self.attr === "html", - result = ""; - - if (key === true) { - swapContent = true; - key = 0; - } - if (self.tag) { - // This is a call from renderTag or tagCtx.render() - tagCtx = self; - self = self.tag; - tag_ = self._; - tmplName = self.tagName; - tmpl = tagCtx.tmpl; - context = extendCtx(context, self.ctx); - contentTmpl = tagCtx.content; // The wrapped content - to be added to views, below - if (tagCtx.props.link === false) { - // link=false setting on block tag - // We will override inherited value of link by the explicit setting link=false taken from props - // The child views of an unlinked view are also unlinked. So setting child back to true will not have any effect. - context = context || {}; - context.link = false; - } - parentView = parentView || tagCtx.view; - data = data === undefined ? parentView : data; - } else { - tmpl = self.jquery && (self[0] || error('Unknown template: "' + self.selector + '"')) // This is a call from $(selector).render - || self; - } - if (tmpl) { - if (!parentView && data && data._is === "view") { - parentView = data; // When passing in a view to render or link (and not passing in a parent view) use the passed in view as parentView - } - if (parentView) { - contentTmpl = contentTmpl || parentView.content; // The wrapped content - to be added as #content property on views, below - onRender = onRender || parentView._.onRender; - if (data === parentView) { - // Inherit the data from the parent view. - // This may be the contents of an {{if}} block - // Set isLayout = true so we don't iterate the if block if the data is an array. - data = parentView.data; - isLayout = true; - } - context = extendCtx(context, parentView.ctx); - } - if (!parentView || parentView.data === undefined) { - (context = context || {}).root = data; // Provide ~root as shortcut to top-level data. - } - - // Set additional context on views created here, (as modified context inherited from the parent, and to be inherited by child views) - // Note: If no jQuery, $extend does not support chained copies - so limit extend() to two parameters - - if (!tmpl.fn) { - tmpl = $templates[tmpl] || $templates(tmpl); - } - - if (tmpl) { - onRender = (context && context.link) !== false && allowDataLink && onRender; - // If link===false, do not call onRender, so no data-linking marker nodes - outerOnRender = onRender; - if (onRender === true) { - // Used by view.refresh(). Don't create a new wrapper view. - outerOnRender = undefined; - onRender = parentView._.onRender; - } - context = tmpl.helpers - ? extendCtx(tmpl.helpers, context) - : context; - if ($.isArray(data) && !isLayout) { - // Create a view for the array, whose child views correspond to each data item. (Note: if key and parentView are passed in - // along with parent view, treat as insert -e.g. from view.addViews - so parentView is already the view item for array) - newView = swapContent - ? parentView : - (key !== undefined && parentView) || View(context, "array", parentView, data, tmpl, key, contentTmpl, onRender); - for (i = 0, l = data.length; i < l; i++) { - // Create a view for each data item. - dataItem = data[i]; - childView = View(context, "item", newView, dataItem, tmpl, (key || 0) + i, contentTmpl, onRender); - itemResult = tmpl.fn(dataItem, childView, $views); - result += newView._.onRender ? newView._.onRender(itemResult, childView) : itemResult; - } - } else { - // Create a view for singleton data object. The type of the view will be the tag name, e.g. "if" or "myTag" except for - // "item", "array" and "data" views. A "data" view is from programatic render(object) against a 'singleton'. - newView = swapContent ? parentView : View(context, tmplName||"data", parentView, data, tmpl, key, contentTmpl, onRender); - if (tag_ && !self.flow) { - newView.tag = self; - } - result += tmpl.fn(data, newView, $views); - } - return outerOnRender ? outerOnRender(result, newView) : result; - } - } - return ""; - } - - //=========================== - // Build and compile template - //=========================== - - // Generate a reusable function that will serve to render a template against data - // (Compile AST then build template function) - - function error(message) { - throw new $viewsSub.Error(message); - } - - function syntaxError(message) { - error("Syntax error\n" + message); - } - - function tmplFn(markup, tmpl, isLinkExpr, convertBack) { - // Compile markup to AST (abtract syntax tree) then build the template function code from the AST nodes - // Used for compiling templates, and also by JsViews to build functions for data link expressions - - //==== nested functions ==== - function pushprecedingContent(shift) { - shift -= loc; - if (shift) { - content.push(markup.substr(loc, shift).replace(rNewLine, "\\n")); - } - } - - function blockTagCheck(tagName) { - tagName && syntaxError('Unmatched or missing tag: "{{/' + tagName + '}}" in template:\n' + markup); - } - - function parseTag(all, bind, tagName, converter, colon, html, comment, codeTag, params, slash, closeBlock, index) { - - // bind tag converter colon html comment code params slash closeBlock - // /{(\^)?{(?:(?:(\w+(?=[\/\s}]))|(?:(\w+)?(:)|(>)|!--((?:[^-]|-(?!-))*)--|(\*)))\s*((?:[^}]|}(?!}))*?)(\/)?|(?:\/(\w+)))}}/g - // Build abstract syntax tree (AST): [tagName, converter, params, content, hash, bindings, contentMarkup] - if (html) { - colon = ":"; - converter = "html"; - } - slash = slash || isLinkExpr; - var noError, current0, - pathBindings = bind && [], - code = "", - hash = "", - passedCtx = "", - // Block tag if not self-closing and not {{:}} or {{>}} (special case) and not a data-link expression - block = !slash && !colon && !comment; - - //==== nested helper function ==== - tagName = tagName || colon; - pushprecedingContent(index); - loc = index + all.length; // location marker - parsed up to here - if (codeTag) { - if (allowCode) { - content.push(["*", "\n" + params.replace(rUnescapeQuotes, "$1") + "\n"]); - } - } else if (tagName) { - if (tagName === "else") { - if (rTestElseIf.test(params)) { - syntaxError('for "{{else if expr}}" use "{{else expr}}"'); - } - pathBindings = current[6]; - current[7] = markup.substring(current[7], index); // contentMarkup for block tag - current = stack.pop(); - content = current[3]; - block = true; - } - if (params) { - // remove newlines from the params string, to avoid compiled code errors for unterminated strings - params = params.replace(rNewLine, " "); - code = parseParams(params, pathBindings, tmpl) - .replace(rBuildHash, function(all, isCtx, keyValue) { - if (isCtx) { - passedCtx += keyValue + ","; - } else { - hash += keyValue + ","; - } - return ""; - }); - } - hash = hash.slice(0, -1); - code = code.slice(0, -1); - noError = hash && (hash.indexOf("noerror:true") + 1) && hash || ""; - - newNode = [ - tagName, - converter || !!convertBack || "", - code, - block && [], - 'params:"' + params + '",props:{' + hash + "}" - + (passedCtx ? ",ctx:{" + passedCtx.slice(0, -1) + "}" : ""), - noError, - pathBindings || 0 - ]; - content.push(newNode); - if (block) { - stack.push(current); - current = newNode; - current[7] = loc; // Store current location of open tag, to be able to add contentMarkup when we reach closing tag - } - } else if (closeBlock) { - current0 = current[0]; - blockTagCheck(closeBlock !== current0 && current0 !== "else" && closeBlock); - current[7] = markup.substring(current[7], index); // contentMarkup for block tag - current = stack.pop(); - } - blockTagCheck(!current && closeBlock); - content = current[3]; - } - //==== /end of nested functions ==== - - var newNode, - allowCode = tmpl && tmpl.allowCode, - astTop = [], - loc = 0, - stack = [], - content = astTop, - current = [, , , astTop]; - -//TODO result = tmplFnsCache[markup]; // Only cache if template is not named and markup length < ..., -//and there are no bindings or subtemplates?? Consider standard optimization for data-link="a.b.c" -// if (result) { -// tmpl.fn = result; -// } else { - -// result = markup; - - blockTagCheck(stack[0] && stack[0][3].pop()[0]); - // Build the AST (abstract syntax tree) under astTop - markup.replace(rTag, parseTag); - - pushprecedingContent(markup.length); - - if (loc = astTop[astTop.length - 1]) { - blockTagCheck("" + loc !== loc && (+loc[7] === loc[7]) && loc[0]); - } -// result = tmplFnsCache[markup] = buildCode(astTop, tmpl); -// } - return buildCode(astTop, isLinkExpr ? markup : tmpl, isLinkExpr); - } - - function buildCode(ast, tmpl, isLinkExpr) { - // Build the template function code from the AST nodes, and set as property on the passed-in template object - // Used for compiling templates, and also by JsViews to build functions for data link expressions - var i, node, tagName, converter, params, hash, hasTag, hasEncoder, getsVal, hasCnvt, useCnvt, tmplBindings, pathBindings, - nestedTmpls, tmplName, nestedTmpl, tagAndElses, content, markup, nextIsElse, oldCode, isElse, isGetVal, prm, tagCtxFn, - tmplBindingKey = 0, - code = "", - noError = "", - tmplOptions = {}, - l = ast.length; - - if ("" + tmpl === tmpl) { - tmplName = isLinkExpr ? 'data-link="' + tmpl.replace(rNewLine, " ").slice(1, -1) + '"' : tmpl; - tmpl = 0; - } else { - tmplName = tmpl.tmplName || "unnamed"; - if (tmpl.allowCode) { - tmplOptions.allowCode = true; - } - if (tmpl.debug) { - tmplOptions.debug = true; - } - tmplBindings = tmpl.bnds; - nestedTmpls = tmpl.tmpls; - } - for (i = 0; i < l; i++) { - // AST nodes: [tagName, converter, params, content, hash, noError, pathBindings, contentMarkup, link] - node = ast[i]; - - // Add newline for each callout to t() c() etc. and each markup string - if ("" + node === node) { - // a markup string to be inserted - code += '\nret+="' + node + '";'; - } else { - // a compiled tag expression to be inserted - tagName = node[0]; - if (tagName === "*") { - // Code tag: {{* }} - code += "" + node[1]; - } else { - converter = node[1]; - params = node[2]; - content = node[3]; - hash = node[4]; - noError = node[5]; - markup = node[7]; - - if (!(isElse = tagName === "else")) { - tmplBindingKey = 0; - if (tmplBindings && (pathBindings = node[6])) { // Array of paths, or false if not data-bound - tmplBindingKey = tmplBindings.push(pathBindings); - } - } - if (isGetVal = tagName === ":") { - if (converter) { - tagName = converter === "html" ? ">" : converter + tagName; - } - if (noError) { - // If the tag includes noerror=true, we will do a try catch around expressions for named or unnamed parameters - // passed to the tag, and return the empty string for each expression if it throws during evaluation - //TODO This does not work for general case - supporting noError on multiple expressions, e.g. tag args and properties. - //Consider replacing with try and return the value of the expression a.b.c(p,q) + a.d, or, if it throws, return xxx||'' (rather than always the empty string) - prm = "prm" + i; - noError = "try{var " + prm + "=[" + params + "][0];}catch(e){" + prm + '="";}\n'; - params = prm; - } - } else { - if (content) { - // Create template object for nested template - nestedTmpl = TmplObject(markup, tmplOptions); - nestedTmpl.tmplName = tmplName + "/" + tagName; - // Compile to AST and then to compiled function - buildCode(content, nestedTmpl); - nestedTmpls.push(nestedTmpl); - } - - if (!isElse) { - // This is not an else tag. - tagAndElses = tagName; - // Switch to a new code string for this bound tag (and its elses, if it has any) - for returning the tagCtxs array - oldCode = code; - code = ""; - } - nextIsElse = ast[i + 1]; - nextIsElse = nextIsElse && nextIsElse[0] === "else"; - } - - hash += ",args:[" + params + "]}"; - - if (isGetVal && pathBindings || converter && tagName !== ">") { - // For convertVal we need a compiled function to return the new tagCtx(s) - tagCtxFn = new Function("data,view,j,u", " // " - + tmplName + " " + tmplBindingKey + " " + tagName + "\n" + noError + "return {" + hash + ";"); - tagCtxFn.paths = pathBindings; - tagCtxFn._ctxs = tagName; - if (isLinkExpr) { - return tagCtxFn; - } - useCnvt = 1; - } - - code += (isGetVal - ? "\n" + (pathBindings ? "" : noError) + (isLinkExpr ? "return " : "ret+=") + (useCnvt // Call _cnvt if there is a converter: {{cnvt: ... }} or {^{cnvt: ... }} - ? (useCnvt = 0, hasCnvt = true, 'c("' + converter + '",view,' + (pathBindings - ? ((tmplBindings[tmplBindingKey - 1] = tagCtxFn), tmplBindingKey) // Store the compiled tagCtxFn in tmpl.bnds, and pass the key to convertVal() - : "{" + hash) + ");") - : tagName === ">" - ? (hasEncoder = true, "h(" + params + ");") - : (getsVal = true, "(v=" + params + ")!=" + (isLinkExpr ? "=" : "") + 'u?v:"";') // Strict equality just for data-link="title{:expr}" so expr=null will remove title attribute - ) - : (hasTag = true, "{view:view,tmpl:" // Add this tagCtx to the compiled code for the tagCtxs to be passed to renderTag() - + (content ? nestedTmpls.length: "0") + "," // For block tags, pass in the key (nestedTmpls.length) to the nested content template - + hash + ",")); - - if (tagAndElses && !nextIsElse) { - code = "[" + code.slice(0, -1) + "]"; // This is a data-link expression or the last {{else}} of an inline bound tag. We complete the code for returning the tagCtxs array - if (isLinkExpr || pathBindings) { - // This is a bound tag (data-link expression or inline bound tag {^{tag ...}}) so we store a compiled tagCtxs function in tmp.bnds - code = new Function("data,view,j,u", " // " + tmplName + " " + tmplBindingKey + " " + tagAndElses + "\nreturn " + code + ";"); - if (pathBindings) { - (tmplBindings[tmplBindingKey - 1] = code).paths = pathBindings; - } - code._ctxs = tagName; - if (isLinkExpr) { - return code; // For a data-link expression we return the compiled tagCtxs function - } - } - - // This is the last {{else}} for an inline tag. - // For a bound tag, pass the tagCtxs fn lookup key to renderTag. - // For an unbound tag, include the code directly for evaluating tagCtxs array - code = oldCode + '\nret+=t("' + tagAndElses + '",view,this,' + (tmplBindingKey || code) + ");"; - pathBindings = 0; - tagAndElses = 0; - } - } - } - } - // Include only the var references that are needed in the code - code = "// " + tmplName - + "\nvar j=j||" + (jQuery ? "jQuery." : "js") + "views" - + (getsVal ? ",v" : "") // gets value - + (hasTag ? ",t=j._tag" : "") // has tag - + (hasCnvt ? ",c=j._cnvt" : "") // converter - + (hasEncoder ? ",h=j.converters.html" : "") // html converter - + (isLinkExpr ? ";\n" : ',ret="";\n') - + ($viewsSettings.tryCatch ? "try{\n" : "") - + (tmplOptions.debug ? "debugger;" : "") - + code + (isLinkExpr ? "\n" : "\nreturn ret;\n") - + ($viewsSettings.tryCatch ? "\n}catch(e){return j._err(e);}" : ""); - try { - code = new Function("data,view,j,u", code); - } catch (e) { - syntaxError("Compiled template code:\n\n" + code, e); - } - if (tmpl) { - tmpl.fn = code; - } - return code; - } - - function parseParams(params, bindings, tmpl) { - - //function pushBindings() { // Consider structured path bindings - // if (bindings) { - // named ? bindings[named] = bindings.pop(): bindings.push(list = []); - // } - //} - - function parseTokens(all, lftPrn0, lftPrn, bound, path, operator, err, eq, path2, prn, comma, lftPrn2, apos, quot, rtPrn, rtPrnDot, prn2, space, index, full) { - //rParams = /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*\.|\s*\^)|[)\]])([([]?))|(\s+)/g, - // lftPrn0 lftPrn bound path operator err eq path2 prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space - // (left paren? followed by (path? followed by operator) or (path followed by paren?)) or comma or apos or quot or right paren or space - var expr; - operator = operator || ""; - lftPrn = lftPrn || lftPrn0 || lftPrn2; - path = path || path2; - prn = prn || prn2 || ""; - - function parsePath(allPath, not, object, helper, view, viewProperty, pathTokens, leafToken) { - // rPath = /^(?:null|true|false|\d[\d.]*|(!*?)([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g, - // none object helper view viewProperty pathTokens leafToken - if (object) { - if (bindings) { - if (named === "linkTo") { - bindto = bindings._jsvto = bindings._jsvto || []; - bindto.push(path); - } - if (!named || boundName) { - bindings.push(path.slice(not.length)); // Add path binding for paths on props and args, -// list.push(path); - } - } - if (object !== ".") { - var ret = (helper - ? 'view.hlp("' + helper + '")' - : view - ? "view" - : "data") - + (leafToken - ? (viewProperty - ? "." + viewProperty - : helper - ? "" - : (view ? "" : "." + object) - ) + (pathTokens || "") - : (leafToken = helper ? "" : view ? viewProperty || "" : object, "")); - - ret = ret + (leafToken ? "." + leafToken : ""); - - return not + (ret.slice(0, 9) === "view.data" - ? ret.slice(5) // convert #view.data... to data... - : ret); - } - } - return allPath; - } - - if (err) { - syntaxError(params); - } else { - if (bindings && rtPrnDot && !aposed && !quoted) { - // This is a binding to a path in which an object is returned by a helper/data function/expression, e.g. foo()^x.y or (a?b:c)^x.y - // We create a compiled function to get the object instance (which will be called when the dependent data of the subexpression changes, to return the new object, and trigger re-binding of the subsequent path) - if (!named || boundName || bindto) { - expr = pathStart[parenDepth]; - if (full.length - 1 > index - expr) { // We need to compile a subexpression - expr = full.slice(expr, index + 1); - rtPrnDot = delimOpenChar1 + ":" + expr + delimCloseChar0; // The parameter or function subexpression - //TODO Optimize along the lines of: - //var paths = []; - //rtPrnDot = tmplLinks[rtPrnDot] = tmplLinks[rtPrnDot] || tmplFn(delimOpenChar0 + rtPrnDot + delimCloseChar1, tmpl, true, paths); // Compile the expression (or use cached copy already in tmpl.links) - //rtPrnDot.paths = rtPrnDot.paths || paths; - - rtPrnDot = tmplLinks[rtPrnDot] = tmplLinks[rtPrnDot] || tmplFn(delimOpenChar0 + rtPrnDot + delimCloseChar1, tmpl, true); // Compile the expression (or use cached copy already in tmpl.links) - if (!rtPrnDot.paths) { - parseParams(expr, rtPrnDot.paths = [], tmpl); - } - (bindto || bindings).push({_jsvOb: rtPrnDot}); // Insert special object for in path bindings, to be used for binding the compiled sub expression () - //list.push({_jsvOb: rtPrnDot}); - } - } - } - return (aposed - // within single-quoted string - ? (aposed = !apos, (aposed ? all : '"')) - : quoted - // within double-quoted string - ? (quoted = !quot, (quoted ? all : '"')) - : - ( - (lftPrn - ? (parenDepth++, pathStart[parenDepth] = index++, lftPrn) - : "") - + (space - ? (parenDepth - ? "" - //: (pushBindings(), named - // : ",") - : named - ? (named = boundName = bindto = false, "\b") - : "," - ) - : eq - // named param - // Insert backspace \b (\x08) as separator for named params, used subsequently by rBuildHash - ? (parenDepth && syntaxError(params), named = path, boundName = bound, /*pushBindings(),*/ '\b' + path + ':') - : path - // path - ? (path.split("^").join(".").replace(rPath, parsePath) - + (prn - ? (fnCall[++parenDepth] = true, path.charAt(0) !== "." && (pathStart[parenDepth] = index), prn) - : operator) - ) - : operator - ? operator - : rtPrn - // function - ? ((fnCall[parenDepth--] = false, rtPrn) - + (prn - ? (fnCall[++parenDepth] = true, prn) - : "") - ) - : comma - ? (fnCall[parenDepth] || syntaxError(params), ",") // We don't allow top-level literal arrays or objects - : lftPrn0 - ? "" - : (aposed = apos, quoted = quot, '"') - )) - ); - } - } - - var named, bindto, boundName, // list, - tmplLinks = tmpl.links, - fnCall = {}, - pathStart = {0:-1}, - parenDepth = 0, - quoted = false, // boolean for string content in double quotes - aposed = false; // or in single quotes - - //pushBindings(); - - return (params + " ") - .replace(/\)\^/g, ").") // Treat "...foo()^bar..." as equivalent to "...foo().bar..." - //since preceding computed observables in the path will always be updated if their dependencies change - .replace(rParams, parseTokens); - } - - //========== - // Utilities - //========== - - // Merge objects, in particular contexts which inherit from parent contexts - function extendCtx(context, parentContext) { - // Return copy of parentContext, unless context is defined and is different, in which case return a new merged context - // If neither context nor parentContext are defined, return undefined - return context && context !== parentContext - ? (parentContext - ? $extend($extend({}, parentContext), context) - : context) - : parentContext && $extend({}, parentContext); - } - - // Get character entity for HTML and Attribute encoding - function getCharEntity(ch) { - return charEntities[ch] || (charEntities[ch] = "&#" + ch.charCodeAt(0) + ";"); - } - - //========================== Initialize ========================== - - for (jsvStoreName in jsvStores) { - registerStore(jsvStoreName, jsvStores[jsvStoreName]); - } - - var $templates = $views.templates, - $converters = $views.converters, - $helpers = $views.helpers, - $tags = $views.tags, - $viewsSub = $views.sub, - $viewsSettings = $views.settings, - noIndex = "Error: #index in nested view: use #getIndex()"; // Error string if debugMode, else empty - - if (jQuery) { - //////////////////////////////////////////////////////////////////////////////////////////////// - // jQuery is loaded, so make $ the jQuery object - $ = jQuery; - $.fn.render = renderContent; - - } else { - //////////////////////////////////////////////////////////////////////////////////////////////// - // jQuery is not loaded. - - $ = global.jsviews = {}; - - $.isArray = Array && Array.isArray || function(obj) { - return Object.prototype.toString.call(obj) === "[object Array]"; - }; - - // //========================== Future Node.js support ========================== - // if ((nodeJsModule = global.module) && nodeJsModule.exports) { - // nodeJsModule.exports = $; - // } - } - - $.render = $render; - $.views = $views; - $.templates = $templates = $views.templates; - - //========================== Register tags ========================== - - $tags({ - "else": function() {}, // Does nothing but ensures {{else}} tags are recognized as valid - "if": { - render: function(val) { - // This function is called once for {{if}} and once for each {{else}}. - // We will use the tag.rendering object for carrying rendering state across the calls. - // If not done (a previous block has not been rendered), look at expression for this block and render the block if expression is truthy - // Otherwise return "" - var self = this, - ret = (self.rendering.done || !val && (arguments.length || !self.tagCtx.index)) - ? "" - : (self.rendering.done = true, self.selected = self.tagCtx.index, - // Test is satisfied, so render content on current context. We call tagCtx.render() rather than return undefined - // (which would also render the tmpl/content on the current context but would iterate if it is an array) - self.tagCtx.render()); - return ret; - }, - onUpdate: function(ev, eventArgs, tagCtxs) { - var tci, prevArg, different; - for (tci = 0; (prevArg = this.tagCtxs[tci]) && prevArg.args.length; tci++) { - prevArg = prevArg.args[0]; - different = !prevArg !== !tagCtxs[tci].args[0]; - if (!!prevArg || different) { - return different; - // If newArg and prevArg are both truthy, return false to cancel update. (Even if values on later elses are different, we still don't want to update, since rendered output would be unchanged) - // If newArg and prevArg are different, return true, to update - // If newArg and prevArg are both falsey, move to the next {{else ...}} - } - } - // Boolean value of all args are unchanged (falsey), so return false to cancel update - return false; - }, - flow: true - }, - "for": { - render: renderForBlock, - //onUpdate: function(ev, eventArgs, tagCtxs) { - //Consider adding filtering for perf optimization. However the below prevents update on some scenarios which _should_ update - namely when there is another array on which for also depends. - //var i, l, tci, prevArg; - //for (tci = 0; (prevArg = this.tagCtxs[tci]) && prevArg.args.length; tci++) { - // if (prevArg.args[0] !== tagCtxs[tci].args[0]) { - // return true; - // } - //} - //return false; - //}, - onArrayChange: function(ev, eventArgs) { - var arrayView, - self = this, - change = eventArgs.change; - if (this.tagCtxs[1] && ( // There is an {{else}} - change === "insert" && ev.target.length === eventArgs.items.length // inserting, and new length is same as inserted length, so going from 0 to n - || change === "remove" && !ev.target.length // removing , and new length 0, so going from n to 0 - || change === "refresh" && !eventArgs.oldItems.length !== !ev.target.length // refreshing, and length is going from 0 to n or from n to 0 - )) { - this.refresh(); - } else { - for (arrayView in self._.arrVws) { - arrayView = self._.arrVws[arrayView]; - if (arrayView.data === ev.target) { - arrayView._.onArrayChange.apply(arrayView, arguments); - } - } - } - ev.done = true; - }, - flow: true - }, - props: { - prep: function(object) { - var key, - arr = []; - for (key in object) { - arr.push({key: key, prop: object[key]}); - } - return arr; - }, - render: renderForBlock, - flow: true - }, - include: { - flow: true - }, - "*": { - // {{* code... }} - Ignored if template.allowCode is false. Otherwise include code in compiled template - render: function(value) { - return value; // Include the code. - }, - flow: true - } - }); - - function renderForBlock(val) { - // This function is called once for {{for}} and once for each {{else}}. - // We will use the tag.rendering object for carrying rendering state across the calls. - var self = this, - tagCtx = self.tagCtx, - noArg = !arguments.length, - result = "", - done = noArg || 0; - - if (!self.rendering.done) { - if (noArg) { - result = undefined; - } else if (val !== undefined) { - val = self.prep ? self.prep(val) : val; - result += tagCtx.render(val); - done += $.isArray(val) ? val.length : 1; - } - if (self.rendering.done = done) { - self.selected = tagCtx.index; - } - // If nothing was rendered we will look at the next {{else}}. Otherwise, we are done. - } - return result; - } - //========================== Register converters ========================== - - $converters({ - html: function(text) { - // HTML encode: Replace < > & and ' and " by corresponding entities. - return text != undefined ? String(text).replace(rHtmlEncode, getCharEntity) : ""; // null and undefined return "" - }, - attr: function(text) { - // Attribute encode: Replace < > & ' and " by corresponding entities. - return text != undefined ? String(text).replace(rAttrEncode, getCharEntity) : text === null ? text : ""; // null returns null, e.g. to remove attribute. undefined returns "" - }, - url: function(text) { - // URL encoding helper. - return text != undefined ? encodeURI(String(text)) : text === null ? text : ""; // null returns null, e.g. to remove attribute. undefined returns "" - } - }); - - //========================== Define default delimiters ========================== - $viewsDelimiters(); - -})(this, this.jQuery); diff --git a/nano/js/nano_base_callbacks.js b/nano/js/nano_base_callbacks.js new file mode 100644 index 0000000000..3770dae7ec --- /dev/null +++ b/nano/js/nano_base_callbacks.js @@ -0,0 +1,85 @@ +// NanoBaseCallbacks is where the base callbacks (common to all templates) are stored +NanoBaseCallbacks = function () +{ + // _canClick is used to disable clicks for a short period after each click (to avoid mis-clicks) + var _canClick = true; + + var _baseBeforeUpdateCallbacks = {} + + var _baseAfterUpdateCallbacks = { + // this callback is triggered after new data is processed + // it updates the status/visibility icon and adds click event handling to buttons/links + status: function (updateData) { + var uiStatusClass; + if (updateData['config']['status'] == 2) + { + uiStatusClass = 'icon24 uiStatusGood'; + $('.linkActive').removeClass('inactive'); + } + else if (updateData['config']['status'] == 1) + { + uiStatusClass = 'icon24 uiStatusAverage'; + $('.linkActive').addClass('inactive'); + } + else + { + uiStatusClass = 'icon24 uiStatusBad' + $('.linkActive').addClass('inactive'); + } + $('#uiStatusIcon').attr('class', uiStatusClass); + + $('.linkActive').stopTime('linkPending'); + $('.linkActive').removeClass('linkPending'); + + $('.linkActive').off('click'); + $('.linkActive').on('click', function (event) { + event.preventDefault(); + var href = $(this).data('href'); + if (href != null && _canClick) + { + _canClick = false; + $('body').oneTime(300, 'enableClick', function () { + _canClick = true; + }); + if (updateData['config']['status'] == 2) + { + $(this).oneTime(300, 'linkPending', function () { + $(this).addClass('linkPending'); + }); + } + window.location.href = href; + } + }); + } + }; + + return { + addCallbacks: function () { + NanoStateManager.addBeforeUpdateCallbacks(_baseBeforeUpdateCallbacks); + NanoStateManager.addAfterUpdateCallbacks(_baseAfterUpdateCallbacks); + }, + removeCallbacks: function () { + for (var callbackKey in _baseBeforeUpdateCallbacks) + { + if (_baseBeforeUpdateCallbacks.hasOwnProperty(callbackKey)) + { + NanoStateManager.removeBeforeUpdateCallback(callbackKey); + } + } + for (var callbackKey in _baseAfterUpdateCallbacks) + { + if (_baseAfterUpdateCallbacks.hasOwnProperty(callbackKey)) + { + NanoStateManager.removeAfterUpdateCallback(callbackKey); + } + } + } + }; +} (); + + + + + + + diff --git a/nano/js/nano_base_helpers.js b/nano/js/nano_base_helpers.js index ed3ce322f1..98275b247d 100644 --- a/nano/js/nano_base_helpers.js +++ b/nano/js/nano_base_helpers.js @@ -1,21 +1,8 @@ // NanoBaseHelpers is where the base template helpers (common to all templates) are stored NanoBaseHelpers = function () { - var _urlParameters = {}; // This is populated with the base url parameters (used by all links), which is probaby just the "src" parameter - - var init = function () - { - var body = $('body'); // We store data in the body tag, it's as good a place as any - - _urlParameters = body.data('urlParameters'); - - initHelpers(); - }; - - var initHelpers = function () - { - $.views.helpers({ - + var _baseHelpers = { + // change ui styling to "syndicate mode" syndicateMode: function() { $('body').css("background-color","#8f1414"); $('body').css("background-image","url('uiBackground-Syndicate.png')"); @@ -26,9 +13,8 @@ NanoBaseHelpers = function () $('#uiTitleFluff').css("background-position","50% 50%"); $('#uiTitleFluff').css("background-repeat", "no-repeat"); - return ''; + return ''; }, - // Generate a Byond link link: function( text, icon, parameters, status, elementClass, elementId) { @@ -56,7 +42,7 @@ NanoBaseHelpers = function () return ''; } - return ''; + return ''; }, // Round a number to the nearest integer round: function(number) { @@ -91,12 +77,12 @@ NanoBaseHelpers = function () } return ''; }, - formatNumber: function(x) { - // From http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript - var parts = x.toString().split("."); - parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); - return parts.join("."); - }, + formatNumber: function(x) { + // From http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript + var parts = x.toString().split("."); + parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return parts.join("."); + }, // Display a bar. Used to show health, capacity, etc. displayBar: function(value, rangeMin, rangeMax, styleClass, showText) { @@ -172,7 +158,7 @@ NanoBaseHelpers = function () status = 'selected'; } - html += '' + html += '' index++; if (index % blockSize == 0 && index < characters.length) @@ -191,52 +177,26 @@ NanoBaseHelpers = function () return html; } - }); - }; - - // generate a Byond href, combines _urlParameters with parameters - var generateHref = function (parameters) - { - var queryString = '?'; - - for (var key in _urlParameters) - { - if (_urlParameters.hasOwnProperty(key)) - { - if (queryString !== '?') - { - queryString += ';'; - } - queryString += key + '=' + _urlParameters[key]; - } - } - - for (var key in parameters) - { - if (parameters.hasOwnProperty(key)) - { - if (queryString !== '?') - { - queryString += ';'; - } - queryString += key + '=' + parameters[key]; - } - } - return queryString; - }; - + }; + return { - init: function () + addHelpers: function () { - init(); + NanoTemplate.addHelpers(_baseHelpers); + }, + removeHelpers: function () + { + for (var helperKey in _baseHelpers) + { + if (_baseHelpers.hasOwnProperty(helperKey)) + { + NanoTemplate.removeHelper(helperKey); + } + } } }; } (); - -$(document).ready(function() -{ - NanoBaseHelpers.init(); -}); + diff --git a/nano/js/nano_state.js b/nano/js/nano_state.js new file mode 100644 index 0000000000..7a3dcfdf03 --- /dev/null +++ b/nano/js/nano_state.js @@ -0,0 +1,69 @@ +// This is the base state class, it is not to be used directly + +function NanoStateClass() { + /*if (typeof this.key != 'string' || !this.key.length) + { + alert('ERROR: Tried to create a state with an invalid state key: ' + this.key); + return; + } + + this.key = this.key.toLowerCase(); + + NanoStateManager.addState(this);*/ +} + +NanoStateClass.prototype.key = null; + +NanoStateClass.prototype.isCurrent = function () { + return NanoStateManager.getCurrentState() == this; +}; + +NanoStateClass.prototype.onAdd = function (previousState) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + NanoBaseCallbacks.addCallbacks(); + NanoBaseHelpers.addHelpers(); +}; + +NanoStateClass.prototype.onRemove = function (nextState) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + NanoBaseCallbacks.removeCallbacks(); + NanoBaseHelpers.removeHelpers(); +}; + +NanoStateClass.prototype.onBeforeUpdate = function (data) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + data = NanoStateManager.executeBeforeUpdateCallbacks(data); + + return data; // Return data to continue, return false to prevent onUpdate and onAfterUpdate +}; + +NanoStateClass.prototype.onUpdate = function (data) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + try + { + $("#mainTemplate").html(NanoTemplate.parse('main', data)); // render the 'mail' template to the #mainTemplate div + } + catch(error) + { + alert('ERROR: An error occurred while rendering the UI: ' + error.message); + return; + } +}; + +NanoStateClass.prototype.onAfterUpdate = function (data) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + NanoStateManager.executeAfterUpdateCallbacks(data); +}; + +NanoStateClass.prototype.alertText = function (text) { + // Do not add code here, add it to the 'default' state (nano_state_defaut.js) or create a new state and override this function + + alert(text); +}; + + diff --git a/nano/js/nano_state_default.js b/nano/js/nano_state_default.js new file mode 100644 index 0000000000..65493b8c87 --- /dev/null +++ b/nano/js/nano_state_default.js @@ -0,0 +1,14 @@ + +NanoStateDefaultClass.inheritsFrom(NanoStateClass); +var NanoStateDefault = new NanoStateDefaultClass(); + +function NanoStateDefaultClass() { + + this.key = 'default'; + + //this.parent.constructor.call(this); + + this.key = this.key.toLowerCase(); + + NanoStateManager.addState(this); +} \ No newline at end of file diff --git a/nano/js/nano_state_manager.js b/nano/js/nano_state_manager.js new file mode 100644 index 0000000000..0cbdb2e48a --- /dev/null +++ b/nano/js/nano_state_manager.js @@ -0,0 +1,227 @@ +// NanoStateManager handles data from the server and uses it to render templates +NanoStateManager = function () +{ + // _isInitialised is set to true when all of this ui's templates have been processed/rendered + var _isInitialised = false; + + // the array of template names to use for this ui + var _templates = null; + // the data for this ui + var _data = null; + // new data which arrives before _isInitialised is true is stored here for processing later + var _earlyUpdateData = null; + + // this is an array of callbacks which are called when new data arrives, before it is processed + var _beforeUpdateCallbacks = {}; + // this is an array of callbacks which are called when new data arrives, before it is processed + var _afterUpdateCallbacks = {}; + + // this is an array of state objects, these can be used to provide custom javascript logic + var _states = {}; + + var _currentState = null; + + // the init function is called when the ui has loaded + // this function sets up the templates and base functionality + var init = function () + { + $('#uiLoadingNotice').html('Loading...'); + + // We store initialData and templateData in the body tag, it's as good a place as any + _data = $('body').data('initialData'); + + if (_data == null || !_data.hasOwnProperty('config') || !_data.hasOwnProperty('data')) + { + alert('Error: Initial data did not load correctly.'); + } + + var stateKey = 'default'; + if (_data['config'].hasOwnProperty('stateKey') && _data['config']['stateKey']) + { + stateKey = _data['config']['stateKey'].toLowerCase(); + } + + NanoStateManager.setCurrentState(stateKey); + + $(document).on('templatesLoaded', function () { + doUpdate(_data); + + _isInitialised = true; + $('#uiLoadingNotice').hide(); + }); + }; + + // Receive update data from the server + var receiveUpdateData = function (jsonString) + { + var updateData; + try + { + // parse the JSON string from the server into a JSON object + updateData = jQuery.parseJSON(jsonString); + } + catch (error) + { + alert(error.Message); + return; + } + + if (!updateData.hasOwnProperty('data')) + { + if (_data && _data.hasOwnProperty('data')) + { + updateData['data'] = _data['data']; + } + else + { + updateData['data'] = {}; + } + } + + if (_isInitialised) // all templates have been registered, so render them + { + doUpdate(updateData); + } + else + { + _data = updateData; // all templates have not been registered. We set _data directly here which will be applied after the template is loaded with the initial data + } + }; + + // This function does the update by calling the methods on the current state + var doUpdate = function (data) + { + if (_currentState == null) + { + return; + } + + data = _currentState.onBeforeUpdate(data); + + if (data === false) + { + alert('data is false, return'); + return; // A beforeUpdateCallback returned a false value, this prevents the render from occuring + } + + _data = data; + + _currentState.onUpdate(_data); + + _currentState.onAfterUpdate(_data); + }; + + // Execute all callbacks in the callbacks array/object provided, updateData is passed to them for processing and potential modification + var executeCallbacks = function (callbacks, data) + { + for (var key in callbacks) + { + if (callbacks.hasOwnProperty(key) && jQuery.isFunction(callbacks[key])) + { + data = callbacks[key].call(this, data); + } + } + + return data; + }; + + return { + init: function () + { + init(); + }, + receiveUpdateData: function (jsonString) + { + receiveUpdateData(jsonString); + }, + addBeforeUpdateCallback: function (key, callbackFunction) + { + _beforeUpdateCallbacks[key] = callbackFunction; + }, + addBeforeUpdateCallbacks: function (callbacks) { + for (var callbackKey in callbacks) { + if (!callbacks.hasOwnProperty(callbackKey)) + { + continue; + } + NanoStateManager.addBeforeUpdateCallback(callbackKey, callbacks[callbackKey]); + } + }, + removeBeforeUpdateCallback: function (key) + { + if (_beforeUpdateCallbacks.hasOwnProperty(key)) + { + delete _beforeUpdateCallbacks[key]; + } + }, + executeBeforeUpdateCallbacks: function (data) { + return executeCallbacks(_beforeUpdateCallbacks, data); + }, + addAfterUpdateCallback: function (key, callbackFunction) + { + _afterUpdateCallbacks[key] = callbackFunction; + }, + addAfterUpdateCallbacks: function (callbacks) { + for (var callbackKey in callbacks) { + if (!callbacks.hasOwnProperty(callbackKey)) + { + continue; + } + NanoStateManager.addAfterUpdateCallback(callbackKey, callbacks[callbackKey]); + } + }, + removeAfterUpdateCallback: function (key) + { + if (_afterUpdateCallbacks.hasOwnProperty(key)) + { + delete _afterUpdateCallbacks[key]; + } + }, + executeAfterUpdateCallbacks: function (data) { + return executeCallbacks(_afterUpdateCallbacks, data); + }, + addState: function (state) + { + if (!(state instanceof NanoStateClass)) + { + alert('ERROR: Attempted to add a state which is not instanceof NanoStateClass'); + return; + } + if (!state.key) + { + alert('ERROR: Attempted to add a state with an invalid stateKey'); + return; + } + _states[state.key] = state; + }, + setCurrentState: function (stateKey) + { + if (typeof stateKey == 'undefined' || !stateKey) { + alert('ERROR: No state key was passed!'); + return false; + } + if (!_states.hasOwnProperty(stateKey)) + { + alert('ERROR: Attempted to set a current state which does not exist: ' + stateKey); + return false; + } + + var previousState = _currentState; + + _currentState = _states[stateKey]; + + if (previousState != null) { + previousState.onRemove(_currentState); + } + + _currentState.onAdd(previousState); + + return true; + }, + getCurrentState: function () + { + return _currentState; + } + }; +} (); + \ No newline at end of file diff --git a/nano/js/nano_template.js b/nano/js/nano_template.js new file mode 100644 index 0000000000..23e2ac0837 --- /dev/null +++ b/nano/js/nano_template.js @@ -0,0 +1,130 @@ + +var NanoTemplate = function () { + + var _templates = {}; + var _compiledTemplates = {}; + + var _helpers = {}; + + var init = function () { + // We store initialData and templateData in the body tag, it's as good a place as any + var templateData = $('body').data('templateData'); + + if (templateData == null) + { + alert('Error: Template data did not load correctly.'); + } + + // we count the number of templates for this ui so that we know when they've all been rendered + var templateCount = 0; + for (var key in templateData) + { + if (templateData.hasOwnProperty(key)) + { + templateCount++; + } + } + + if (!templateCount) + { + alert('ERROR: No templates listed!'); + } + + // load markup for each template and register it + for (var key in templateData) + { + if (!templateData.hasOwnProperty(key)) + { + continue; + } + + $.when($.ajax({ + url: templateData[key], + cache: false, + dataType: 'text' + })) + .done(function(templateMarkup) { + + //templateMarkup = templateMarkup.replace(/ +\) *\}\}/g, ')}}'); + + templateMarkup += '
    '; + + try + { + NanoTemplate.addTemplate(key, templateMarkup) + + templateCount--; + + if (templateCount <= 0) + { + $(document).trigger('templatesLoaded'); + } + } + catch(error) + { + alert('ERROR: An error occurred while loading the UI: ' + error.message); + return; + } + }) + .fail(function () { + alert('ERROR: Loading template ' + key + '(' + templateData[key] + ') failed!'); + });; + } + }; + + var compileTemplates = function () { + + for (var key in _templates) { + try { + _compiledTemplates[key] = doT.template(_templates[key], null, _templates) + } + catch (error) { + alert(error); + } + } + }; + + return { + init: function () { + init(); + }, + addTemplate: function (key, templateString) { + _templates[key] = templateString; + }, + parse: function (templateKey, data) { + if (!_compiledTemplates.hasOwnProperty(templateKey)) { + if (!_templates.hasOwnProperty(templateKey)) { + alert('ERROR: Template "' + templateKey + '" does not exist in _compiledTemplates!'); + return; + } + compileTemplates(); + } + return _compiledTemplates[templateKey].call(this, data['data'], data['config'], _helpers); + }, + addHelper: function (helperName, helperFunction) { + if (!jQuery.isFunction(helperFunction)) { + alert('NanoTemplate.addHelper failed to add ' + helperName + ' as it is not a function.'); + return; + } + + _helpers[helperName] = helperFunction; + }, + addHelpers: function (helpers) { + for (var helperName in helpers) { + if (!helpers.hasOwnProperty(helperName)) + { + continue; + } + NanoTemplate.addHelper(helperName, helpers[helperName]); + } + }, + removeHelper: function (helperName) { + if (helpers.hasOwnProperty(helperName)) + { + delete _helpers[helperName]; + } + } + } +}(); + + diff --git a/nano/js/nano_update.js b/nano/js/nano_update.js deleted file mode 100644 index cb2eee021d..0000000000 --- a/nano/js/nano_update.js +++ /dev/null @@ -1,236 +0,0 @@ -// NanoUpdate handles data from the server and uses it to render templates -NanoUpdate = function () -{ - // _isInitialised is set to true when all of this ui's templates have been processed/rendered - var _isInitialised = false; - - // the array of template names to use for this ui - var _templates = null; - // the data for this ui - var _data = null; - // new data which arrives before _isInitialised is true is stored here for processing later - var _earlyUpdateData = null; - - // this is an array of callbacks which are called when new data arrives, before it is processed - var _beforeUpdateCallbacks = []; - // this is an array of callbacks which are called when new data arrives, before it is processed - var _afterUpdateCallbacks = []; - - // _canClick is used to disable clicks for a short period after each click (to avoid mis-clicks) - var _canClick = true; - - // the init function is called when the ui has loaded - // this function sets up the templates and base functionality - var init = function () - { - $('#uiNoJavaScript').html('Loading...'); - - // this callback is triggered after new data is processed - // it updates the status/visibility icon and adds click event handling to buttons/links - NanoUpdate.addAfterUpdateCallback(function (updateData) { - var uiStatusClass; - if (updateData['ui']['status'] == 2) - { - uiStatusClass = 'icon24 uiStatusGood'; - $('.linkActive').removeClass('inactive'); - } - else if (updateData['ui']['status'] == 1) - { - uiStatusClass = 'icon24 uiStatusAverage'; - $('.linkActive').addClass('inactive'); - } - else - { - uiStatusClass = 'icon24 uiStatusBad' - $('.linkActive').addClass('inactive'); - } - $('#uiStatusIcon').attr('class', uiStatusClass); - - $('.linkActive').stopTime('linkPending'); - $('.linkActive').removeClass('linkPending'); - - $('.linkActive').off('click'); - $('.linkActive').on('click', function (event) { - event.preventDefault(); - var href = $(this).data('href'); - if (href != null && _canClick) - { - _canClick = false; - $('body').oneTime(300, 'enableClick', function () { - _canClick = true; - }); - if (updateData['ui']['status'] == 2) - { - $(this).oneTime(300, 'linkPending', function () { - $(this).addClass('linkPending'); - }); - } - window.location.href = href; - } - }); - }); - - // We store initialData and templateData in the body tag, it's as good a place as any - var body = $('body'); - var templateData = body.data('templateData'); - var initialData = body.data('initialData'); - - if (templateData == null || !initialData == null) - { - alert('Error: Initial data did not load correctly.'); - } - - // we count the number of templates for this ui so that we know when they've all been rendered - var templateCount = 0; - for (var key in templateData) - { - if (templateData.hasOwnProperty(key)) - { - templateCount++; - } - } - - if (!templateCount) - { - alert('ERROR: No templates listed!'); - } - - // load markup for each template and register it - for (var key in templateData) - { - if (templateData.hasOwnProperty(key)) - { - $.when($.get(templateData[key])) - .done(function(templateMarkup) { - if (_templates == null) - { - _templates = {}; - } - - templateMarkup = templateMarkup.replace(/ +\) *\}\}/g, ')}}'); - - templateMarkup += '
    ' - - try - { - _templates[key] = $.templates(key, templateMarkup); - - templateCount--; - - if (templateCount <= 0) - { - if (_earlyUpdateData !== null) // Newer data has already arrived, so update - { - renderTemplates(_earlyUpdateData); - } - else - { - renderTemplates(initialData); - } - _isInitialised = true; - $('#uiNoJavaScript').hide(); - } - - executeCallbacks(_afterUpdateCallbacks, _data); - } - catch(error) - { - alert('ERROR: An error occurred while loading the UI: ' + error.message); - return; - } - }); - } - } - }; - - // Receive update data from the server - var receiveUpdateData = function (jsonString) - { - var updateData; - try - { - // parse the JSON string from the server into a JSON object - updateData = jQuery.parseJSON(jsonString); - } - catch (error) - { - alert(error.Message); - return; - } - - - if (_isInitialised) // all templates have been registered, so render them - { - executeCallbacks(_beforeUpdateCallbacks, updateData); - - renderTemplates(updateData); - - executeCallbacks(_afterUpdateCallbacks, updateData); - } - else - { - _earlyUpdateData = updateData; // all templates have not been registered. We set _earlyUpdateData which will be applied after the template is loaded with the initial data - } - }; - - // This function renders the template with the latest data - // It has to be done recursively as each piece of data is observed individually and needs to be updated individually - var renderTemplates = function (data) - { - if (!_templates.hasOwnProperty("main")) - { - alert('Error: Main template not found.'); - } - - _data = data; - - try - { - $("#mainTemplate").html(_templates["main"].render(_data)); - } - catch(error) - { - alert('ERROR: An error occurred while rendering the UI: ' + error.message); - return; - } - }; - - // Execute all callbacks in the callbacks array/object provided, updateData is passed to them for processing - var executeCallbacks = function (callbacks, updateData) - { - for (var index in callbacks) - { - callbacks[index].call(this, updateData); - } - - return updateData; - }; - - return { - init: function () - { - init(); - }, - isInitialised: function () - { - return _isInitialised; - }, - receiveUpdateData: function (jsonString) - { - receiveUpdateData(jsonString); - }, - addBeforeUpdateCallback: function (callbackFunction) - { - _beforeUpdateCallbacks.push(callbackFunction); - }, - addAfterUpdateCallback: function (callbackFunction) - { - _afterUpdateCallbacks.push(callbackFunction); - } - }; -} (); - -$(document).ready(function() -{ - NanoUpdate.init(); -}); \ No newline at end of file diff --git a/nano/js/nano_config.js b/nano/js/nano_utility.js similarity index 57% rename from nano/js/nano_config.js rename to nano/js/nano_utility.js index 8352b197cc..40cd827d13 100644 --- a/nano/js/nano_config.js +++ b/nano/js/nano_utility.js @@ -1,20 +1,61 @@ -// NanoConfig is the place to store utility functions -var NanoConfig = function () +// NanoUtility is the place to store utility functions +var NanoUtility = function () { - return { + var _urlParameters = {}; // This is populated with the base url parameters (used by all links), which is probaby just the "src" parameter + + return { init: function () { - if (typeof jQuery == 'undefined') { - alert('ERROR: jQuery failed to load!'); - } - if (typeof $.views == 'undefined') { - alert('ERROR: JSRender failed to load!'); - } - } - } -} (); + var body = $('body'); // We store data in the body tag, it's as good a place as any -NanoConfig.init(); + _urlParameters = body.data('urlParameters'); + }, + // generate a Byond href, combines _urlParameters with parameters + generateHref: function (parameters) + { + var queryString = '?'; + + for (var key in _urlParameters) + { + if (_urlParameters.hasOwnProperty(key)) + { + if (queryString !== '?') + { + queryString += ';'; + } + queryString += key + '=' + _urlParameters[key]; + } + } + + for (var key in parameters) + { + if (parameters.hasOwnProperty(key)) + { + if (queryString !== '?') + { + queryString += ';'; + } + queryString += key + '=' + parameters[key]; + } + } + return queryString; + } + } +} (); + +if (typeof jQuery == 'undefined') { + alert('ERROR: Javascript library failed to load!'); +} +if (typeof doT == 'undefined') { + alert('ERROR: Template engine failed to load!'); +} + +// All scripts are initialised here, this allows control of init order +$(document).ready(function () { + NanoUtility.init(); + NanoStateManager.init(); + NanoTemplate.init(); +}); if (!Array.prototype.indexOf) { @@ -97,4 +138,11 @@ String.prototype.toTitleCase = function () { $.ajaxSetup({ cache: false -}); \ No newline at end of file +}); + +Function.prototype.inheritsFrom = function (parentClassOrObject) { + this.prototype = new parentClassOrObject; + this.prototype.constructor = this; + this.prototype.parent = parentClassOrObject.prototype; + return this; +}; \ No newline at end of file diff --git a/nano/templates/accounts_terminal.tmpl b/nano/templates/accounts_terminal.tmpl index 9903878ee6..ca7fe82752 100644 --- a/nano/templates/accounts_terminal.tmpl +++ b/nano/templates/accounts_terminal.tmpl @@ -3,7 +3,7 @@ Machine:
  • - {{:machine_id}} + {{:data.machine_id}}
    @@ -11,25 +11,25 @@ ID:
    - {{:~link(id_card, 'eject', {'choice' : "insert_card"}, null, id_inserted ? 'fixedLeftWidest' : 'fixedLeft')}} + {{:helper.link(data.id_card, 'eject', {'choice' : "insert_card"}, null, data.id_inserted ? 'fixedLeftWidest' : 'fixedLeft')}}
    -{{if access_level > 0}} +{{if data.access_level > 0}}

    Menu

    - {{:~link('Home', 'home', {'choice' : 'view_accounts_list'}, !creating_new_account && !detailed_account_view ? 'disabled' : null, 'fixedLeft')}} - {{:~link('New Account', 'gear', {'choice' : 'create_account'}, creating_new_account ? 'disabled' : null, 'fixedLeft')}} - {{:~link('Print', 'print', {'choice' : 'print'}, creating_new_account ? 'disabled' : null, 'fixedLeft')}} + {{:helper.link('Home', 'home', {'choice' : 'view_accounts_list'}, !data.creating_new_account && !data.detailed_account_view ? 'disabled' : null, 'fixedLeft')}} + {{:helper.link('New Account', 'gear', {'choice' : 'create_account'}, data.creating_new_account ? 'disabled' : null, 'fixedLeft')}} + {{:helper.link('Print', 'print', {'choice' : 'print'}, data.creating_new_account ? 'disabled' : null, 'fixedLeft')}} - {{if creating_new_account}} + {{if data.creating_new_account}}

    Create Account

    -
    - + +
    @@ -52,7 +52,7 @@
    {{else}} - {{if detailed_account_view}} + {{if data.detailed_account_view}}

    Account Details

    @@ -62,7 +62,7 @@ Account Number:
    - #{{:account_number}} + #{{:data.account_number}}
    @@ -71,7 +71,7 @@ Holder:
    - {{:owner_name}} + {{:data.owner_name}}
    @@ -80,7 +80,7 @@ Balance:
    - ${{:~formatNumber(money)}} + ${{:helper.formatNumber(money)}}
    @@ -89,17 +89,17 @@ Status:
    - - {{: suspended ? "Suspended" : "Active"}} + + {{:data.suspended ? "Suspended" : "Active"}}
    - {{:~link(suspended ? "Unsuspend" : "Suspend", 'gear', {'choice' : 'toggle_suspension'})}} + {{:helper.link(data.suspended ? "Unsuspend" : "Suspend", 'gear', {'choice' : 'toggle_suspension'})}}
    - {{if transactions}} + {{if data.transactions}}
    @@ -111,13 +111,13 @@ - {{for transactions}} + {{for data.transactions}} - - - - - + + + + + {{/for}} @@ -126,7 +126,6 @@ This account has no financial transactions on record for today. {{/if}} -

    CentCom Administrator

    @@ -134,15 +133,15 @@
    Payroll:
    - {{:~link('Revoke', 'transferthick-e-w', {'choice' : 'revoke_payroll'}, account_number == station_account_number ? 'disabled' : null, 'linkDanger')}} + {{:helper.link('Revoke', 'transferthick-e-w', {'choice' : 'revoke_payroll'}, data.account_number == data.station_account_number ? 'disabled' : null, 'linkDanger')}} - {{if access_level >= 2}} + {{if data.access_level >= 2}}
    Silent Fund Adjustment:
    - {{:~link('Add', 'plus', {'choice' : 'add_funds'})}} - {{:~link('Remove', 'minus', {'choice' : 'remove_funds'})}} + {{:helper.link('Add', 'plus', {'choice' : 'add_funds'})}} + {{:helper.link('Remove', 'minus', {'choice' : 'remove_funds'})}}
    {{/if}} {{else}} @@ -150,13 +149,13 @@

    NanoTrasen Accounts

    - {{if accounts}} + {{if data.accounts}}
    {{:date}} {{:time}}{{:target_name}}{{:purpose}}{{:amount}}{{:source_terminal}}{{:value.date}} {{:value.time}}{{:value.target_name}}{{:value.purpose}}{{:value.amount}}{{:value.source_terminal}}
    - {{for accounts}} - - - - + {{for data.accounts}} + + + + {{/for}}
    {{:~link('#' + account_number, '', {'choice' : 'view_account_detail', 'account_index' : account_index})}}{{:owner_name}}{{:suspended}}
    {{:helper.link('#' + value.account_number, '', {'choice' : 'view_account_detail', 'account_index' : value.account_index})}}{{:value.owner_name}}{{:value.suspended}}
    diff --git a/nano/templates/advanced_airlock_console.tmpl b/nano/templates/advanced_airlock_console.tmpl index 7f886657f6..90ef192731 100644 --- a/nano/templates/advanced_airlock_console.tmpl +++ b/nano/templates/advanced_airlock_console.tmpl @@ -4,9 +4,9 @@ External Pressure:
    - {{:~displayBar(external_pressure, 0, 200, external_pressure < 80 || external_pressure > 120 ? 'bad' : external_pressure < 95 || external_pressure > 110 ? 'average' : 'good')}} + {{:helper.displayBar(data.external_pressure, 0, 200, (data.external_pressure < 80 || data.external_pressure > 120) ? 'bad' : (data.external_pressure < 95 || data.external_pressure > 110) ? 'average' : 'good')}}
    - {{:external_pressure}} kPa + {{:data.external_pressure}} kPa
    @@ -15,9 +15,9 @@ Chamber Pressure:
    - {{:~displayBar(chamber_pressure, 0, 200, chamber_pressure < 80 || chamber_pressure > 120 ? 'bad' : chamber_pressure < 95 || chamber_pressure > 110 ? 'average' : 'good')}} + {{:helper.displayBar(data.chamber_pressure, 0, 200, (data.chamber_pressure < 80 || data.chamber_pressure > 120) ? 'bad' : (data.chamber_pressure < 95 || data.chamber_pressure > 110) ? 'average' : 'good')}}
    - {{:chamber_pressure}} kPa + {{:data.chamber_pressure}} kPa
    @@ -26,9 +26,9 @@ Internal Pressure:
    - {{:~displayBar(internal_pressure, 0, 200, internal_pressure < 80 || internal_pressure > 120 ? 'bad' : internal_pressure < 95 || internal_pressure > 110 ? 'average' : 'good')}} + {{:helper.displayBar(data.internal_pressure, 0, 200, (data.internal_pressure < 80 || data.internal_pressure > 120) ? 'bad' : (data.internal_pressure < 95 || data.internal_pressure > 110) ? 'average' : 'good')}}
    - {{:internal_pressure}} kPa + {{:data.internal_pressure}} kPa
    @@ -36,25 +36,25 @@
    - {{:~link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext'}, processing ? 'disabled' : null)}} - {{:~link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int'}, processing ? 'disabled' : null)}} + {{:helper.link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext'}, data.processing ? 'disabled' : null)}} + {{:helper.link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int'}, data.processing ? 'disabled' : null)}}
    - {{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, processing ? 'yellowBackground' : null)}} - {{:~link('Force interior door', 'alert', {'command' : 'force_int'}, null, processing ? 'yellowBackground' : null)}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, data.processing ? 'yellowBackground' : null)}} + {{:helper.link('Force interior door', 'alert', {'command' : 'force_int'}, null, data.processing ? 'yellowBackground' : null)}}
    - {{:~link('Purge', 'refresh', {'command' : 'purge'}, processing ? 'disabled' : null, purge ? 'linkOn' : null)}} + {{:helper.link('Purge', 'refresh', {'command' : 'purge'}, data.processing ? 'disabled' : null, data.purge ? 'linkOn' : null)}}
    - {{:~link('Secure', secure ? 'locked' : 'unlocked', {'command' : 'secure'}, processing ? 'disabled' : null, secure ? 'linkOn' : null)}} + {{:helper.link('Secure', data.secure ? 'locked' : 'unlocked', {'command' : 'secure'}, data.processing ? 'disabled' : null, data.secure ? 'linkOn' : null)}}
    - {{:~link('Abort', 'cancel', {'command' : 'abort'}, processing ? null : 'disabled', processing ? 'redBackground' : null)}} + {{:helper.link('Abort', 'cancel', {'command' : 'abort'}, data.processing ? null : 'disabled', data.processing ? 'redBackground' : null)}}
    \ No newline at end of file diff --git a/nano/templates/apc.tmpl b/nano/templates/apc.tmpl index 82dc2175a1..1db3cb3dda 100644 --- a/nano/templates/apc.tmpl +++ b/nano/templates/apc.tmpl @@ -1,17 +1,17 @@
    - {{if siliconUser}} + {{if data.siliconUser}}
    Interface Lock:
    - {{:~link('Engaged', 'locked', {'toggleaccess' : 1}, locked ? 'selected' : null)}}{{:~link('Disengaged', 'unlocked', {'toggleaccess' : 1}, malfStatus >= 2 ? 'linkOff' : (locked ? null : 'selected'))}} + {{:helper.link('Engaged', 'locked', {'toggleaccess' : 1}, data.locked ? 'selected' : null)}}{{:helper.link('Disengaged', 'unlocked', {'toggleaccess' : 1}, data.malfStatus >= 2 ? 'linkOff' : (data.locked ? null : 'selected'))}}
    {{else}} - {{if locked}} - Swipe an ID card to unlock this interface. + {{if data.locked}} + Swipe an ID card to unlock this interface {{else}} - Swipe an ID card to lock this interface. + Swipe an ID card to lock this interface {{/if}} {{/if}}
    @@ -25,14 +25,14 @@ Main Breaker:
    - {{if locked && !siliconUser}} - {{if isOperating}} + {{if data.locked && !data.siliconUser}} + {{if data.isOperating}} On {{else}} Off {{/if}} {{else}} - {{:~link('On', 'power', {'breaker' : 1}, isOperating ? 'selected' : null)}}{{:~link('Off', 'close', {'breaker' : 1}, isOperating ? null : 'selected')}} + {{:helper.link('On', 'power', {'breaker' : 1}, data.isOperating ? 'selected' : null)}}{{:helper.link('Off', 'close', {'breaker' : 1}, data.isOperating ? null : 'selected')}} {{/if}}
    @@ -42,9 +42,9 @@ External Power:
    - {{if externalPower == 2}} + {{if data.externalPower == 2}} Good - {{else externalPower == 1}} + {{else data.externalPower == 1}} Low {{else}} None @@ -56,38 +56,38 @@
    Power Cell:
    - {{if powerCellStatus == null}} + {{if data.powerCellStatus == null}}
    Power cell removed.
    {{else}} - {{:~displayBar(powerCellStatus, 0, 100, powerCellStatus >= 50 ? 'good' : powerCellStatus >= 25 ? 'average' : 'bad')}} + {{:helper.displayBar(data.powerCellStatus, 0, 100, (data.powerCellStatus >= 50) ? 'good' : (data.powerCellStatus >= 25) ? 'average' : 'bad')}}
    - {{:~round(powerCellStatus*10)/10}}% + {{:helper.round(data.powerCellStatus*10)/10}}%
    {{/if}}
    - {{if powerCellStatus != null}} + {{if data.powerCellStatus != null}}
    Charge Mode:
    - {{if locked && !siliconUser}} - {{if chargeMode}} + {{if data.locked && !data.siliconUser}} + {{if data.chargeMode}} Auto {{else}} Off {{/if}} {{else}} - {{:~link('Auto', 'refresh', {'cmode' : 1}, chargeMode ? 'selected' : null)}}{{:~link('Off', 'close', {'cmode' : 1}, chargeMode ? null : 'selected')}} + {{:helper.link('Auto', 'refresh', {'cmode' : 1}, data.chargeMode ? 'selected' : null)}}{{:helper.link('Off', 'close', {'cmode' : 1}, data.chargeMode ? null : 'selected')}} {{/if}}   - {{if chargingStatus > 1}} + {{if data.chargingStatus > 1}} [Fully Charged] - {{else chargingStatus == 1}} + {{else data.chargingStatus == 1}} [Charging] {{else}} [Not Charging] @@ -99,32 +99,34 @@

    Power Channels

    - {{for powerChannels}} + {{for data.powerChannels}}
    - {{:title}}: + {{:value.title}}:
    - {{:powerLoad}} W + {{:value.powerLoad}} W
       - {{if status <= 1}} + {{if value.status <= 1}} Off - {{else status >= 2}} + {{else value.status >= 2}} On {{/if}} - {{if status == 1 || status == 3}} - [Auto] - {{else}} - [Manual] - {{/if}} + {{if data.locked}} + {{if value.status == 1 || value.status == 3}} +   Auto + {{else}} +   Manual + {{/if}} + {{/if}}
    - {{if !~root.locked || ~root.siliconUser}} + {{if !data.locked || data.siliconUser}}
    - {{:~link('Auto', 'refresh', topicParams.auto, (status == 1 || status == 3) ? 'selected' : null)}} - {{:~link('On', 'power', topicParams.on, (status == 2) ? 'selected' : null)}} - {{:~link('Off', 'close', topicParams.off, (status == 0) ? 'selected' : null)}} + {{:helper.link('Auto', 'refresh', value.topicParams.auto, (value.status == 1 || value.status == 3) ? 'selected' : null)}} + {{:helper.link('On', 'power', value.topicParams.on, (value.status == 2) ? 'selected' : null)}} + {{:helper.link('Off', 'close', value.topicParams.off, (value.status == 0) ? 'selected' : null)}}
    {{/if}}
    @@ -135,7 +137,7 @@ Total Load:
    - {{:totalLoad}} W + {{:data.totalLoad}} W
    @@ -146,26 +148,26 @@ Cover Lock:
    - {{if locked && !siliconUser}} - {{if coverLocked}} + {{if data.locked && !data.siliconUser}} + {{if data.coverLocked}} Engaged {{else}} Disengaged {{/if}} {{else}} - {{:~link('Engaged', 'locked', {'lock' : 1}, coverLocked ? 'selected' : null)}}{{:~link('Disengaged', 'unlocked', {'lock' : 1}, coverLocked ? null : 'selected')}} + {{:helper.link('Engaged', 'locked', {'lock' : 1}, data.coverLocked ? 'selected' : null)}}{{:helper.link('Disengaged', 'unlocked', {'lock' : 1}, data.coverLocked ? null : 'selected')}} {{/if}}
    - {{if siliconUser}} + {{if data.siliconUser}}

    System Overrides

    - {{:~link('Overload Lighting Circuit', 'lightbulb', {'overload' : 1})}} - {{if malfStatus == 1}} - {{:~link('Override Programming', 'script', {'malfhack' : 1})}} - {{else malfStatus > 1}} + {{:helper.link('Overload Lighting Circuit', 'lightbulb', {'overload' : 1})}} + {{if data.malfStatus == 1}} + {{:helper.link('Override Programming', 'script', {'malfhack' : 1})}} + {{else data.malfStatus > 1}}
    APC Hacked
    {{/if}}
    diff --git a/nano/templates/canister.tmpl b/nano/templates/canister.tmpl index 3bd69a4a9b..dd72102232 100644 --- a/nano/templates/canister.tmpl +++ b/nano/templates/canister.tmpl @@ -4,7 +4,7 @@ Tank Label:
    -
    {{:name}}
    {{:~link('Relabel', 'pencil', {'relabel' : 1}, (canLabel) ? null : 'disabled')}} +
    {{:data.name}}
    {{:helper.link('Relabel', 'pencil', {'relabel' : 1}, (data.canLabel) ? null : 'disabled')}}
    @@ -13,7 +13,7 @@ Tank Pressure:
    - {{:tankPressure}} kPa + {{:data.tankPressure}} kPa
    @@ -22,18 +22,18 @@ Port Status:
    - {{:portConnected ? 'Connected' : 'Disconnected'}} + {{:data.portConnected ? 'Connected' : 'Disconnected'}}

    Holding Tank Status

    -{{if hasHoldingTank}} +{{if data.hasHoldingTank}}
    Tank Label:
    -
    {{:holdingTank.name}}
    {{:~link('Eject', 'eject', {'remove_tank' : 1})}} +
    {{:data.holdingTank.name}}
    {{:helper.link('Eject', 'eject', {'remove_tank' : 1})}}
    @@ -42,7 +42,7 @@ Tank Pressure:
    - {{:holdingTank.tankPressure}} kPa + {{:data.holdingTank.tankPressure}} kPa
    {{else}} @@ -57,17 +57,17 @@ Release Pressure:
    - {{:~displayBar(releasePressure, minReleasePressure, maxReleasePressure)}} + {{:helper.displayBar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure)}}
    - {{:~link('-', null, {'pressure_adj' : -1000}, (releasePressure > minReleasePressure) ? null : 'disabled')}} - {{:~link('-', null, {'pressure_adj' : -100}, (releasePressure > minReleasePressure) ? null : 'disabled')}} - {{:~link('-', null, {'pressure_adj' : -10}, (releasePressure > minReleasePressure) ? null : 'disabled')}} - {{:~link('-', null, {'pressure_adj' : -1}, (releasePressure > minReleasePressure) ? null : 'disabled')}} -
     {{:releasePressure}} kPa 
    - {{:~link('+', null, {'pressure_adj' : 1}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('+', null, {'pressure_adj' : 10}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('+', null, {'pressure_adj' : 100}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('+', null, {'pressure_adj' : 1000}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -1000}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -100}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -10}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -1}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} +
     {{:data.releasePressure}} kPa 
    + {{:helper.link('+', null, {'pressure_adj' : 1}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 10}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 100}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 1000}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}}
    @@ -77,7 +77,7 @@ Release Valve:
    - {{:~link('Open', 'unlocked', {'toggle' : 1}, valveOpen ? 'selected' : null)}}{{:~link('Close', 'locked', {'toggle' : 1}, valveOpen ? null : 'selected')}} + {{:helper.link('Open', 'unlocked', {'toggle' : 1}, data.valveOpen ? 'selected' : null)}}{{:helper.link('Close', 'locked', {'toggle' : 1}, data.valveOpen ? null : 'selected')}}
    diff --git a/nano/templates/chem_dispenser.tmpl b/nano/templates/chem_dispenser.tmpl index c2b5e62ce1..1dd960f9c8 100644 --- a/nano/templates/chem_dispenser.tmpl +++ b/nano/templates/chem_dispenser.tmpl @@ -7,7 +7,7 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm Energy:
    - {{:~displayBar(energy, 0, maxEnergy, 'good', energy + ' Units')}} + {{:helper.displayBar(data.energy, 0, data.maxEnergy, 'good', data.energy + ' Units')}}
    @@ -16,17 +16,17 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm Dispense:
    - {{:~link('5', 'gear', {'amount' : 5}, (amount == 5) ? 'selected' : null)}} - {{:~link('10', 'gear', {'amount' : 10}, (amount == 10) ? 'selected' : null)}} - {{:~link('20', 'gear', {'amount' : 20}, (amount == 20) ? 'selected' : null)}} - {{:~link('30', 'gear', {'amount' : 30}, (amount == 30) ? 'selected' : null)}} - {{:~link('50', 'gear', {'amount' : 50}, (amount == 50) ? 'selected' : null)}} + {{:helper.link('5', 'gear', {'amount' : 5}, (data.amount == 5) ? 'selected' : null)}} + {{:helper.link('10', 'gear', {'amount' : 10}, (data.amount == 10) ? 'selected' : null)}} + {{:helper.link('20', 'gear', {'amount' : 20}, (data.amount == 20) ? 'selected' : null)}} + {{:helper.link('30', 'gear', {'amount' : 30}, (data.amount == 30) ? 'selected' : null)}} + {{:helper.link('50', 'gear', {'amount' : 50}, (data.amount == 50) ? 'selected' : null)}}
     
    - {{if glass}} + {{if data.glass}} Drink Dispenser {{else}} Chemical Dispenser @@ -35,8 +35,8 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm
    - {{for chemicals}} - {{:~link(title, 'circle-arrow-s', commands, null, ~root.glass ? 'fixedLeftWide' : 'fixedLeft')}} + {{for data.chemicals}} + {{:helper.link(value.title, 'circle-arrow-s', value.commands, null, data.glass ? 'fixedLeftWide' : 'fixedLeft')}} {{/for}}
    @@ -44,39 +44,43 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm
     
    - {{if glass}} + {{if data.glass}} Glass {{else}} Beaker {{/if}} Contents
    - {{:~link(glass ? 'Eject Glass' : 'Eject Beaker', 'eject', {'ejectBeaker' : 1}, isBeakerLoaded ? null : 'disabled', 'floatRight')}} + {{:helper.link(data.glass ? 'Eject Glass' : 'Eject Beaker', 'eject', {'ejectBeaker' : 1}, data.isBeakerLoaded ? null : 'disabled', 'floatRight')}}
    -
    +
    - {{if isBeakerLoaded}} - Volume: {{:beakerCurrentVolume}} / {{:beakerMaxVolume}}
    - {{for beakerContents}} - {{:volume}} units of {{:name}}
    - {{else}} + {{if data.isBeakerLoaded}} + Volume: {{:data.beakerCurrentVolume}} / {{:data.beakerMaxVolume}}
    + {{for data.beakerContents}} + {{:value.volume}} units of {{:value.name}}
    + {{empty}} - {{if glass}} - Glass - {{else}} - Beaker - {{/if}} - is empty + {{if data.glass}} + Glass + {{else}} + Beaker + {{/if}} + is empty + {{/for}} {{else}} - No - {{if glass}} - Glass - {{else}} - Beaker - {{/if}} loaded + + No + {{if data.glass}} + Glass + {{else}} + Beaker + {{/if}} + loaded + {{/if}}
    diff --git a/nano/templates/crew_monitor.tmpl b/nano/templates/crew_monitor.tmpl index efa885f20f..f789f6052c 100644 --- a/nano/templates/crew_monitor.tmpl +++ b/nano/templates/crew_monitor.tmpl @@ -2,13 +2,13 @@ Crew Monitoring Computer interface --> - {{for crewmembers}} - {{if sensor_type == 1}} - - {{else sensor_type == 2}} - - {{else sensor_type == 3}} - + {{for data.crewmembers}} + {{if value.sensor_type == 1}} + + {{else value.sensor_type == 2}} + + {{else value.sensor_type == 3}} + {{/if}} {{/for}}
    {{:name}}{{:dead ? "Deceased" : "Living"}}Not Available
    {{:name}}{{:dead ? "Deceased" : "Living"}} ({{:oxy}}/{{:tox}}/{{:fire}}/{{:brute}})Not Available
    {{:name}}{{:dead ? "Deceased" : "Living"}} ({{:oxy}}/{{:tox}}/{{:fire}}/{{:brute}}){{:area}}({{:x}}, {{:y}})
    {{:value.name}}{{:value.dead ? "Deceased" : "Living"}}Not Available
    {{:value.name}}{{:value.dead ? "Deceased" : "Living"}} ({{:value.oxy}}/{{:value.tox}}/{{:value.fire}}/{{:value.brute}})Not Available
    {{:value.name}}{{:value.dead ? "Deceased" : "Living"}} ({{:value.oxy}}/{{:value.tox}}/{{:value.fire}}/{{:value.brute}}){{:value.area}}({{:value.x}}, {{:value.y}})
    \ No newline at end of file diff --git a/nano/templates/cryo.tmpl b/nano/templates/cryo.tmpl index c8c5610aa6..e8302b07df 100644 --- a/nano/templates/cryo.tmpl +++ b/nano/templates/cryo.tmpl @@ -5,60 +5,62 @@ Used In File(s): \code\game\machinery\cryo.dm

    Cryo Cell Status

    - {{if !hasOccupant}} + {{if !data.hasOccupant}}
    Cell Unoccupied
    {{else}}
    - {{:occupant.name}} =>  - {{if occupant.stat == 0}} + {{:data.occupant.name}} =>  + {{if data.occupant.stat == 0}} Conscious - {{else occupant.stat == 1}} + {{else data.occupant.stat == 1}} Unconscious {{else}} DEAD {{/if}}
    - {{if occupant.stat < 2}} + {{if data.occupant.stat < 2}}
    Health:
    - {{if occupant.health >= 0}} - {{:~displayBar(occupant.health, 0, occupant.maxHealth, 'good')}} + {{if data.occupant.health >= 0}} + {{:helper.displayBar(data.occupant.health, 0, data.occupant.maxHealth, 'good')}} {{else}} - {{:~displayBar(occupant.health, 0, occupant.minHealth, 'average alignRight')}} + {{:helper.displayBar(data.occupant.health, 0, data.occupant.minHealth, 'average alignRight')}} {{/if}} -
    {{:~round(occupant.health)}}
    +
    {{:helper.round(data.occupant.health)}}
    => Brute Damage:
    - {{:~displayBar(occupant.bruteLoss, 0, occupant.maxHealth, 'bad')}} -
    {{:~round(occupant.bruteLoss)}}
    + {{:helper.displayBar(data.occupant.bruteLoss, 0, data.occupant.maxHealth, 'bad')}} +
    {{:helper.round(data.occupant.bruteLoss)}}
    => Resp. Damage:
    - {{:~displayBar(occupant.oxyLoss, 0, occupant.maxHealth, 'bad')}} -
    {{:~round(occupant.oxyLoss)}}
    + {{:helper.displayBar(data.occupant.oxyLoss, 0, data.occupant.maxHealth, 'bad')}} +
    {{:helper.round(data.occupant.oxyLoss)}}
    => Toxin Damage:
    - {{:~displayBar(occupant.toxLoss, 0, occupant.maxHealth, 'bad')}} -
    {{:~round(occupant.toxLoss)}}
    + {{:helper.displayBar(data.occupant.toxLoss, 0, data.occupant.maxHealth, 'bad')}} +
    {{:helper.round(data.occupant.toxLoss)}}
    => Burn Severity:
    - {{:~displayBar(occupant.fireLoss, 0, occupant.maxHealth, 'bad')}} -
    {{:~round(occupant.fireLoss)}}
    + {{:helper.displayBar(data.occupant.fireLoss, 0, data.occupant.maxHealth, 'bad')}} +
    {{:helper.round(data.occupant.fireLoss)}}
    {{/if}} {{/if}}
    -
    Cell Temperature:
    - {{:~string('{1} K', cellTemperatureStatus, cellTemperature)}} -
    +
    +
    Cell Temperature:
    + {{:data.cellTemperature}} K +
    +

    Cryo Cell Operation

    @@ -67,10 +69,10 @@ Used In File(s): \code\game\machinery\cryo.dm Cryo Cell Status:
    - {{:~link('On', 'power', {'switchOn' : 1}, isOperating ? 'selected' : null)}}{{:~link('Off', 'close', {'switchOff' : 1}, isOperating ? null : 'selected')}} + {{:helper.link('On', 'power', {'switchOn' : 1}, data.isOperating ? 'selected' : null)}}{{:helper.link('Off', 'close', {'switchOff' : 1}, data.isOperating ? null : 'selected')}}
    - {{:~link('Eject Occupant', 'arrowreturnthick-1-s', {'ejectOccupant' : 1}, hasOccupant ? null : 'disabled')}} + {{:helper.link('Eject Occupant', 'arrowreturnthick-1-s', {'ejectOccupant' : 1}, data.hasOccupant ? null : 'disabled')}}
     
    @@ -79,10 +81,10 @@ Used In File(s): \code\game\machinery\cryo.dm Beaker:
    - {{if isBeakerLoaded}} - {{:beakerLabel ? beakerLabel : 'No label'}}
    - {{if beakerVolume}} - {{:beakerVolume}} units remaining
    + {{if data.isBeakerLoaded}} + {{:data.beakerLabel ? data.beakerLabel : 'No label'}}
    + {{if data.beakerVolume}} + {{:data.beakerVolume}} units remaining
    {{else}} Beaker is empty {{/if}} @@ -91,6 +93,6 @@ Used In File(s): \code\game\machinery\cryo.dm {{/if}}
    - {{:~link('Eject Beaker', 'eject', {'ejectBeaker' : 1}, isBeakerLoaded ? null : 'disabled')}} + {{:helper.link('Eject Beaker', 'eject', {'ejectBeaker' : 1}, data.isBeakerLoaded ? null : 'disabled')}}
    \ No newline at end of file diff --git a/nano/templates/disease_splicer.tmpl b/nano/templates/disease_splicer.tmpl index a7d76fb4f6..0277fbe342 100644 --- a/nano/templates/disease_splicer.tmpl +++ b/nano/templates/disease_splicer.tmpl @@ -1,13 +1,13 @@
    - {{:~link('Close', 'gear', {'close' : 1}, null, 'fixedLeft')}} + {{:helper.link('Close', 'gear', {'close' : 1}, null, 'fixedLeft')}}
    -{{if busy}} +{{if data.busy}}
    The Splicer is currently busy.
    -
    {{:busy}}
    +
    {{:data.busy}}

    Thank you for your patience! @@ -17,7 +17,7 @@

    Virus Dish

    - {{:~link('Eject Dish', 'eject', { 'eject' : 1 }, dish_inserted ? null : 'disabled')}} + {{:helper.link('Eject Dish', 'eject', { 'eject' : 1 }, data.dish_inserted ? null : 'disabled')}}
    @@ -25,26 +25,26 @@ Growth Density:
    - {{:~displayBar(growth, 0, 100, growth >= 50 ? 'good' : growth >= 25 ? 'average' : 'bad', growth + '%' )}} + {{:helper.displayBar(data.growth, 0, 100, (data.growth >= 50) ? 'good' : data.growth >= 25 ? 'average' : 'bad', data.growth + '%' )}}
    - {{if !info}} + {{if !data.info}}
    Symptoms:
    {{/if}}
    - {{if info}} - {{:info}} + {{if data.info}} + {{:data.info}} {{else}} - {{for effects}} + {{for data.effects}}
    - ({{:stage}}) {{:name}} - {{if badness > 1}} + ({{:data.stage}}) {{:data.name}} + {{if data.badness > 1}} Dangerous {{/if}}
    @@ -53,18 +53,18 @@ {{/if}}
    - {{if affected_species && !info}} + {{if data.affected_species && !data.info}}
    Affected Species:
    - {{:affected_species}} + {{:data.affected_species}}
    {{/if}}
    - {{if effects}} + {{if data.effects}}
    CAUTION: Reverse engineering will destroy the viral sample.
    @@ -73,12 +73,12 @@ Reverse Engineering:
    - {{for effects}} - {{:~link(stage, 'transferthick-e-w', { 'grab' : reference })}} + {{for data.effects}} + {{:helper.link(data.stage, 'transferthick-e-w', { 'grab' : data.reference })}} {{/for}}
    - {{:~link('Species', 'transferthick-e-w', { 'affected_species' : 1 })}} + {{:helper.link('Species', 'transferthick-e-w', { 'affected_species' : 1 })}}
    {{/if}} @@ -92,17 +92,17 @@ Memory Buffer:
    - {{if buffer}} - {{:buffer.name}} ({{:buffer.stage}}) + {{if data.buffer}} + {{:data.buffer.name}} ({{:data.buffer.stage}}) {{else}} - {{if species_buffer}} - {{:species_buffer}} + {{if data.species_buffer}} + {{:data.species_buffer}} {{else}} Empty {{/if}} {{/if}}
    - {{:~link('Save To Disk', 'disk', { 'disk' : 1 }, (buffer || species_buffer) ? null : 'disabled')}} - {{:~link('Splice Onto Dish', 'pencil', { 'splice' : 1 }, (buffer || species_buffer) && !info ? null : 'disabled')}} + {{:helper.link('Save To Disk', 'disk', { 'disk' : 1 }, (data.buffer || data.species_buffer) ? null : 'disabled')}} + {{:helper.link('Splice Onto Dish', 'pencil', { 'splice' : 1 }, ((data.buffer || data.species_buffer) && !data.info) ? null : 'disabled')}} {{/if}} diff --git a/nano/templates/dish_incubator.tmpl b/nano/templates/dish_incubator.tmpl index 6ebff27698..ae887e6986 100644 --- a/nano/templates/dish_incubator.tmpl +++ b/nano/templates/dish_incubator.tmpl @@ -1,6 +1,6 @@
    - {{:~link('Close', 'gear', {'close' : '1'}, null, 'fixedLeft')}} + {{:helper.link('Close', 'gear', {'close' : '1'}, null, 'fixedLeft')}}
    @@ -12,12 +12,12 @@ Power:
    - {{:~link('On', 'power', { 'power' : 1 }, !dish_inserted ? 'disabled' : on ? 'selected' : null)}}{{:~link('Off', 'close', { 'power' : 1 }, on ? null : 'selected')}} + {{:helper.link('On', 'power', { 'power' : 1 }, !data.dish_inserted ? 'disabled' : data.on ? 'selected' : null)}}{{:helper.link('Off', 'close', { 'power' : 1 }, data.on ? null : 'selected')}}
    - {{:~link('Add Radiation', 'radiation', {'rad' : 1})}} - {{:~link('Flush System', 'trash', {'flush' : 1}, system_in_use ? null : 'disabled')}} + {{:helper.link('Add Radiation', 'radiation', {'rad' : 1})}} + {{:helper.link('Flush System', 'trash', {'flush' : 1}, data.system_in_use ? null : 'disabled')}}
    @@ -26,7 +26,7 @@ Virus Food:
    - {{:~displayBar(food_supply, 0, 100, 'good', food_supply)}} + {{:helper.displayBar(data.food_supply, 0, 100, 'good', data.food_supply)}}
    @@ -34,9 +34,9 @@ Radiation Level:
    - {{:~displayBar(radiation, 0, 100, radiation >= 50 ? 'bad' : growth >= 25 ? 'average' : 'good')}} + {{:helper.displayBar(data.radiation, 0, 100, (data.radiation >= 50) ? 'bad' : (data.growth >= 25) ? 'average' : 'good')}}
    - {{:~formatNumber(radiation * 10000)}} µSv + {{:helper.formatNumber(data.radiation * 10000)}} µSv
    @@ -44,7 +44,7 @@ Toxicity:
    - {{:~displayBar(toxins, 0, 100, toxins >= 50 ? 'bad' : toxins >= 25 ? 'average' : 'good', toxins + '%')}} + {{:helper.displayBar(data.toxins, 0, 100, (data.toxins >= 50) ? 'bad' : (data.toxins >= 25) ? 'average' : 'good', data.toxins + '%')}}
    @@ -53,17 +53,17 @@

    Chemicals

    - {{:~link('Eject Chemicals', 'eject', { 'ejectchem' : 1 }, chemicals_inserted ? null : 'disabled')}} - {{:~link('Breed Virus', 'circle-arrow-s', { 'virus' : 1 }, can_breed_virus ? null : 'disabled')}} + {{:helper.link('Eject Chemicals', 'eject', { 'ejectchem' : 1 }, data.chemicals_inserted ? null : 'disabled')}} + {{:helper.link('Breed Virus', 'circle-arrow-s', { 'virus' : 1 }, data.can_breed_virus ? null : 'disabled')}}
    -{{if chemicals_inserted}} +{{if data.chemicals_inserted}}
    Volume:
    - {{:~displayBar(chemical_volume, 0, max_chemical_volume, 'good', chemical_volume + ' / ' + max_chemical_volume)}} + {{:helper.displayBar(data.chemical_volume, 0, data.max_chemical_volume, 'good', data.chemical_volume + ' / ' + data.max_chemical_volume)}}
    @@ -71,10 +71,10 @@ Breeding Environment:
    - - {{:!dish_inserted ? 'N/A' : can_breed_virus ? 'Suitable' : 'No hemolytic samples detected'}} + + {{:!data.dish_inserted ? 'N/A' : data.can_breed_virus ? 'Suitable' : 'No hemolytic samples detected'}} - {{if blood_already_infected}} + {{if data.blood_already_infected}}
    CAUTION: Viral infection detected in blood sample. {{/if}} @@ -90,17 +90,17 @@

    Virus Dish

    - {{:~link('Eject Dish', 'eject', {'ejectdish' : 1}, dish_inserted ? null : 'disabled')}} + {{:helper.link('Eject Dish', 'eject', {'ejectdish' : 1}, data.dish_inserted ? null : 'disabled')}}
    -{{if dish_inserted}} - {{if virus}} +{{if data.dish_inserted}} + {{if data.virus}}
    Growth Density:
    - {{:~displayBar(growth, 0, 100, growth >= 50 ? 'good' : growth >= 25 ? 'average' : 'bad', growth + '%' )}} + {{:helper.displayBar(data.growth, 0, 100, (data.growth >= 50) ? 'good' : (data.growth >= 25) ? 'average' : 'bad', data.growth + '%' )}}
    @@ -108,7 +108,7 @@ Infection Rate:
    - {{:analysed ? infection_rate : "Unknown"}} + {{:data.analysed ? data.infection_rate : "Unknown"}}
    {{else}} diff --git a/nano/templates/dna_modifier.tmpl b/nano/templates/dna_modifier.tmpl index b064de84b8..9a2804ba98 100644 --- a/nano/templates/dna_modifier.tmpl +++ b/nano/templates/dna_modifier.tmpl @@ -5,54 +5,54 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm

    Status

    - {{if !hasOccupant}} + {{if !data.hasOccupant}}
    Cell Unoccupied
    {{else}}
    - {{:occupant.name}} =>  - {{if occupant.stat == 0}} + {{:data.occupant.name}} =>  + {{if data.occupant.stat == 0}} Conscious - {{else occupant.stat == 1}} + {{else data.occupant.stat == 1}} Unconscious {{else}} DEAD {{/if}}
    - {{if !occupant.isViableSubject || !occupant.uniqueIdentity || !occupant.structuralEnzymes}} + {{if !data.occupant.isViableSubject || !data.occupant.uniqueIdentity || !data.occupant.structuralEnzymes}}
    The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure.
    - {{else occupant.stat < 2}} + {{else data.occupant.stat < 2}}
    Health:
    - {{if occupant.health >= 0}} - {{:~displayBar(occupant.health, 0, occupant.maxHealth, 'good')}} + {{if data.occupant.health >= 0}} + {{:helper.displayBar(data.occupant.health, 0, data.occupant.maxHealth, 'good')}} {{else}} - {{:~displayBar(occupant.health, 0, occupant.minHealth, 'average alignRight')}} + {{:helper.displayBar(data.occupant.health, 0, data.occupant.minHealth, 'average alignRight')}} {{/if}} -
    {{:~round(occupant.health)}}
    +
    {{:helper.round(data.occupant.health)}}
    Radiation:
    - {{:~displayBar(occupant.radiationLevel, 0, 100, 'average')}} -
    {{:~round(occupant.radiationLevel)}}
    + {{:helper.displayBar(data.occupant.radiationLevel, 0, 100, 'average')}} +
    {{:helper.round(data.occupant.radiationLevel)}}
    Unique Enzymes:
    -
    {{:occupant.uniqueEnzymes ? occupant.uniqueEnzymes : 'Unknown'}}
    +
    {{:data.occupant.uniqueEnzymes ? data.occupant.uniqueEnzymes : 'Unknown'}}
    {{/if}} {{/if}} @@ -61,65 +61,65 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm

    Operations

    - {{:~link('Modify U.I.', 'link', {'selectMenuKey' : 'ui'}, selectedMenuKey == 'ui' ? 'selected' : null)}} - {{:~link('Modify S.E.', 'link', {'selectMenuKey' : 'se'}, selectedMenuKey == 'se' ? 'selected' : null)}} - {{:~link('Transfer Buffers', 'disk', {'selectMenuKey' : 'buffer'}, selectedMenuKey == 'buffer' ? 'selected' : null)}} - {{:~link('Rejuvenators', 'plusthick', {'selectMenuKey' : 'rejuvenators'}, selectedMenuKey == 'rejuvenators' ? 'selected' : null)}} + {{:helper.link('Modify U.I.', 'link', {'selectMenuKey' : 'ui'}, data.selectedMenuKey == 'ui' ? 'selected' : null)}} + {{:helper.link('Modify S.E.', 'link', {'selectMenuKey' : 'se'}, data.selectedMenuKey == 'se' ? 'selected' : null)}} + {{:helper.link('Transfer Buffers', 'disk', {'selectMenuKey' : 'buffer'}, data.selectedMenuKey == 'buffer' ? 'selected' : null)}} + {{:helper.link('Rejuvenators', 'plusthick', {'selectMenuKey' : 'rejuvenators'}, data.selectedMenuKey == 'rejuvenators' ? 'selected' : null)}}
     
    -{{if !selectedMenuKey || selectedMenuKey == 'ui'}} +{{if !data.selectedMenuKey || data.selectedMenuKey == 'ui'}}

    Modify Unique Identifier

    - {{:~displayDNABlocks(occupant.uniqueIdentity, selectedUIBlock, selectedUISubBlock, dnaBlockSize, 'UI')}} + {{:helper.displayDNABlocks(data.occupant.uniqueIdentity, data.selectedUIBlock, data.selectedUISubBlock, data.dnaBlockSize, 'UI')}}
    Target:
    - {{:~link('-', null, {'changeUITarget' : 0}, selectedUITarget > 0 ? null : 'disabled')}} -
     {{:selectedUITargetHex}} 
    - {{:~link('+', null, {'changeUITarget' : 1}, selectedUITarget < 15 ? null : 'disabled')}} + {{:helper.link('-', null, {'changeUITarget' : 0}, (data.selectedUITarget > 0) ? null : 'disabled')}} +
     {{:data.selectedUITargetHex}} 
    + {{:helper.link('+', null, {'changeUITarget' : 1}, (data.selectedUITarget < 15) ? null : 'disabled')}}
    - {{:~link('Irradiate Block', 'radiation', {'pulseUIRadiation' : 1}, !occupant.isViableSubject ? 'disabled' : null)}} + {{:helper.link('Irradiate Block', 'radiation', {'pulseUIRadiation' : 1}, !data.occupant.isViableSubject ? 'disabled' : null)}}
    -{{else selectedMenuKey == 'se'}} +{{else data.selectedMenuKey == 'se'}}

    Modify Structural Enzymes

    - {{:~displayDNABlocks(occupant.structuralEnzymes, selectedSEBlock, selectedSESubBlock, dnaBlockSize, 'SE')}} + {{:helper.displayDNABlocks(data.occupant.structuralEnzymes, data.selectedSEBlock, data.selectedSESubBlock, data.dnaBlockSize, 'SE')}}
    - {{:~link('Irradiate Block', 'radiation', {'pulseSERadiation' : 1}, !occupant.isViableSubject ? 'disabled' : null)}} + {{:helper.link('Irradiate Block', 'radiation', {'pulseSERadiation' : 1}, !data.occupant.isViableSubject ? 'disabled' : null)}}
    -{{else selectedMenuKey == 'buffer'}} +{{else data.selectedMenuKey == 'buffer'}}

    Transfer Buffers

    - {{for buffers}} -

    Buffer {{:#index + 1}}

    + {{for data.buffers}} +

    Buffer {{:(index + 1)}}

    Load Data:
    - {{:~link('Subject U.I.', 'link', {'bufferOption' : 'saveUI', 'bufferId' : (#index + 1)}, !~root.hasOccupant ? 'disabled' : null)}} - {{:~link('Subject U.I. + U.E.', 'link', {'bufferOption' : 'saveUIAndUE', 'bufferId' : (#index + 1)}, !~root.hasOccupant ? 'disabled' : null)}} - {{:~link('Subject S.E.', 'link', {'bufferOption' : 'saveSE', 'bufferId' : (#index + 1)}, !~root.hasOccupant ? 'disabled' : null)}} - {{:~link('From Disk', 'disk', {'bufferOption' : 'loadDisk', 'bufferId' : (#index + 1)}, !~root.hasDisk || !~root.disk.data ? 'disabled' : null)}} + {{:helper.link('Subject U.I.', 'link', {'bufferOption' : 'saveUI', 'bufferId' : (index + 1)}, !data.hasOccupant ? 'disabled' : null)}} + {{:helper.link('Subject U.I. + U.E.', 'link', {'bufferOption' : 'saveUIAndUE', 'bufferId' : (index + 1)}, !data.hasOccupant ? 'disabled' : null)}} + {{:helper.link('Subject S.E.', 'link', {'bufferOption' : 'saveSE', 'bufferId' : (index + 1)}, !data.hasOccupant ? 'disabled' : null)}} + {{:helper.link('From Disk', 'disk', {'bufferOption' : 'loadDisk', 'bufferId' : (index + 1)}, (!data.hasDisk || !data.disk.data) ? 'disabled' : null)}}
    - {{if data}} + {{if value.data}}
    Label:
    - {{:~link(label, 'document-b', {'bufferOption' : 'changeLabel', 'bufferId' : (#parent.index + 1)})}} + {{:helper.link(value.label, 'document-b', {'bufferOption' : 'changeLabel', 'bufferId' : (index + 1)})}}
    @@ -127,7 +127,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Subject:
    - {{:owner ? owner : 'Unknown'}} + {{:value.owner ? value.owner : 'Unknown'}}
    @@ -135,8 +135,8 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Stored Data:
    - {{:data == 'ui' ? 'Unique Identifiers' : 'Structural Enzymes'}} - {{:ue ? ' + Unique Enzymes' : ''}} + {{:value.data == 'ui' ? 'Unique Identifiers' : 'Structural Enzymes'}} + {{:value.ue ? ' + Unique Enzymes' : ''}}
    {{else}} @@ -151,11 +151,11 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Options:
    - {{:~link('Clear', 'trash', {'bufferOption' : 'clear', 'bufferId' : (#index + 1)}, !data ? 'disabled' : null)}} - {{:~link('Injector', ~root.isInjectorReady ? 'pencil' : 'clock', {'bufferOption' : 'createInjector', 'bufferId' : (#index + 1)}, !~root.isInjectorReady || !data ? 'disabled' : null)}} - {{:~link('Block Injector', ~root.isInjectorReady ? 'pencil' : 'clock', {'bufferOption' : 'createInjector', 'bufferId' : (#index + 1), 'createBlockInjector' : 1}, !~root.isInjectorReady || !data ? 'disabled' : null)}} - {{:~link('Transfer', 'radiation', {'bufferOption' : 'transfer', 'bufferId' : (#index + 1)}, !~root.hasOccupant || !data ? 'disabled' : null)}} - {{:~link('Save To Disk', 'disk', {'bufferOption' : 'saveDisk', 'bufferId' : (#index + 1)}, !data || !~root.hasDisk ? 'disabled' : null)}} + {{:helper.link('Clear', 'trash', {'bufferOption' : 'clear', 'bufferId' : (index + 1)}, !value.data ? 'disabled' : null)}} + {{:helper.link('Injector', data.isInjectorReady ? 'pencil' : 'clock', {'bufferOption' : 'createInjector', 'bufferId' : (index + 1)}, (!data.isInjectorReady || !value.data) ? 'disabled' : null)}} + {{:helper.link('Block Injector', data.isInjectorReady ? 'pencil' : 'clock', {'bufferOption' : 'createInjector', 'bufferId' : (index + 1), 'createBlockInjector' : 1}, (!data.isInjectorReady || !value.data) ? 'disabled' : null)}} + {{:helper.link('Transfer', 'radiation', {'bufferOption' : 'transfer', 'bufferId' : (index + 1)}, (!data.hasOccupant || !value.data) ? 'disabled' : null)}} + {{:helper.link('Save To Disk', 'disk', {'bufferOption' : 'saveDisk', 'bufferId' : (index + 1)}, (!value.data || !data.hasDisk) ? 'disabled' : null)}}
    @@ -163,14 +163,14 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm

    Data Disk

    - {{if hasDisk}} - {{if disk.data}} + {{if data.hasDisk}} + {{if data.disk.data}}
    Label:
    - {{:disk.label ? disk.label : 'No Label'}} + {{:data.disk.label ? data.disk.label : 'No Label'}}
    @@ -178,7 +178,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Subject:
    - {{:disk.owner ? disk.owner : 'Unknown'}} + {{:data.disk.owner ? data.disk.owner : 'Unknown'}}
    @@ -186,8 +186,8 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Stored Data:
    - {{:disk.data == 'ui' ? 'Unique Identifiers' : 'Structural Enzymes'}} - {{:disk.ue ? ' + Unique Enzymes' : ''}} + {{:data.disk.data == 'ui' ? 'Unique Identifiers' : 'Structural Enzymes'}} + {{:data.disk.ue ? ' + Unique Enzymes' : ''}}
    {{else}} @@ -206,26 +206,26 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{/if}}
    - Options: + Options:
    - {{:~link('Wipe Disk', 'trash', {'bufferOption' : 'wipeDisk'}, !hasDisk || !disk.data ? 'disabled' : null)}} - {{:~link('Eject Disk', 'eject', {'bufferOption' : 'ejectDisk'}, !hasDisk ? 'disabled' : null)}} + {{:helper.link('Wipe Disk', 'trash', {'bufferOption' : 'wipeDisk'}, (!data.hasDisk || !data.disk.data) ? 'disabled' : null)}} + {{:helper.link('Eject Disk', 'eject', {'bufferOption' : 'ejectDisk'}, !data.hasDisk ? 'disabled' : null)}}
    -{{else selectedMenuKey == 'rejuvenators'}} +{{else data.selectedMenuKey == 'rejuvenators'}}

    Rejuvenators

    Inject:
    - {{:~link('5', 'pencil', {'injectRejuvenators' : 5}, !hasOccupant || !beakerVolume ? 'disabled' : null)}} - {{:~link('10', 'pencil', {'injectRejuvenators' : 10}, !hasOccupant || !beakerVolume ? 'disabled' : null)}} - {{:~link('20', 'pencil', {'injectRejuvenators' : 20}, !hasOccupant || !beakerVolume ? 'disabled' : null)}} - {{:~link('30', 'pencil', {'injectRejuvenators' : 30}, !hasOccupant || !beakerVolume ? 'disabled' : null)}} - {{:~link('50', 'pencil', {'injectRejuvenators' : 50}, !hasOccupant || !beakerVolume ? 'disabled' : null)}} + {{:helper.link('5', 'pencil', {'injectRejuvenators' : 5}, (!data.hasOccupant || !data.beakerVolume) ? 'disabled' : null)}} + {{:helper.link('10', 'pencil', {'injectRejuvenators' : 10}, (!data.hasOccupant || !data.beakerVolume) ? 'disabled' : null)}} + {{:helper.link('20', 'pencil', {'injectRejuvenators' : 20}, (!data.hasOccupant || !data.beakerVolume) ? 'disabled' : null)}} + {{:helper.link('30', 'pencil', {'injectRejuvenators' : 30}, (!data.hasOccupant || !data.beakerVolume) ? 'disabled' : null)}} + {{:helper.link('50', 'pencil', {'injectRejuvenators' : 50}, (!data.hasOccupant || !data.beakerVolume) ? 'disabled' : null)}}
     
    @@ -234,10 +234,10 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Beaker:
    - {{if isBeakerLoaded}} - {{:beakerLabel ? beakerLabel : 'No label'}}
    - {{if beakerVolume}} - {{:beakerVolume}} units remaining
    + {{if data.isBeakerLoaded}} + {{:data.beakerLabel ? data.beakerLabel : 'No label'}}
    + {{if data.beakerVolume}} + {{:data.beakerVolume}} units remaining
    {{else}} Beaker is empty {{/if}} @@ -246,23 +246,23 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm {{/if}}
    - {{:~link('Eject Beaker', 'eject', {'ejectBeaker' : 1}, isBeakerLoaded ? null : 'disabled')}} + {{:helper.link('Eject Beaker', 'eject', {'ejectBeaker' : 1}, data.isBeakerLoaded ? null : 'disabled')}}
    {{/if}}
     
    -{{if !selectedMenuKey || selectedMenuKey == 'ui' || selectedMenuKey == 'se'}} +{{if !data.selectedMenuKey || data.selectedMenuKey == 'ui' || data.selectedMenuKey == 'se'}}

    Radiation Emitter Settings

    Intensity:
    - {{:~link('-', null, {'radiationIntensity' : 0}, radiationIntensity > 1 ? null : 'disabled')}} -
     {{:radiationIntensity}} 
    - {{:~link('+', null, {'radiationIntensity' : 1}, radiationIntensity < 10 ? null : 'disabled')}} + {{:helper.link('-', null, {'radiationIntensity' : 0}, (data.radiationIntensity > 1) ? null : 'disabled')}} +
     {{:data.radiationIntensity}} 
    + {{:helper.link('+', null, {'radiationIntensity' : 1}, (data.radiationIntensity < 10) ? null : 'disabled')}}
    @@ -270,9 +270,9 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Duration:
    - {{:~link('-', null, {'radiationDuration' : 0}, radiationDuration > 2 ? null : 'disabled')}} -
     {{:radiationDuration}} 
    - {{:~link('+', null, {'radiationDuration' : 1}, radiationDuration < 20 ? null : 'disabled')}} + {{:helper.link('-', null, {'radiationDuration' : 0}, (data.radiationDuration > 2) ? null : 'disabled')}} +
     {{:data.radiationDuration}} 
    + {{:helper.link('+', null, {'radiationDuration' : 1}, (data.radiationDuration < 20) ? null : 'disabled')}}
    @@ -280,7 +280,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm  
    - {{:~link('Pulse Radiation', 'radiation', {'pulseRadiation' : 1}, !hasOccupant ? 'disabled' : null)}} + {{:helper.link('Pulse Radiation', 'radiation', {'pulseRadiation' : 1}, !data.hasOccupant ? 'disabled' : null)}}
    {{/if}} @@ -294,7 +294,7 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Occupant:
    - {{:~link('Eject Occupant', 'eject', {'ejectOccupant' : 1}, locked || !hasOccupant || irradiating ? 'disabled' : null)}} + {{:helper.link('Eject Occupant', 'eject', {'ejectOccupant' : 1}, data.locked || !data.hasOccupant || data.irradiating ? 'disabled' : null)}}
    @@ -302,16 +302,16 @@ Used In File(s): D:\Development\SS13-BS12\code\game\dna\dna_modifier.dm Door Lock:
    - {{:~link('Engaged', 'locked', {'toggleLock' : 1}, locked ? 'selected' : !hasOccupant ? 'disabled' : null)}} - {{:~link('Disengaged', 'unlocked', {'toggleLock' : 1}, !locked ? 'selected' : irradiating ? 'disabled' : null)}} + {{:helper.link('Engaged', 'locked', {'toggleLock' : 1}, data.locked ? 'selected' : !data.hasOccupant ? 'disabled' : null)}} + {{:helper.link('Disengaged', 'unlocked', {'toggleLock' : 1}, !data.locked ? 'selected' : data.irradiating ? 'disabled' : null)}}
    -{{if irradiating}} +{{if data.irradiating}}

    Irradiating Subject

    -

    For {{:irradiating}} seconds.

    +

    For {{:data.irradiating}} seconds.

    {{/if}} diff --git a/nano/templates/docking_airlock_console.tmpl b/nano/templates/docking_airlock_console.tmpl index b19d13a3a6..24e66574cf 100644 --- a/nano/templates/docking_airlock_console.tmpl +++ b/nano/templates/docking_airlock_console.tmpl @@ -3,53 +3,53 @@
    Docking Port Status:
    - {{if docking_status == "docked"}} + {{if data.docking_status == "docked"}}
    - {{if !override_enabled}} + {{if !data.override_enabled}} DOCKED {{else}} DOCKED-OVERRIDE ENABLED {{/if}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}}
    - {{else docking_status == "docking"}} + {{else data.docking_status == "docking"}}
    - {{if !override_enabled}} + {{if !data.override_enabled}} DOCKING {{else}} DOCKING-OVERRIDE ENABLED {{/if}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}}
    - {{else docking_status == "undocking"}} + {{else data.docking_status == "undocking"}}
    - {{if !override_enabled}} + {{if !data.override_enabled}} UNDOCKING {{else}} UNDOCKING-OVERRIDE ENABLED {{/if}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}}
    - {{else docking_status == "undocked"}} + {{else data.docking_status == "undocked"}}
    - {{if !override_enabled}} + {{if !data.override_enabled}} NOT IN USE {{else}} OVERRIDE ENABLED {{/if}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}}
    {{else}} ERROR - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}} {{/if}} @@ -59,9 +59,9 @@ Chamber Pressure:
    - {{:~displayBar(chamber_pressure, 0, 200, chamber_pressure < 80 || chamber_pressure > 120 ? 'bad' : chamber_pressure < 95 || chamber_pressure > 110 ? 'average' : 'good')}} + {{:helper.displayBar(data.chamber_pressure, 0, 200, (data.chamber_pressure < 80 || data.chamber_pressure > 120) ? 'bad' : (data.chamber_pressure < 95 || data.chamber_pressure > 110) ? 'average' : 'good')}}
    - {{:chamber_pressure}} kPa + {{:data.chamber_pressure}} kPa
    @@ -69,28 +69,28 @@
    - {{:~link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext'}, (processing || airlock_disabled) ? 'disabled' : null)}} - {{:~link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int'}, (processing || airlock_disabled) ? 'disabled' : null)}} + {{:helper.link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext'}, (data.processing || data.airlock_disabled) ? 'disabled' : null)}} + {{:helper.link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int'}, (data.processing || data.airlock_disabled) ? 'disabled' : null)}}
    - {{if airlock_disabled}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, 'disabled', null)}} - {{:~link('Force interior door', 'alert', {'command' : 'force_int'}, 'disabled', null)}} + {{if data.airlock_disabled}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_ext'}, 'disabled', null)}} + {{:helper.link('Force interior door', 'alert', {'command' : 'force_int'}, 'disabled', null)}} {{else}} - {{if interior_status.state == "open"}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, 'redBackground')}} + {{if data.interior_status.state == "open"}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, 'redBackground')}} {{else}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, processing ? 'yellowBackground' : null)}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_ext'}, null, data.processing ? 'yellowBackground' : null)}} {{/if}} - {{if exterior_status.state == "open"}} - {{:~link('Force interior door', 'alert', {'command' : 'force_int'}, null, 'redBackground')}} + {{if data.exterior_status.state == "open"}} + {{:helper.link('Force interior door', 'alert', {'command' : 'force_int'}, null, 'redBackground')}} {{else}} - {{:~link('Force interior door', 'alert', {'command' : 'force_int'}, null, processing ? 'yellowBackground' : null)}} + {{:helper.link('Force interior door', 'alert', {'command' : 'force_int'}, null, data.processing ? 'yellowBackground' : null)}} {{/if}} {{/if}}
    - {{:~link('Abort', 'cancel', {'command' : 'abort'}, (processing && !airlock_disabled) ? null : 'disabled', (processing && !airlock_disabled) ? 'redBackground' : null)}} + {{:helper.link('Abort', 'cancel', {'command' : 'abort'}, (data.processing && !airlock_disabled) ? null : 'disabled', (data.processing && !data.airlock_disabled) ? 'redBackground' : null)}}
    \ No newline at end of file diff --git a/nano/templates/door_access_console.tmpl b/nano/templates/door_access_console.tmpl index c755d7c806..2e5c81cb7e 100644 --- a/nano/templates/door_access_console.tmpl +++ b/nano/templates/door_access_console.tmpl @@ -4,7 +4,7 @@ Exterior Door Status:
    - {{if exterior_status.state == "closed"}} + {{if data.exterior_status.state == "closed"}} Locked {{else}} Open @@ -16,7 +16,7 @@ Interior Door Status:
    - {{if interior_status.state == "closed"}} + {{if data.interior_status.state == "closed"}} Locked {{else}} Open @@ -27,15 +27,15 @@
    - {{if exterior_status.state == "open"}} - {{:~link('Lock Exterior Door', 'alert', {'command' : 'force_ext'}, processing ? 'disabled' : null)}} + {{if data.exterior_status.state == "open"}} + {{:helper.link('Lock Exterior Door', 'alert', {'command' : 'force_ext'}, data.processing ? 'disabled' : null)}} {{else}} - {{:~link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext_door'}, processing ? 'disabled' : null)}} + {{:helper.link('Cycle to Exterior', 'arrowthickstop-1-w', {'command' : 'cycle_ext_door'}, data.processing ? 'disabled' : null)}} {{/if}} - {{if interior_status.state == "open"}} - {{:~link('Lock Interior Door', 'alert', {'command' : 'force_int'}, processing ? 'disabled' : null)}} + {{if data.interior_status.state == "open"}} + {{:helper.link('Lock Interior Door', 'alert', {'command' : 'force_int'}, data.processing ? 'disabled' : null)}} {{else}} - {{:~link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int_door'}, processing ? 'disabled' : null)}} + {{:helper.link('Cycle to Interior', 'arrowthickstop-1-e', {'command' : 'cycle_int_door'}, data.processing ? 'disabled' : null)}} {{/if}}
    diff --git a/nano/templates/engines_control.tmpl b/nano/templates/engines_control.tmpl index 505150964a..2e4816a3ac 100644 --- a/nano/templates/engines_control.tmpl +++ b/nano/templates/engines_control.tmpl @@ -1,17 +1,17 @@
    - {{:~link('Overall status', 'note', {'state' :'status'}, null, state == 'status' ? 'selected' : null)}} - {{:~link('Details', 'note', {'state' : 'engines'}, null, state == 'engines' ? 'selected' : null)}} + {{:helper.link('Overall status', 'note', {'state' :'status'}, null, state == 'status' ? 'selected' : null)}} + {{:helper.link('Details', 'note', {'state' : 'engines'}, null, state == 'engines' ? 'selected' : null)}}
    -{{if state == "engines"}} - {{if engines_info}} - {{for engines_info}} +{{if data.state == "engines"}} + {{if data.engines_info}} + {{for data.engines_info}}
    - Engine #{{:#index + 1}}: + Engine #{{:(index + 1)}}:
    - {{:~link(eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : eng_reference }, null, eng_on ? 'selected' : null)}} + {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}}
    @@ -20,7 +20,7 @@ Type:
    - {{:eng_type}} + {{:value.eng_type}}
    @@ -28,8 +28,8 @@ Status:
    - {{:eng_on ? 'Online' : 'Offline'}}
    - {{:eng_status}} + {{:value.eng_on ? 'Online' : 'Offline'}}
    + {{:value.eng_status}}
    @@ -37,7 +37,7 @@ Current thrust:
    - {{:eng_thrust}} + {{:value.eng_thrust}}
    @@ -45,25 +45,25 @@ Thrust limit:
    - {{:~link('', 'circle-plus', { 'limit' : 0.1, 'engine' : eng_reference }, null, null)}} - {{:~link(eng_thrust_limiter+'%', null, { 'set_limit' : 1, 'engine' : eng_reference }, null, null)}} - {{:~link('', 'circle-minus', { 'limit' : -0.1, 'engine' : eng_reference }, null, null)}} + {{:helper.link('', 'circle-plus', { 'limit' : 0.1, 'engine' : value.eng_reference }, null, null)}} + {{:helper.link(value.eng_thrust_limiter+'%', null, { 'set_limit' : 1, 'engine' : value.eng_reference }, null, null)}} + {{:helper.link('', 'circle-minus', { 'limit' : -0.1, 'engine' : value.eng_reference }, null, null)}}
    {{/for}} {{/if}} {{/if}} -{{if state == "status"}} -{{if engines_info}} - {{for engines_info}} +{{if data.state == "status"}} + {{if data.engines_info}} + {{for data.engines_info}}
    - Engine #{{:#index + 1}}: + Engine #{{:(index + 1)}}:
    - {{:~link(eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : eng_reference }, null, eng_on ? 'selected' : null)}} + {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}}
    @@ -73,9 +73,9 @@ Thrust limit:
    - {{:eng_thrust}} + {{:value.eng_thrust}}
    - {{:eng_thrust_limiter}}% + {{:value.eng_thrust_limiter}}%
    diff --git a/nano/templates/escape_pod_berth_console.tmpl b/nano/templates/escape_pod_berth_console.tmpl index 756ab7e656..8ed01f540d 100644 --- a/nano/templates/escape_pod_berth_console.tmpl +++ b/nano/templates/escape_pod_berth_console.tmpl @@ -4,17 +4,17 @@ Escape Pod Status:
    - {{if docking_status == "docked"}} - {{if armed}} + {{if data.docking_status == "docked"}} + {{if data.armed}} ARMED {{else}} SYSTEMS OK {{/if}} - {{else docking_status == "undocking"}} + {{else data.docking_status == "undocking"}} EJECTING-STAND CLEAR! - {{else docking_status == "undocked"}} + {{else data.docking_status == "undocked"}} POD EJECTED - {{else docking_status == "docking"}} + {{else data.docking_status == "docking"}} INITIALIZING... {{else}} ERROR @@ -25,17 +25,17 @@
    - {{if armed}} - {{if docking_status == "docked"}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', null)}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{if data.armed}} + {{if data.docking_status == "docked"}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}} {{else}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', override_enabled? 'redBackground' : null)}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : 'yellowBackground')}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : 'yellowBackground')}} {{/if}} {{else}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, 'disabled', null)}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, 'disabled', null)}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_door'}, 'disabled', null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, 'disabled', null)}} {{/if}}
    diff --git a/nano/templates/escape_pod_console.tmpl b/nano/templates/escape_pod_console.tmpl index 90346af30e..f476c6c735 100644 --- a/nano/templates/escape_pod_console.tmpl +++ b/nano/templates/escape_pod_console.tmpl @@ -4,17 +4,17 @@ Escape Pod Status:
    - {{if docking_status == "docked"}} - {{if is_armed}} + {{if data.docking_status == "docked"}} + {{if data.is_armed}} ARMED {{else}} SYSTEMS OK {{/if}} - {{else docking_status == "undocking"}} + {{else data.docking_status == "undocking"}} EJECTING - {{else docking_status == "undocked"}} + {{else data.docking_status == "undocked"}} POD EJECTED - {{else docking_status == "docking"}} + {{else data.docking_status == "docking"}} DOCKING {{else}} ERROR @@ -28,40 +28,40 @@ Docking Hatch:
    - {{if docking_status == "docked"}} - {{if door_state == "open"}} + {{if data.docking_status == "docked"}} + {{if data.door_state == "open"}} OPEN - {{else door_state == "closed"}} + {{else data.door_state == "closed"}} CLOSED {{else}} ERROR {{/if}} - {{else docking_status == "docking"}} - {{if door_state == "open"}} + {{else data.docking_status == "docking"}} + {{if data.door_state == "open"}} OPEN - {{else door_state == "closed" && door_lock == "locked"}} + {{else data.door_state == "closed" && data.door_lock == "locked"}} SECURED - {{else door_state == "closed" && door_lock == "unlocked"}} + {{else data.door_state == "closed" && data.door_lock == "unlocked"}} UNSECURED {{else}} ERROR {{/if}} - {{else docking_status == "undocking"}} - {{if door_state == "open"}} + {{else data.docking_status == "undocking"}} + {{if data.door_state == "open"}} OPEN - {{else door_state == "closed" && door_lock == "locked"}} + {{else data.door_state == "closed" && data.door_lock == "locked"}} SECURED - {{else door_state == "closed" && door_lock == "unlocked"}} + {{else data.door_state == "closed" && data.door_lock == "unlocked"}} UNSECURED {{else}} ERROR {{/if}} - {{else docking_status == "undocked"}} - {{if door_state == "open"}} + {{else data.docking_status == "undocked"}} + {{if data.door_state == "open"}} OPEN - {{else door_state == "closed" && door_lock == "locked"}} + {{else data.door_state == "closed" && data.door_lock == "locked"}} SECURED - {{else door_state == "closed" && door_lock == "unlocked"}} + {{else data.door_state == "closed" && data.door_lock == "unlocked"}} UNSECURED {{else}} ERROR @@ -75,12 +75,12 @@
    - {{if docking_status == "docked"}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', null)}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : null)}} + {{if data.docking_status == "docked"}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : null)}} {{else}} - {{:~link('Force exterior door', 'alert', {'command' : 'force_door'}, override_enabled ? null : 'disabled', override_enabled? 'redBackground' : null)}} - {{:~link('Override', 'alert', {'command' : 'toggle_override'}, null, override_enabled ? 'redBackground' : 'yellowBackground')}} + {{:helper.link('Force exterior door', 'alert', {'command' : 'force_door'}, data.override_enabled ? null : 'disabled', data.override_enabled? 'redBackground' : null)}} + {{:helper.link('Override', 'alert', {'command' : 'toggle_override'}, null, data.override_enabled ? 'redBackground' : 'yellowBackground')}} {{/if}}
    @@ -88,8 +88,8 @@
    - {{:~link('ARM', 'alert', {'command' : 'manual_arm'}, is_armed ? 'disabled' : null, is_armed ? 'redBackground' : 'yellowBackground')}} - {{:~link('MANUAL EJECT', 'alert', {'command' : 'force_launch'}, can_force ? null : 'disabled', can_force ? 'yellowBackground' : null)}} + {{:helper.link('ARM', 'alert', {'command' : 'manual_arm'}, data.is_armed ? 'disabled' : null, data.is_armed ? 'redBackground' : 'yellowBackground')}} + {{:helper.link('MANUAL EJECT', 'alert', {'command' : 'force_launch'}, data.can_force ? null : 'disabled', data.can_force ? 'yellowBackground' : null)}}
    diff --git a/nano/templates/escape_shuttle_control_console.tmpl b/nano/templates/escape_shuttle_control_console.tmpl index ad2d682ade..ecc8476b59 100644 --- a/nano/templates/escape_shuttle_control_console.tmpl +++ b/nano/templates/escape_shuttle_control_console.tmpl @@ -1,7 +1,7 @@

    Shuttle Status

    - {{:shuttle_status}} + {{:data.shuttle_status}}
    @@ -10,11 +10,11 @@ Bluespace Drive:
    - {{if shuttle_state == "idle"}} + {{if data.shuttle_state == "idle"}} IDLE - {{else shuttle_state == "warmup"}} + {{else data.shuttle_state == "warmup"}} SPINNING UP - {{else shuttle_state == "in_transit"}} + {{else data.shuttle_state == "in_transit"}} ENGAGED {{else}} ERROR @@ -22,28 +22,28 @@
    -{{if has_docking}} +{{if data.has_docking}}
    Docking Status:
    - {{if docking_status == "docked"}} + {{if data.docking_status == "docked"}} DOCKED - {{else docking_status == "docking"}} - {{if !docking_override}} + {{else data.docking_status == "docking"}} + {{if !data.docking_override}} DOCKING {{else}} DOCKING-MANUAL {{/if}} - {{else docking_status == "undocking"}} - {{if !docking_override}} + {{else data.docking_status == "undocking"}} + {{if !data.docking_override}} UNDOCKING {{else}} UNDOCKING-MANUAL {{/if}} - {{else docking_status == "undocked"}} + {{else data.docking_status == "undocked"}} UNDOCKED {{else}} ERROR @@ -55,7 +55,7 @@

    Shuttle Authorization

    - {{if has_auth}} + {{if data.has_auth}} Access Granted. Shuttle controls unlocked. {{else}} Additional authorization required. @@ -63,8 +63,8 @@
    - {{for auth_list}} - {{:~link(auth_name, 'eject', {'auth' : auth_hash}, null, 'itemContentWide')}} + {{for data.auth_list}} + {{:helper.link(value.auth_name, 'eject', {'auth' : value.auth_hash}, null, 'itemContentWide')}} {{/for}}
    @@ -72,9 +72,9 @@
    - {{:~link('Launch Shuttle', 'arrowthickstop-1-e', {'move' : '1'}, can_launch? null : 'disabled' , null)}} - {{:~link('Cancel Launch', 'cancel', {'cancel' : '1'}, can_cancel? null : 'disabled' , null)}} - {{:~link('Force Launch', 'alert', {'force' : '1'}, can_force? null : 'disabled' , can_force? 'redBackground' : null)}} + {{:helper.link('Launch Shuttle', 'arrowthickstop-1-e', {'move' : '1'}, data.can_launch? null : 'disabled' , null)}} + {{:helper.link('Cancel Launch', 'cancel', {'cancel' : '1'}, data.can_cancel? null : 'disabled' , null)}} + {{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force? null : 'disabled' , data.can_force? 'redBackground' : null)}}
    \ No newline at end of file diff --git a/nano/templates/freezer.tmpl b/nano/templates/freezer.tmpl index 9e1c13edae..d45fa135b6 100644 --- a/nano/templates/freezer.tmpl +++ b/nano/templates/freezer.tmpl @@ -3,7 +3,7 @@ Status:
    - {{:~link('On', 'power', {'toggleStatus' : 1}, on ? 'selected' : null)}}{{:~link('Off', 'close', {'toggleStatus' : 1}, on ? null : 'selected')}} + {{:helper.link('On', 'power', {'toggleStatus' : 1}, data.on ? 'selected' : null)}}{{:helper.link('Off', 'close', {'toggleStatus' : 1}, data.on ? null : 'selected')}}
    @@ -12,7 +12,7 @@ Gas Pressure:
    - {{:gasPressure}} kPa + {{:data.gasPressure}} kPa
    @@ -22,9 +22,9 @@ Current:
    - {{:~displayBar(gasTemperature, minGasTemperature, maxGasTemperature, gasTemperatureClass)}} + {{:helper.displayBar(data.gasTemperature, data.minGasTemperature, data.maxGasTemperature, data.gasTemperatureClass)}}
    - {{:gasTemperature}} K + {{:data.gasTemperature}} K
    @@ -34,15 +34,15 @@ Target:
    - {{:~displayBar(targetGasTemperature, minGasTemperature, maxGasTemperature)}} + {{:helper.displayBar(data.targetGasTemperature, data.minGasTemperature, data.maxGasTemperature)}}
    - {{:~link('-', null, {'temp' : -100}, (targetGasTemperature > minGasTemperature) ? null : 'disabled')}} - {{:~link('-', null, {'temp' : -10}, (targetGasTemperature > minGasTemperature) ? null : 'disabled')}} - {{:~link('-', null, {'temp' : -1}, (targetGasTemperature > minGasTemperature) ? null : 'disabled')}} -
     {{:targetGasTemperature}} K 
    - {{:~link('+', null, {'temp' : 1}, (targetGasTemperature < maxGasTemperature) ? null : 'disabled')}} - {{:~link('+', null, {'temp' : 10}, (targetGasTemperature < maxGasTemperature) ? null : 'disabled')}} - {{:~link('+', null, {'temp' : 100}, (targetGasTemperature < maxGasTemperature) ? null : 'disabled')}} + {{:helper.link('-', null, {'temp' : -100}, (data.targetGasTemperature > data.minGasTemperature) ? null : 'disabled')}} + {{:helper.link('-', null, {'temp' : -10}, (data.targetGasTemperature > data.minGasTemperature) ? null : 'disabled')}} + {{:helper.link('-', null, {'temp' : -1}, (data.targetGasTemperature > data.minGasTemperature) ? null : 'disabled')}} +
     {{:data.targetGasTemperature}} K 
    + {{:helper.link('+', null, {'temp' : 1}, (data.targetGasTemperature < data.maxGasTemperature) ? null : 'disabled')}} + {{:helper.link('+', null, {'temp' : 10}, (data.targetGasTemperature < data.maxGasTemperature) ? null : 'disabled')}} + {{:helper.link('+', null, {'temp' : 100}, (data.targetGasTemperature < data.maxGasTemperature) ? null : 'disabled')}}
    diff --git a/nano/templates/gas_pump.tmpl b/nano/templates/gas_pump.tmpl index 6adcf0be44..a26d88a2cf 100644 --- a/nano/templates/gas_pump.tmpl +++ b/nano/templates/gas_pump.tmpl @@ -3,7 +3,7 @@ Power:
    - {{:~link(on? 'On' : 'Off', null, {'power' : 1})}} + {{:helper.link(data.on? 'On' : 'Off', null, {'power' : 1})}}
    @@ -13,9 +13,9 @@
    - {{:~link('MAX', null, {'set_press' : 'max'}, null)}} - {{:~link('SET', null, {'set_press' : 'set'}, null)}} -
     {{:(pressure_set/100)}} kPa 
    + {{:helper.link('MAX', null, {'set_press' : 'max'}, null)}} + {{:helper.link('SET', null, {'set_press' : 'set'}, null)}} +
     {{:(data.pressure_set/100)}} kPa 
    @@ -25,9 +25,9 @@ Load:
    - {{:~displayBar(last_power_draw, 0, max_power_draw, (last_power_draw < max_power_draw - 5) ? 'good' : 'average')}} + {{:helper.displayBar(data.last_power_draw, 0, data.max_power_draw, (data.last_power_draw < data.max_power_draw - 5) ? 'good' : 'average')}}
    - {{:last_power_draw}} W + {{:data.last_power_draw}} W
    @@ -38,7 +38,7 @@
    - {{:(last_flow_rate/10)}} L/s + {{:(data.last_flow_rate/10)}} L/s
    \ No newline at end of file diff --git a/nano/templates/geoscanner.tmpl b/nano/templates/geoscanner.tmpl index d3205e2ebe..351ddc4cf7 100644 --- a/nano/templates/geoscanner.tmpl +++ b/nano/templates/geoscanner.tmpl @@ -6,10 +6,10 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan

    Machine Status

    - {{:~link(scanning ? 'Halt Scan' : 'Begin Scan', 'signal-diag', {'scanItem' : 1}, null)}} + {{:helper.link(data.scanning ? 'Halt Scan' : 'Begin Scan', 'signal-diag', {'scanItem' : 1}, null)}}
    - {{:~link('Eject item', 'eject', {'ejectItem' : 1}, (scanned_item && !scanning) ? null : 'disabled')}} + {{:helper.link('Eject item', 'eject', {'ejectItem' : 1}, (data.scanned_item && !data.scanning) ? null : 'disabled')}}
    @@ -17,8 +17,8 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Item:
    - {{if scanned_item}} - {{:scanned_item}} + {{if data.scanned_item}} + {{:data.scanned_item}} {{else}} No item inserted {{/if}} @@ -27,8 +27,8 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Heuristic analysis:
    - {{if scanned_item_desc}} - {{:scanned_item_desc}} + {{if data.scanned_item_desc}} + {{:data.scanned_item_desc}} {{/if}}
    @@ -38,11 +38,11 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Scan progress:
    - {{:~displayBar(scan_progress, 0, 100, 'good')}} - {{:scan_progress}} % + {{:helper.displayBar(data.scan_progress, 0, 100, 'good')}} + {{:data.scan_progress}} %
    - {{if scan_progress >= 100}} + {{if data.scan_progress >= 100}} Scan completed successfully. {{/if}}
    @@ -50,11 +50,11 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Vacuum seal integrity:
    - {{:~displayBar(scanner_seal_integrity, 0, 100, (scanner_seal_integrity < 66 ? (scanner_seal_integrity < 33 ? 'bad' : 'average') : 'good'))}} - {{:scanner_seal_integrity}} % + {{:helper.displayBar(data.scanner_seal_integrity, 0, 100, ((data.scanner_seal_integrity < 66) ? ((data.scanner_seal_integrity < 33) ? 'bad' : 'average') : 'good'))}} + {{:data.scanner_seal_integrity}} %
    - {{if scanner_seal_integrity < 25}} + {{if data.scanner_seal_integrity < 25}} Warning! Vacuum seal breach will result in scan failure! {{/if}}
    @@ -64,11 +64,11 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    MASER Efficiency:
    - {{:~displayBar(maser_efficiency, 1, 100, (maser_efficiency < 66 ? (maser_efficiency < 33 ? 'bad' : 'average') : 'good'))}} - {{:maser_efficiency}} % + {{:helper.displayBar(data.maser_efficiency, 1, 100, ((data.maser_efficiency < 66) ? ((data.maser_efficiency) < 33 ? 'bad' : 'average') : 'good'))}} + {{:data.maser_efficiency}} %
    - {{if maser_efficiency < 50}} + {{if data.maser_efficiency < 50}} Match wavelengths to progress the scan. {{/if}}
    @@ -76,25 +76,25 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Optimal Wavelength:
    - {{:~displayBar(optimal_wavelength, 1, 10000, 'good')}} - {{:optimal_wavelength}} MHz + {{:helper.displayBar(data.optimal_wavelength, 1, 10000, 'good')}} + {{:data.optimal_wavelength}} MHz
    Current Wavelength:
    - {{:~displayBar(maser_wavelength, 1, 10000, 'good')}} - {{:maser_wavelength}} MHz + {{:helper.displayBar(data.maser_wavelength, 1, 10000, 'good')}} + {{:data.maser_wavelength}} MHz
    - {{:~link('-2 KHz', null, {'maserWavelength' : -2}, null)}} - {{:~link('-1 KHz', null, {'maserWavelength' : -1}, null)}} - {{:~link('-0.5 KHz', null, {'maserWavelength' : -0.5}, null)}} + {{:helper.link('-2 KHz', null, {'maserWavelength' : -2}, null)}} + {{:helper.link('-1 KHz', null, {'maserWavelength' : -1}, null)}} + {{:helper.link('-0.5 KHz', null, {'maserWavelength' : -0.5}, null)}}
    - {{:~link('+0.5 KHz', null, {'maserWavelength' : 0.5}, null)}} - {{:~link('+1 KHz', null, {'maserWavelength' : 1}, null)}} - {{:~link('+2 KHz', null, {'maserWavelength' : 2}, null)}} + {{:helper.link('+0.5 KHz', null, {'maserWavelength' : 0.5}, null)}} + {{:helper.link('+1 KHz', null, {'maserWavelength' : 1}, null)}} + {{:helper.link('+2 KHz', null, {'maserWavelength' : 2}, null)}}
    @@ -102,18 +102,18 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Centrifuge speed:
    - {{:~displayBar(scanner_rpm, 0, 1000, 'good')}} - {{:scanner_rpm}} RPM + {{:helper.displayBar(data.scanner_rpm, 0, 1000, 'good')}} + {{:data.scanner_rpm}} RPM
    Internal temperature:
    - {{:~displayBar(scanner_temperature, 0, 1273, (scanner_temperature > 250 ? (scanner_temperature > 1000 ? 'bad' : 'average') : 'good')))}} - {{:scanner_temperature}} K + {{:helper.displayBar(data.scanner_temperature, 0, 1273, (data.scanner_temperature > 250 ? (data.scanner_temperature > 1000 ? 'bad' : 'average') : 'good')))}} + {{:data.scanner_temperature}} K
    - {{if scanner_temperature > 1000}} + {{if data.scanner_temperature > 1000}} Warning! Exceeding 1200K will result in scan failure! {{/if}}
    @@ -123,12 +123,12 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Ambient radiation:
    - {{:~displayBar(radiation, 0, 100, (radiation > 15 ? (radiation > 65 ? 'bad' : 'average') : 'good'))}} - {{:radiation}} mSv + {{:helper.displayBar(data.radiation, 0, 100, ((data.radiation > 15) ? ((data.radiation > 65) ? 'bad' : 'average') : 'good'))}} + {{:data.radiation}} mSv
    - {{:~link(rad_shield_on ? 'Disable Radiation Shielding' : 'Enable Radiation Shielding', 'radiation', {'toggle_rad_shield' : 1}, null)}} - {{if rad_shield_on}} + {{:helper.link(data.rad_shield_on ? 'Disable Radiation Shielding' : 'Enable Radiation Shielding', 'radiation', {'toggle_rad_shield' : 1}, null)}} + {{if data.rad_shield_on}} Shield blocking scanner. {{/if}}
    @@ -138,11 +138,11 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Coolant remaining:
    - {{:~displayBar(unused_coolant_per, 0, 100, (unused_coolant_per < 66 ? (unused_coolant_per < 33 ? 'bad' : 'average') : 'good'))}} - {{:unused_coolant_abs}} u + {{:helper.displayBar(data.unused_coolant_per, 0, 100, ((data.unused_coolant_per < 66) ? ((data.unused_coolant_per < 33) ? 'bad' : 'average') : 'good'))}} + {{:data.unused_coolant_abs}} u
    - {{if unused_coolant_per < 20}} + {{if data.unused_coolant_per < 20}} Warning! Coolant stocks low! {{/if}}
    @@ -150,28 +150,28 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan
    Coolant flow rate:
    - {{:~displayBar(coolant_usage_rate, 0, 10, 'good')}} - {{:coolant_usage_rate}} u/s + {{:helper.displayBar(data.coolant_usage_rate, 0, 10, 'good')}} + {{:data.coolant_usage_rate}} u/s
    - {{:~link('Min u/s', null, {'coolantRate' : -10}, null)}} - {{:~link('-3 u/s', null, {'coolantRate' : -3}, null)}} - {{:~link('-1 u/s', null, {'coolantRate' : -1}, null)}} + {{:helper.link('Min u/s', null, {'coolantRate' : -10}, null)}} + {{:helper.link('-3 u/s', null, {'coolantRate' : -3}, null)}} + {{:helper.link('-1 u/s', null, {'coolantRate' : -1}, null)}}
    - {{:~link('+1 u/s', null, {'coolantRate' : 1}, null)}} - {{:~link('+3 u/s', null, {'coolantRate' : 3}, null)}} - {{:~link('Max u/s', null, {'coolantRate' : 10}, null)}} + {{:helper.link('+1 u/s', null, {'coolantRate' : 1}, null)}} + {{:helper.link('+3 u/s', null, {'coolantRate' : 3}, null)}} + {{:helper.link('Max u/s', null, {'coolantRate' : 10}, null)}}
    Coolant purity:
    - {{:~displayBar(coolant_purity, 0, 100, (coolant_purity < 66 ? (coolant_purity < 33 ? 'bad' : 'average') : 'good'))}} - {{:coolant_purity}} % + {{:helper.displayBar(data.coolant_purity, 0, 100, ((data.coolant_purity < 66) ? ((data.coolant_purity < 33) ? 'bad' : 'average') : 'good'))}} + {{:data.coolant_purity}} %
    - {{if coolant_purity < 0.5}} + {{if data.coolant_purity < 0.5}} Warning! Check coolant for contaminants! {{/if}}
    @@ -180,6 +180,6 @@ Used In File(s): \code\modules\research\xenoarchaeology\machinery\geosample_scan

    Latest Results

    - {{:last_scan_data}} + {{:data.last_scan_data}}
    diff --git a/nano/templates/helm.tmpl b/nano/templates/helm.tmpl index 1457d7a336..9fcee26fb2 100644 --- a/nano/templates/helm.tmpl +++ b/nano/templates/helm.tmpl @@ -1,17 +1,13 @@ - - - -

    Sector information

    - {{:sector}} + {{:data.sector}}
    - Coordinates: {{:s_x}} : {{:s_y}} + Coordinates: {{:data.s_x}} : {{:data.s_y}}
    - Additional information: {{:s_x}} : {{:s_y}} - {{:sector_info}} + Additional information: {{:data.s_x}} : {{:data.s_y}} + {{:data.sector_info}}
    @@ -23,7 +19,7 @@ Speed:
    - {{:speed}} + {{:data.speed}}
    @@ -31,7 +27,7 @@ Acceleration:
    - {{:accel}} + {{:data.accel}}
    @@ -39,7 +35,7 @@ Heading:
    - {{:heading}} + {{:data.heading}}
    @@ -51,26 +47,26 @@
    - {{:~link('', 'triangle-1-nw', { 'move' : 9 }, null, null)}} - {{:~link('', 'triangle-1-n', { 'move' : 1 }, null, null)}} - {{:~link('', 'triangle-1-ne', { 'move' : 5 }, null, null)}} + {{:helper.link('', 'triangle-1-nw', { 'move' : 9 }, null, null)}} + {{:helper.link('', 'triangle-1-n', { 'move' : 1 }, null, null)}} + {{:helper.link('', 'triangle-1-ne', { 'move' : 5 }, null, null)}}
    - {{:~link('', 'triangle-1-w', { 'move' : 8 }, null, null)}} - {{:~link('', 'circle-close', { 'brake' : 1 }, null, null)}} - {{:~link('', 'triangle-1-e', { 'move' : 4 }, null, null)}} + {{:helper.link('', 'triangle-1-w', { 'move' : 8 }, null, null)}} + {{:helper.link('', 'circle-close', { 'brake' : 1 }, null, null)}} + {{:helper.link('', 'triangle-1-e', { 'move' : 4 }, null, null)}}
    - {{:~link('', 'triangle-1-sw', { 'move' : 10 }, null, null)}} - {{:~link('', 'triangle-1-s', { 'move' : 2 }, null, null)}} - {{:~link('', 'triangle-1-se', { 'move' : 6 }, null, null)}} + {{:helper.link('', 'triangle-1-sw', { 'move' : 10 }, null, null)}} + {{:helper.link('', 'triangle-1-s', { 'move' : 2 }, null, null)}} + {{:helper.link('', 'triangle-1-se', { 'move' : 6 }, null, null)}}
    Direct control - {{:~link(manual_control ? 'Engaged' : 'Disengaged', 'shuffle', { 'manual' : 1 }, manual_control ? 'selected' : null, null)}} + {{:helper.link(data.manual_control ? 'Engaged' : 'Disengaged', 'shuffle', { 'manual' : 1 }, data.manual_control ? 'selected' : null, null)}}
    @@ -81,7 +77,7 @@

    Autopilot

    - {{:~link(autopilot? 'Engaged' : 'Disengaged', 'gear', { 'apilot' : 1 }, dest ? null : 'disabled' , autopilot ? 'selected' : null)}} + {{:helper.link(data.autopilot ? 'Engaged' : 'Disengaged', 'gear', { 'apilot' : 1 }, data.dest ? null : 'disabled', data.autopilot ? 'selected' : null)}}
    @@ -89,30 +85,30 @@ Target coordinates
    - {{if dest}} - {{:~link(d_x, null, { 'setx' : 1 }, null, null)}} {{:~link(d_y, null, { 'sety' : 1 }, null, null)}} + {{if data.dest}} + {{:helper.link(data.d_x, null, { 'setx' : 1 }, null, null)}} {{:helper.link(data.d_y, null, { 'sety' : 1 }, null, null)}} {{else}} - {{:~link('None', null, { 'sety' : 1, 'setx' : 1 }, null, null)}} + {{:helper.link('None', null, { 'sety' : 1, 'setx' : 1 }, null, null)}} {{/if}}

    Navigation data

    - {{:~link('Save current position', 'disk', { 'add' : 'current' }, null)}} - {{:~link('Add new entry', 'document', { 'add' : 'new' }, null)}} + {{:helper.link('Save current position', 'disk', { 'add' : 'current' }, null)}} + {{:helper.link('Add new entry', 'document', { 'add' : 'new' }, null)}}
    - {{if locations}} - {{for locations}} + {{if data.locations}} + {{for data.locations}}
    - {{:name}}: - {{:x}} : {{:y}} + {{:value.name}}: + {{:value.x}} : {{:value.y}}
    - {{:~link('Plot course', 'arrowreturnthick-1-e', { 'x' : x, 'y' : y }, null, null)}} - {{:~link('Remove entry', 'close', { 'remove' : reference }, null, null)}} + {{:helper.link('Plot course', 'arrowreturnthick-1-e', { 'x' : value.x, 'y' : value.y }, null, null)}} + {{:helper.link('Remove entry', 'close', { 'remove' : value.reference }, null, null)}}
    {{/for}} {{/if}} diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl index 3c52746ce8..d7635dc9f7 100644 --- a/nano/templates/identification_computer.tmpl +++ b/nano/templates/identification_computer.tmpl @@ -1,4 +1,4 @@ -{{if printing}} +{{if data.printing}}
    The computer is currently busy.
    Printing...
    @@ -7,23 +7,23 @@ Thank you for your patience!

    {{else}} - {{:~link('Access Modification', 'home', {'choice' : 'mode', 'mode_target' : 0}, !mode ? 'disabled' : null)}} - {{:~link('Crew Manifest', 'folder-open', {'choice' : 'mode', 'mode_target' : 1}, mode ? 'disabled' : null)}} - {{:~link('Print', 'print', {'choice' : 'print'}, (mode || has_modify) ? null : 'disabled')}} + {{:helper.link('Access Modification', 'home', {'choice' : 'mode', 'mode_target' : 0}, !data.mode ? 'disabled' : null)}} + {{:helper.link('Crew Manifest', 'folder-open', {'choice' : 'mode', 'mode_target' : 1}, data.mode ? 'disabled' : null)}} + {{:helper.link('Print', 'print', {'choice' : 'print'}, (data.mode || data.has_modify) ? null : 'disabled')}} - {{if mode}} + {{if data.mode}}

    Crew Manifest

    - {{:manifest}} + {{:data.manifest}}
    {{else}}

    Access Modification

    - {{if !authenticated}} + {{if !data.authenticated}} Please insert the IDs into the terminal to proceed.
    {{/if}} @@ -32,7 +32,7 @@ Target Identity:
    - {{:~link(target_name, 'eject', {'choice' : 'modify'})}} + {{:helper.link(data.target_name, 'eject', {'choice' : 'modify'})}}
    @@ -40,12 +40,12 @@ Authorized Identity:
    - {{:~link(scan_name, 'eject', {'choice' : 'scan'})}} + {{:helper.link(data.scan_name, 'eject', {'choice' : 'scan'})}}

    - {{if authenticated}} + {{if data.authenticated}} - {{if has_modify}} + {{if data.has_modify}}

    Details

    -
    +
    - + Registered Name:
    - +
    -
    +
    - + Account Number:
    - +
    @@ -115,7 +115,7 @@ Terminations:
    - {{:~link('Terminate ' + target_owner, 'gear', {'choice' : 'terminate'}, target_rank == "Terminated" ? 'disabled' : null, target_rank == "Terminated" ? 'disabled' : 'linkDanger')}} + {{:helper.link('Terminate ' + data.target_owner, 'gear', {'choice' : 'terminate'}, data.target_rank == "Terminated" ? 'disabled' : null, data.target_rank == "Terminated" ? 'disabled' : 'linkDanger')}}
    @@ -124,12 +124,12 @@
    -
    - {{:~link('Auto', 'refresh', {'cmode' : 1}, chargeMode ? 'selected' : null)}}{{:~link('Off', 'close', {'cmode' : 1}, chargeMode ? null : 'selected')}} + {{:helper.link('Auto', 'refresh', {'cmode' : 1}, data.chargeMode ? 'selected' : null)}}{{:helper.link('Off', 'close', {'cmode' : 1}, data.chargeMode ? null : 'selected')}}   - {{if charging}} + {{if data.charging}} [Charging] {{else}} [Not Charging] @@ -31,12 +31,12 @@ Input Level:
    - {{:~displayBar(chargeLevel, 0, chargeMax)}} + {{:helper.displayBar(data.chargeLevel, 0, data.chargeMax)}}
    - {{:~link('MIN', null, {'input' : 'min'}, (chargeLevel > 0) ? null : 'disabled')}} - {{:~link('SET', null, {'input' : 'set'}, null)}} - {{:~link('MAX', null, {'input' : 'max'}, (chargeLevel < chargeMax) ? null : 'disabled')}} -
     {{:chargeLevel}} W 
    + {{:helper.link('MIN', null, {'input' : 'min'}, (data.chargeLevel > 0) ? null : 'disabled')}} + {{:helper.link('SET', null, {'input' : 'set'}, null)}} + {{:helper.link('MAX', null, {'input' : 'max'}, (data.chargeLevel < data.chargeMax) ? null : 'disabled')}} +
     {{:data.chargeLevel}} W 
    @@ -47,7 +47,7 @@ Output Status:
    - {{:~link('Online', 'power', {'online' : 1}, outputOnline ? 'selected' : null)}}{{:~link('Offline', 'close', {'online' : 1}, outputOnline ? null : 'selected')}} + {{:helper.link('Online', 'power', {'online' : 1}, data.outputOnline ? 'selected' : null)}}{{:helper.link('Offline', 'close', {'online' : 1}, data.outputOnline ? null : 'selected')}}
    @@ -56,12 +56,12 @@ Output Level:
    - {{:~displayBar(outputLevel, 0, outputMax)}} + {{:helper.displayBar(data.outputLevel, 0, data.outputMax)}}
    - {{:~link('MIN', null, {'output' : 'min'}, (outputLevel > 0) ? null : 'disabled')}} - {{:~link('SET', null, {'output' : 'set'}, null)}} - {{:~link('MAX', null, {'output' : 'max'}, (outputLevel < outputMax) ? null : 'disabled')}} -
     {{:outputLevel}} W 
    + {{:helper.link('MIN', null, {'output' : 'min'}, (data.outputLevel > 0) ? null : 'disabled')}} + {{:helper.link('SET', null, {'output' : 'set'}, null)}} + {{:helper.link('MAX', null, {'output' : 'max'}, (data.outputLevel < data.outputMax) ? null : 'disabled')}} +
     {{:data.outputLevel}} W 
    @@ -71,9 +71,9 @@ Output Load:
    - {{:~displayBar(outputLoad, 0, outputMax, (outputLoad < outputLevel) ? 'good' : 'average')}} + {{:helper.displayBar(data.outputLoad, 0, data.outputMax, (data.outputLoad < data.outputLevel) ? 'good' : 'average')}}
    - {{:outputLoad}} W + {{:data.outputLoad}} W
    \ No newline at end of file diff --git a/nano/templates/tanks.tmpl b/nano/templates/tanks.tmpl index af7ab874f6..a1929dbe4e 100644 --- a/nano/templates/tanks.tmpl +++ b/nano/templates/tanks.tmpl @@ -1,4 +1,4 @@ -{{if maskConnected}} +{{if data.maskConnected}}
    This tank is connected to a mask.
    {{else}}
    This tank is NOT connected to a mask.
    @@ -9,9 +9,9 @@ Tank Pressure:
    - {{:~displayBar(tankPressure, 0, 1013, (tankPressure > 200) ? 'good' : (tankPressure > 100) ? 'average' : 'bad'))}} + {{:helper.displayBar(data.tankPressure, 0, 1013, (data.tankPressure > 200) ? 'good' : (data.tankPressure > 100) ? 'average' : 'bad'))}}
    - {{:tankPressure}} kPa + {{:data.tankPressure}} kPa
    @@ -23,15 +23,15 @@ Mask Release Pressure:
    - {{:~displayBar(releasePressure, 0, maxReleasePressure, (releasePressure >= 23) ? null : ((releasePressure >= 17) ? 'average' : 'bad'))}} + {{:helper.displayBar(data.releasePressure, 0, data.maxReleasePressure, (data.releasePressure >= 23) ? null : ((data.releasePressure >= 17) ? 'average' : 'bad'))}}
    - {{:~link('-', null, {'dist_p' : -10}, (releasePressure > 0) ? null : 'disabled')}} - {{:~link('-', null, {'dist_p' : -1}, (releasePressure > 0) ? null : 'disabled')}} -
     {{:releasePressure}} kPa 
    - {{:~link('+', null, {'dist_p' : 1}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('+', null, {'dist_p' : 10}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('Max', null, {'dist_p' : 'max'}, (releasePressure < maxReleasePressure) ? null : 'disabled')}} - {{:~link('Reset', null, {'dist_p' : 'reset'}, (releasePressure != defaultReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'dist_p' : -10}, (data.releasePressure > 0) ? null : 'disabled')}} + {{:helper.link('-', null, {'dist_p' : -1}, (data.releasePressure > 0) ? null : 'disabled')}} +
     {{:data.releasePressure}} kPa 
    + {{:helper.link('+', null, {'dist_p' : 1}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'dist_p' : 10}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('Max', null, {'dist_p' : 'max'}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('Reset', null, {'dist_p' : 'reset'}, (data.releasePressure != data.defaultReleasePressure) ? null : 'disabled')}}
    @@ -41,7 +41,7 @@ Mask Release Valve:
    - {{:~link('Open', 'unlocked', {'stat' : 1}, (!maskConnected) ? 'disabled' : (valveOpen ? 'selected' : null))}}{{:~link('Close', 'locked', {'stat' : 1}, valveOpen ? null : 'selected')}} + {{:helper.link('Open', 'unlocked', {'stat' : 1}, (!data.maskConnected) ? 'disabled' : (data.valveOpen ? 'selected' : null))}}{{:helper.link('Close', 'locked', {'stat' : 1}, data.valveOpen ? null : 'selected')}}
    diff --git a/nano/templates/telescience_console.tmpl b/nano/templates/telescience_console.tmpl index bd88dc4586..4f88267510 100644 --- a/nano/templates/telescience_console.tmpl +++ b/nano/templates/telescience_console.tmpl @@ -5,16 +5,16 @@ Used In File(s): \code\modules\telesci\telesci_computer.dm
    Coordinates:
    - {{:~link('X: ' + coordx, 'gear', {'setx': 1})}} - {{:~link('Y: ' + coordy, 'gear', {'sety': 1})}} - {{:~link('Z: ' + coordz, 'gear', {'setz': 1})}} + {{:helper.link('X: ' + data.coordx, 'gear', {'setx': 1})}} + {{:helper.link('Y: ' + data.coordy, 'gear', {'sety': 1})}} + {{:helper.link('Z: ' + data.coordz, 'gear', {'setz': 1})}}
    Controls:
    - {{:~link('Send', 'gear', {'send': 1}, null, (coordx != null && coordy != null && coordz != null) ? '' : 'disabled')}} - {{:~link('Receive', 'gear', {'receive': 1}, null, (coordx != null && coordy != null && coordz != null) ? '' : 'disabled')}} - {{:~link('Recalibrate', 'gear', {'recal': 1})}} + {{:helper.link('Send', 'gear', {'send': 1}, null, (data.coordx != null && data.coordy != null && data.coordz != null) ? '' : 'disabled')}} + {{:helper.link('Receive', 'gear', {'receive': 1}, null, (data.coordx != null && data.coordy != null && data.coordz != null) ? '' : 'disabled')}} + {{:helper.link('Recalibrate', 'gear', {'recal': 1})}}
    diff --git a/nano/templates/transfer_valve.tmpl b/nano/templates/transfer_valve.tmpl index 6c5cca62ff..f839583999 100644 --- a/nano/templates/transfer_valve.tmpl +++ b/nano/templates/transfer_valve.tmpl @@ -3,12 +3,12 @@ Attachment One:
    - {{if attachmentOne}} - {{:attachmentOne}} + {{if data.attachmentOne}} + {{:data.attachmentOne}} {{else}} None {{/if}} - {{:~link('Remove', 'eject', {'tankone' : 1}, attachmentOne ? null : 'disabled')}} + {{:helper.link('Remove', 'eject', {'tankone' : 1}, data.attachmentOne ? null : 'disabled')}}
    @@ -17,12 +17,12 @@ Attachment Two:
    - {{if attachmentTwo}} - {{:attachmentTwo}} + {{if data.attachmentTwo}} + {{:data.attachmentTwo}} {{else}} None {{/if}} - {{:~link('Remove', 'eject', {'tanktwo' : 1}, attachmentTwo ? null : 'disabled')}} + {{:helper.link('Remove', 'eject', {'tanktwo' : 1}, data.attachmentTwo ? null : 'disabled')}}
    @@ -31,14 +31,14 @@ Valve Attachment:
    - {{if valveAttachment}} - {{:valveAttachment}} + {{if data.valveAttachment}} + {{:data.valveAttachment}} {{else}} None {{/if}} - {{:~link('Remove', 'eject', {'rem_device' : 1}, valveAttachment ? null : 'disabled')}} - {{if valveAttachment}} - {{:~link('View', 'wrench', {'device' : 1})}} + {{:helper.link('Remove', 'eject', {'rem_device' : 1}, data.valveAttachment ? null : 'disabled')}} + {{if data.valveAttachment}} + {{:helper.link('View', 'wrench', {'device' : 1})}} {{/if}}
    @@ -50,7 +50,7 @@ Valve Status:
    - {{:~link('Open', 'unlocked', {'open' : 1}, (!attachmentOne || !attachmentTwo) ? 'disabled' : (valveOpen ? 'selected' : null))}}{{:~link('Close', 'locked', {'open' : 1}, (!attachmentOne || !attachmentTwo) ? 'disabled' : (valveOpen ? null : 'selected'))}} + {{:helper.link('Open', 'unlocked', {'open' : 1}, (!data.attachmentOne || !data.attachmentTwo) ? 'disabled' : (data.valveOpen ? 'selected' : null))}}{{:helper.link('Close', 'locked', {'open' : 1}, (!data.attachmentOne || !data.attachmentTwo) ? 'disabled' : (data.valveOpen ? null : 'selected'))}}
    diff --git a/nano/templates/uplink.tmpl b/nano/templates/uplink.tmpl index 34188899a5..dd92bcd0be 100644 --- a/nano/templates/uplink.tmpl +++ b/nano/templates/uplink.tmpl @@ -3,44 +3,43 @@ Title: Syndicate Uplink, uses some javascript to change nanoUI up a bit. Used In File(s): \code\game\objects\items\devices\uplinks.dm --> -{{:~syndicateMode()}} -

    {{:welcome}}

    +{{:helper.syndicateMode()}} +

    {{:data.welcome}}


    Functions:
    - {{:~link('Close', 'gear', {'lock' : "1"}, null, 'fixedLeft')}} + {{:helper.link('Close', 'gear', {'lock' : "1"}, null, 'fixedLeft')}}

    -
    - Tele-Crystals: -
    -
    - {{:crystals}} -
    +
    + Tele-Crystals: +
    +
    + {{:data.crystals}} +

    Request items:


    Each item costs a number of tele-crystals as indicated by the number following their name.

    -{{for nano_items}} -
    -

    {{:Category}}

    -
    - {{for items}} -
    - {{:~link( Name, 'gear', {'buy_item' : obj_path, 'cost' : Cost}, Cost > ~root.crystals ? 'disabled' : null, null)}} - {{:Cost}} -
    +{{for data.nano_items}} +
    +

    {{:value.Category}}

    +
    + {{for data.items :itemValue:itemIndex}} +
    + {{:helper.link( itemValue.Name, 'gear', {'buy_item' : itemValue.obj_path, 'cost' : itemValue.Cost}, itemValue.Cost > data.crystals ? 'disabled' : null, null)}} - {{:itemValue.Cost}} +
    {{/for}} -
    - +
    {{/for}}
    - {{:~link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, null, 'fixedLeftWidest')}} + {{:helper.link('Buy Random (??)' , 'gear', {'buy_item' : 'random'}, null, 'fixedLeftWidest')}}