content
stringlengths
5
1.05M
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRIGHT ZENIMAX MEDIA INC. **************************************************************************** ]] ZO_Provisioner = ZO_SharedProvisioner:Subclass() ZO_PROVISIONER_SLOT_ROW_WIDTH = 260 ZO_PROVISIONER_SLOT_ROW_HEIGHT = 58 ZO_PROVISIONER_SLOT_ICON_SIZE = 48 ZO_PROVISIONER_SLOT_PADDING_X = 5 function ZO_Provisioner:New(...) return ZO_SharedProvisioner.New(self, ...) end function ZO_Provisioner:Initialize(control) self.mainSceneName = "provisioner" ZO_SharedProvisioner.Initialize(self, control) self.resultTooltip = self.control:GetNamedChild("Tooltip") if IsChatSystemAvailableForCurrentPlatform() then local function OnTooltipMouseUp(control, button, upInside) if upInside and button == MOUSE_BUTTON_INDEX_RIGHT then ClearMenu() local function AddLink() local recipeListIndex, recipeIndex = self:GetSelectedRecipeListIndex(), self:GetSelectedRecipeIndex() local link = ZO_LinkHandler_CreateChatLink(GetRecipeResultItemLink, recipeListIndex, recipeIndex) ZO_LinkHandler_InsertLink(zo_strformat(SI_TOOLTIP_ITEM_NAME, link)) end AddMenuItem(GetString(SI_ITEM_ACTION_LINK_TO_CHAT), AddLink) ShowMenu(self) end end self.resultTooltip:SetHandler("OnMouseUp", OnTooltipMouseUp) self.resultTooltip:GetNamedChild("Icon"):SetHandler("OnMouseUp", OnTooltipMouseUp) end self.currentTabs = {} self.multiCraftContainer = self.control:GetNamedChild("MultiCraftContainer") self.multiCraftSpinner = ZO_MultiCraftSpinner:New(self.multiCraftContainer:GetNamedChild("Spinner")) self.multiCraftSpinner:RegisterCallback("OnValueChanged", function() self:RefreshRecipeDetails() end) ZO_CraftingUtils_ConnectSpinnerToCraftingProcess(self.multiCraftSpinner) self:InitializeTabs() self:InitializeSettings() self:InitializeFilters() self:InitializeKeybindStripDescriptors() self:InitializeRecipeTree() self:InitializeDetails() ZO_InventoryInfoBar_ConnectStandardBar(self.control:GetNamedChild("InfoBar")) local function OnAddOnLoaded(event, name) if name == "ZO_Ingame" then local defaults = { haveIngredientsChecked = true, haveSkillsChecked = true, questsOnlyChecked = false, } self.savedVars = ZO_SavedVars:New("ZO_Ingame_SavedVariables", 2, "Provisioner", defaults) ZO_CheckButton_SetCheckState(self.haveIngredientsCheckBox, self.savedVars.haveIngredientsChecked) ZO_CheckButton_SetCheckState(self.haveSkillsCheckBox, self.savedVars.haveSkillsChecked) ZO_CheckButton_SetCheckState(self.isQuestItemCheckbox, self.savedVars.questsOnlyChecked) self:DirtyRecipeList() self.control:UnregisterForEvent(EVENT_ADD_ON_LOADED) end end self.control:RegisterForEvent(EVENT_ADD_ON_LOADED, OnAddOnLoaded) PROVISIONER_FRAGMENT = ZO_FadeSceneFragment:New(control) PROVISIONER_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState) if newState == SCENE_FRAGMENT_SHOWING then self:ResetMultiCraftNumIterations() SYSTEMS:GetObject("craftingResults"):SetCraftingTooltip(self.resultTooltip) KEYBIND_STRIP:AddKeybindButtonGroup(self.mainKeybindStripDescriptor) elseif newState == SCENE_FRAGMENT_HIDDEN then SYSTEMS:GetObject("craftingResults"):SetCraftingTooltip(nil) KEYBIND_STRIP:RemoveKeybindButtonGroup(self.mainKeybindStripDescriptor) -- when we hide this fragment make sure to end the preview and toggle the camera back to normal, -- since we may still be staying in the crafting scene if ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() then self:TogglePreviewMode() end end end) PROVISIONER_SCENE = self:CreateInteractScene(self.mainSceneName) PROVISIONER_SCENE:RegisterCallback("StateChange", function(oldState, newState) if newState == SCENE_SHOWING then self:ConfigureFromSettings(ZO_Provisioner.PROVISIONING_SETTINGS) TriggerTutorial(TUTORIAL_TRIGGER_PROVISIONING_OPENED) if CRAFT_ADVISOR_MANAGER:HasActiveWrits() then SCENE_MANAGER:AddFragmentGroup(WRIT_ADVISOR_KEYBOARD_FRAGMENT_GROUP) end elseif newState == SCENE_HIDDEN then SCENE_MANAGER:RemoveFragmentGroup(WRIT_ADVISOR_KEYBOARD_FRAGMENT_GROUP) end end) self.skillInfoHeader = self.control:GetNamedChild("SkillInfo") ZO_Skills_TieSkillInfoHeaderToCraftingSkill(self.skillInfoHeader, CRAFTING_TYPE_PROVISIONING) end --Settings ZO_Provisioner.PROVISIONING_SETTINGS = { tabsOffsetY = 10, selectedTabLabelFont = "ZoFontHeader4", selectedTabLabelOffsetY = 7, showProvisionerSkillLevel = true, } ZO_Provisioner.EMBEDDED_SETTINGS = { tabsOffsetY = 58, selectedTabLabelFont = "ZoFontHeader2", selectedTabLabelOffsetY = 0, showProvisionerSkillLevel = false, } function ZO_Provisioner:InitializeSettings() local function GenerateTab(filterType, normal, pressed, highlight, disabled) local name = GetString("SI_PROVISIONERSPECIALINGREDIENTTYPE", filterType) return { activeTabText = name, categoryName = name, descriptor = filterType, normal = normal, pressed = pressed, highlight = highlight, disabled = disabled, callback = function(tabData) self:OnTabFilterChanged(tabData) end, } end local provisioningSettings = ZO_Provisioner.PROVISIONING_SETTINGS local foodTab = GenerateTab(PROVISIONER_SPECIAL_INGREDIENT_TYPE_SPICES, "EsoUI/Art/Crafting/provisioner_indexIcon_meat_up.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_meat_down.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_meat_over.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_meat_disabled.dds") local drinkTab = GenerateTab(PROVISIONER_SPECIAL_INGREDIENT_TYPE_FLAVORING, "EsoUI/Art/Crafting/provisioner_indexIcon_beer_up.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_beer_down.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_beer_over.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_beer_disabled.dds") local furnishingsTab = GenerateTab(PROVISIONER_SPECIAL_INGREDIENT_TYPE_FURNISHING, "EsoUI/Art/Crafting/provisioner_indexIcon_furnishings_up.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_furnishings_down.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_furnishings_over.dds", "EsoUI/Art/Crafting/provisioner_indexIcon_furnishings_disabled.dds") provisioningSettings.tabs = {} table.insert(provisioningSettings.tabs, foodTab) table.insert(provisioningSettings.tabs, drinkTab) table.insert(provisioningSettings.tabs, furnishingsTab) local embeddedSettings = ZO_Provisioner.EMBEDDED_SETTINGS embeddedSettings.tabs = {} table.insert(embeddedSettings.tabs, furnishingsTab) end function ZO_Provisioner:ConfigureFromSettings(settings) if self.settings ~= settings then self.settings = settings self.skillInfoHeader:SetHidden(not settings.showProvisionerSkillLevel) self.tabs:SetAnchor(TOPRIGHT, ZO_SharedRightPanelBackground, TOPRIGHT, -33, settings.tabsOffsetY) local selectedTabLabel = self.tabs:GetNamedChild("Label") selectedTabLabel:SetFont(settings.selectedTabLabelFont) selectedTabLabel:SetAnchor(RIGHT, nil, LEFT, -25, settings.selectedTabLabelOffsetY) ZO_MenuBar_ClearButtons(self.tabs) ZO_ClearTable(self.currentTabs) for _, tab in ipairs(settings.tabs) do table.insert(self.currentTabs, ZO_MenuBar_AddButton(self.tabs, tab)) end ZO_MenuBar_SelectDescriptor(self.tabs, settings.tabs[1].descriptor) end end function ZO_Provisioner:EmbedInCraftingScene() self:ConfigureFromSettings(ZO_Provisioner.EMBEDDED_SETTINGS) SCENE_MANAGER:AddFragment(PROVISIONER_FRAGMENT) self:DirtyRecipeList() self:UpdateQuestPins() end function ZO_Provisioner:RemoveFromCraftingScene() SCENE_MANAGER:RemoveFragment(PROVISIONER_FRAGMENT) end function ZO_Provisioner:ShouldShowForControlScheme() return not IsInGamepadPreferredMode() end function ZO_Provisioner:InitializeTabs() self.tabs = self.control:GetNamedChild("Tabs") self.activeTab = self.control:GetNamedChild("TabsLabel") ZO_CraftingUtils_ConnectMenuBarToCraftingProcess(self.tabs) end function ZO_Provisioner:OnTabFilterChanged(filterData) -- we are switching from the furnishing tab to another tab, make sure the end the preview if there is one if self.filterType == PROVISIONER_SPECIAL_INGREDIENT_TYPE_FURNISHING then if SYSTEMS:GetObject("itemPreview"):IsInteractionCameraPreviewEnabled() then self:TogglePreviewMode() end end self.activeTab:SetText(filterData.activeTabText) self.filterType = filterData.descriptor if self.savedVars then ZO_CheckButton_SetCheckState(self.haveIngredientsCheckBox, self.savedVars.haveIngredientsChecked) ZO_CheckButton_SetCheckState(self.haveSkillsCheckBox, self.savedVars.haveSkillsChecked) ZO_CheckButton_SetCheckState(self.isQuestItemCheckbox, self.savedVars.questsOnlyChecked) end self:ResetMultiCraftNumIterations() self:DirtyRecipeList() end function ZO_Provisioner:InitializeFilters() self.haveIngredientsCheckBox = self.control:GetNamedChild("HaveIngredients") self.haveSkillsCheckBox = self.control:GetNamedChild("HaveSkills") self.isQuestItemCheckbox = self.control:GetNamedChild("IsQuestItem") local function OnFilterChanged() self.savedVars.haveIngredientsChecked = ZO_CheckButton_IsChecked(self.haveIngredientsCheckBox) self.savedVars.haveSkillsChecked = ZO_CheckButton_IsChecked(self.haveSkillsCheckBox) self.savedVars.questsOnlyChecked = ZO_CheckButton_IsChecked(self.isQuestItemCheckbox) self:DirtyRecipeList() end ZO_CheckButton_SetToggleFunction(self.haveIngredientsCheckBox, OnFilterChanged) ZO_CheckButton_SetToggleFunction(self.haveSkillsCheckBox, OnFilterChanged) ZO_CheckButton_SetToggleFunction(self.isQuestItemCheckbox, OnFilterChanged) ZO_CheckButton_SetLabelText(self.haveIngredientsCheckBox, GetString(SI_PROVISIONER_HAVE_INGREDIENTS)) local FILTER_SPACING = 20 self.haveSkillsCheckBox:SetAnchor(LEFT, self.haveIngredientsCheckBox.label, RIGHT, FILTER_SPACING, 0) ZO_CheckButton_SetLabelText(self.haveSkillsCheckBox, GetString(SI_PROVISIONER_HAVE_SKILLS)) self.isQuestItemCheckbox:SetAnchor(LEFT, self.haveSkillsCheckBox.label, RIGHT, FILTER_SPACING, 0) ZO_CheckButton_SetLabelText(self.isQuestItemCheckbox, GetString(SI_SMITHING_IS_QUEST_ITEM)) ZO_CraftingUtils_ConnectCheckBoxToCraftingProcess(self.haveIngredientsCheckBox) ZO_CraftingUtils_ConnectCheckBoxToCraftingProcess(self.haveSkillsCheckBox) ZO_CraftingUtils_ConnectCheckBoxToCraftingProcess(self.isQuestItemCheckbox) end function ZO_Provisioner:InitializeKeybindStripDescriptors() self.mainKeybindStripDescriptor = { alignment = KEYBIND_STRIP_ALIGN_CENTER, -- Perform craft { name = function() local cost = GetCostToCraftProvisionerItem(self:GetSelectedRecipeListIndex(), self:GetSelectedRecipeIndex()) return ZO_CraftingUtils_GetCostToCraftString(cost) end, keybind = "UI_SHORTCUT_SECONDARY", callback = function() ZO_KeyboardCraftingUtils_RequestCraftingCreate(self, self:GetMultiCraftNumIterations()) end, enabled = function() return self:ShouldCraftButtonBeEnabled() end, }, --Toggle Preview { name = function() if not ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() then return GetString(SI_CRAFTING_ENTER_PREVIEW_MODE) else return GetString(SI_CRAFTING_EXIT_PREVIEW_MODE) end end, keybind = "UI_SHORTCUT_QUATERNARY", callback = function() self:TogglePreviewMode() end, visible = function() return self:CanPreviewRecipe(self:GetRecipeData()) end, }, } ZO_CraftingUtils_ConnectKeybindButtonGroupToCraftingProcess(self.mainKeybindStripDescriptor) end function ZO_Provisioner:InitializeRecipeTree() local navigationContainer = self.control:GetNamedChild("NavigationContainer") self.recipeTree = ZO_Tree:New(navigationContainer:GetNamedChild("ScrollChild"), 74, -10, 535) local function TreeHeaderSetup(node, control, data, open, userRequested, enabled) control.text:SetModifyTextType(MODIFY_TEXT_TYPE_UPPERCASE) control.text:SetDimensionConstraints(0, 0, 260, 0) control.text:SetText(data.name) local shouldHide = self.questRecipeLists[data.recipeListIndex] ~= true control.questPin:SetHidden(shouldHide) if not enabled then control.icon:SetDesaturation(1) control.icon:SetTexture(data.upIcon) elseif open then control.icon:SetDesaturation(0) control.icon:SetTexture(data.downIcon) else control.icon:SetDesaturation(0) control.icon:SetTexture(data.upIcon) end control.iconHighlight:SetTexture(data.overIcon) ZO_IconHeader_Setup(control, open, enabled) end local function TreeHeaderEquality(left, right) return left.recipeListIndex == right.recipeListIndex end self.recipeTree:AddTemplate("ZO_ProvisionerNavigationHeader", TreeHeaderSetup, nil, TreeHeaderEquality, nil, 0) local function TreeEntrySetup(node, control, data, open, userRequested, enabled) control.data = data control.meetsLevelReq = self:PassesTradeskillLevelReqs(data.tradeskillsLevelReqs) control.meetsQualityReq = self:PassesQualityLevelReq(data.qualityReq) control.enabled = enabled local shouldHideQuestPin = self.questRecipes[data.resultItemId] ~= true control.questPin:SetHidden(shouldHideQuestPin) if data.maxIterationsForIngredients > 0 and enabled then control:SetText(zo_strformat(SI_PROVISIONER_RECIPE_NAME_COUNT, data.name, data.maxIterationsForIngredients)) else control:SetText(zo_strformat(SI_PROVISIONER_RECIPE_NAME_COUNT_NONE, data.name)) end control:SetEnabled(enabled) control:SetSelected(node:IsSelected()) if WINDOW_MANAGER:GetMouseOverControl() == control then zo_callHandler(control, enabled and "OnMouseEnter" or "OnMouseExit") end end local function TreeEntryOnSelected(control, data, selected, reselectingDuringRebuild) control:SetSelected(selected) if selected then self:RefreshRecipeDetails() end end local function TreeEntryEquality(left, right) return left.recipeListIndex == right.recipeListIndex and left.recipeIndex == right.recipeIndex and left.name == right.name end self.recipeTree:AddTemplate("ZO_ProvisionerNavigationEntry", TreeEntrySetup, TreeEntryOnSelected, TreeEntryEquality) self.recipeTree:SetExclusive(true) self.recipeTree:SetOpenAnimation("ZO_TreeOpenAnimation") ZO_CraftingUtils_ConnectTreeToCraftingProcess(self.recipeTree) self.noRecipesLabel = navigationContainer:GetNamedChild("NoRecipesLabel") self:DirtyRecipeList() end function ZO_Provisioner:InitializeDetails() self.detailsPane = self.control:GetNamedChild("Details") self.ingredientRowsContainer = self.detailsPane:GetNamedChild("Ingredients") self.ingredientRows = {} local ingredientAnchor = ZO_Anchor:New(TOPLEFT, self.ingredientRowsContainer, TOPLEFT, 0, 0) local NUM_INGREDIENTS_PER_ROW = 2 local INGREDIENT_PAD_X = 15 local INGREDIENT_PAD_Y = 15 local INGREDIENT_INITIAL_OFFSET_X = 0 local INGREDIENT_INITIAL_OFFSET_Y = 0 for i = 1, GetMaxRecipeIngredients() do local control = CreateControlFromVirtual("$(parent)Slot", self.ingredientRowsContainer, "ZO_ProvisionerSlotRow", i) table.insert(self.ingredientRows, ZO_ProvisionerRow:New(self, control)) ZO_Anchor_BoxLayout(ingredientAnchor, control, i - 1, NUM_INGREDIENTS_PER_ROW, INGREDIENT_PAD_X, INGREDIENT_PAD_Y, ZO_PROVISIONER_SLOT_ROW_WIDTH, ZO_PROVISIONER_SLOT_ROW_HEIGHT, INGREDIENT_INITIAL_OFFSET_X, INGREDIENT_INITIAL_OFFSET_Y) end end function ZO_Provisioner:ResetSelectedTab() self.settings = nil end function ZO_Provisioner:SetDetailsEnabled(enabled) for ingredientIndex, ingredientSlot in ipairs(self.ingredientRows) do ingredientSlot:SetEnabled(enabled) end end function ZO_Provisioner:RefreshRecipeList() self.recipeTree:Reset() local knowAnyRecipesInTab = false local hasRecipesWithFilter = false local requireIngredients = ZO_CheckButton_IsChecked(self.haveIngredientsCheckBox) local requireSkills = ZO_CheckButton_IsChecked(self.haveSkillsCheckBox) local requireQuests = ZO_CheckButton_IsChecked(self.isQuestItemCheckbox) local craftingInteractionType = GetCraftingInteractionType() local recipeLists = PROVISIONER_MANAGER:GetRecipeListData(craftingInteractionType) for _, recipeList in pairs(recipeLists) do local parent for _, recipe in ipairs(recipeList.recipes) do if recipe.requiredCraftingStationType == craftingInteractionType and self.filterType == recipe.specialIngredientType then knowAnyRecipesInTab = true if self:DoesRecipePassFilter(recipe.specialIngredientType, requireIngredients, recipe.maxIterationsForIngredients, requireSkills, recipe.tradeskillsLevelReqs, recipe.qualityReq, craftingInteractionType, recipe.requiredCraftingStationType, requireQuests, recipe.resultItemId) then parent = parent or self.recipeTree:AddNode("ZO_ProvisionerNavigationHeader", { recipeListIndex = recipeList.recipeListIndex, name = recipeList.recipeListName, upIcon = recipeList.upIcon, downIcon = recipeList.downIcon, overIcon = recipeList.overIcon, }) self.recipeTree:AddNode("ZO_ProvisionerNavigationEntry", recipe, parent) hasRecipesWithFilter = true end end end end self.recipeTree:Commit() self.noRecipesLabel:SetHidden(hasRecipesWithFilter) if not hasRecipesWithFilter then if knowAnyRecipesInTab then self.noRecipesLabel:SetText(GetString(SI_PROVISIONER_NONE_MATCHING_FILTER)) else --If there are no recipes all the types show the same message. self.noRecipesLabel:SetText(GetString(SI_PROVISIONER_NO_RECIPES)) ZO_CheckButton_SetChecked(self.haveIngredientsCheckBox) ZO_CheckButton_SetChecked(self.haveSkillsCheckBox) ZO_CheckButton_SetUnchecked(self.isQuestItemCheckbox) end self:RefreshRecipeDetails() end ZO_CheckButton_SetEnableState(self.haveIngredientsCheckBox, knowAnyRecipesInTab) ZO_CheckButton_SetEnableState(self.haveSkillsCheckBox, knowAnyRecipesInTab) ZO_CheckButton_SetEnableState(self.isQuestItemCheckbox, knowAnyRecipesInTab) end function ZO_Provisioner:GetRecipeData() return self.recipeTree:GetSelectedData() end function ZO_Provisioner:GetSelectedRecipeListIndex() local recipeData = self:GetRecipeData() if recipeData then return recipeData.recipeListIndex end end function ZO_Provisioner:GetSelectedRecipeIndex() local recipeData = self:GetRecipeData() if recipeData then return recipeData.recipeIndex end end function ZO_Provisioner:RefreshRecipeDetails() local recipeData = self:GetRecipeData() if recipeData then if not ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() then self.resultTooltip:SetHidden(false) end local recipeListIndex, recipeIndex = self:GetSelectedRecipeListIndex(), self:GetSelectedRecipeIndex() self.resultTooltip:ClearLines() self.resultTooltip:SetProvisionerResultItem(recipeListIndex, recipeIndex) local numIngredients = recipeData.numIngredients for ingredientIndex, ingredientSlot in ipairs(self.ingredientRows) do if ingredientIndex > numIngredients then ingredientSlot:ClearItem() else local name, icon, requiredQuantity, _, displayQuality = GetRecipeIngredientItemInfo(recipeListIndex, recipeIndex, ingredientIndex) -- Scale the recipe ingredients to what will actually be used when you hit craft. -- If numIterations is 0 we should just show what ingredients you would need to craft once, instead. local numIterations = self:GetMultiCraftNumIterations() if numIterations > 1 then requiredQuantity = requiredQuantity * numIterations end local ingredientCount = GetCurrentRecipeIngredientCount(recipeListIndex, recipeIndex, ingredientIndex) ingredientSlot:SetItem(name, icon, ingredientCount, displayQuality, requiredQuantity) ingredientSlot:SetItemIndices(recipeListIndex, recipeIndex, ingredientIndex) end end CRAFTING_RESULTS:SetTooltipAnimationSounds(recipeData.createSound) if ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() and self:CanPreviewRecipe(recipeData) then self:PreviewRecipe(recipeData) end else self.resultTooltip:SetHidden(true) for ingredientIndex, ingredientSlot in ipairs(self.ingredientRows) do ingredientSlot:ClearItem() end end self:UpdateMultiCraft() KEYBIND_STRIP:UpdateKeybindButtonGroup(self.mainKeybindStripDescriptor) end function ZO_Provisioner:UpdateQuestPins() --Determine whether or not we need quest pins on each tab for _, tab in ipairs(self.currentTabs) do local data = tab.m_object.m_buttonData local shouldHide = self.questCategories[data.descriptor] ~= true tab.questPin:SetHidden(shouldHide) end end function ZO_Provisioner:TogglePreviewMode() ITEM_PREVIEW_KEYBOARD:ToggleInteractionCameraPreview(FRAME_TARGET_CRAFTING_FRAGMENT, FRAME_PLAYER_ON_SCENE_HIDDEN_FRAGMENT, CRAFTING_PREVIEW_OPTIONS_FRAGMENT) if ITEM_PREVIEW_KEYBOARD:IsInteractionCameraPreviewEnabled() then self.resultTooltip:SetHidden(true) self:SetMultiCraftHidden(true) self:PreviewRecipe(self:GetRecipeData()) else self.resultTooltip:SetHidden(false) self:SetMultiCraftHidden(false) end KEYBIND_STRIP:UpdateKeybindButtonGroup(self.mainKeybindStripDescriptor) end function ZO_Provisioner:SetMultiCraftHidden(shouldBeHidden) self.multiCraftContainer:SetHidden(shouldBeHidden) self:RefreshRecipeDetails() end function ZO_Provisioner:GetMultiCraftNumIterations() -- while spinner is hidden, hard cap the iteration count at 1, so the player doesn't accidentally perform a multicraft without a visual cue that it will happen if self.multiCraftContainer:IsControlHidden() then return 1 end return self.multiCraftSpinner:GetValue() end function ZO_Provisioner:ResetMultiCraftNumIterations() self.multiCraftSpinner:SetValue(1) end function ZO_Provisioner:UpdateMultiCraft() self.multiCraftSpinner:SetMinMax(1, self:GetMultiCraftMaxIterations()) self.multiCraftSpinner:UpdateButtons() end ZO_ProvisionerRow = ZO_Object:Subclass() function ZO_ProvisionerRow:New(...) local provisionerSlot = ZO_Object.New(self) provisionerSlot:Initialize(...) return provisionerSlot end function ZO_ProvisionerRow:Initialize(owner, control) self.owner = owner self.control = control self.enabled = true self.icon = control:GetNamedChild("Icon") self.nameLabel = control:GetNamedChild("Name") self.countControl = control:GetNamedChild("Count") local DIVIDER_THICKNESS = 2 self.countFractionDisplay = ZO_FractionDisplay:New(self.countControl, "ZoFontWinH4", DIVIDER_THICKNESS) self.countFractionDisplay:SetHorizontalAlignment(TEXT_ALIGN_RIGHT) self.countDividerTexture = self.countControl:GetNamedChild("Divider") end function ZO_ProvisionerRow:SetItemIndices(recipeListIndex, recipeIndex, ingredientIndex) self.control.recipeListIndex = recipeListIndex self.control.recipeIndex = recipeIndex self.control.ingredientIndex = ingredientIndex end function ZO_ProvisionerRow:SetItem(name, icon, ingredientCount, displayQuality, requiredQuantity) self.ingredientCount = ingredientCount self.requiredQuantity = requiredQuantity self.displayQuality = displayQuality -- self.quality is deprecated, included here for addon backwards compatibility self.quality = displayQuality self.nameLabel:SetText(zo_strformat(SI_TOOLTIP_ITEM_NAME, name)) self.icon:SetTexture(icon) self.countFractionDisplay:SetValues(ingredientCount, requiredQuantity) --The name label takes the remaining width which is the full row minus padding, icon, padding, padding, count, padding. self.nameLabel:SetWidth(ZO_PROVISIONER_SLOT_ROW_WIDTH - ZO_PROVISIONER_SLOT_ICON_SIZE - ZO_PROVISIONER_SLOT_PADDING_X * 4 - self.countControl:GetWidth()) self:UpdateColors() self:SetHidden(false) self.hasItem = true end function ZO_ProvisionerRow:ClearItem() self.control.recipeListIndex = nil self.control.recipeIndex = nil self.control.ingredientIndex = nil self:SetHidden(true) self.hasItem = false end function ZO_ProvisionerRow:SetHidden(hidden) self.nameLabel:SetHidden(hidden) self.icon:SetHidden(hidden) self.countControl:SetHidden(hidden) end function ZO_ProvisionerRow:SetEnabled(enabled) if self.enabled ~= enabled then self.enabled = enabled self:UpdateEnabledState() end end function ZO_ProvisionerRow:UpdateColors() local ingredientCount = self.ingredientCount local requiredQuantity = self.requiredQuantity if ingredientCount >= requiredQuantity then -- self.quality is deprecated, included here for addon backwards compatibility local displayQuality = self.displayQuality or self.quality local r, g, b = GetInterfaceColor(INTERFACE_COLOR_TYPE_ITEM_QUALITY_COLORS, displayQuality) self.nameLabel:SetColor(r, g, b, 1) else self.nameLabel:SetColor(ZO_ERROR_COLOR:UnpackRGBA()) end if self.enabled then if ingredientCount >= requiredQuantity then self.icon:SetColor(ZO_SELECTED_TEXT:UnpackRGBA()) else self.icon:SetColor(ZO_ERROR_COLOR:UnpackRGBA()) end else local DISABLED = true ZO_ItemSlot_SetupIconUsableAndLockedColor(self.icon, MEETS_USAGE_REQUIREMENTS, DISABLED) end --Despite the name these only touch the label alpha local MEETS_USAGE_REQUIREMENTS = true ZO_ItemSlot_SetupTextUsableAndLockedColor(self.nameLabel, MEETS_USAGE_REQUIREMENTS, not self.enabled) ZO_ItemSlot_SetupTextUsableAndLockedColor(self.haveLabel, MEETS_USAGE_REQUIREMENTS, not self.enabled) ZO_ItemSlot_SetupTextUsableAndLockedColor(self.countControl, MEETS_USAGE_REQUIREMENTS, not self.enabled) end function ZO_ProvisionerRow:UpdateEnabledState() if self.hasItem then self:UpdateColors() end end function ZO_Provisioner_Initialize(control) PROVISIONER = ZO_Provisioner:New(control) end function ZO_Provisioner_HaveIngredientsOnMouseEnter(control) InitializeTooltip(InformationTooltip, control, BOTTOM, 0, -10) SetTooltipText(InformationTooltip, GetString(SI_CRAFTING_HAVE_INGREDIENTS_TOOLTIP)) end function ZO_Provisioner_HaveSkillsOnMouseEnter(control) InitializeTooltip(InformationTooltip, control, BOTTOM, 0, -10) SetTooltipText(InformationTooltip, GetString(SI_CRAFTING_HAVE_SKILLS_TOOLTIP)) end function ZO_Provisioner_IsQuestItemOnMouseEnter(control) InitializeTooltip(InformationTooltip, control, BOTTOM, 0, -10) SetTooltipText(InformationTooltip, GetString(SI_CRAFTING_IS_QUEST_ITEM_TOOLTIP)) end function ZO_Provisioner_FilterOnMouseExit(control) ClearTooltip(InformationTooltip) end function ZO_ProvisionerRow_GetTextColor(self) if not self.enabled then return GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_DISABLED) elseif self.selected then return GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_SELECTED) elseif self.mouseover then return GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_HIGHLIGHT) elseif self.meetsLevelReq and self.meetsQualityReq then return GetInterfaceColor(INTERFACE_COLOR_TYPE_TEXT_COLORS, INTERFACE_TEXT_COLOR_NORMAL) end return ZO_ERROR_COLOR:UnpackRGBA() end function ZO_ProvisionerNavigationEntry_OnMouseEnter(self) ZO_SelectableLabel_OnMouseEnter(self) if self.enabled and (not self.meetsLevelReq or not self.meetsQualityReq) then InitializeTooltip(InformationTooltip, self, RIGHT, -15, 0) --loop over tradeskills if not self.meetsLevelReq then for tradeskill, levelReq in pairs(self.data.tradeskillsLevelReqs) do local level = GetNonCombatBonus(GetNonCombatBonusLevelTypeForTradeskillType(tradeskill)) if level < levelReq then local levelPassiveAbilityId = GetTradeskillLevelPassiveAbilityId(tradeskill) local levelPassiveAbilityName = GetAbilityName(levelPassiveAbilityId) InformationTooltip:AddLine(zo_strformat(SI_RECIPE_REQUIRES_LEVEL_PASSIVE, levelPassiveAbilityName, levelReq), "", ZO_ERROR_COLOR:UnpackRGBA()) end end end if not self.meetsQualityReq then InformationTooltip:AddLine(zo_strformat(SI_PROVISIONER_REQUIRES_RECIPE_QUALITY, self.data.qualityReq), "", ZO_ERROR_COLOR:UnpackRGBA()) end end end function ZO_ProvisionerNavigationEntry_OnMouseExit(self) ZO_SelectableLabel_OnMouseExit(self) ClearTooltip(InformationTooltip) end function ZO_ProvisionerTabs_OnInitialized(control) ZO_MenuBar_OnInitialized(control) local barData = { buttonPadding = 20, normalSize = 51, downSize = 64, animationDuration = DEFAULT_SCENE_TRANSITION_TIME, buttonTemplate = "ZO_ProvisionerTabButton", } ZO_MenuBar_SetData(control, barData) end
local _M = {} local mt = { __index = _M } local select = select local setmetatable = setmetatable local str_find = string.find local str_gsub = string.gsub local tab_concat = table.concat local modf = math.modf local ceil = math.ceil local function tab_append(t, idx, ...) local n = select("#", ...) for i = 1, n do t[idx + i] = select(i, ...) end return idx + n end function _M:new(url, total, page_size, page) total = total or 1 page_size = page_size or 20 page = page or 1 if page < 1 then page = 1 end local page_count = ceil(total / page_size) if page > page_count then page = page_count end local this = { total = total, page_size = page_size, page = page, page_count = page_count, url = url } setmetatable(this, mt) return this end function _M:set_url(page) local url = self.url if str_find(url, '[&%?]page=') then url = str_gsub(url, '([&%?])page=[^&#]*', '%1page=' .. page) else if not str_find(url, '%?') then url = url .. '?' end if str_find(url, '%w=') then url = url .. '&' end url = url .. 'page=' .. page end return url end function _M:prev() if self.page == 1 then return "<span class='disabled'>prev</span>" end return '<a href="' .. self:set_url(self.page - 1) .. '">prev</a>' end function _M:next() if self.page < self.page_count then return '<a href="' .. self:set_url(self.page + 1) .. '">next</a>' end return "<span class='disabled'>next</span>" end function _M:url_range(list, tlen, first, last) last = last or first for i = first, last do if i == self.page then tlen = tab_append(list, tlen, ' <span class="current">', i, '</span>') else tlen = tab_append(list, tlen, '<a href="', self:set_url(i), '">', i, '</a>') end end return tlen end function _M:slide(each_side) local ret = {} local tlen = 0 each_side = each_side or 2 local window = each_side * 2 local left_dot_end local right_dot_begin if self.page > each_side + 3 then left_dot_end = self.page - each_side if left_dot_end > self.page_count - window then left_dot_end = self.page_count - window end if left_dot_end <= 3 then left_dot_end = nil end end if self.page <= self.page_count - (each_side + 3) and self.page_count > (each_side + 3) then right_dot_begin = self.page + each_side if right_dot_begin <= window then right_dot_begin = window + 1 end if self.page_count - right_dot_begin <= 2 then right_dot_begin = nil end end if left_dot_end then tlen = self:url_range(ret, tlen, 1) tlen = tab_append(ret, tlen, " ... ") if right_dot_begin then tlen = self:url_range(ret, tlen, left_dot_end, right_dot_begin) tlen = tab_append(ret, tlen, " ... ") tlen = self:url_range(ret, tlen, self.page_count) else tlen = self:url_range(ret, tlen, left_dot_end, self.page_count) end else if right_dot_begin then tlen = self:url_range(ret, tlen, 1, right_dot_begin) tlen = tab_append(ret, tlen, " ... ") tlen = self:url_range(ret, tlen, self.page_count) else tlen = self:url_range(ret, tlen, 1, self.page_count) end end return tab_concat(ret) end function _M:show() local ret = '<div class="pager">' .. ' ' .. self:prev() .. ' ' .. self:slide() .. ' ' .. self:next() .. '</div>' return ret end function _M.paging(total_count, page_size, curr_page) total_count = total_count or 0 curr_page = curr_page or 1 if curr_page < 1 then curr_page = 1 end page_size = page_size or 20 local page_count, remainder = modf(total_count / page_size) if remainder > 0 then page_count = page_count + 1 end if curr_page > page_count then curr_page = page_count end local offset = (curr_page - 1) * page_size local limit = page_size if limit > total_count then limit = total_count end return limit, offset end return _M
if (not Bagnon) then return end if (function(addon) for i = 1,GetNumAddOns() do local name, title, notes, loadable, reason, security, newVersion = GetAddOnInfo(i) if (name:lower() == addon:lower()) then local enabled = not(GetAddOnEnableState(UnitName("player"), i) == 0) if (enabled and loadable) then return true end end end end)("Bagnon_ItemInfo") then print("|cffff1111"..(...).." was auto-disabled.") return end local MODULE = ... local ADDON, Addon = MODULE:match("[^_]+"), _G[MODULE:match("[^_]+")] local Module = Bagnon:NewModule("BindOnEquip", Addon) -- Tooltip used for scanning local ScannerTipName = "BagnonItemInfoScannerTooltip" local ScannerTip = _G[ScannerTipName] or CreateFrame("GameTooltip", ScannerTipName, WorldFrame, "GameTooltipTemplate") -- Lua API local _G = _G local string_find = string.find local string_gsub = string.gsub local string_lower = string.lower local string_match = string.match local string_split = string.split local string_upper = string.upper -- WoW API local GetItemQualityColor = _G.GetItemQualityColor local GetItemInfo = _G.GetItemInfo -- WoW Strings local S_ITEM_BOUND1 = _G.ITEM_SOULBOUND local S_ITEM_BOUND2 = _G.ITEM_ACCOUNTBOUND local S_ITEM_BOUND3 = _G.ITEM_BNETACCOUNTBOUND -- Localization. -- *Just enUS so far. local L = { ["BoE"] = "BoE", -- Bind on Equip ["BoU"] = "BoU" -- Bind on Use } -- FontString Caches local Cache_ItemBind = {} ----------------------------------------------------------- -- Slash Command & Options Handling ----------------------------------------------------------- do -- Saved settings BagnonBoE_DB = { enableRarityColoring = true } local slashCommand = function(msg, editBox) local action, element -- Remove spaces at the start and end msg = string_gsub(msg, "^%s+", "") msg = string_gsub(msg, "%s+$", "") -- Replace all space characters with single spaces msg = string_gsub(msg, "%s+", " ") -- Extract the arguments if string_find(msg, "%s") then action, element = string_split(" ", msg) else action = msg end if (action == "enable") then if (element == "color") then BagnonBoE_DB.enableRarityColoring = true end elseif (action == "disable") then if (element == "color") then BagnonBoE_DB.enableRarityColoring = false end end end -- Create a unique name for the command local commands = { "bagnonboe", "bboe", "boe" } for i = 1,#commands do -- Register the chat command, keep hash upper case, value lowercase local command = commands[i] local name = "AZERITE_TEAM_PLUGIN_"..string_upper(command) _G["SLASH_"..name.."1"] = "/"..string_lower(command) _G.SlashCmdList[name] = slashCommand end end ----------------------------------------------------------- -- Utility Functions ----------------------------------------------------------- local GetPluginContainter = function(button) local name = button:GetName() .. "ExtraInfoFrame" local frame = _G[name] if (not frame) then frame = CreateFrame("Frame", name, button) frame:SetAllPoints() end return frame end local Cache_GetItemBind = function(button) if (not Cache_ItemBind[button]) then local ItemBind = GetPluginContainter(button):CreateFontString() ItemBind:SetDrawLayer("ARTWORK") ItemBind:SetPoint("BOTTOMLEFT", 2, 2) ItemBind:SetFontObject(_G.NumberFont_Outline_Med or _G.NumberFontNormal) ItemBind:SetFont(ItemBind:GetFont(), 12, "OUTLINE") ItemBind:SetShadowOffset(1, -1) ItemBind:SetShadowColor(0, 0, 0, .5) local UpgradeIcon = button.UpgradeIcon if UpgradeIcon then UpgradeIcon:ClearAllPoints() UpgradeIcon:SetPoint("BOTTOMRIGHT", 2, 0) end Cache_ItemBind[button] = ItemBind end return Cache_ItemBind[button] end ----------------------------------------------------------- -- Main Update ----------------------------------------------------------- local Update = function(self) local showStatus local itemLink = self:GetItem() if (itemLink) then local itemName, _itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, iconFileDataID, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent = GetItemInfo(itemLink) if (itemRarity and (itemRarity > 1)) and ((bindType == 2) or (bindType == 3)) then local bag,slot = self:GetBag(), self:GetID() ScannerTip.owner = self ScannerTip.bag = bag ScannerTip.slot = slot ScannerTip:SetOwner(self, "ANCHOR_NONE") ScannerTip:SetBagItem(bag,slot) showStatus = true for i = 2,6 do local line = _G[ScannerTipName.."TextLeft"..i] if (not line) then break end local msg = line:GetText() if (msg) then if (string_find(msg, S_ITEM_BOUND1) or string_find(msg, S_ITEM_BOUND2) or string_find(msg, S_ITEM_BOUND3)) then showStatus = nil end end end end if (showStatus) then local ItemBind = Cache_ItemBind[self] or Cache_GetItemBind(self) local r, g, b = GetItemQualityColor(itemRarity) if (BagnonBoE_DB.enableRarityColoring) then ItemBind:SetTextColor(r * 2/3, g * 2/3, b * 2/3) else ItemLevel:SetTextColor(240/255, 240/255, 240/255) end ItemBind:SetText((bindType == 3) and L["BoU"] or L["BoE"]) end end if (not showStatus) and (Cache_ItemBind[self]) then Cache_ItemBind[self]:SetText("") end end local item = Bagnon.ItemSlot or Bagnon.Item if (item) and (item.Update) then hooksecurefunc(item, "Update", Update) end
local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local condition = Condition(CONDITION_INVISIBLE) condition:setParameter(CONDITION_PARAM_TICKS, 200000) combat:addCondition(condition) local spell = Spell("instant") function spell.onCastSpell(creature, variant) return combat:execute(creature, variant) end spell:name("Invisibility") spell:words("utana vid") spell:group("support") spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") spell:id(45) spell:cooldown(2 * 1000) spell:groupCooldown(2 * 1000) spell:level(35) spell:mana(440) spell:isSelfTarget(true) spell:isAggressive(false) spell:needLearn(false) spell:register()
local token = redis.call('lpop',KEYS[1]) local curtime = tonumber(KEYS[2]) if token ~= false then if ( tonumber(token)/1000 > tonumber(KEYS[2]) ) then redis.call('lpush',KEYS[1],token) return 1 else return tonumber(token) end else return 0 end
-- Applies damage if the weapon projectile hits a player -- Attach this script to weapons that can take damage -- Add "Damage" custom property on the weapon object -- Getting custom properties on the weapon local WEAPON = script.parent local DAMAGE = WEAPON:GetCustomProperty("Damage") local function OnWeaponInteraction(weaponInteraction) local target = weaponInteraction.targetObject -- Apply damage to target if it's a player if Object.IsValid(target) and target:IsA("Player") then -- Creating damage information local newDamage = Damage.New(DAMAGE) newDamage.reason = DamageReason.COMBAT newDamage.sourceAbility = weaponInteraction.sourceAbility newDamage.sourcePlayer = weaponInteraction.weaponOwner target:ApplyDamage(newDamage) end end -- Connecting weapon event to a function WEAPON.targetInteractionEvent:Connect(OnWeaponInteraction)
#!/usr/bin/env lua local exec = require "tek.lib.exec" local c = exec.run(function() local exec = require "tek.lib.exec" exec.sleep() end) exec.sleep(100) error "something went wrong." --[[ lua: bin/task/case32.lua:8: something went wrong. stack traceback: [C]: in function 'error' bin/task/case32.lua:8: in main chunk [C]: ? luatask: bin/task/case32.lua:5: received abort signal stack traceback: [C]: in function 'sleep' bin/task/case32.lua:5: in function <bin/task/case32.lua:3> [C]: ? ]]--
PLUGIN.name = "Strength" PLUGIN.author = "Chessnut" PLUGIN.desc = "Adds a strength attribute." if (SERVER) then function PLUGIN:PlayerGetFistDamage(client, damage, context) if (client:getChar()) then -- Add to the total fist damage. context.damage = context.damage + (client:getChar():getAttrib("str", 0) * 1.5) end end function PLUGIN:PlayerThrowPunch(client, hit) return end end -- Configuration for the plugin
--[[ button.lua Copyright (C) 2016 Kano Computing Ltd. License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 Button consistent on text and action ]]-- local Colour = require 'system.colour' local Locale = require 'system.locale' local Utils = require 'system.utils' local love = love local g = love.graphics local m = love.mouse local Button = {} Button.__index = Button -- local function forward declaration local checkPosition, checkTouchPosition function Button.create(textKey, action, args, font, boxColour, shadowColour, frameColour) -- print("CREATING Button") -- DEBUG_TAG local self = setmetatable({}, Button) self.selected = false self.isNew = false -- self.textKey = textKey self.action = action self.args = args self.font = font self.colours = { box = boxColour, shadow = shadowColour, frame = frameColour, disabled = Colour.GREY_DARK } -- tooltip pop up self.tooltipText = g.newText(g_resMngr.fonts[g_resMngr.DEFAULT_FONT_16], '') self.tooltipPos = {x = 0, y = 0} self.tooltipSize = {w = 0, h = 0} self.tooltipTriangle = {x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0} return self end function Button:init() self.selected = false -- Text self.text = g.newText( g_resMngr.fonts[g_resMngr.DEFAULT_FONT_16], Locale.text(self.textKey) ) -- Calculate size local textW = Utils.round(self.text:getWidth()) local textH = Utils.round(self.text:getHeight()) self.size = { w = textW + 20, h = textH + 5} end function Button:update() -- Check hoverover self.selected = self.selected or checkPosition(self.pos, self.size) return self.selected end function Button:draw() local lineW = g.getLineWidth() -- shadow Colour.set(self.colours.shadow) g.rectangle("fill", self.pos.x, self.pos.y + 5, self.size.w, self.size.h, 2, 2, 10) -- frame if self.colours.frame then g.setLineWidth(1) Colour.set(self.colours.frame) g.rectangle("line", self.pos.x, self.pos.y, self.size.w, self.size.h, 2, 2, 10) end -- box Colour.set(self.colours.box) g.rectangle("fill", self.pos.x, self.pos.y, self.size.w, self.size.h, 2, 2, 10) -- text Colour.set(Colour.WHITE) g.draw(self.text, self.textPos.x, self.textPos.y) -- hover highlight if self.selected then self:drawHoverHighlight() -- tooltip pop up if self.tooltipText then self:drawTooltip() end -- new item highlight elseif self.isNew then self:drawIsNewHighlight() end -- resetting graphics Colour.reset() g.setLineWidth(lineW) end function Button:drawHoverHighlight() g.setLineWidth(6) Colour.set(Colour.WHITE) g.rectangle( "line", self.highlight.x, self.highlight.y, self.highlight.w, self.highlight.h, 2, 2, 10 ) g.setLineWidth(2) Colour.set(Colour.ORANGE_KANO) g.rectangle( "line", self.highlight.x, self.highlight.y, self.highlight.w, self.highlight.h, 2, 2, 10 ) end function Button:drawIsNewHighlight() g.setLineWidth(2) Colour.set(Colour.GREEN_BRIGHT) g.rectangle( "line", self.highlight.x, self.highlight.y, self.highlight.w, self.highlight.h, 2, 2, 10 ) end function Button:drawTooltip() -- bubble Colour.set(Colour.WHITE) g.rectangle( "fill", self.tooltipPos.x, self.tooltipPos.y, self.tooltipSize.w, self.tooltipSize.h, 2, 2, 10 ) -- triangle g.polygon("fill", self.tooltipTriangle.x1, self.tooltipTriangle.y1, self.tooltipTriangle.x2, self.tooltipTriangle.y2, self.tooltipTriangle.x3, self.tooltipTriangle.y3 ) -- text Colour.set(Colour.ORANGE_KANO) g.draw(self.tooltipText, self.tooltipPos.x + 5, self.tooltipPos.y) -- resetting graphics Colour.reset() end function Button:toggleSelected() self.selected = not self.selected end function Button:select(bool) self.selected = bool end function Button:setIsNew(isNew) self.isNew = isNew end function Button:getSize() return self.size end function Button:getPos() return self.pos end function Button:setPos(x, y) -- position self.pos = { x = x, y = y } -- if self.text then local textW = self.text:getWidth() local textH = self.text:getHeight() local posX = Utils.round(self.pos.x + (self.size.w - textW) / 2) local posY = Utils.round(self.pos.y + (self.size.h - textH) / 2) self.textPos = {x = posX, y = posY} end -- self:setHighlight(1, 1, 3, 3) end function Button:setColour(box, frame) self.colours.box = box self.colours.frame = frame end function Button:setDisabledColour(colour) self.colours.disabled = colour end function Button:setHighlight(x, y, w, h) self.highlight = {x = self.pos.x - x, y = self.pos.y - y, w = self.size.w + w, h = self.size.h + h} end function Button:setTooltipTextKey(textKey) if not textKey or textKey == '' then return end Utils.setText(self.tooltipText, Locale.text(textKey)) self.tooltipSize = { w = self.tooltipText:getWidth() + 10, h = self.tooltipText:getHeight() + 3 } -- TODO: remove the +16 here, its needed because of CodexMenu:drawElements self.tooltipPos = { x = Utils.round(self.pos.x + self.size.w / 2 - self.tooltipSize.w / 2) + 16, y = self.pos.y - self.tooltipSize.h - 20 } self.tooltipTriangle = { x1 = Utils.round(self.tooltipPos.x + (self.tooltipSize.w / 2) - 10), y1 = self.tooltipPos.y + self.tooltipSize.h, x2 = Utils.round(self.tooltipPos.x + (self.tooltipSize.w / 2)), y2 = self.tooltipPos.y + self.tooltipSize.h + 10, x3 = Utils.round(self.tooltipPos.x + (self.tooltipSize.w / 2) + 10), y3 = self.tooltipPos.y + self.tooltipSize.h, } end -- Input -------------------------------------------------------------------------------- function Button:controls(isReleased, key, mousebutton, touchX, touchY) if isReleased and key == 'return' and self.selected then self:click() return true end if isReleased and mousebutton == 1 then if checkPosition(self.pos, self.size) then self:click() self.selected = true return true end end if touchX ~= nil and touchY ~= nil then if checkTouchPosition(self.pos, self.size, touchX, touchY) then self:click() self.selected = true return true end end return false end function Button:click() if self.action then g_resMngr.playSound(g_resMngr.SFX_CONFIRM) self.action(unpack(self.args)) end end -- Private ------------------------------------------------------------------------------ function checkPosition(pos, size) local sw, sh = Utils.getScale() return ((pos.x * sw) <= m.getX()) and (m.getX() <= (pos.x * sw + size.w * sw)) and ((pos.y * sh) <= m.getY()) and (m.getY() <= (pos.y * sh + size.h * sh)) end function checkTouchPosition(pos, size, touchX, touchY) local sw, sh = Utils.getScale() return ((pos.x * sw) <= touchX) and (touchX <= (pos.x * sw + size.w * sw)) and ((pos.y * sh) <= touchY) and (touchY <= (pos.y * sh + size.h * sh)) end return Button
return {'rit','ritalin','ritardando','rite','ritenuto','ritme','ritmebox','ritmeester','ritmegevoel','ritmeren','ritmesectie','ritmiek','ritmisch','ritmus','ritnaald','ritornel','ritoverwinning','ritprijs','rits','ritselaar','ritselen','ritseling','ritsen','ritser','ritsig','ritsijzer','ritssluiting','ritten','rittenadministratie','rittenkoers','rittenwedstrijd','rituaal','ritualiseren','ritualisering','ritualisme','ritualist','ritualistisch','ritueel','ritus','ritwinnaar','ritwinst','ritzege','ritmestoornis','ritsvak','rittenkaart','rittenregistratie','rita','ritzen','ritsma','ritchie','ritsema','ritmeester','ritman','riteco','ritter','ritzema','ritskes','ritmeijer','ritzer','ritfeld','riten','rites','ritje','ritjes','ritmeesters','ritmen','ritmes','ritmische','ritmischer','ritnaalden','ritornellen','ritsel','ritselde','ritselden','ritselend','ritselende','ritselingen','ritselt','ritsers','ritsige','ritssluitingen','ritst','ritste','ritsten','ritte','ritualen','ritualisten','rituele','rituelen','ritussen','ritmeboxen','ritmeerde','ritprijzen','ritselaars','ritsijzers','rittenkoersen','ritualiseerde','ritualistische','ritueeltjes','ritzeges','ritmestoornissen','ritas','ritchies','ritueeltje','ritsvakje','ritmesecties','rittenkaarten','rittenwedstrijden','ritsvakken'}
-- initial for props functions util.AddNetworkString("ResetHull") util.AddNetworkString("SetBlind") util.AddNetworkString("SetHull") util.AddNetworkString("PlayFreezeCamSound") util.AddNetworkString("PlayerSwitchDynamicLight") util.AddNetworkString("DisableDynamicLight") util.AddNetworkString("PH_ShowTutor") util.AddNetworkString("CheckAdminFirst") util.AddNetworkString("CheckAdminResult") util.AddNetworkString("SvCommandReq") util.AddNetworkString("SvCommandSliderReq") util.AddNetworkString("SendTauntStateCmd") util.AddNetworkString("CL2SV_PlayThisTaunt") util.AddNetworkString("CL2SV_ExchangeProp") util.AddNetworkString("utilWLVShowMessage") util.AddNetworkString("ServerUsablePropsToClient") util.AddNetworkString("PH_ForceCloseTauntWindow") util.AddNetworkString("PH_AllowTauntWindow") util.AddNetworkString("PH_RoundDraw_Snd") util.AddNetworkString("PH_TeamWinning_Snd") util.AddNetworkString("AutoTauntSpawn") util.AddNetworkString("AutoTauntRoundEnd") -- some stupid checks util.AddNetworkString("PHE.rotateState")
-- Start Vehicle thread Threads.Start(Vehicle) -- Vehicle Class Functions function Vehicle.Initialize() DecorRegister('fuel', 1) -- float DecorRegister('owner', 3) -- int DecorRegister('hotwired', 3) -- int DecorRegister('silentsirens', 3) -- int DecorRegister('neonlayout', 3) -- int end function Vehicle.Tick() if (LocalPlayer.IsDead) then return end if (not LocalPlayer.InVehicle) then Vehicle.HandleOutside() else Vehicle.HandleInside() end Vehicle.HandleKeys() end function Vehicle.HandleOutside() local enteringVehicle = GetVehiclePedIsTryingToEnter(LocalPlayer.Ped) local vehicleExists = DoesEntityExist(enteringVehicle) if (vehicleExists and not LocalPlayer.IsEnteringVehicle) then LocalPlayer.IsEnteringVehicle = true -- do not let the player steal this vehicle if (GetVehicleDoorLockStatus(enteringVehicle) == 7) then SetVehicleDoorsLocked(enteringVehicle, 2) end local driverPed = GetPedInVehicleSeat(enteringVehicle, -1) if (driverPed) then SetPedCanBeDraggedOut(driverPed, false) end elseif (not vehicleExists and not IsPedInAnyVehicle(LocalPlayer.Ped, true) and LocalPlayer.IsEnteringVehicle) then LocalPlayer.IsEnteringVehicle = false elseif (IsPedInAnyVehicle(LocalPlayer.Ped, false)) then Vehicle.Enter() end -- todo - add stealing vehicles at gunpoint end function Vehicle.HandleInside() if (LocalPlayer.InVehicle and not IsPedInAnyVehicle(LocalPlayer.Ped, false)) then Vehicle.Exit() end if (not DoesEntityExist(Vehicle.Entity)) then return end Vehicle.Coords = GetEntityCoords(Vehicle.Entity, true) Vehicle.ProcessModifiers() Vehicle.ProcessSpeedControl() Vehicle.HandleFuel() Vehicle.HandleDamage() Vehicle.HandleShuffle() Vehicle.HandleCrash() Vehicle.DrawHUD() end function Vehicle.HandleKeys() if (LocalPlayer.InVehicle and LocalPlayer.CanDrive) then if (LocalPlayer.IsDriving) then if ((Vehicle.HasKeys or Vehicle.IsHotwired == 1) and IsControlJustPressed(0, 246) and GetLastInputMethod(2)) then -- Y: toggle engine if (DoesEntityExist(Vehicle.Entity) and not Vehicle.IsDamaged) then local isEngineRunning = IsVehicleEngineOn(Vehicle.Entity) if (not isEngineRunning) then if (Vehicle.Fuel > 1) then SetVehicleUndriveable(Vehicle.Entity, false) SetVehicleEngineOn(Vehicle.Entity, true, false) Vehicle.IsEngineRunning = true Chat.Log('^5You started the engine.') Core.Event('gtarp:VehicleStartEngine', true) else Core.Event('gtarp:VehicleOutOfFuel') Chat.Log('^5Your vehicle is out of fuel.') end else SetVehicleUndriveable(Vehicle.Entity, true) SetVehicleEngineOn(Vehicle.Entity, false, true) Vehicle.IsEngineRunning = false Chat.Log('^5Your vehicles engine has shut off.') Core.Event('gtarp:VehicleStartEngine', false) end end end end end -- TOGGLE VEHICLE LOCKS INSIDE OR OUTSIDE OF CAR if (IsControlJustPressed(1, 303) and GetLastInputMethod(2)) then -- U: lock/unlock vehicle local vehicle = nil if (not IsPedInAnyVehicle(LocalPlayer.Ped)) then -- get the vehicle we are looking at local endCoords = GetOffsetFromEntityInWorldCoords(LocalPlayer.Ped, 0.0, 10.0, -4.0) vehicle = Core.Raycast(LocalPlayer.Coords, endCoords, 10) else -- get the vehicle we are in vehicle = Vehicle.Entity end -- handle locking/unlocking if (vehicle ~= nil and DoesEntityExist(vehicle)) then local plateText = GetVehicleNumberPlateText(vehicle) if (plateText ~= nil and plateText ~= "" and (LocalPlayer.OwnsVehicle(plateText) or LocalPlayer.HasKeys(plateText))) then local isLocked = not GetVehicleDoorsLockedForPlayer(vehicle, LocalPlayer.Ped) SetVehicleDoorsLockedForAllPlayers(vehicle, isLocked) -- an annoying horn for when you lock and unlock your car :) -- doesnt behave well with police cars. if (not Vehicle.IsPoliceVehicle) then Citizen.CreateThread(function() StartVehicleHorn(vehicle, 25, GetHashKey("HELDDOWN"), 0) SetVehicleIndicatorLights(vehicle, 0, true) SetVehicleIndicatorLights(vehicle, 1, true) Wait(100) SetVehicleIndicatorLights(vehicle, 0, false) SetVehicleIndicatorLights(vehicle, 1, false) if (isLocked) then Wait(50) StartVehicleHorn(vehicle, 25, GetHashKey("HELDDOWN"), 0) SetVehicleIndicatorLights(vehicle, 0, true) SetVehicleIndicatorLights(vehicle, 1, true) Wait(100) SetVehicleIndicatorLights(vehicle, 0, false) SetVehicleIndicatorLights(vehicle, 1, false) end end) end if (isLocked) then Chat.Log('^5You locked this vehicle.') else Chat.Log('^5You unlocked this vehicle.') end else Chat.Log('^5You cannot lock/unlock that vehicle.') end end end end function Vehicle.Enter() if (LocalPlayer.InVehicle or Vehicle.Entity ~= nil) then return end -- get vehicle and set player info Vehicle.Entity = GetVehiclePedIsIn(LocalPlayer.Ped, false) Vehicle.Name = GetDisplayNameFromVehicleModel(GetEntityModel(Vehicle.Entity)) Vehicle.IsMedicalVehicle = false Vehicle.IsPoliceVehicle = false LocalPlayer.CanDrive = false LocalPlayer.InVehicle = true LocalPlayer.IsEnteringVehicle = false -- figure out if this player has the keys to this vehicle local plateText = Core.StringTrim(GetVehicleNumberPlateText(Vehicle.Entity)) local isOwner = LocalPlayer.OwnsVehicle(plateText) -- check if this vehicle is hotwired Vehicle.IsHotwired = DecorGetInt(Vehicle.Entity, 'hotwired') -- figure out medical/police vehicles if (not isOwner) then Vehicle.IsMedicalVehicle = Vehicle.Name == 'AMBULAN' Vehicle.IsPoliceVehicle = IsPedInAnyPoliceVehicle(LocalPlayer.Ped) end -- get the seat the ped is in local seat = -1 for i = -1, 6 do if (GetPedInVehicleSeat(Vehicle.Entity, i) == LocalPlayer.Ped) then seat = i break end end SetVehicleNeedsToBeHotwired(Vehicle.Entity, false) -- handle taxi --if (not isOwner and Vehicle.Name == 'TAXI' and not TaxiDriver.IsPlayerOnDuty and seat ~= -1) then -- TriggerServerEvent('gtarp:TaxiGetIn', playerId, plateText, seat) -- end if (seat == -1) then -- if the player doesn't have the keys, nothing else matters, fail! Vehicle.HasKeys = LocalPlayer.HasKeys(plateText) or isOwner if (Vehicle.IsHotwired == 1) then Vehicle.HasKeys = true Chat.Log("^5*** You notice a bunch of weird wires.") end if (not isOwner and not Vehicle.HasKeys) then if (not IsVehicleEngineOn(Vehicle.Entity)) then Chat.Log("^1You don't have the keys for this vehicle.") SetVehicleUndriveable(Vehicle.Entity, true) end end -- if it's the owner or the player has the keys, go ahead if (isOwner or Vehicle.HasKeys or Vehicle.IsHotwired) then Vehicle.LastDamageCheck = GetGameTimer() Vehicle.LastEngineHealth = GetVehicleEngineHealth(Vehicle.Entity) Vehicle.LastBodyHealth = GetVehicleBodyHealth(Vehicle.Entity) LocalPlayer.CanDrive = true -- prepare for fuel Vehicle.LastFuelCheck = GetGameTimer() if (DecorGetFloat(Vehicle.Entity, 'fuel') == 0) then DecorSetFloat(Vehicle.Entity, 'fuel', 16.0) end Vehicle.Fuel = DecorGetFloat(Vehicle.Entity, 'fuel') SetVehicleHasBeenOwnedByPlayer(Vehicle.Entity, true) -- ensure damage flag is set Vehicle.IsDamaged = GetVehicleBodyHealth(Vehicle.Entity) <= 100 or GetVehicleEngineHealth(Vehicle.Entity) Vehicle.IsEngineRunning = IsVehicleEngineOn(Vehicle.Entity) Vehicle.SteeringAngle = GetVehicleSteeringAngle(Vehicle.Entity) Vehicle.MaxSpeed = GetVehicleHandlingFloat(Vehicle.Entity, "CHandlingData", "fInitialDriveMaxFlatVel") if (not LocalPlayer.IsHudHidden) then DisplayRadar(true) end LocalPlayer.ShowHud = true else local lockStatus = GetVehicleDoorLockStatus(Vehicle.Entity) if (lockStatus == 4) then -- stop window breaking ClearPedTasks(LocalPlayer.Ped) elseif (lockStatus == 7) then -- local is driving SetVehicleDoorsLocked(Vehicle.Entity, 2) local drivingPed = GetPedInVehicleSeat(drivingPed, -1) if (drivingPed) then SetPedCanBeDraggedOut(drivingPed, false) end end end SetVehicleLightMultiplier(Vehicle.Entity, 1.0) else if (not LocalPlayer.IsHudHidden) then DisplayRadar(true) end LocalPlayer.ShowHud = true end end function Vehicle.Exit() if (not LocalPlayer.InVehicle or Vehicle.Entity == nil) then return end if (LocalPlayer.IsDriving) then if (Vehicle.IsEngineRunning and not Vehicle.IsDamaged) then SetVehicleEngineOn(Vehicle.Entity, true, true) SetVehicleRadioEnabled(Vehicle.Entity, 1) SetVehicleLightMultiplier(Vehicle.Entity, 25.0) -- todo ???? --Citizen.InvokeNative(0xBC3CCA5844452B06, Vehicles.Vehicle.Entity, 1.0) -- todo ???? end end --SetVehicleSteeringAngle(Vehicles.Vehicle.Entity, Vehicles.Vehicle.SteeringAngle) Vehicle.Name = GetDisplayNameFromVehicleModel(GetEntityModel(Vehicle.Entity)) if (Vehicle.Name == 'TAXI' and not TaxiDriver.IsPlayerOnDuty and GetPedInVehicleSeat(Vehicle.Entity, -1) ~= LocalPlayer.Ped) then TriggerServerEvent('gtarp:TaxiGetOut', GetPlayerServerId(PlayerId()), GetVehicleNumberPlateText(Vehicle.Entity)) end Vehicle.Entity = nil Vehicle.LastFuelCheck = nil Vehicle.IsMedicalVehicle = false Vehicle.Speed = 0 Vehicle.LeftGroundAt = nil Vehicle.MaxHeight = nil LocalPlayer.InVehicle = false LocalPlayer.IsDriving = false LocalPlayer.CanDrive = false if (Vehicle.IsPoliceVehicle) then Vehicle.IsPoliceVehicle = false LocalPlayer.ResetWeapons() if (Police.HeliCam.Enabled) then Police.ExitHeliCam() end end Vehicle.LastDamageCheck = nil if (not LocalPlayer.IsHudHidden) then DisplayRadar(false) end LocalPlayer.ShowHud = false end function Vehicle.HandleSpikes() end function Vehicle.HandleShuffle() CanShuffleSeat(Vehicle.Entity, false) if (not Vehicle.AllowShuffling) then if (GetPedInVehicleSeat(Vehicle.Entity, 0) == LocalPlayer.Ped and GetIsTaskActive(LocalPlayer.Ped, 165) and not GetIsTaskActive(LocalPlayer.Ped, 2) and IsVehicleSeatFree(Vehicle.Entity, -1)) then SetPedIntoVehicle(LocalPlayer.Ped, Vehicle.Entity, 0) end else if (GetPedInVehicleSeat(Vehicle.Entity, 0) == LocalPlayer.Ped and not GetIsTaskActive(LocalPlayer.Ped, 165) and not GetIsTaskActive(LocalPlayer.Ped, 2) and IsVehicleSeatFree(Vehicle.Entity, -1)) then -- shuffle wasnt working... had the force the task once on allow shuffle TaskShuffleToNextVehicleSeat(LocalPlayer.Ped, Vehicle.Entity) end end end function Vehicle.ProcessModifiers() if (not LocalPlayer.IsDriving or not DoesEntityExist(LocalPlayer.Ped) and not IsPlayerControlOn(LocalPlayer.Ped)) then return end if (LocalPlayer.IsDead or IsPlayerBeingArrested(PlayerId(), true)) then return end if (Vehicle.Handling.Base < 0.0) then Vehicle.Handling.Base = 35.0 end Vehicle.Handling.RelVector = GetEntitySpeedVector(Vehicle.Entity, true) Vehicle.Handling.Angle = math.acos(Vehicle.Handling.RelVector.y / Vehicle.Speed) * 180.0 / 3.14159265 if (tonumber(Vehicle.Handling.Angle) == nil) then Vehicle.Handling.Angle = 0.0 end if (Vehicle.Speed < Vehicle.Handling.Base) then Vehicle.Handling.SpeedMultiplier = (Vehicle.Handling.Base - Vehicle.Speed) / Vehicle.Handling.Base end Vehicle.Handling.PowerMultiplier = 1.0 + Vehicle.Handling.PowerAdjust * (((Vehicle.Handling.Angle / 90) * Vehicle.Handling.AngleImpact) + ((Vehicle.Handling.Angle / 90) * Vehicle.Handling.SpeedMultiplier * Vehicle.Handling.SpeedImpact)) Vehicle.Handling.TorqueMultiplier = 1.0 + Vehicle.Handling.TorqueAdjust * (((Vehicle.Handling.Angle / 90) * Vehicle.Handling.AngleImpact) + ((Vehicle.Handling.Angle / 90) * Vehicle.Handling.SpeedMultiplier * Vehicle.Handling.SpeedImpact)) Vehicle.Handling.AccelValue = GetControlValue(0, 71) Vehicle.Handling.BrakeValue = GetControlValue(0, 72) if (Vehicle.Handling.Angle <= 135 and Vehicle.Handling.Angle > Vehicle.Handling.Deadzone) then SetVehicleEngineTorqueMultiplier(Vehicle.Entity, Vehicle.Handling.TorqueMultiplier) SetVehicleEnginePowerMultiplier(Vehicle.Entity, Vehicle.Handling.PowerMultiplier) else Vehicle.Handling.PowerMultiplier = 1.0 Vehicle.Handling.TorqueMultiplier = 1.0 end end function Vehicle.HandleOffGround() end function Vehicle.HandleCrash() end function Vehicle.RequestInventory() end function Vehicle.DrawHud() if (not LocalPlayer.ShowHud or LocalPlayer.IsHudHidden) then return end if (not LocalPlayer.InVehicle or not DoesEntityExist(Vehicle.Entity)) then return end -- calculate speeds for display Vehicle.Speed = GetEntitySpeed(Vehicle.Entity) Vehicle.SpeedKnots = math.floor(Vehicle.Speed * 1.94384 + 0.5) Vehicle.SpeedMph = math.floor(Vehicle.Speed * 2.23694 + 0.5) Vehicle.SpeedKph = math.floor(Vehicle.Speed * 3.6 + 0.5) -- speed text Vehicle.SpeedText = string.format('%d mph | %d kmh', Vehicle.SpeedMph, Vehicle.SpeedKph) Core.DrawText({x = 0.52, y = 1.25}, {width=1, height=1, scale=0.5}, {r=255,g=255,b=255,a=255}, Vehicle.SpeedText) -- if driving, display fuel text if (LocalPlayer.IsDriving) then Vehicle.FuelText = string.format('%0.1f%s', Vehicle.Fuel - 1, 'g') Core.DrawText({x = 0.62, y = 1.25}, {width=1, height=1, scale=0.5}, {r=255,g=255,b=0,a=255}, Vehicle.FuelText) end -- todo -- move gps hud draw here end function Vehicle.HandleFuel() end function Vehicle.HandleDamage() end function Vehicle.ProcessSpeedControl() end function Vehicle.ShuffleSeat() end function Vehicle.Fix() end function Vehicle.UseRepairKit() end function Vehicle.Fuel(value) end function Vehicle.Wash() end function Vehicle.CanFuel() end function Vehicle.GetFuel() if (not Vehicle.GetTarget()) then return false end return DecorGetFloat(Vehicles.GetTarget(), 'fuel') end function Vehicle.GetTarget() return nil end
-- Parse the generic MsdFile (used for SSC and SM files). -- Translated directly from the source here: -- https://github.com/stepmania/stepmania/blob/master/src/MsdFile.cpp#L32 -- The original MSD format is simply: -- #PARAM0:PARAM1:PARAM2:PARAM3; -- #NEXTPARAM0:PARAM1:PARAM2:PARAM3; -- (The first field is typically an identifier, but doesn't have to be.) -- The semicolon is not optional, though if we hit a # on a new line, eg: -- #VALUE:PARAM1 -- #VALUE2:PARAM2 -- we'll recover. function ParseMsdFile(SongDir) local function AddParam(t, p, plen) -- table.concat(table_name, separator, start, end) local param = table.concat(p, '', 1, plen) -- -- Normalize all line endings to \n and remove all leading and trailing whitespace. param = param:gsub('\r\n', '\n'):gsub('\r', '\n'):match('^%s*(.-)%s*$') -- Field specific modifications. We length check the last table to make sure we're -- actually parsing what we want. -- TODO(teejusb): We should probably do this for most fields for consistency. -- NOTE(teejusb): This is for *.sm files only. This is easily changeable, -- I just haven't got around to it yet. if((#t[#t] == 6 and t[#t][1] == 'NOTES')) then -- Spaces don't matter for the chart data itself, remove them all. param = param:gsub(' ', '') elseif((#t[#t] == 1 and t[#t][1] == 'BPMS')) then -- Line endings and spaces don't matter for BPMs, remove them all. param = param:gsub('\n', ''):gsub(' ', '') end table.insert(t[#t], param) end local function AddValue(t) table.insert(t, {}) end local function at(s, i) return s:sub(i, i) end local SimfileString, FileType = GetSimfileString(SongDir) if not SimfileString then return {} end if FileType ~= 'sm' then return {} end local final = {} local length = SimfileString:len() local ReadingValue = false local processed = {} for i = 0, length - 1 do table.insert(processed, '\0') end local i = 0 local processedLen = -1 -- Lua doesn't have continue so use a bool to emulate it and skip the operations we don't want to perform. local continue = false while i < length do if(i + 1 < length and at(SimfileString, i+1) == '/' and at(SimfileString, i+2) == '/') then -- Skip a comment entirely; don't copy the comment to the value/parameter i = i + 1 while i < length and at(SimfileString, i+1) ~= '\n' do i = i + 1 end continue = true end if(not continue and ReadingValue and at(SimfileString, i+1) == '#') then -- Unfortunately, many of these files are missing ;'s. -- If we get a # when we thought we were inside a value, assume we -- missed the ;. Back up and end the value. -- Make sure this # is the first non-whitespace character on the line. local firstChar = true local j = processedLen while j > 0 and processed[j] ~= '\r' and processed[j] ~= '\n' do if(processed[j] == ' ' or processed[j] == '\t') then j = j - 1 else firstChar = false break end end if not firstChar then -- We're not the first char on a line. Treat it as if it were a normal character. processed[processedLen+1] = at(SimfileString, i+1) processedLen = processedLen + 1 i = i + 1 continue = true end if(not continue) then -- Skip newlines and whitespace before adding the value. processedLen = j while(processedLen > 0 and (processed[processedLen] == '\r' or processed[processedLen] == '\n' or processed[processedLen] == ' ' or processed[processedLen] == '\t')) do processedLen = processedLen - 1 end AddParam(final, processed, processedLen) processedLen = 0 ReadingValue = false end end -- # starts a new value. if(not continue and not ReadingValue and at(SimfileString, i+1) == '#') then AddValue(final) ReadingValue = true end if(not continue and not ReadingValue) then if(at(SimfileString, i+1) == '\\') then i = i + 2 else i = i + 1 end -- nothing else is meaningful outside of a value continue = true end -- : and ; end the current param, if any. if(not continue and processedLen ~= -1 and (at(SimfileString, i+1) == ':' or at(SimfileString, i+1) == ';')) then AddParam(final, processed, processedLen) end -- # and : begin new params. if(not continue and (at(SimfileString, i+1) == '#' or at(SimfileString, i+1) == ':')) then i = i + 1 processedLen = 0 continue = true end -- ; ends the current value. if(not continue and at(SimfileString, i+1) == ';') then ReadingValue = false i = i + 1 continue = true end -- We've gone through all the control characters. All that is left is either an escaped character, -- ie \#, \\, \:, etc., or a regular character. -- NOTE: There is usually an 'unescape' bool passed to this top level function, -- but when reading SM/SSC files it's always set to true so we assume that. if(not continue and i < length and at(SimfileString, i+1) == '\\') then i = i + 1 end -- Add any unterminated value at the very end. if (not continue and i < length) then processed[processedLen+1] = at(SimfileString, i+1) processedLen = processedLen + 1 i = i + 1 end continue = false end if(ReadingValue) then AddParam(final, processed, processedLen) end return final end
local dfhack = dfhack local _ENV = dfhack.BASE_G local buildings = dfhack.buildings local utils = require 'utils' -- Uninteresting values for filter attributes when reading them from DF memory. -- Differs from the actual defaults of the job_item constructor in allow_artifact. buildings.input_filter_defaults = { item_type = -1, item_subtype = -1, mat_type = -1, mat_index = -1, flags1 = {}, -- Instead of noting those that allow artifacts, mark those that forbid them. -- Leaves actually enabling artifacts to the discretion of the API user, -- which is the right thing because unlike the game UI these filters are -- used in a way that does not give the user a chance to choose manually. flags2 = { allow_artifact = true }, flags3 = {}, flags4 = 0, flags5 = 0, reaction_class = '', has_material_reaction_product = '', metal_ore = -1, min_dimension = -1, has_tool_use = -1, quantity = 1 } --[[ Building input material table. ]] local building_inputs = { [df.building_type.Chair] = { { item_type=df.item_type.CHAIR, vector_id=df.job_item_vector_id.CHAIR } }, [df.building_type.Bed] = { { item_type=df.item_type.BED, vector_id=df.job_item_vector_id.BED } }, [df.building_type.Table] = { { item_type=df.item_type.TABLE, vector_id=df.job_item_vector_id.TABLE } }, [df.building_type.Coffin] = { { item_type=df.item_type.COFFIN, vector_id=df.job_item_vector_id.COFFIN } }, [df.building_type.FarmPlot] = { }, [df.building_type.TradeDepot] = { { flags2={ building_material=true, non_economic=true }, quantity=3 } }, [df.building_type.Door] = { { item_type=df.item_type.DOOR, vector_id=df.job_item_vector_id.DOOR } }, [df.building_type.Floodgate] = { { item_type=df.item_type.FLOODGATE, vector_id=df.job_item_vector_id.FLOODGATE } }, [df.building_type.Box] = { { flags1={ empty=true }, item_type=df.item_type.BOX, vector_id=df.job_item_vector_id.BOX } }, [df.building_type.Weaponrack] = { { item_type=df.item_type.WEAPONRACK, vector_id=df.job_item_vector_id.WEAPONRACK } }, [df.building_type.Armorstand] = { { item_type=df.item_type.ARMORSTAND, vector_id=df.job_item_vector_id.ARMORSTAND } }, [df.building_type.Cabinet] = { { item_type=df.item_type.CABINET, vector_id=df.job_item_vector_id.CABINET } }, [df.building_type.Statue] = { { item_type=df.item_type.STATUE, vector_id=df.job_item_vector_id.STATUE } }, [df.building_type.WindowGlass] = { { item_type=df.item_type.WINDOW, vector_id=df.job_item_vector_id.WINDOW } }, [df.building_type.WindowGem] = { { item_type=df.item_type.SMALLGEM, quantity=3, vector_id=df.job_item_vector_id.ANY_GENERIC35 } }, [df.building_type.Well] = { { item_type=df.item_type.BLOCKS, vector_id=df.job_item_vector_id.ANY_GENERIC35 }, { name='bucket', flags2={ lye_milk_free=true }, item_type=df.item_type.BUCKET, vector_id=df.job_item_vector_id.BUCKET }, { name='chain', item_type=df.item_type.CHAIN, vector_id=df.job_item_vector_id.CHAIN }, { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.building_type.Bridge] = { { flags2={ building_material=true, non_economic=true }, quantity=-1 } }, [df.building_type.RoadDirt] = { }, [df.building_type.RoadPaved] = { { flags2={ building_material=true, non_economic=true }, quantity=-1 } }, [df.building_type.AnimalTrap] = { { flags1={ empty=true }, item_type=df.item_type.ANIMALTRAP, vector_id=df.job_item_vector_id.ANIMALTRAP } }, [df.building_type.Support] = { { flags2={ building_material=true, non_economic=true } } }, [df.building_type.ArcheryTarget] = { { flags2={ building_material=true, non_economic=true } } }, [df.building_type.Chain] = { { item_type=df.item_type.CHAIN, vector_id=df.job_item_vector_id.CHAIN } }, [df.building_type.Cage] = { { item_type=df.item_type.CAGE, vector_id=df.job_item_vector_id.CAGE } }, [df.building_type.Weapon] = { { name='weapon', vector_id=df.job_item_vector_id.ANY_SPIKE } }, [df.building_type.ScrewPump] = { { item_type=df.item_type.BLOCKS, vector_id=df.job_item_vector_id.ANY_GENERIC35 }, { name='screw', flags2={ screw=true }, item_type=df.item_type.TRAPCOMP, vector_id=df.job_item_vector_id.ANY_WEAPON }, { name='pipe', item_type=df.item_type.PIPE_SECTION, vector_id=df.job_item_vector_id.PIPE_SECTION } }, [df.building_type.Construction] = { { flags2={ building_material=true, non_economic=true } } }, [df.building_type.Hatch] = { { item_type=df.item_type.HATCH_COVER, vector_id=df.job_item_vector_id.HATCH_COVER } }, [df.building_type.GrateWall] = { { item_type=df.item_type.GRATE, vector_id=df.job_item_vector_id.GRATE } }, [df.building_type.GrateFloor] = { { item_type=df.item_type.GRATE, vector_id=df.job_item_vector_id.GRATE } }, [df.building_type.BarsVertical] = { { item_type=df.item_type.BAR, vector_id=df.job_item_vector_id.ANY_GENERIC35 } }, [df.building_type.BarsFloor] = { { item_type=df.item_type.BAR, vector_id=df.job_item_vector_id.ANY_GENERIC35 } }, [df.building_type.GearAssembly] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.building_type.AxleHorizontal] = { { item_type=df.item_type.WOOD, vector_id=df.job_item_vector_id.WOOD, quantity=-1 } }, [df.building_type.AxleVertical] = { { item_type=df.item_type.WOOD, vector_id=df.job_item_vector_id.WOOD } }, [df.building_type.WaterWheel] = { { item_type=df.item_type.WOOD, quantity=3, vector_id=df.job_item_vector_id.WOOD } }, [df.building_type.Windmill] = { { item_type=df.item_type.WOOD, quantity=4, vector_id=df.job_item_vector_id.WOOD } }, [df.building_type.TractionBench] = { { item_type=df.item_type.TRACTION_BENCH, vector_id=df.job_item_vector_id.TRACTION_BENCH } }, [df.building_type.Slab] = { { item_type=df.item_type.SLAB } }, [df.building_type.NestBox] = { { has_tool_use=df.tool_uses.NEST_BOX, item_type=df.item_type.TOOL } }, [df.building_type.Hive] = { { has_tool_use=df.tool_uses.HIVE, item_type=df.item_type.TOOL } }, [df.building_type.Rollers] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, quantity=-1, vector_id=df.job_item_vector_id.TRAPPARTS }, { name='chain', item_type=df.item_type.CHAIN, vector_id=df.job_item_vector_id.CHAIN } } } --[[ Furnace building input material table. ]] local furnace_inputs = { [df.furnace_type.WoodFurnace] = { { flags2={ building_material=true, fire_safe=true, non_economic=true } } }, [df.furnace_type.Smelter] = { { flags2={ building_material=true, fire_safe=true, non_economic=true } } }, [df.furnace_type.GlassFurnace] = { { flags2={ building_material=true, fire_safe=true, non_economic=true } } }, [df.furnace_type.Kiln] = { { flags2={ building_material=true, fire_safe=true, non_economic=true } } }, [df.furnace_type.MagmaSmelter] = { { flags2={ building_material=true, magma_safe=true, non_economic=true } } }, [df.furnace_type.MagmaGlassFurnace] = { { flags2={ building_material=true, magma_safe=true, non_economic=true } } }, [df.furnace_type.MagmaKiln] = { { flags2={ building_material=true, magma_safe=true, non_economic=true } } } } --[[ Workshop building input material table. ]] local workshop_inputs = { [df.workshop_type.Carpenters] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Farmers] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Masons] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Craftsdwarfs] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Jewelers] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.MetalsmithsForge] = { { name='anvil', flags2={ fire_safe=true }, item_type=df.item_type.ANVIL, vector_id=df.job_item_vector_id.ANVIL }, { flags2={ building_material=true, fire_safe=true, non_economic=true } } }, [df.workshop_type.MagmaForge] = { { name='anvil', flags2={ magma_safe=true }, item_type=df.item_type.ANVIL, vector_id=df.job_item_vector_id.ANVIL }, { flags2={ building_material=true, magma_safe=true, non_economic=true } } }, [df.workshop_type.Bowyers] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Mechanics] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Siege] = { { flags2={ building_material=true, non_economic=true }, quantity=3 } }, [df.workshop_type.Butchers] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Leatherworks] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Tanners] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Clothiers] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Fishery] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Still] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Loom] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Quern] = { { item_type=df.item_type.QUERN, vector_id=df.job_item_vector_id.QUERN } }, [df.workshop_type.Kennels] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Kitchen] = { { flags2={ building_material=true, non_economic=true } } }, [df.workshop_type.Ashery] = { { item_type=df.item_type.BLOCKS, vector_id=df.job_item_vector_id.ANY_GENERIC35 }, { name='barrel', flags1={ empty=true }, item_type=df.item_type.BARREL, vector_id=df.job_item_vector_id.BARREL }, { name='bucket', flags2={ lye_milk_free=true }, item_type=df.item_type.BUCKET, vector_id=df.job_item_vector_id.BUCKET } }, [df.workshop_type.Dyers] = { { name='barrel', flags1={ empty=true }, item_type=df.item_type.BARREL, vector_id=df.job_item_vector_id.BARREL }, { name='bucket', flags2={ lye_milk_free=true }, item_type=df.item_type.BUCKET, vector_id=df.job_item_vector_id.BUCKET } }, [df.workshop_type.Millstone] = { { item_type=df.item_type.MILLSTONE, vector_id=df.job_item_vector_id.MILLSTONE }, { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } } } --[[ Trap building input material table. ]] local trap_inputs = { [df.trap_type.StoneFallTrap] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.trap_type.WeaponTrap] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS }, { name='weapon', vector_id=df.job_item_vector_id.ANY_WEAPON } }, [df.trap_type.Lever] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.trap_type.PressurePlate] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.trap_type.CageTrap] = { { name='mechanism', item_type=df.item_type.TRAPPARTS, vector_id=df.job_item_vector_id.TRAPPARTS } }, [df.trap_type.TrackStop] = { { flags2={ building_material=true, non_economic=true } } } } local siegeengine_input = { [df.siegeengine_type.Catapult] = { { item_type=df.item_type.CATAPULTPARTS, vector_id=df.job_item_vector_id.CATAPULTPARTS, quantity=3 } }, [df.siegeengine_type.Ballista] = { { item_type=df.item_type.BALLISTAPARTS, vector_id=df.job_item_vector_id.BALLISTAPARTS, quantity=3 } }, } --[[ Functions for lookup in tables. ]] local function get_custom_inputs(custom) local defn = df.building_def.find(custom) if defn ~= nil then return utils.clone_with_default(defn.build_items, buildings.input_filter_defaults) end end local function get_inputs_by_type(type,subtype,custom) if type == df.building_type.Workshop then if subtype == df.workshop_type.Custom then return get_custom_inputs(custom) else return workshop_inputs[subtype] end elseif type == df.building_type.Furnace then if subtype == df.furnace_type.Custom then return get_custom_inputs(custom) else return furnace_inputs[subtype] end elseif type == df.building_type.Trap then return trap_inputs[subtype] elseif type == df.building_type.SiegeEngine then return siegeengine_input[subtype] else return building_inputs[type] end end local function augment_input(input, argtable) local rv = {} local arg = argtable[input.name or 'material'] if arg then utils.assign(rv, arg) end utils.assign(rv, input) if rv.mat_index and safe_index(rv, 'flags2', 'non_economic') then rv.flags2.non_economic = false end rv.new = true rv.name = nil return rv end function buildings.getFiltersByType(argtable,type,subtype,custom) local inputs = get_inputs_by_type(type,subtype,custom) if not inputs then return nil end local rv = {} for i,v in ipairs(inputs) do rv[i] = augment_input(v, argtable) end return rv end --[[ Wraps all steps necessary to create a building with a construct job into one function. dfhack.buildings.constructBuilding{ -- Position: pos = { x = ..., y = ..., z = ... }, -- OR x = ..., y = ..., z = ..., -- Type: type = df.building_type.FOO, subtype = ..., custom = ..., -- Field initialization: fields = { ... }, -- Size and orientation: width = ..., height = ..., direction = ..., -- Abort if not all tiles in the rectangle are available: full_rectangle = true, -- Materials: items = { item, item ... }, -- OR filters = { { ... }, { ... }... } -- OR abstract = true -- OR material = { filter_properties... } mechanism = { filter_properties... } barrel, bucket, chain, anvil, screw, pipe } Returns: the created building, or 'nil, error' --]] function buildings.constructBuilding(info) local btype = info.type local subtype = info.subtype or -1 local custom = info.custom or -1 local filters = info.filters if not (info.pos or info.x) then error('position is required') end if not (info.abstract or info.items or filters) then filters = buildings.getFiltersByType(info,btype,subtype,custom) if not filters then error('one of items, filters or abstract is required') end elseif filters then for _,v in ipairs(filters) do v.new = true end end if type(btype) ~= 'number' or not df.building_type[btype] then error('Invalid building type: '..tostring(btype)) end local pos = info.pos or xyz2pos(info.x, info.y, info.z) local instance = buildings.allocInstance(pos, btype, subtype, custom) if not instance then error('Could not create building of type '..df.building_type[btype]) end local to_delete = instance return dfhack.with_finalize( function() df.delete(to_delete) end, function() if info.fields then instance:assign(info.fields) end local ok,w,h,area,r_area = buildings.setSize( instance,info.width,info.height,info.direction ) if not ok then return nil, "cannot place at this position" end if info.full_rectangle and area ~= r_area then return nil, "not all tiles can be used" end if info.abstract then ok = buildings.constructAbstract(instance) elseif info.items then ok = buildings.constructWithItems(instance, info.items) else ok = buildings.constructWithFilters(instance, filters) end if not ok then return nil, "could not construct the building" end -- Success to_delete = nil return instance end ) end return buildings
-- Code heavily modified but started from Slipstream_2.0.0 by Degraine / James Brooker (MIT License 2014) require "util" function math_round(x) return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5) end function tableToString(t) local str = "{ " for i,v in pairs(t) do str = str .. tostring(i) .. ":" .. tostring(v) .. "," end str = str .. " }" return str end script.on_event(defines.events.on_player_created, function(e) local player = game.players[e.player_index] --xxx HACK: for testing purposes only player.insert({name="superbus-1", count=10}) player.insert({name="transport-belt", count=100}) player.insert({name="iron-gear-wheel", count=100}) player.insert({name="iron-plate", count=200}) player.insert({name="coal", count=50}) player.insert({name="assembling-machine-2", count=5}) player.insert({name="oil-refinery", count=5}) player.insert({name="offshore-pump", count=5}) player.insert({name="small-electric-pole", count=5}) end) local next = next local north = defines.direction.north local east = defines.direction.east local south = defines.direction.south local west = defines.direction.west local transport_line = defines.transport_line script.on_init(function() onLoad() end) script.on_load(function() onLoad() end) function onLoad() if not global.all_superbusses then global.all_superbusses = {} -- not sure why we'd want to reset all tech/rec every time the user loads a game!? --game.forces.player.reset_technologies() --game.forces.player.reset_recipes() end end -- we want to keep track of all superbusses, so we listen for all -- build and destroy tracking events and keep our own list up to date -- pattern for matching superbus entity names (eg: superbus-1, superbus-2) local superbusNamePattern = "^superbus%-%d+$" -- buses placed by player or robots script.on_event(defines.events.on_built_entity, function(event) if string.find(event.created_entity.name, superbusNamePattern) then superbusBuilt(event.created_entity) end end) script.on_event(defines.events.on_robot_built_entity, function(event) if string.find(event.created_entity.name, superbusNamePattern) then superbusBuilt(event.created_entity) end end) -- buses removed by player, robots, or violence script.on_event(defines.events.on_player_mined_item, function(event) if string.find(event.item_stack.name, superbusNamePattern) then superbusRemoved() end end) script.on_event(defines.events.on_robot_mined, function(event) if string.find(event.item_stack.name, superbusNamePattern) then superbusRemoved() end end) script.on_event(defines.events.on_entity_died, function(event) if string.find(event.entity.name, superbusNamePattern) then superbusRemoved() end end) -- insert/remove utilities function superbusBuilt(entity) -- Construct the data table for each chest as it's built. local busId = string.format("%d_%d", entity.position.x, entity.position.y) local surface = entity.surface entity.operable = false --dont let user click on this (would have opened recipe window) local bounds = entity.selection_box --selection box is more accurate to what we want than bounding_box local size = bounds.right_bottom.x - bounds.left_top.x log("create superbus of size " .. tostring(size) .. " at " .. tostring(entity.position.x) .. "," .. tostring(entity.position.y)) local wo = 0 if (size > 1) then wo = ((size-1)/2) end -- create hidden entities local containers = {} local xoff = 0 local xStart = entity.position.x - wo for i = 1,size,1 do local pos = { x = xStart + xoff, y = entity.position.y } containers[i] = surface.create_entity{name="superbus-hidden-container", position = pos, force = entity.force} xoff = xoff + 1 end --container.destructible = false --test: doing this in prototype, make sure its okay local superBusObject = { entity = entity, size = size, startIdx = 0, containers = containers, inventory = function(self, idx) --log("get inv " .. tostring(idx) .. " of " .. #(self.containers)) return self.containers[idx].get_inventory(defines.inventory.chest) end} global.all_superbusses[busId] = superBusObject end function superbusRemoved() -- find which bus was removed :/ for busId,superBusObject in pairs(global.all_superbusses) do if not superBusObject.entity.valid then --clean up hidden entities for i,v in ipairs(superBusObject.containers) do v.destroy() end global.all_superbusses[busId] = nil end end end -- returns dictionary of { str:input/output , belt line } pairs function getSuperbusTransferInstructions(superBus) -- Find the input and output belts for a superBus. local busDirection = superBus.entity.direction local pos = {x = superBus.entity.position.x, y = superBus.entity.position.y} --center of bus entity (in tiles) local eps = 0.1 --epsilon: small change of distance local size = superBus.size local wo = 0 local ro = 1 if (size > 1) then -- avoid divide by zero wo = ((size-1)/2) --width offset (dist from center of entity to center of adjacent outer tile) ro = ((size-1)/2) + 1 --radial offset (distance from center of entity to center of adjacent outer tile tangent) end -- origin top-left local beltscan_coords = { -- rectangles to search for transport belts. [north] = {{pos.x - (wo + eps), pos.y - (ro - eps)},{pos.x + (wo + eps), pos.y - (ro + eps)}}, [east] = {{pos.x + (ro - eps), pos.y - (wo + eps)},{pos.x + (ro + eps), pos.y + (wo + eps)}}, [south] = {{pos.x - (wo + eps), pos.y + (ro - eps)},{pos.x + (wo + eps), pos.y + (ro + eps)}}, [west] = {{pos.x - (ro - eps), pos.y - (wo + eps)},{pos.x - (ro + eps), pos.y + (wo + eps)}} } local directions = {north, east, south, west} -- For the for loop. local away_directions = {[north] = north, [east] = east, [south] = south, [west] = west} local facing_directions = {[north] = south, [east] = west, [south] = north, [west] = east} -- local side_clockwise_directions = {[north] = east, [east] = south, [south] = west, [west] = north} -- local side_anticlockwise_directions = {[north] = west, [east] = north, [south] = east, [west] = south} local instructions = {} -- dictionary of { str:input/output , belt line } pairs for i,v in ipairs(directions) do local isOutputSide = (away_directions[v] == busDirection) -- Search for transport belts -- todo: test if we can add underground belt support here for free? (if the API is the same) local belts = superBus.entity.surface.find_entities_filtered({area = beltscan_coords[v], type = "transport-belt"}) for bidx,belt in ipairs(belts) do if belt ~= nil then -- If belt is found. --determine "laneIndex" of belt found local busIdx = 1 local beltXOffset = belt.position.x - (superBus.entity.position.x - wo) local beltYOffset = belt.position.y - (superBus.entity.position.y - wo) if v == north then busIdx = 1 + math_round(beltXOffset) elseif v == east then busIdx = 1 + math_round(beltYOffset) elseif v == south then busIdx = superBus.size - math_round(beltXOffset) else busIdx = superBus.size - math_round(beltYOffset) end if belt.direction == away_directions[v] then --flip output belt bus idx (ex: top left input from west side should be top right output on east side) busIdx = superBus.size - (busIdx - 1) table.insert(instructions,{"output", busIdx, belt.get_transport_line(transport_line.left_line)}) table.insert(instructions,{"output", busIdx, belt.get_transport_line(transport_line.right_line)}) -- Unlike Slipstream, I dont want belts that are curved to interact with SuperBus at all -- elseif belt.direction == side_clockwise_directions[v] then -- Just one lane. -- table.insert(instructions,{"output", belt.get_transport_line(transport_line.right_line)}) -- elseif belt.direction == side_anticlockwise_directions[v] then -- Or the other lane. -- table.insert(instructions,{"output", belt.get_transport_line(transport_line.left_line)}) elseif belt.direction == facing_directions[v] then table.insert(instructions,1,{"input", busIdx, belt.get_transport_line(transport_line.right_line)}) table.insert(instructions,1,{"input", busIdx, belt.get_transport_line(transport_line.left_line)}) end end end --for each belt found adjacent to superbus -- search fluid boxes for fluidIdx,fluid in ipairs(superBus.entity.fluidbox) do local connections = fluid.connections if #connections > 1 then --need two pipes connected to transfer anything table.insert(instructions,1,{"fluid", fluidIdx}) end end --search for other superbusses to transfer INTO if isOutputSide then -- only transfer to other busses of EXACT SAME TYPE (todo: support multi-type as long as size is same?) local superBusType = superBus.entity.type local buses = superBus.entity.surface.find_entities_filtered({area = beltscan_coords[v], type = superBusType}) local validBusses = {} for bidx,outbusEntity in ipairs(buses) do local outbusId = string.format("%d_%d", outbusEntity.position.x, outbusEntity.position.y) --log("found adjacent sb at " .. outbusId) local outbusObject = global.all_superbusses[outbusId] if outbusObject ~= nil then --log("attempt transfer between busses") validBusses[#validBusses+1] = outbusObject end end --group all busses into one transfer command if superBus.startIdx > #validBusses then superBus.startIdx = 0 end table.insert(instructions, {"transfer", validBusses}) end --if isOutputSide end --for each direction return instructions end function transferStack( invOut, invIn, stack ) if stack.count == 0 then return false end if invIn.can_insert(stack) then invIn.insert(stack) invOut.remove(stack) return true end return false end function transferInventory( invOut, invIn ) if invOut.is_empty() then return end local outContents = invOut.get_contents() for itemName,itemCount in pairs(outContents) do local easyStack = {name=itemName, count=itemCount} transferStack(invOut, invIn, easyStack) end end -- return nil or array of stacks -- divides by numSplits, but ensures integers, and remainders are handled -- if division is uneven, last stacks are always shortest (by 0 or 1) -- eg: split 5, count 7, result: {2, 2, 1, 1, 1} -- note: ignores health/durability/ammo -- so technically this could result in a free repairing bug? function splitInventoryIntoStacks(inventory, numSplits) if inv_contents == nil then return nil end if type(inv_contents) ~= "table" then return nil end if numSplits <= 1 then return nil end local stacks = {} log("attempt to split " .. tableToString(inv_contents)) for itemName,itemCount in pairs(inv_contents) do local chunkSize = math.max(math.floor(itemCount / numSplits), 1) for i=1,numSplits,1 do if itemCount > 0 then local chip = math.min(itemCount, chunkSize) log(" split"..tostring(i).." - "..itemName.." : "..tostring(chip)) stacks[i] = {name = itemName, count = chip} itemCount = itemCount - chip end end end return stacks end function equalizeFluids(fluidBox, fluidIdx) local connections = fluidBox.get_connections(fluidIdx) -- its possible for connections to not all have the same type of fluid for i,v in ipairs(connections) do end end -- returns true if any items were transferred function runSuperbusTransferInstructions(superBus, instructions) local action_count = 0 for i,v in pairs(instructions) do --xxx TODO: implement electricity requirement -- if superBus.battery.energy < energy_per_action then -- break -- elseif v[2].valid == false then -- return true, false -- end local instruction = v[1] if instruction == "output" then --xxx TODO: figure out how to filter what it is we're sending out local busIdx = v[2] local outbelt = v[3] local busInventory = superBus:inventory(busIdx) if not busInventory.is_empty() and outbelt.can_insert_at_back() then local inv_contents = next(busInventory.get_contents()) local stack = {name = inv_contents, count = 1} outbelt.insert_at_back(stack) busInventory.remove(stack) --xxx TODO: chest.battery.energy = chest.battery.energy - energy_per_action action_count = action_count + 1 end elseif instruction == "input" then local busIdx = v[2] local inbelt = v[3] local line_contents = next(inbelt.get_contents()) local busInventory = superBus:inventory(busIdx) if line_contents ~= nil then local stack = {name = line_contents, count = 1} if busInventory.can_insert(stack) then busInventory.insert(stack) inbelt.remove_item(stack) --xxx TODO: chest.battery.energy = chest.battery.energy - energy_per_action action_count = action_count + 1 end end elseif instruction == "fluid" then local fluidIdx = v[2] equalizeFluids(superBus.entity.fluidbox) elseif instruction == "transfer" then local outbusObjectArray = v[2] local transferCount = #outbusObjectArray if transferCount > 0 then --log("transfer from bus to bus") for busIdx=1,superBus.size,1 do --log("transfer bus idx " .. tostring(busIdx)) local busInventory = superBus:inventory(busIdx) if not busInventory.is_empty() then --split contents between all outbusses local inv_contents = busInventory.get_contents() if transferCount == 1 then local outbusObject = outbusObjectArray[1] local outBusInventory = outbusObject:inventory( busIdx ) transferInventory(busInventory, outBusInventory) else local splitStacks = splitInventoryIntoStacks(inv_contents, transferCount) --for i,outbusObject in ipairs(outbusObjectArray) do for i=1,#outbusObjectArray,1 do local offsetIdx = 1 + (i + superBus.startIdx) % transferCount local outbusObject = outbusObjectArray[offsetIdx] local outBusInventory = outbusObject:inventory( busIdx ) --log(" ssi " .. tostring(splitStacks[i]) .. " count " .. tostring(#splitStacks) ) if transferStack(busInventory, outBusInventory, splitStacks[i]) then action_count = action_count + 1 end end end -- if-else: bus transfer 1:1 or 1:many end end -- for each inventory lane superBus.startIdx = superBus.startIdx + 1 --offset into outbusObjectArray alternating left/right end -- if bus-to-bus transfer end -- if-else: instruction type end return (action_count == 0) end script.on_event(defines.events.on_tick, function(e) -- for each superbus for index,superBus in pairs(global.all_superbusses) do local instructions = getSuperbusTransferInstructions(superBus) runSuperbusTransferInstructions(superBus, instructions) end end)
---@class RDSSpecificProfession : zombie.randomizedWorld.randomizedDeadSurvivor.RDSSpecificProfession ---@field private specificProfessionDistribution ArrayList|Unknown RDSSpecificProfession = {} ---@public ---@param arg0 BuildingDef ---@return void function RDSSpecificProfession:randomizeDeadSurvivor(arg0) end
local canvas = require("hs.canvas") local screen = require("hs.screen") local module = {} local cos = {} local sin = {} for i = 0, 360, 0.5 do sin[i] = math.sin(math.rad(i)) cos[i] = math.cos(math.rad(i)) end local rehoboam = nil module.undraw = function() if rehoboam then rehoboam:delete() rehoboam = nil end end module.draw = function(radius) local ff = screen.mainScreen():fullFrame() radius = radius or (ff.h / 2) local ss = radius * 0.15 radius = radius - ss if not rehoboam then local side = 2 * (radius + ss) rehoboam = canvas.new{ x = ff.x + (ff.w - side) / 2, y = ff.y + (ff.h - side) / 2, w = side, h = side, }:show() rehoboam[#rehoboam + 1] = { id = "background", type = "rectangle", action = "fill", fillColor = { white = 1 }, } local offset = side / 2 local segments = {} for i = 0, 359, 1 do local len = radius + math.random() * ss table.insert(segments, { x = offset + sin[i] * radius, y = offset + cos[i] * radius }) table.insert(segments, { x = offset + sin[i + 0.5] * len, y = offset + cos[i + 0.5] * len }) end rehoboam[#rehoboam + 1] = { id = "status", type = "segments", action = "strokeAndFill", strokeColor = { white = 0.25 }, fillColor = { white = 0.25 }, coordinates = segments, closed = true, } rehoboam[#rehoboam + 1] = { id = "center", type = "circle", action = "fill", radius = radius, fillColor = { white = 1 }, } local routine routine = coroutine.wrap(function() while rehoboam do local segments = {} for i = 0, 359, 1 do local len = radius + math.random() * ss table.insert(segments, { x = offset + sin[i] * radius, y = offset + cos[i] * radius }) table.insert(segments, { x = offset + sin[i + 0.5] * len, y = offset + cos[i + 0.5] * len }) end rehoboam["status"].coordinates = segments coroutine.applicationYield() end routine = nil end) routine() end end return module
require 'class' local json = require 'lunajson' local Stat = torch.class('Stat') function Stat:__init(labelSize, batchSize, maxSeq) self.labelSize = labelSize self.batchSize = batchSize self.maxSeq = maxSeq -- init confusion matrix (correct label (size) * predict label (size)) self.confus = self:initMat(labelSize, labelSize) end function Stat:initMat(height, width) local mat = {} for h = 1, height do mat[h] = {} for w = 1, width do mat[h][w] = 0 end end return mat end function Stat:updateStat(outputs, targets) -- calculate one sequence by one sequence for o = 1, #outputs do local _, indices = torch.max(outputs[o], 2) for b = 1, self.batchSize do local right, pred = targets[o][b], indices[b][1] -- update confusion matrix self.confus[right][pred] = self.confus[right][pred] + 1 end end end function Stat:sum(list, length) local result = 0 -- ignore null label in sum for i = 1, length do result = result + list[i] end return result end -- calculate per label stat function Stat:calPerLabel() local right, count = {}, {} -- iterate for all label for l = 1, self.labelSize do right[l] = self.confus[l][l] count[l] = self:sum(self.confus[l], #self.confus[l]) end return right, count end -- print matrix function Stat:printMat(str, right, count, matRight, matCount) for l = 1, #right do if count[l] > 0 then local accLine = right[l] * 100 / count[l] io.write(string.format(' %s %02d: %02.0f [', str, l, accLine)) for ll = 1, #matRight[1] do -- print each element depends on the type and value if type(matCount[l]) == 'number' and matCount[l] > 0 then local acc = matRight[l][ll] * 100 / matCount[l] io.write(string.format(' %02.0f ', acc)) else io.write(' -- ') end end io.write(']\n') else io.write(string.format(' %s %02d: --\n', str, l)) end end end function Stat:print(type) local right, count = self:calPerLabel() -- calculate sum of label local accEpoch = self:sum(right, #right - 1) / self:sum(count, #count - 1) io.write(string.format('[%s] accuracy %f\n', type, accEpoch)) -- print per label and confusion matrix self:printMat('label', right, count, self.confus, count) -- return accuracy for lr update return accEpoch end
type array = { any } local function copy(tbl: array, deep: boolean?): array if not deep then return table.move(tbl, 1, #tbl, 1, table.create(#tbl)) end local new = table.create(#tbl) for index, value in ipairs(tbl) do if typeof(value) == "table" then new[index] = copy(value, true) else new[index] = value end end return new end return copy
local tasks = require'tasks' local screenWidth = 640 local screenHeight = 480 local bumperSpeed = 400 local bumperWidth = 15 local bumperHeight = 80 local bumper1X = bumperWidth local bumper1Y = (screenHeight - bumperHeight) / 2 local bumper2X = screenWidth - 2 * bumperWidth local bumper2Y = bumper1Y local ballSpeed = 250 local ballSize = 20 local ballXInitial = (screenWidth - ballSize) / 2 local ballYInitial = (screenHeight - ballSize) / 2 local ballX = ballXInitial local ballY = ballYInitial local ballXSpeed = ballSpeed local ballYSpeed = 0 local matchLen = 180 -- Seconds local clockText = '' function didColideX() if ballY + ballSize>= bumper1Y and ballY <= bumper1Y + bumperHeight and ballX <= bumper1X + bumperWidth and ballXSpeed < 0 then return true end if ballY + ballSize >= bumper2Y and ballY <= bumper2Y + bumperHeight and ballX + ballSize >= bumper2X and ballXSpeed > 0 then return true end return false end function didColideY() return (ballY <= 0 and ballYSpeed < 0) or (ballY + ballSize >= screenHeight and ballYSpeed > 0) end function setBallDirection() local bumperY = ballX < screenWidth / 2 and bumper1Y or bumper2Y local top = math.max(ballY, bumperY) local distCenter = 2 * math.abs(bumperY + bumperHeight / 2 - top) / bumperHeight local dirY = top < bumperY + bumperHeight / 2 and -1 or 1 ballYSpeed = distCenter * ballSpeed * dirY end function bumperTaskFactory(key_up, key_down, bumper) tasks.task_t:new(function() while true do local up_event -- Evento de soltura da tecla local speed -- Velovidade e direção do movimento tasks.par_or( -- Aguarda uma tecla ser pressionada function() tasks.await(key_up .. '_down') up_event = key_up .. '_up' speed = -bumperSpeed end, function() tasks.await(key_down .. '_down') up_event = key_down .. '_up' speed = bumperSpeed end )() tasks.par_or( -- Movimenta o rebatedor function() tasks.await(up_event) end, function() while true do local dt = tasks.await('update') if bumper == 1 then bumper1Y = math.max(0, math.min(screenHeight - bumperHeight, bumper1Y + speed * dt)) else bumper2Y = math.max(0, math.min(screenHeight - bumperHeight, bumper2Y + speed * dt)) end end end )() end end)(true, true) end function startBumper1Task() tasks.task_t:new(function() while true do tasks.par_or( -- Espera 'w_down' e 's_down' simultaneamente function() tasks.await('w_down') tasks.par_or( function() while true do local dt = tasks.await('update') bumper1Y = math.max(0, bumper1Y - bumperSpeed * dt) end end, function() tasks.await('w_up') -- Volta a esperar o início do movimento tasks.emit('bumper1_done') end )(true, true) -- Inicia esse par_or sem bloquear a tarefa e não -- termina quando ela terminar -- A tarefa termina imediatamente após iniciar o par_or, -- terminando o par_or mais externo (mas não o interno) end, function() tasks.await('s_down') tasks.par_or( function() while true do local dt = tasks.await('update') bumper1Y = math.min(screenHeight - bumperHeight, bumper1Y + bumperSpeed * dt) end end, function() tasks.await('s_up') tasks.emit('bumper1_done') end )(true, true) -- Inicia esse par_or sem bloquear a tarefa e não -- termina quando ela terminar -- A tarefa termina imediatamente após iniciar o par_or, -- terminando o par_or mais externo (mas não o interno) end )() -- A atualização da posição executa como uma tarefa independente -- Espera ela terminar antes de permitir iniciar o movimento novamente tasks.await('bumper1_done') end end)(true, true) end function startBumper2Task() tasks.task_t:new(function() while true do tasks.par_or( -- Espera 'w_down' e 's_down' simultaneamente function() tasks.await('up_down') tasks.par_or( function() while true do local dt = tasks.await('update') bumper2Y = math.max(0, bumper2Y - bumperSpeed * dt) end end, function() tasks.await('up_up') -- Volta a esperar o início do movimento tasks.emit('bumper2_done') end )(true, true) -- Inicia esse par_or sem bloquear a tarefa e não -- termina quando ela terminar -- A tarefa termina imediatamente após iniciar o par_or, -- terminando o par_or mais externo (mas não o interno) end, function() tasks.await('down_down') tasks.par_or( function() while true do local dt = tasks.await('update') bumper2Y = math.min(screenHeight - bumperHeight, bumper2Y + bumperSpeed * dt) end end, function() tasks.await('down_up') tasks.emit('bumper2_done') end )(true, true) -- Inicia esse par_or sem bloquear a tarefa e não -- termina quando ela terminar -- A tarefa termina imediatamente após iniciar o par_or, -- terminando o par_or mais externo (mas não o interno) end )() -- A atualização da posição executa como uma tarefa independente -- Espera ela terminar antes de permitir iniciar o movimento novamente tasks.await('bumper2_done') end end)(true, true) end function startBallTask() local function update_ball_pos() while true do local dt = tasks.await('update') -- Calcula o deslocamento da bola a cada dt segundos ballX = ballX + ballXSpeed * dt ballY = ballY + ballYSpeed * dt if didColideX() then -- Colisão com rebatedor -> calcula nova velocidade em Y ballXSpeed = -ballXSpeed setBallDirection() end if didColideY() then -- Colisão com a borda superior / inferior ballYSpeed = -ballYSpeed end if ballX > screenWidth - ballSize or ballX < 0 then -- Colisão com a borda direita / esquerda -> ponto print('score') ballX = ballXInitial ballY = ballYInitial ballYSpeed = 0 end end end tasks.par_or( update_ball_pos, function() -- Para a bola quando acabar o tempo da partida tasks.await_ms(matchLen * 1000) clockText = '00:00' end, function() -- Atualiza o relógio na tela uma vez por segundo local time = math.ceil(matchLen - tasks.now_ms() / 1000) clockText = string.format('%02d:%02d', time / 60, time % 60) while true do tasks.await_ms(1000) time = math.ceil(matchLen - tasks.now_ms() / 1000) clockText = string.format('%02d:%02d', time / 60, time % 60) end end )(true, true) end function love.load() love.window.setMode(screenWidth, screenHeight) love.graphics.setFont(love.graphics.newFont(18)) love.graphics.setColor(1, 1, 1) bumperTaskFactory('w', 's', 1) bumperTaskFactory('up', 'down', 2) --startBumper1Task() --startBumper2Task() startBallTask() end function love.keypressed(key, scancode, isrepeat) tasks.emit(key .. '_down') end function love.keyreleased(key) tasks.emit(key .. '_up') end function love.update(dt) tasks.emit('update', dt) tasks.update_time(dt * 1000) end function love.draw() love.graphics.print(clockText, 280, 10) love.graphics.rectangle('fill', ballX, ballY, ballSize, ballSize) love.graphics.rectangle('fill', bumper1X, bumper1Y, bumperWidth, bumperHeight) love.graphics.rectangle('fill', bumper2X, bumper2Y, bumperWidth, bumperHeight) end
function createATM(thePlayer, commandName) if (exports.global:isPlayerLeadAdmin(thePlayer)) and ( getElementDimension(thePlayer) > 0 or exports.global:isPlayerScripter(thePlayer) ) then local dimension = getElementDimension(thePlayer) local interior = getElementInterior(thePlayer) local x, y, z = getElementPosition(thePlayer) local rotation = getPedRotation(thePlayer) z = z - 0.3 local id = mysql:query_insert_free("INSERT INTO atms SET x='" .. x .. "', y='" .. y .. "', z='" .. z .. "', dimension='" .. dimension .. "', interior='" .. interior .. "', rotation='" .. rotation .. "',`limit`=5000") if (id) then local object = createObject(2942, x, y, z, 0, 0, rotation-180) exports.pool:allocateElement(object) setElementDimension(object, dimension) setElementInterior(object, interior) setElementData(object, "depositable", 0, false) setElementData(object, "limit", 5000, false) local px = x + math.sin(math.rad(-rotation)) * 0.8 local py = y + math.cos(math.rad(-rotation)) * 0.8 local pz = z setElementData(object, "dbid", id, false) x = x + ((math.cos(math.rad(rotation)))*5) y = y + ((math.sin(math.rad(rotation)))*5) setElementPosition(thePlayer, x, y, z) outputChatBox("ATM created with ID #" .. id .. "!", thePlayer, 0, 255, 0) else outputChatBox("There was an error while creating an ATM. Try again.", thePlayer, 255, 0, 0) end end end addCommandHandler("addatm", createATM, false, false) function loadAllATMs() local result = mysql:query("SELECT id, x, y, z, rotation, dimension, interior, deposit, `limit` FROM atms") local counter = 0 if (result) then local continue = true while continue do local row = mysql:fetch_assoc(result) if not row then break end local id = tonumber(row["id"]) local x = tonumber(row["x"]) local y = tonumber(row["y"]) local z = tonumber(row["z"]) local rotation = tonumber(row["rotation"]) local dimension = tonumber(row["dimension"]) local interior = tonumber(row["interior"]) local deposit = tonumber(row["deposit"]) local limit = tonumber(row["limit"]) local object = createObject(2942, x, y, z, 0, 0, rotation-180) exports.pool:allocateElement(object) setElementDimension(object, dimension) setElementInterior(object, interior) setElementData(object, "depositable", deposit, false) setElementData(object, "limit", limit, false) local px = x + math.sin(math.rad(-rotation)) * 0.8 local py = y + math.cos(math.rad(-rotation)) * 0.8 local pz = z setElementData(object, "dbid", id, false) counter = counter + 1 end mysql:free_result(result) end end addEventHandler("onResourceStart", getResourceRootElement(), loadAllATMs) function deleteATM(thePlayer, commandName, id) if (exports.global:isPlayerLeadAdmin(thePlayer)) then if not (id) then outputChatBox("SYNTAX: /" .. commandName .. " [ID]", thePlayer, 255, 194, 14) else id = tonumber(id) local counter = 0 local objects = getElementsByType("object", getResourceRootElement()) for k, theObject in ipairs(objects) do local objectID = getElementData(theObject, "dbid") if (objectID==id) then destroyElement(theObject) counter = counter + 1 end end if (counter>0) then -- ID Exists local query = mysql:query_free("DELETE FROM atms WHERE id='" .. id .. "'") outputChatBox("ATM #" .. id .. " Deleted!", thePlayer, 0, 255, 0) exports.irc:sendMessage(getPlayerName(thePlayer) .. " deleted ATM #" .. id .. ".") else outputChatBox("ATM ID does not exist!", thePlayer, 255, 0, 0) end end end end addCommandHandler("delatm", deleteATM, false, false) function getNearbyATMs(thePlayer, commandName) if (exports.global:isPlayerAdmin(thePlayer)) then local posX, posY, posZ = getElementPosition(thePlayer) outputChatBox("Nearby ATMs:", thePlayer, 255, 126, 0) local count = 0 for k, theObject in ipairs(getElementsByType("object", getResourceRootElement())) do local x, y, z = getElementPosition(theObject) local distance = getDistanceBetweenPoints3D(posX, posY, posZ, x, y, z) if (distance<=10) then local dbid = getElementData(theObject, "dbid") outputChatBox(" ATM with ID " .. dbid .. ".", thePlayer) count = count + 1 end end if (count==0) then outputChatBox(" None.", thePlayer, 255, 126, 0) end end end addCommandHandler("nearbyatms", getNearbyATMs, false, false) function showATMInterface(atm) local faction_id = tonumber( getElementData(source, "faction") ) local faction_leader = tonumber( getElementData(source, "factionleader") ) local isInFaction = false local isFactionLeader = false if faction_id and faction_id > 0 then isInFaction = true if faction_leader == 1 then isFactionLeader = true end end local faction = getPlayerTeam(source) local money = exports.global:getMoney(faction) local depositable = getElementData(atm, "depositable") local deposit = false if (depositable == 1) then deposit = true end local limit = getElementData(atm, "limit") triggerClientEvent(source, "showBankUI", atm, isInFaction, isFactionLeader, money, deposit, limit) end addEvent( "requestATMInterface", true ) addEventHandler( "requestATMInterface", getRootElement(), showATMInterface )
local ffi = require("ffi") ffi.cdef[[ typedef void (*xmlValidityErrorFunc) (void *ctx, const char *msg, ...); typedef void (*xmlValidityWarningFunc) (void *ctx, const char *msg, ...); typedef struct _xmlValidState xmlValidState; typedef struct _xmlValidCtxt xmlValidCtxt; struct _xmlValidCtxt { void *userData; /* user specific data block */ xmlValidityErrorFunc error; /* the callback in case of errors */ xmlValidityWarningFunc warning; /* the callback in case of warning */ /* Node analysis stack used when validating within entities */ xmlNodePtr node; /* Current parsed Node */ int nodeNr; /* Depth of the parsing stack */ int nodeMax; /* Max depth of the parsing stack */ xmlNodePtr *nodeTab; /* array of nodes */ unsigned int finishDtd; /* finished validating the Dtd ? */ xmlDocPtr doc; /* the document */ int valid; /* temporary validity check result */ /* state state used for non-determinist content validation */ xmlValidState *vstate; /* current state */ int vstateNr; /* Depth of the validation stack */ int vstateMax; /* Max depth of the validation stack */ xmlValidState *vstateTab; /* array of validation states */ void *am; void *state; }; ]]
local ffi = require("ffi") ffi.cdef([[ int getpid(); ]]) local helper = {} function helper.getProcessId() return ffi.C.getpid() end return helper
local obj = {} obj._box = nil -- Show a message in oncscree textbox function obj:show(message, pos) if obj._box ~= nil then obj._box:delete() end if pos == nil then local res = hs.window.focusedWindow():screen():frame() pos = { x = 50, y = res.h - 300, w = res.w - 100, h = 150, } end obj._box = hs.canvas.new(pos) obj._box:appendElements({ type = "rectangle", fillColor = { white = 0.125, alpha = 0.8 }, strokeColor = { white = 0.625, alpha = 0.8 }, strokeWidth = 1, roundedRectRadii = { xRadius = 10, yRadius = 10 }, }) obj._box:appendElements({ type = "text", text = message, textSize = 120, textAlignment = "center", }) obj._box:show() end -- Hide textbox function obj:hide() if obj._box ~= nil then obj._box:delete() obj._box = nil end end return obj
local i18n = require 'i18n' local fun = require 'lib.fun' local Codes = { const = { attribute = { EARTH = 0x1, WATER = 0x2, FIRE = 0x4, WIND = 0x8, LIGHT = 0x10, DARK = 0x20, DIVINE = 0x40, ALL = 0x7F }, race = { WARRIOR = 0x1, SPELLCASTER = 0x2, FAIRY = 0x4, FIEND = 0x8, ZOMBIE = 0x10, MACHINE = 0x20, AQUA = 0x40, PYRO = 0x80, ROCK = 0x100, WINGED_BEAST = 0x200, PLANT = 0x400, INSECT = 0x800, THUNDER = 0x1000, DRAGON = 0x2000, BEAST = 0x4000, BEAST_WARRIOR = 0x8000, DINOSAUR = 0x10000, FISH = 0x20000, SEA_SERPENT = 0x40000, REPTILE = 0x80000, PSYCHIC = 0x100000, DIVINE_BEAST = 0x200000, CREATOR_GOD = 0x400000, WYRM = 0x800000, CYBERSE = 0x1000000, ALL = 0x1FFFFFF }, type = { MONSTER = 0x1, SPELL = 0x2, TRAP = 0x4, NORMAL = 0x10, EFFECT = 0x20, FUSION = 0x40, RITUAL = 0x80, SPIRIT = 0x200, UNION = 0x400, GEMINI = 0x800, TUNER = 0x1000, SYNCHRO = 0x2000, TOKEN = 0x4000, QUICKPLAY = 0x10000, CONTINUOUS = 0x20000, EQUIP = 0x40000, FIELD = 0x80000, COUNTER = 0x100000, FLIP = 0x200000, TOON = 0x400000, XYZ = 0x800000, PENDULUM = 0x1000000, NOMI = 0x2000000, LINK = 0x4000000 }, link = { TOP_LEFT = 0x040, TOP = 0x080, TOP_RIGHT = 0x100, LEFT = 0x008, RIGHT = 0x020, BOTTOM_LEFT = 0x001, BOTTOM = 0x002, BOTTOM_RIGHT = 0x004, ALL = 0x1EF }, ot = { OCG = 0x1, TCG = 0x2, ANIME = 0x4, ILLEGAL = 0x8, VIDEOGAME = 0x10, VG = 0x10, CUSTOM = 0x20, SPEED = 0x40, PRE_RELEASE = 0x100, RUSH = 0x200, LEGEND = 0x400, HIDDEN = 0x1000 }, category = { DESTROY_MONSTER = 0x1, DESTROY_ST = 0x2, DESTROY_DECK = 0x4, DESTROY_HAND = 0x8, SEND_TO_GY = 0x10, SEND_TO_HAND = 0x20, SEND_TO_DECK = 0x40, BANISH = 0x80, DRAW = 0x100, SEARCH = 0x200, CHANGE_ATK_DEF = 0x400, CHANGE_LEVEL_RANK = 0x800, POSITION = 0x1000, PIERCING = 0x2000, DIRECT_ATTACK = 0x4000, MULTI_ATTACK = 0x8000, NEGATE_ACTIVATION = 0x10000, NEGATE_EFFECT = 0x20000, DAMAGE_LP = 0x40000, RECOVER_LP = 0x80000, SPECIAL_SUMMON = 0x100000, NON_EFFECT_RELATED = 0x200000, TOKEN_RELATED = 0x400000, FUSION_RELATED = 0x800000, RITUAL_RELATED = 0x1000000, SYNCHRO_RELATED = 0x2000000, XYZ_RELATED = 0x4000000, LINK_RELATED = 0x8000000, COUNTER_RELATED = 0x10000000, GAMBLE = 0x20000000, CONTROL = 0x40000000, MOVE_ZONES = 0x80000000 } } } local normalize = function(s) return s:gsub('[-_]', ''):lower() end local rev_index = fun.iter(Codes.const):map(function(k, group) return k, fun.iter(group):map(function(k, v) return v, k end):tomap() end):tomap() local norm_index = fun.iter(Codes.const):map(function(k, group) return k, fun.iter(group):map(function(k, v) return normalize(k), v end):tomap() end):tomap() --- @alias CodeGroupKey "'attribute'"|"'category'"|"'link'"|"'ot'"|"'race'"|"'type'" --- Returns internationalized string from a `code`. Additional sub keys --- can be specified after `code` with `sub`. --- E.g. if locale is `en`, `Codes.i18n('type', 0x10)` -> `'Normal'`, --- `Codes.i18n('type', 0x2, 'attribute'')` -> `'SPELL'` --- @param group_key CodeGroupKey --- @param code number --- @param sub? string --- @return string|nil function Codes.i18n(group_key, code, sub) local group = rev_index[group_key] if not group then return end local partial_key = group[code] if not partial_key then return end sub = sub and '.' .. sub or '' return i18n('codes.' .. group_key .. '.' .. partial_key .. sub) end --- Combines keys from a group into a single value, doing a --- bitwise or among them. --- @param group_key CodeGroupKey --- @param keys string --- @return number function Codes.combine(group_key, keys) local group = norm_index[group_key] if not group then return 0 end return fun.iter(keys:gmatch '[%a-_]+'):map(normalize):reduce(0, function(c, key) return bit.bor(c, group[key] or 0) end) end return Codes
local skynet = require "skynet" local sprotoloader = require "sprotoloader" local sprotoparser = require("sprotoparser") local socket = require "skynet.socket" local boylib = require("boylib") local function readCrc32(crc32Str) local b = crc32Str local byte=string.byte local ret = byte(b,4) | byte(b,3)<<8 | byte(b,2)<<16 | byte(b,1)<<24 return ret end local function accept(s, fd, addr) local msg,len = skynet.call(s, "lua", fd, addr) return msg,len end local port=... port = tonumber(port) local function loginCmd(fd,addr,cmdBinStr) local sp = sprotoloader.load(1) local cmdvo = sp:pdecode("Cmd",cmdBinStr) print("rec cmd",fd,addr) local utilsFunc = require("utils/utilsFunc") utilsFunc.printTable(cmdvo) local cmd_login= require("game.cmd.cmd_login") local cmdLuaTable = cmd_login.recCmd(cmdvo) local cmdconst = require("game.cmd.cmdconst") local cmdStrcutName = cmdconst.getStructName(cmdvo.cmd) print("send cmd",cmdStrcutName,":") utilsFunc.printTable(cmdLuaTable) local msg = sp:pencode(cmdStrcutName,cmdLuaTable) return msg end skynet.start(function() skynet.error("logind2 server start") local cmd = require("game.cmd.cmdstruct") sprotoloader.save(sprotoparser.parse(cmd), 1) local instance = 8 local host = "0.0.0.0" local port = port local slave = {} local balance = 1 local id = socket.listen(host, port) socket.start(id , function(fd, addr) skynet.error(string.format("connect from %s (fd = %d)", addr, fd)) socket.start(fd) socket.limit(fd,1024) local cmdBinStr = socket.readline(fd,"\r\n") local c_crc32 = socket.readline(fd,"\r\n") local s_crc32 = boylib.crc32(cmdBinStr) local c_crc32int = readCrc32(c_crc32) local s_crc32int = readCrc32(s_crc32) local msg,len= "unVaild data",14 if c_crc32int == s_crc32int then msg = loginCmd(fd,add,cmdBinStr) end socket.write(fd,msg) --如果要增加较验,可以在下一行增加一个较验数 --BTODO 有空再加 socket.abandon(fd) -- never raise error here socket.close_fd(fd) end) end) --skynet.start(function() --skynet.error("logind2 server start") --local cmd = require("game.cmd.cmdstruct") --sprotoloader.save(sprotoparser.parse(cmd), 1) --local instance = 8 --local host = "0.0.0.0" --local port = port --local slave = {} --local balance = 1 --for i=1,instance do --table.insert(slave, skynet.newservice("login/loginblanced")) --end --local id = socket.listen(host, port) --socket.start(id , function(fd, addr) --local s = slave[balance] --balance = balance + 1 --if balance > #slave then balance = 1 end --local msg,len = skynet.call(s, "lua", fd, addr) ----local ok,err = pcall(accept,s, fd, addr) ----if not ok then ----if err ~= socket_error then ----skynet.error(string.format("invalid client (fd = %d) error = %s", fd, err)) ----end ----end --socket.close_fd(fd) --end) --end)
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by xuanc. --- DateTime: 2020/2/1 下午3:32 --- Description: 推送任务 --- -- function: log local function log(str) redis.log(redis.LOG_VERBOSE, '[LUA] ' .. str); end -- function: string split local function split(str, reps) local resultStrList = {} string.gsub(str, '[^' .. reps .. ']+', function(w) table.insert(resultStrList, w); end ) return resultStrList; end -- define local waitingKey = KEYS[1] local consumingKeyPrefix = KEYS[2] local maxScore = ARGV[1] local minScore = ARGV[2] log("EVAL lua [pushTask] ---------------------------------") log("keys: " .. waitingKey .. ", " .. consumingKeyPrefix); log(string.format("minScore: %s, maxScore: %s", minScore, maxScore)); local status, type = next(redis.call('TYPE', waitingKey)) log("status: " .. status .. ", type: " .. type); if status ~= nil and status == 'ok' then if type == 'zset' then -- get values local list = redis.call('ZRANGEBYSCORE', waitingKey, minScore, maxScore) if list ~= nil and #list > 0 then log("list length: " .. #list); for _, v in ipairs(list) do local item = split(v, ':'); local topic = item[1]; local taskId = item[2]; local consumingKey = consumingKeyPrefix .. ':' .. topic; redis.call('RPUSH', consumingKey, taskId); log('~ add value ' .. taskId .. ' in key ' .. consumingKey); end -- 从等待队列中删除 redis.call('ZREM', waitingKey, unpack(list)) log('delete list on waiting key'); end end end return nil;
--- --- Generated by MLN Team (http://www.immomo.com) --- Created by MLN Team. --- DateTime: 2019-09-05 12:05 --- local _class = { _name = 'HomeCommonCell', _version = '1.0' } ---@public function _class:new() local o = {} setmetatable(o, { __index = self }) return o end ---@public function _class:contentView() self:setupCellContentView() self:setupViewPagerForCell() self:setupDetailDescViewForCell() self:setupInteractionViewsForCell() return self.cellContentView end ---更新关注按钮 ---@public function _class:updateFollowLabel(show, text) self.followLabel:hidden(not show) self.followLabel:text(text or "+关注") end ---更新cell内容展示 ---@param item Map 数据 ---@public function _class:updateCellContentWithItem(item) self.nameLabel:text(item:get("sellernick")) --名字 self.avatarView:image(item:get("itempic")) --头像 self.cellItems:insert(1, item:get("itempic")) --图片 self.cellItems:insert(1, item:get("taobao_image")) --图片 local count = self.cellItems:size() if count > 10 then --设置cell上的图片滑动展示数量最多10个 self.cellItems:removeObjectsAtRange(10, count) end self.viewPager:reloadData() self.descLabel:text(item:get("itemdesc")) --简介 self.detailImageView:image(item:get("itempic")) --小图片 self.detailSubTitleLabel:text(item:get("itemshorttitle")) --副标题 self.detailCountLabel:text(string.format("%d篇内容>", item:get("couponmoney"))) --内容数量 self.likeCountLabel:text(item:get("itemsale")) --点赞数量 self.commentCountLabel:text(item:get("general_index")) --评论数量 end ---@private function _class:setupCellContentView() local cellContentView = LinearLayout(LinearType.VERTICAL) :width(MeasurementType.MATCH_PARENT):height(MeasurementType.WRAP_CONTENT) self.cellContentView = cellContentView --layout local personInfoView = LinearLayout(LinearType.HORIZONTAL) personInfoView:width(MeasurementType.MATCH_PARENT):height(MeasurementType.WRAP_CONTENT) :marginTop(12):marginBottom(12):marginLeft(12):marginRight(12) cellContentView:addView(personInfoView) self.personInfoView = personInfoView --头像 local avatarView = ImageView() avatarView:width(35):height(35):setGravity(Gravity.CENTER_VERTICAL) :cornerRadius(18) avatarView:bgColor(ColorConstants.LightGray)--ok avatarView:contentMode(ContentMode.SCALE_ASPECT_FILL) personInfoView:addView(avatarView) self.avatarView = avatarView --名字 local nameLabel = Label() nameLabel:height(MeasurementType.WRAP_CONTENT):width(MeasurementType.MATCH_PARENT):setGravity(Gravity.CENTER_VERTICAL):marginLeft(8) nameLabel:fontSize(14):textAlign(TextAlign.LEFT) personInfoView:addView(nameLabel) self.nameLabel = nameLabel --关注按钮 local followLabel = Label() followLabel:priority(1):width(55):height(30) :cornerRadius(3):borderWidth(1):borderColor(Color(200, 200, 200)) followLabel:text("+关注"):textAlign(TextAlign.CENTER):fontSize(13):textColor(ColorConstants.Black) followLabel:onClick(function() if self.followLabel:text() == "+关注" then self.followLabel:text("已关注") else self.followLabel:text("+关注") end end) self.followLabel = followLabel personInfoView:addView(followLabel) end ---@private function _class:setupViewPagerForCell() self.cellItems = Array() --配置cell图片数据 self.adapter = ViewPagerAdapter() self.adapter:getCount(function(_) return self.cellItems:size() end) self.adapter:initCell(function(cell, _) cell.imageView = ImageView() cell.imageView:contentMode(ContentMode.SCALE_ASPECT_FIT) cell.imageView:height(MeasurementType.MATCH_PARENT):width(MeasurementType.MATCH_PARENT) cell.contentView:addView(cell.imageView) end) self.adapter:fillCellData(function(cell, row) local item = self.cellItems:get(row) cell.imageView:image(item) end) --让cell上的图片支持滑动 self.viewPager = ViewPager() :setPreRenderCount(1) self.viewPager:width(MeasurementType.MATCH_PARENT):height(350) self.viewPager:adapter(self.adapter) self.cellContentView:addView(self.viewPager) end ---@private function _class:setupDetailDescViewForCell() self.descLabel = Label() self.descLabel:marginLeft(10):marginRight(10):marginTop(10):height(MeasurementType.WRAP_CONTENT):width(MeasurementType.MATCH_PARENT) self.descLabel:fontSize(15):textAlign(TextAlign.LEFT):lines(3) self.cellContentView:addView(self.descLabel) local detailViewHeight = 50 local detailLayout = LinearLayout(LinearType.HORIZONTAL):marginTop(10):marginLeft(10):marginRight(10):height(detailViewHeight):width(MeasurementType.MATCH_PARENT) detailLayout:cornerRadius(3) detailLayout:bgColor(ColorConstants.LightGray)--OK detailLayout:onClick(function() Toast("灵感集里还有更多内容哦", 1) end) self.detailLayout = detailLayout local detailImageView = ImageView():width(detailViewHeight):height(detailViewHeight):setGravity(Gravity.CENTER_VERTICAL) detailImageView:contentMode(ContentMode.SCALE_ASPECT_FILL) self.detailImageView = detailImageView --布局label local labelLayout = LinearLayout(LinearType.VERTICAL):marginLeft(10):marginTop(10):width(MeasurementType.WRAP_CONTENT):height(MeasurementType.WRAP_CONTENT) self.labelLayout = labelLayout local detailTitleLabel = Label():height(MeasurementType.WRAP_CONTENT):width(MeasurementType.WRAP_CONTENT) detailTitleLabel:text("来自灵感集"):fontSize(12):textAlign(TextAlign.LEFT):lines(1) labelLayout:addView(detailTitleLabel) self.detailTitleLabel = detailTitleLabel --布局居右显示label local rightLayout = LinearLayout(LinearType.HORIZONTAL):width(MeasurementType.MATCH_PARENT):setGravity(Gravity.CENTER):marginRight(0) self.rightLayout = rightLayout local placeholderLayout = Label():height(26):width(MeasurementType.MATCH_PARENT):setGravity(Gravity.CENTER):marginLeft(0):marginRight(0) self.placeholderLayout = placeholderLayout rightLayout:addView(placeholderLayout) local detailCountLabelWidth = 85 local detailCountLabel = Label():marginLeft(-detailCountLabelWidth):height(26):width(detailCountLabelWidth):setGravity(Gravity.CENTER) detailCountLabel:bgColor(Color(210, 210, 210, 1))--ok detailCountLabel:cornerRadius(detailCountLabel:height() / 2) detailCountLabel:fontSize(12):textAlign(TextAlign.CENTER):lines(1):textColor(ColorConstants.White) self.detailCountLabel = detailCountLabel rightLayout:addView(detailCountLabel) --副标题 local detailSubTitleLabel = Label():marginTop(5):marginRight(detailCountLabel:width()):height(MeasurementType.WRAP_CONTENT):width(MeasurementType.WRAP_CONTENT) detailSubTitleLabel:fontSize(13):textAlign(TextAlign.LEFT):lines(1):setTextFontStyle(FontStyle.BOLD) labelLayout:addView(detailSubTitleLabel) self.detailSubTitleLabel = detailSubTitleLabel --添加显示 detailLayout:addView(detailImageView) detailLayout:addView(labelLayout) detailLayout:addView(rightLayout) self.cellContentView:addView(detailLayout) end ---@private function _class:setupInteractionViewsForCell() local height = 50 local interactionLayout = LinearLayout(LinearType.HORIZONTAL):marginTop(10):marginLeft(10):marginRight(10):height(height):width(MeasurementType.MATCH_PARENT) self.interactionLayout = interactionLayout self.cellContentView:addView(interactionLayout) --分享 local shareView = ImageView():height(25):width(25):setGravity(Gravity.CENTER_VERTICAL) shareView:image("share") shareView:onClick(function() Toast("可分享到微信朋友圈哦") end) self.shareView = shareView interactionLayout:addView(shareView) --布局点赞、评论、收藏 local buttonsLayout = LinearLayout(LinearType.HORIZONTAL):height(height):width(MeasurementType.MATCH_PARENT) self.buttonsLayout = buttonsLayout interactionLayout:addView(buttonsLayout) --收藏 local collectButton = ImageView():marginLeft(-30):marginTop(-3):width(30):height(30):setGravity(Gravity.CENTER_VERTICAL) collectButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567258988643-collect.png") collectButton:onClick(function() self:handleClickCollectEvent() end) self.collectButton = collectButton interactionLayout:addView(collectButton) --评论数量 local commentCountLabel = Label():marginLeft(-60):marginTop(-8):width(30):height(15):setGravity(Gravity.CENTER) commentCountLabel:fontSize(11):textColor(ColorConstants.LightBlack) commentCountLabel:text("5") self.commentCountLabel = commentCountLabel interactionLayout:addView(commentCountLabel) --评论 local messageButton = ImageView():marginLeft(-60):width(25):height(25):setGravity(Gravity.CENTER_VERTICAL) messageButton:image("https://s.momocdn.com/w/u/others/2019/08/28/1566958902036-comment.png") messageButton:onClick(function() Toast("还没有评论,赶快抢个沙发吧") end) self.messageButton = messageButton interactionLayout:addView(messageButton) --点赞数量 local likeCountLabel = Label():marginLeft(-60):marginTop(-8):width(35):height(15):setGravity(Gravity.CENTER) likeCountLabel:fontSize(11):textColor(ColorConstants.LightBlack) likeCountLabel:text("3") self.likeCountLabel = likeCountLabel interactionLayout:addView(likeCountLabel) --点赞 local likeButton = ImageView():marginLeft(-65):width(30):height(25):setGravity(Gravity.CENTER_VERTICAL) likeButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567257871136-like.png") likeButton:onClick(function() self:handleClickLikeEvent() end) self.likeButton = likeButton interactionLayout:addView(likeButton) --分割线 local line = View():width(MeasurementType.MATCH_PARENT):height(10) line:bgColor(ColorConstants.LightGray)--ok self.line = line self.cellContentView:addView(line) end ---点赞事件 ---@private function _class:handleClickLikeEvent() if self.hasLiked then self.likeButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567257871136-like.png") self.likeCountLabel:text(string.format("%s", (self.likeCountLabel:text() - 1))) self.hasLiked = false else Toast("点赞成功,购物基金+1", 1) self.likeButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567257871172-liked.png") self.likeCountLabel:text(string.format("%s", (self.likeCountLabel:text() + 1))) self.hasLiked = true end self:addScaleAnimation(self.likeButton) end ---收藏事件 ---@private function _class:handleClickCollectEvent() if self.hasCollected then self.collectButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567258988643-collect.png") self.hasCollected = false else Toast("收藏成功", 1) self.collectButton:image("https://s.momocdn.com/w/u/others/2019/08/31/1567258988643-collected.png") self.hasCollected = true end self:addScaleAnimation(self.collectButton) end ---动画 ---@private function _class:addScaleAnimation(view) local anim = Animation() anim:setScaleX(0.9, 1):setScaleY(0.9, 1):setDuration(0.2) anim:start(view) end return _class
extensions("abcpy/2.1") help([[ This is the help message for python3 3.7 ]])
require('lspsaga').init_lsp_saga{ -- default value use_saga_diagnostic_sign = true, error_sign = '', warn_sign = '', hint_sign = '', infor_sign = '', code_action_icon = ' ', diagnostic_header_icon = '  ', code_action_prompt = { enable = true, sign = false, virtual_text = false, }, code_action_keys = { quit = '<Esc>',exec = '<CR>' }, finder_action_keys = { open = 'o', vsplit = 'v',split = 'h',quit = '<Esc>',scroll_down = '<C-f>', scroll_up = '<C-b>' }, rename_prompt_prefix = '>', border_style = "round", }
mapFields = require "lib/mapFields" target.field = mapFields.getID("SilentSwamp")
-------------------------------------------------------------------------------- -- 81-714 Moscow and SPB electric schemes -------------------------------------------------------------------------------- -- Copyright (C) 2013-2018 Metrostroi Team & FoxWorks Aerospace s.r.o. -- Contains proprietary code. See license.txt for additional information. -------------------------------------------------------------------------------- Metrostroi.DefineSystem("81_714_Electric") TRAIN_SYSTEM.MVM = 1 TRAIN_SYSTEM.LVZ_1 = 2 TRAIN_SYSTEM.LVZ_2 = 3 TRAIN_SYSTEM.LVZ_3 = 4 function TRAIN_SYSTEM:Initialize(typ1,typ2) self.TrainSolver = "81_717" self.ThyristorController = true self.Type = self.Type or self.MVM -- Load all functions from base Metrostroi.BaseSystems["Electric"].Initialize(self) for k,v in pairs(Metrostroi.BaseSystems["Electric"]) do if not self[k] and type(v) == "function" then self[k] = v end end self.SolvePowerCircuits = Metrostroi.BaseSystems["81_717_Electric"].SolvePowerCircuits self.SolveThyristorController = Metrostroi.BaseSystems["81_717_Electric"].SolveThyristorController self.Think = Metrostroi.BaseSystems["81_717_Electric"].Think end if CLIENT then return end function TRAIN_SYSTEM:Inputs(...) return { "Type", "NoRT2", "HaveRO", "GreenRPRKR","X2PS", "HaveVentilation" } end function TRAIN_SYSTEM:Outputs(...) return Metrostroi.BaseSystems["81_717_Electric"].Outputs(self,...) end function TRAIN_SYSTEM:TriggerInput(name,value) if name == "Type" then self.Type = value end if name == "NoRT2" then self.NoRT2 = value > 0 end if name == "HaveRO" then self.HaveRO = value > 0 end if name == "GreenRPRKR" then self.GreenRPRKR = value > 0 end if name == "X2PS" then self.X2PS = value > 0 end if name == "HaveVentilation" then self.Vent = value > 0 end end -- Node values local S = {} -- Converts boolean expression to a number local function C(x) return x and 1 or 0 end local min = math.min local max = math.max function TRAIN_SYSTEM:SolveAllInternalCircuits(Train,dT,firstIter) local P = Train.PositionSwitch local RheostatController = Train.RheostatController local RK = RheostatController.SelectedPosition local B = (Train.Battery.Voltage > 55) and 1 or 0 local BO = B*Train.VB.Value local T = Train.SolverTemporaryVariables local isMVM = self.Type == 1 local Panel = Train.Panel Panel.V1 = BO --Поездная часть S["33D"] = T[10]*Train.A54.Value*Train.A84.Value Train:WriteTrainWire(1, S["33D"]*C(Train.RV.Value~=1)) Train:WriteTrainWire(20,S["33D"]*C(Train.RV.Value~=1)) Train:WriteTrainWire(4, S["33D"]*C(Train.RV.Value==2)*Train.Start.Value) Train:WriteTrainWire(5, S["33D"]*C(Train.RV.Value==0)*Train.Start.Value) Train:WriteTrainWire(17,S["33D"]*Train.VozvratRP.Value) if isMVM then Train:WriteTrainWire(71,S["33D"]*Train.OtklBV.Value) end --Вагонная часть S["10A"] = BO*Train.A30.Value S["ZR"] = (1-Train.RRP.Value)+(B*Train.A39.Value*(1-Train.RPvozvrat.Value)*Train.RRP.Value)*-1 S["1A"] = T[1]*Train.A1.Value*Train.IGLA_PCBK.KVC S["6A"] = T[6]*Train.A6.Value Train.TR1:TriggerInput("Set",S["6A"]) --1A-PMU-1T-NR/RPU-1P(6^) S["1P"] = S["1A"]*P.PM*(Train.NR.Value+Train.RPU.Value)+S["6A"]*P.PT --1P-RK1-18-AVT-!RP-RKR-DR1-DR2-1G S["1G"] = S["1P"]*C(1 <= RK and RK <= 18)*Train.AVT.Value*(1-Train.RPvozvrat.Value)*Train.RKR.Value--FIXME S["1L"] = S["1G"]*C(RK==1)*(Train.KSB1.Value+Train.KSH1.Value)*Train.LK2.Value S["1Zh"] = (S["1L"]+S["1G"]*Train.LK3.Value)*S["ZR"] Train.LK1:TriggerInput("Set",S["1Zh"]*P.PM) Train.LK3:TriggerInput("Set",S["1Zh"]) Train.LK4:TriggerInput("Set",S["1Zh"]*Train.LK3.Value) S["3A"] = T[3]*Train.A3.Value S["6G1"] = S["6A"]*P.PT*C(RK==1) self.ThyristorControllerWork = S["6G1"]*(Train.KSB1.Value+Train.KSB2.Value)*Train.LK2.Value S["6G2"] = S["6G1"]*(1-Train.RSU.Value) Train.KSB1:TriggerInput("Set",S["6G2"]) Train.KSB2:TriggerInput("Set",S["6G2"]) --20-A20-20A-Rp-20B S["20A"] = T[20]*Train.A20.Value*Train.IGLA_PCBK.KVC Train.RPL:TriggerInput("Set",--[[ S["20A"]--]] BO*(1-Train.RPvozvrat.Value)*(Train.DR1.Value+Train.DR2.Value+(1-Train.BV.State))) S["20B"] = S["20A"]*(1-Train.RPvozvrat.Value) S["20K"] = S["20B"]*P.PS Train.LK2:TriggerInput("Set",S["20K"]*S["ZR"]) Train.LK5:TriggerInput("Set",S["20B"]*Train.LK1.Value*S["ZR"]) if self.X2PS then S["1M"] = C(1<=RK and RK<=5)*S["3A"]+S["20A"]*Train.KSH2.Value S["1R"] = (S["1A"]*C(RK==1)+S["1M"]*P.PP)*S["ZR"] Train.KSH1:TriggerInput("Set",S["1R"]) Train.KSH2:TriggerInput("Set",S["1R"]) P:TriggerInput("PP",S["3A"]*Train.LK5.Value*C(RK==18)*S["ZR"])--1A-1D else S["1M"] = C(1<=RK and RK<=5)*S["3A"]+T[10]*Train.KSH2.Value S["1R"] = (S["1A"]*C(RK==1)*P.PS + S["1M"]*P.PP)*S["ZR"] Train.KSH1:TriggerInput("Set",S["1R"]) Train.KSH2:TriggerInput("Set",S["1R"]) P:TriggerInput("PP",S["1A"]*C(RK==18)*S["ZR"])--1A-1D end local Reverser = Train.Reverser S["4A"] = T[4]*Train.A4.Value Reverser:TriggerInput("NZ",S["4A"]*Reverser.VP*(1-Train.LK1.Value)*S["ZR"]) S["5A"] = T[5]*Train.A5.Value Reverser:TriggerInput("VP",S["5A"]*Reverser.NZ*(1-Train.LK1.Value)*S["ZR"]) --Train.RKR:TriggerInput("Set",(S["4A"]*Reverser.NZ+S["5A"]*Reverser.VP)) --81-717.5(м) МСК Train.RKR:TriggerInput("Set",(S["4A"]*Reverser.NZ+S["5A"]*Reverser.VP)*Train.BV.State*S["ZR"]) --81-717.5 Харько*S["ZR"]в --+B S["1N"] = C(11<=RK and RK<=18)*(1-Train.LK4.Value) Train.RR:TriggerInput("Set",S["10A"]*S["1N"] + P.PS*Train.LK4.Value) S["5Zh"] = S["10A"]*(1-Train.LK3.Value) P:TriggerInput("PS",S["5Zh"]*(P.PP)) P:TriggerInput("PM",S["5Zh"]*(1-Train.TR1.Value)*Train.KSH2.Value) P:TriggerInput("PT",S["5Zh"]*(P.PM)*(1-Train.KSH2.Value)) --P:TriggerInput("PP",S["5Zh"]*(P.PM)) S["2A"] = T[2]*Train.A2.Value S["2T"] = S["2A"]*Train.TR1.Value Train.RSU:TriggerInput("Set",S["2T"]*Train.ThyristorBU5_6.Value) Train.RU:TriggerInput("Set",S["2T"]) S["2B"] = S["2A"]*((1-Train.KSB1.Value)*(1-Train.KSB2.Value)+(1-Train.TR1.Value)) S["2Ca"] = P.PS*C(1<=RK and RK<=17)*Train.RR.Value --CHECK S["2Cb"] = P.PP*(C(6<=RK and RK<=18)+C(2<=RK and RK<=5)*Train.KSH1.Value)*(1-Train.RR.Value) --CHECK S["2C"] = S["2B"]*(S["2Ca"]+S["2Cb"])*Train.LK4.Value S["10R"] = S["10A"]*(1-Train.LK3.Value)*C(2<=RK and RK<=18)*(1-Train.LK4.Value) S["2U"] = S["10R"]+S["2C"]*S["ZR"] Train.SR1:TriggerInput("Set",S["2U"]) Train.RV1:TriggerInput("Set",S["2U"]) S["2Zh"] = S["2A"]*Train.TR1.Value*C(17<=RK and RK<=18) if self.NoRT2 then Train.PneumaticNo1:TriggerInput("Set",S["2Zh"]+T[48]*Train.A72.Value) else Train.PneumaticNo1:TriggerInput("Set",S["2Zh"]+T[48]*Train.A72.Value*(1-Train.RT2.Value)) end S["8A"] = T[8]*Train.A8.Value*(1-Train.RV1.Value)*(1-Train.RT2.Value)*(1-Train.RV3.Value) Train.PneumaticNo2:TriggerInput("Set",S["8A"]+T[39]*Train.A52.Value) Train.RV3:TriggerInput("Set",T[19]*Train.A19.Value) S["25A"] = T[25]*Train.A25.Value S["10X"] = (--[[ S["1N"]*P.PS+--]] Train.LK4.Value+C(RK==1)*Train.LK2.Value) Train["RRTpod"] = S["10A"]*RheostatController.RKM2*S["10X"] Train["RRTuderzh"] = S["25A"] Train["RUTpod"] = S["10A"]*RheostatController.RKM1*S["10X"] Train["RUTavt"] = Train.A70.Value*B Train.RRT:TriggerInput("Close",Train.RRTuderzh*Train.RRTpod) Train.RRT:TriggerInput("Open",(1-Train.RRTuderzh)) Train.RRP:TriggerInput("Set",T[14]*Train.A14.Value)--14A --СДРК Б+ провод S["10A3"] = BO*Train.A28.Value S["10BG"] = S["10A3"]*(Train.TR1.Value + Train.RV1.Value) RheostatController:TriggerInput("MotorCoilState",min(1,S["10A"]*(S["10BG"]*Train.RR.Value - S["10BG"]*(1-Train.RR.Value)))) Train.RVO:TriggerInput("Set",S["10A3"]*Train.NR.Value) self.ThyristorControllerPower = S["10A3"] --[[ S["10Ra"] = T[10]*RheostatController.RKM1 S["10Rb"] = T[10]*Train.SR1.Value S["10RbA"] = S["10Rb"]*(1-Train.RRT.Value)*(1-Train.RUT.Value)+S["10Ra"] S["10RbB"] = S["10Rb"]*Train.RUT.Value S["10RB"] = S["10RbA"]+S["10RbB"]*Train.RRT.Value+S["10RbB"]*(1-Train.SR1.Value) S["10Rc"] = T[10]*Train.LK3.Value*C(RK>=18 or RK<=1) S["10RS"] = S["10Ra"]+S["10RB"]*(1-RheostatController.RKP)*S["10Rc"]--]] S["10Yu"] = S["10A"]*Train.SR1.Value S["10M"] = S["10Yu"]*(1-Train.RRT.Value)*(1-Train.RUT.Value) S["10N"] = S["10A"]*RheostatController.RKM1+S["10M"] S["10T"] = (Train.RUT.Value+Train.RRT.Value+(1-Train.SR1.Value))*(RheostatController.RKP)+S["10A"]*Train.LK3.Value*C(RK>=18 and RK<=1) RheostatController:TriggerInput("MotorState",S["10N"]+S["10T"]*(-10)) Train.RZ_2:TriggerInput("Set",T[24]*(1-Train.LK4.Value)) S["17A"] = T[17]*Train.A18.Value Train.BV:TriggerInput("Power",B*Train.A80.Value) Train.BV:TriggerInput("Enable",S["17A"]*Train.A81.Value) if isMVM then Train.BV:TriggerInput("Disable",T[71]*Train.A66.Value) end Train.RPvozvrat:TriggerInput("Open",S["17A"]) --FIXME Mayve more right RP code -- --Вспом цепи Train:WriteTrainWire(10,BO*Train.A56.Value) if self.NoRT2 then Train:WriteTrainWire(48,Train.A72.Value*S["2Zh"]) --FIXME ARS else Train:WriteTrainWire(48,Train.A72.Value*S["2Zh"]*(1-Train.RT2.Value)) --FIXME ARS end Train:WriteTrainWire(22,T[10]*Train.A10.Value*Train.AK.Value) S["UO"] = T[10]*Train.A27.Value Train:WriteTrainWire(27,S["UO"]*Train.L_1.Value) S["36N"] = BO*Train.A45.Value Train:WriteTrainWire(36,S["36N"]*Train.BPSNon.Value) Train:WriteTrainWire(37,S["36N"]*Train.ConverterProtection.Value) if self.GreenRPRKR then S["10AN"] = Train.RPvozvrat.Value+(1-Train.RKR.Value) --81-717 Харьков else S["10AN"] = Train.RPvozvrat.Value --81-717 МСК end S["18A"] = (S["10AN"]*100+(1-Train.LK4.Value))*Train.A38.Value Train:WriteTrainWire(18,S["18A"]) Panel.TW18 = S["18A"] Panel.GreenRP = S["10AN"]*S["UO"] --S["36N"] = BO*Train.A45.Value --Train:WriteTrainWire(37,Train.ConverterProtection.Value) --Train:WriteTrainWire(36,S["36N"]*(1-Train.BPSNon.Value)) --Train:WriteTrainWire(69,T[36]*Train.BPSNon.Value) S["B9"] = B*Train.A53.Value S["B9a"] = S["B9"]*Train.VB.Value Train.KVC:TriggerInput("Set",S["B9a"]) --Train.KUP:TriggerInput("Set",S["B9a"]*Train.A75.Value) S["D4"] = BO*Train.A13.Value Panel.RZP = T[36]*T[61] --[[S["14b"] = S["14a"]*Train.A17.Value S["D1"] = ["10"]*Train.A21.Value*KV["D-D1"]+S["14b"]*KRU["11/3-D1/1"] if isLVZ then Train:WriteTrainWire(16,S["D1"]*(Train.VUD1.Value*Train.VUD2.Value+AVO["16"]*RC2)) else Train:WriteTrainWire(16,S["D1"]*(Train.VUD1.Value*Train.VUD2.Value)) end Train:WriteTrainWire(12,S["D1"]*Train.KRZD.Value) S[31] = S["D1"]*(1-Train.DoorSelect.Value) S[32] = S["D1"]*Train.DoorSelect.Value Train:WriteTrainWire(31,S[31]*(Train.KDL.Value+Train.KDLR.Value+Train.VDL.Value)) Train:WriteTrainWire(32,S[32]*Train.KDP.Value) S["F7"] = T[10]*Train.A29.Value*KV["F-F7"]+S["14b"]*KRU["11/3-FR1"] S["F1"] = S["B9"]*KV["B9-F1"]--]] Train:WriteTrainWire(34,Train.RKTT.Value+Train.DKPT.Value) Train:WriteTrainWire(28,T[-28]*Train.RD.Value) S[64] = S["UO"]*Train.BPT.Value Train:WriteTrainWire(64,S[64]) Panel.BrW = S[64] --Вспом цепи приём Panel.EmergencyLights = BO*Train.A49.Value*Train.A15.Value Train.RPU:TriggerInput("Set",T[37]*Train.A37.Value) S["D6"] = S["D4"]*Train.BD.Value Train.RD:TriggerInput("Set",S["D6"]) Panel.DoorsW = S["D4"]*(1-Train.RD.Value) Train.VDZ:TriggerInput("Set",T[16]*Train.A16.Value*(1-Train.RD.Value)) S["12A"] = T[12]*Train.A12.Value S["31A"] = T[31]*Train.A31.Value S["32A"] = T[32]*Train.A32.Value Train.VDOL:TriggerInput("Set",S["31A"]+S["12A"]) Train.VDOP:TriggerInput("Set",S["32A"]+S["12A"]) S["36A"] = T[36]*Train.A51.Value*Train.RVO.Value--36 Train.KVP:TriggerInput("Set",S["36A"]*Train.KPP.Value) Train.KPP:TriggerInput("Set",S["36A"]*(1-Train.RZP.Value)*Train.KVC.Value) S["27A"] = T[27]*Train.A50.Value Train.KO:TriggerInput("Set",S["27A"]) --S["22A"] = (T[23]*Train.A23.Value+T[22]*Train.A22.Value) --FIXME 714 Train.RV2:TriggerInput("Set",T[23]*Train.A23.Value) Train.KK:TriggerInput("Set",( T[22]*Train.A22.Value*(1-Train.RV2.Value)+ T[23]*Train.A23.Value*Train.RV2.Value )*(1-Train.TRK.Value)) --if isMVM then Panel.AnnouncerPlaying = T[13] Panel.AnnouncerBuzz = T[-13] --end --BPSN local BPSN = Train.PowerSupply Train.Battery:TriggerInput("Charge",BPSN.X2_2*Train.A24.Value*BO) BPSN:TriggerInput("5x2",BO*Train.A65.Value*Train.KVP.Value) Panel.MainLights = BPSN.X6_2*Train.KO.Value Train.RPU:TriggerInput("Set",T[37]*Train.A37.Value) Train.RZP:TriggerInput("Open",T[37]*Train.A37.Value*Train.RPU.Value) Train:WriteTrainWire(61,Train.RZP.Value) if self.Vent then Train.KV1:TriggerInput("Set",T[59]*Train.AV4.Value*Train.RVO.Value) Train.KV2:TriggerInput("Set",T[60]*Train.AV5.Value) Train.KV3:TriggerInput("Set",T[58]*Train.AV6.Value) S["AV2"] = T[10]*Train.AV2.Value Panel.M1_3 = S["AV2"]*Train.KV1.Value Panel.M4_7 = S["AV2"]*Train.KV2.Value+B*Train.AV3.Value*Train.KV3.Value Train.R1:TriggerInput("Set",S["AV2"]*C(Panel.M1_3 > 0.5 and Panel.M4_7 > 0.5)) Train:WriteTrainWire(57,T[59]*(1-Train.R1.Value)) end return S end function TRAIN_SYSTEM:SolveRKInternalCircuits(Train,dT,firstIter) local P = Train.PositionSwitch local RheostatController = Train.RheostatController local RK = RheostatController.SelectedPosition local B = (Train.Battery.Voltage > 55) and 1 or 0 local BO = B*Train.VB.Value local T = Train.SolverTemporaryVariables --Вагонная часть S["10A"] = BO*Train.A30.Value S["ZR"] = (1-Train.RRP.Value)+(B*Train.A39.Value*(1-Train.RPvozvrat.Value)*Train.RRP.Value)*-1 S["1N"] = C(11<=RK and RK<=18)*(1-Train.LK4.Value) Train.RR:TriggerInput("Set",S["10A"]*S["1N"] + P.PS*Train.LK4.Value) S["2A"] = T[2]*Train.A2.Value S["2B"] = S["2A"]*((1-Train.KSB1.Value)*(1-Train.KSB2.Value)+(1-Train.TR1.Value)) S["2Ca"] = P.PS*C(1<=RK and RK<=17)*Train.RR.Value --CHECK S["2Cb"] = P.PP*(C(6<=RK and RK<=18)+C(2<=RK and RK<=5)*Train.KSH1.Value)*(1-Train.RR.Value) --CHECK S["2C"] = S["2B"]*(S["2Ca"]+S["2Cb"])*Train.LK4.Value S["10R"] = S["10A"]*(1-Train.LK3.Value)*C(2<=RK and RK<=18)*(1-Train.LK4.Value) S["2U"] = S["10R"]+S["2C"]*S["ZR"] Train.SR1:TriggerInput("Set",S["2U"]) Train.RV1:TriggerInput("Set",S["2U"]) S["25A"] = T[25]*Train.A25.Value S["10X"] = (Train.LK4.Value+C(RK==1)*Train.LK2.Value) Train["RRTpod"] = S["10A"]*RheostatController.RKM2*S["10X"] Train["RRTuderzh"] = S["25A"] Train["RUTpod"] = S["10A"]*RheostatController.RKM1*S["10X"] Train.RRT:TriggerInput("Close",Train.RRTuderzh*Train.RRTpod) Train.RRT:TriggerInput("Open",(1-Train.RRTuderzh)) --СДРК Б+ провод S["10A3"] = BO*Train.A28.Value S["10BG"] = S["10A3"]*(Train.TR1.Value + Train.RV1.Value) RheostatController:TriggerInput("MotorCoilState",min(1,S["10A"]*(S["10BG"]*Train.RR.Value - S["10BG"]*(1-Train.RR.Value)))) S["10Yu"] = S["10A"]*Train.SR1.Value S["10M"] = S["10Yu"]*(1-Train.RRT.Value)*(1-Train.RUT.Value) S["10N"] = S["10A"]*RheostatController.RKM1+S["10M"] S["10T"] = (Train.RUT.Value+Train.RRT.Value+(1-Train.SR1.Value))*(RheostatController.RKP)+S["10A"]*Train.LK3.Value*C(RK>=18 and RK<=1) RheostatController:TriggerInput("MotorState",S["10N"]+S["10T"]*(-10)) return S end local wires = {10,1,6,3,20,4,5,2,48,8,39,19,25,13,-13,14,24,17,71,36,-28,37,16,12,31,32,69,27,23,22,23,37,59,60,58,61} function TRAIN_SYSTEM:SolveInternalCircuits(Train,dT,firstIter) local T = Train.SolverTemporaryVariables if not T then T = {} for i,v in ipairs(wires) do T[v] = 0 end Train.SolverTemporaryVariables = T end if firstIter then for i,v in ipairs(wires) do T[v] = min(Train:ReadTrainWire(v),1) end self:SolveAllInternalCircuits(Train,dT) else self:SolveRKInternalCircuits(Train,dT) end end
------------------------------------------------------------------------ --- @file headers.lua --- @brief C struct definitions for all protocol headers and respective --- additional structs for instance addresses. --- Please check the source code for more information. ------------------------------------------------------------------------ local ffi = require "ffi" -- structs ffi.cdef[[ union payload_t { uint8_t uint8[0]; uint16_t uint16[0]; uint32_t uint32[0]; uint64_t uint64[0]; }; // ----------------------------------------------------- // ---- Address structs // ----------------------------------------------------- union __attribute__((__packed__)) mac_address { uint8_t uint8[6]; uint64_t uint64[0]; // for efficient reads }; union ip4_address { uint8_t uint8[4]; uint32_t uint32; }; union ip6_address { uint8_t uint8[16]; uint32_t uint32[4]; uint64_t uint64[2]; }; union ipsec_iv { uint32_t uint32[2]; }; union ipsec_icv { uint32_t uint32[4]; }; // ----------------------------------------------------- // ---- Header structs // ----------------------------------------------------- // TODO: there should also be a variant with a VLAN tag // note that this isn't necessary for most cases as offloading should be preferred struct __attribute__((__packed__)) ethernet_header { union mac_address dst; union mac_address src; uint16_t type; }; struct __attribute__((__packed__)) arp_header { uint16_t hrd; uint16_t pro; uint8_t hln; uint8_t pln; uint16_t op; union mac_address sha; union ip4_address spa; union mac_address tha; union ip4_address tpa; }; struct __attribute__((__packed__)) ptp_header { uint8_t messageType; uint8_t versionPTP; uint16_t len; uint8_t domain; uint8_t reserved; uint16_t flags; uint32_t correction[2]; uint32_t reserved2; uint8_t oui[3]; uint8_t uuid[5]; uint16_t ptpNodePort; uint16_t sequenceId; uint8_t control; uint8_t logMessageInterval; }; struct __attribute__((__packed__)) ip4_header { uint8_t verihl; uint8_t tos; uint16_t len; uint16_t id; uint16_t frag; uint8_t ttl; uint8_t protocol; uint16_t cs; union ip4_address src; union ip4_address dst; }; #pragma pack(push) #pragma pack(1) struct percg_header { uint16_t preamble; uint8_t source; uint8_t destination; uint8_t isData; uint8_t flowId; }; struct percc1_link_data { uint32_t dataQueueSize; uint32_t controlQueueSize; uint32_t linkUtilization; uint8_t bos; }; struct percc1_host_state { uint32_t newRate; uint8_t newLabel; uint32_t oldRate; uint8_t oldLabel; uint8_t bos; }; struct percc1_agg { uint32_t linkCapacity; uint32_t sumSat; uint32_t numSat; uint32_t numUnsat; uint8_t bos; }; struct percc1_header { uint8_t isExit; uint8_t isForward; uint8_t hop; uint8_t maxHops; struct percc1_link_data linkData; struct percc1_link_data linkData2; struct percc1_host_state hostState; struct percc1_host_state hostState2; struct percc1_agg agg; struct percc1_agg agg2; }; #pragma pack(pop) struct __attribute__((__packed__)) ip6_header { uint32_t vtf; uint16_t len; uint8_t nextHeader; uint8_t ttl; union ip6_address src; union ip6_address dst; }; struct __attribute__((__packed__)) icmp_header { uint8_t type; uint8_t code; uint16_t cs; union payload_t body; }; struct __attribute__((__packed__)) udp_header { uint16_t src; uint16_t dst; uint16_t len; uint16_t cs; }; struct __attribute__((__packed__)) tcp_header { uint16_t src; uint16_t dst; uint32_t seq; uint32_t ack; uint8_t offset; uint8_t flags; uint16_t window; uint16_t cs; uint16_t urg; uint32_t options[]; }; struct __attribute__((__packed__)) vxlan_header { uint8_t flags; uint8_t reserved[3]; uint8_t vni[3]; uint8_t reserved2; }; struct __attribute__((__packed__)) esp_header { uint32_t spi; uint32_t sqn; union ipsec_iv iv; }; struct __attribute__((__packed__)) ah_header { uint8_t nextHeader; uint8_t len; uint16_t reserved; uint32_t spi; uint32_t sqn; union ipsec_iv iv; union ipsec_icv icv; }; // https://www.ietf.org/rfc/rfc1035.txt struct __attribute__((__packed__)) dns_header { uint16_t id; uint16_t hdrflags; uint16_t qdcount; uint16_t ancount; uint16_t nscount; uint16_t arcount; uint8_t body[]; }; // ----------------------------------------------------- // ---- https://tools.ietf.org/html/rfc7011 // ---- IPFIX structures // ----------------------------------------------------- struct __attribute__((__packed__)) ipfix_header { uint16_t version; uint16_t length; uint32_t export_time; uint32_t sequence_number; uint32_t observation_domain_id; }; struct __attribute__((__packed__)) ipfix_set_header { uint16_t set_id; uint16_t length; }; struct __attribute__((__packed__)) ipfix_tmpl_record_header { uint16_t template_id; uint16_t field_count; }; struct __attribute__((__packed__)) ipfix_opts_tmpl_record_header { uint16_t template_id; uint16_t field_count; uint16_t scope_field_count; }; struct __attribute__((__packed__)) ipfix_information_element { uint16_t ie_id; uint16_t length; }; struct __attribute__((__packed__)) ipfix_data_record { uint8_t field_values[?]; }; struct __attribute__((__packed__)) ipfix_tmpl_record { struct ipfix_tmpl_record_header template_header; struct ipfix_information_element information_elements[5]; }; struct __attribute__((__packed__)) ipfix_opts_tmpl_record { struct ipfix_opts_tmpl_record_header template_header; struct ipfix_information_element information_elements[5]; }; struct __attribute__((__packed__)) ipfix_data_set { struct ipfix_set_header set_header; uint8_t field_values[?]; }; struct __attribute__((__packed__)) ipfix_tmpl_set { struct ipfix_set_header set_header; struct ipfix_tmpl_record record; uint8_t padding; }; struct __attribute__((__packed__)) ipfix_opts_tmpl_set { struct ipfix_set_header set_header; struct ipfix_opts_tmpl_record record; uint8_t padding; }; // structs and constants partially copied from Open vSwitch lacp.c (Apache 2.0 license) struct __attribute__((__packed__)) lacp_info { uint16_t sys_priority; /* System priority. */ union mac_address sys_id; /* System ID. */ uint16_t key; /* Operational key. */ uint16_t port_priority; /* Port priority. */ uint16_t port_id; /* Port ID. */ uint8_t state; /* State mask. See lacp.STATE_ consts. */ }; struct __attribute__((__packed__)) lacp_header { uint8_t subtype; /* Always 1. */ uint8_t version; /* Always 1. */ uint8_t actor_type; /* Always 1. */ uint8_t actor_len; /* Always 20. */ struct lacp_info actor; /* LACP actor information. */ uint8_t z1[3]; /* Reserved. Always 0. */ uint8_t partner_type; /* Always 2. */ uint8_t partner_len; /* Always 20. */ struct lacp_info partner; /* LACP partner information. */ uint8_t z2[3]; /* Reserved. Always 0. */ uint8_t collector_type; /* Always 3. */ uint8_t collector_len; /* Always 16. */ uint16_t collector_delay; /* Maximum collector delay. Set to 0. */ uint8_t z3[64]; /* Combination of several fields. Always 0. */ }; ]] return ffi.C
--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]] local MAJOR, MINOR = "CallbackHandler-1.0", 6 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed -- Lua APIs local tconcat, tinsert, tgetn, tsetn = table.concat, table.insert, table.getn, table.setn local assert, error, loadstring = assert, error, loadstring local setmetatable, rawset, rawget = setmetatable, rawset, rawget local next, pairs, type, tostring = next, pairs, type, tostring local strgsub = string.gsub local new, del do local list = setmetatable({}, {__mode = "k"}) function new() local t = next(list) if not t then return {} end list[t] = nil return t end function del(t) setmetatable(t, nil) for k in pairs(t) do t[k] = nil end tsetn(t,0) list[t] = true end end local meta = {__index = function(tbl, key) rawset(tbl, key, new()) return tbl[key] end} -- Global vars/functions that we don't upvalue since they might get hooked, or upgraded -- List them here for Mikk's FindGlobals script -- GLOBALS: geterrorhandler local function errorhandler(err) return geterrorhandler()(err) end CallbackHandler.errorhandler = errorhandler local function CreateDispatcher(argCount) local code = [[ local xpcall, errorhandler = xpcall, LibStub("CallbackHandler-1.0").errorhandler local method, UP_ARGS local function call() local func, ARGS = method, UP_ARGS method, UP_ARGS = nil, NILS return func(ARGS) end return function(handlers, ARGS) local index index, method = next(handlers) if not method then return end repeat UP_ARGS = ARGS xpcall(call, errorhandler) index, method = next(handlers, index) until not method end ]] local c = 4*argCount-1 local s = "b01,b02,b03,b04,b05,b06,b07,b08,b09,b10" code = strgsub(code, "UP_ARGS", string.sub(s,1,c)) s = "a01,a02,a03,a04,a05,a06,a07,a08,a09,a10" code = strgsub(code, "ARGS", string.sub(s,1,c)) s = "nil,nil,nil,nil,nil,nil,nil,nil,nil,nil" code = strgsub(code, "NILS", string.sub(s,1,c)) return assert(loadstring(code, "safecall Dispatcher["..tostring(argCount).."]"))() end local Dispatchers = setmetatable({}, {__index=function(self, argCount) local dispatcher = CreateDispatcher(argCount) rawset(self, argCount, dispatcher) return dispatcher end}) -------------------------------------------------------------------------- -- CallbackHandler:New -- -- target - target object to embed public APIs in -- RegisterName - name of the callback registration API, default "RegisterCallback" -- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" -- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName) RegisterName = RegisterName or "RegisterCallback" UnregisterName = UnregisterName or "UnregisterCallback" if UnregisterAllName==nil then -- false is used to indicate "don't want this method" UnregisterAllName = "UnregisterAllCallbacks" end -- we declare all objects and exported APIs inside this closure to quickly gain access -- to e.g. function names, the "target" parameter, etc -- Create the registry object local events = setmetatable({}, meta) local registry = { recurse=0, events=events } -- registry:Fire() - fires the given event/message into the registry function registry:Fire(eventname, argc, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) if not rawget(events, eventname) or not next(events[eventname]) then return end local oldrecurse = registry.recurse registry.recurse = oldrecurse + 1 argc = argc or 0 Dispatchers[argc+1](events[eventname], eventname, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) registry.recurse = oldrecurse if registry.insertQueue and oldrecurse==0 then -- Something in one of our callbacks wanted to register more callbacks; they got queued for eventname,callbacks in pairs(registry.insertQueue) do local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten. for self,func in pairs(callbacks) do events[eventname][self] = func -- fire OnUsed callback? if first and registry.OnUsed then registry.OnUsed(registry, target, eventname) first = nil end end del(callbacks) end del(registry.insertQueue) registry.insertQueue = nil end end -- Registration of a callback, handles: -- self["method"], leads to self["method"](self, ...) -- self with function ref, leads to functionref(...) -- "addonId" (instead of self) with function ref, leads to functionref(...) -- all with an optional arg, which, if present, gets passed as first argument (after self if present) target[RegisterName] = function(self, eventname, method, ...) if type(eventname) ~= "string" then error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2) end method = method or eventname local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten. if type(method) ~= "string" and type(method) ~= "function" then error("Usage: "..RegisterName.."(eventname, method[, arg]): 'method' - string or function expected.", 2) end local regfunc local a1 = arg[1] if type(method) == "string" then -- self["method"] calling style if type(self) ~= "table" then error("Usage: "..RegisterName.."(eventname, method[, arg]): self was not a table?", 2) elseif self==target then error("Usage: "..RegisterName.."(eventname, method[, arg]): do not use Library:"..RegisterName.."(), use your own 'self'.", 2) elseif type(self[method]) ~= "function" then error("Usage: "..RegisterName.."(eventname, method[, arg]): 'method' - method '"..tostring(method).."' not found on 'self'.", 2) end if tgetn(arg) >= 1 then regfunc = function (...) return self[method](self,a1,unpack(arg)) end else regfunc = function (...) return self[method](self,unpack(arg)) end end else -- function ref with self=object or self="addonId" if type(self)~="table" and type(self)~="string" then error("Usage: "..RegisterName.."(self or addonId, eventname, method[, arg]): 'self or addonId': table or string expected.", 2) end if tgetn(arg) >= 1 then regfunc = function (...) return method(a1, unpack(arg)) end else regfunc = method end end if events[eventname][self] or registry.recurse<1 then -- if registry.recurse<1 then -- we're overwriting an existing entry, or not currently recursing. just set it. events[eventname][self] = regfunc -- fire OnUsed callback? if registry.OnUsed and first then registry.OnUsed(registry, target, eventname) end else -- we're currently processing a callback in this registry, so delay the registration of this new entry! -- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency registry.insertQueue = registry.insertQueue or setmetatable(new(),meta) registry.insertQueue[eventname][self] = regfunc end end -- Unregister a callback target[UnregisterName] = function(self, eventname) if not self or self==target then error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2) end if type(eventname) ~= "string" then error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2) end if rawget(events, eventname) and events[eventname][self] then events[eventname][self] = nil -- Fire OnUnused callback? if registry.OnUnused and not next(events[eventname]) then registry.OnUnused(registry, target, eventname) end if rawget(events, eventname) and not next(events[eventname]) then del(events[eventname]) events[eventname] = nil end end if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then registry.insertQueue[eventname][self] = nil end end -- OPTIONAL: Unregister all callbacks for given selfs/addonIds if UnregisterAllName then target[UnregisterAllName] = function(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) if not a1 then error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or 'addonId' to unregister events for.", 2) end if a1 == target then error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or 'addonId'", 2) end -- use our registry table as argument table registry[1] = a1 registry[2] = a2 registry[3] = a3 registry[4] = a4 registry[5] = a5 registry[6] = a6 registry[7] = a7 registry[8] = a8 registry[9] = a9 registry[10] = a10 for i=1,10 do local self = registry[i] registry[i] = nil if self then if registry.insertQueue then for eventname, callbacks in pairs(registry.insertQueue) do if callbacks[self] then callbacks[self] = nil end end end for eventname, callbacks in pairs(events) do if callbacks[self] then callbacks[self] = nil -- Fire OnUnused callback? if registry.OnUnused and not next(callbacks) then registry.OnUnused(registry, target, eventname) end end end end end end end return registry end -- CallbackHandler purposefully does NOT do explicit embedding. Nor does it -- try to upgrade old implicit embeds since the system is selfcontained and -- relies on closures to work.
--[[ Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification The version of the OpenAPI document: 1.1.2-pre.0 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech ]] -- pipeline_step_impl class local pipeline_step_impl = {} local pipeline_step_impl_mt = { __name = "pipeline_step_impl"; __index = pipeline_step_impl; } local function cast_pipeline_step_impl(t) return setmetatable(t, pipeline_step_impl_mt) end local function new_pipeline_step_impl(_class, _links, display_name, duration_in_millis, id, input, result, start_time, state) return cast_pipeline_step_impl({ ["_class"] = _class; ["_links"] = _links; ["displayName"] = display_name; ["durationInMillis"] = duration_in_millis; ["id"] = id; ["input"] = input; ["result"] = result; ["startTime"] = start_time; ["state"] = state; }) end return { cast = cast_pipeline_step_impl; new = new_pipeline_step_impl; }
function onEvent(name, value1, value2) if name == 'FlipUI' then doTweenAngle('bruh', 'camHUD', 180, 0.1, 'linear') end end
Graphics.init() alttpTileset = Graphics.loadImage("Assets/Graphics/alttp.png") tileSizeX = 16 tileSizeY = 16 mapOffsetX =2 mapOffsetY =2 board = { {1,2,1,1,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,1,1,1,1} } boardSize=5; function getTileCoord(coordX,coordY,tileWidth,tileHeight) local tileCoordX = math.floor(coordX / tileWidth); local tileCoordY = math.floor(coordY / tileHeight); end function drawMap(map) for i=1,boardSize do for j=1,boardSize do local tileMapX = map[i][j] * (tileSizeX) local tileMapY = map[i][j] * (tileSizeY) if board[i][j] == 0 then --[[Graphics.drawPartialImage(mapOffsetX+tileX, mapOffsetY+tileY, tileSizeX * map[i][j]+mapOffsetX, tileSizeY * map[i][j]+mapOffsetY, tileSizeX, tileSizeY, alttpTileset)]]-- Graphics.drawImageExtended((j-1)*tileSizeX+(tileSizeX/2), (i-1)*tileSizeY+(tileSizeY/2), tileMapX, tileMapY, tileSizeX, tileSizeY, 0, 1, 1,alttpTileset); end if board[i][j] == 1 then --[[Graphics.drawPartialImage(mapOffsetX+tileX, mapOffsetY+tileY, tileSizeX * map[i][j]+mapOffsetX, tileSizeY * map[i][j]+mapOffsetY, tileSizeX, tileSizeY, alttpTileset)]]-- Graphics.drawImageExtended((j-1)*tileSizeX+(tileSizeX/2), (i-1)*tileSizeY+(tileSizeY/2), tileMapX, tileMapY, tileSizeX, tileSizeY, 0, 1, 1,alttpTileset); end end end Graphics.fillEmptyRect(heroStats.coordX,heroStats.coordX+heroStats.sizeX,heroStats.coordY,heroStats.coordY+heroStats.sizeY,heroStats.color) --[[ Screen.waitVblankStart()--]] end heroStats = { coordX=0, coordY=0, speed=0.1, sizeX=16, sizeY=16, color = Color.new(255,0,0), dx=0, dy=0, facing } while true do Screen.refresh() circleX,circleY = Controls.readCirclePad() --mapOffsetX = mapOffsetX-circleX/100 * 0.25 --mapOffsetY = mapOffsetY+circleY/100 * 0.25 if circleX ~= 0 then heroStats.dx=circleX/156 end if circleY ~=0 then heroStats.dy=circleY/156 end if (circleX==0) and (circleY ==0) then heroStats.dx=0 heroStats.dy=0 end heroStats.coordX = heroStats.coordX + (heroStats.dx * heroStats.speed) heroStats.coordY = heroStats.coordY - (heroStats.dy * heroStats.speed) if Controls.check(Controls.read(),KEY_A) then System.exit() end Graphics.initBlend(TOP_SCREEN) drawMap(board) Graphics.termBlend() Screen.debugPrint(10,10,"Hero Tile: " .. math.floor(heroStats.coordX/tileSizeX) .. " , " .. math.floor(heroStats.coordY/tileSizeY),Color.new(255,255,255),TOP_SCREEN) Screen.debugPrint(10,20,"circleX,circleY " .. circleX .. " , " .. circleY,Color.new(255,255,255),TOP_SCREEN) Screen.flip() end
RegisterNetEvent("vrp_wallet:setValues") AddEventHandler("vrp_wallet:setValues", function(wallet, bank) SendNUIMessage({ wallet = wallet, bank = bank }) end) Citizen.CreateThread(function() while true do Citizen.Wait(0) if IsControlJustPressed(1, 244) then TriggerServerEvent('vrp_wallet:getMoneys') SendNUIMessage({ control = 'm' }) end end end)
local function some(dictionary, predicate) local predicateType = type(predicate) assert(predicateType == "function", "expected a function for second argument, got " .. predicateType) for k, v in pairs(dictionary) do if predicate(v, k) then return true end end return false end return some
-- Time-based One-time Password (RFC 6238) implementation -- Part of the libotp library for ComputerCraft -- https://github.com/UpsilonDev/libotp local oath = require("libotp.oath.common") local gen = oath.generate local totp = {} function totp.generate(s, d, l) local e = math.floor(os.epoch("utc") / 1000 / (d or 30)) return gen(e, s, l) end function totp.check(otp, s, d, l, o) local p, of = {}, o or 1 local e = math.floor(os.epoch("utc") / 1000 / (d or 30)) if of >= 1 then local st = e - of p[gen(st, s, l)] = true for i = 1, of + 1 do p[gen(st + i, s, l)] = true end if p[otp] then return true end else if otp == gen(e, s, l) then return true end end return false end return totp
slot0 = class("BattleDodgemResultLayer", import(".BattleResultLayer")) slot0.didEnter = function (slot0) setText(slot0._levelText, pg.expedition_data_template[slot0.contextData.stageId].name) slot0._gradeUpperLeftPos = rtf(slot0._grade).localPosition rtf(slot0._grade).localPosition = Vector3(0, 25, 0) pg.UIMgr.GetInstance():BlurPanel(slot0._tf) slot0._grade.transform.localScale = Vector3(1.5, 1.5, 0) LeanTween.scale(slot0._grade, Vector3(0.88, 0.88, 1), slot0.DURATION_WIN_SCALE):setOnComplete(System.Action(function () SetActive(slot0._levelText, true) SetActive:rankAnimaFinish() end)) slot0._tf.GetComponent(slot4, typeof(Image)).color = Color.New(0, 0, 0, 0.5) slot0._stateFlag = BattleResultLayer.STATE_RANK_ANIMA onButton(slot0, slot0._skipBtn, function () slot0:skip() end, SFX_CONFIRM) end slot0.rankAnimaFinish = function (slot0) SetActive(slot1, true) SetActive(slot0._conditionBGNormal, false) SetActive(slot0._conditionBGContribute, true) slot0:setCondition(i18n("battle_result_total_score"), slot0.contextData.statistics.dodgemResult.score, COLOR_BLUE) slot0:setCondition(i18n("battle_result_max_combo"), slot0.contextData.statistics.dodgemResult.maxCombo, COLOR_YELLOW) table.insert(slot0._delayLeanList, LeanTween.delayedCall(1, System.Action(function () slot0._stateFlag = slot1.STATE_REPORTED SetActive(slot0:findTF("jieuan01/tips", slot0._bg), true) end)).id) slot0._stateFlag = slot0.STATE_REPORT end slot0.displayBG = function (slot0) LeanTween.moveX(rtf(slot0._conditions), 1300, slot0.DURATION_MOVE) LeanTween.scale(slot0._grade, Vector3(0.6, 0.6, 0), slot0.DURATION_MOVE) LeanTween.moveLocal(go(slot1), slot0._gradeUpperLeftPos, slot0.DURATION_MOVE):setOnComplete(System.Action(function () slot0:showPainting() end)) setActive(slot0.findTF(slot0, "jieuan01/Bomb", slot0._bg), false) end slot0.setCondition = function (slot0, slot1, slot2, slot3) slot4 = cloneTplTo(slot0._conditionContributeTpl, slot0._conditionContainer) setActive(slot4, false) slot5 = nil slot4:Find("text"):GetComponent(typeof(Text)).text = setColorStr(slot1, "#FFFFFFFF") slot4:Find("value"):GetComponent(typeof(Text)).text = setColorStr(slot2, slot3) if slot0._conditionContainer.childCount - 1 > 0 then table.insert(slot0._delayLeanList, LeanTween.delayedCall(slot0.CONDITIONS_FREQUENCE * slot8, System.Action(function () setActive(setActive, true) end)).id) else setActive(slot4, true) end end slot0.showPainting = function (slot0) slot1, slot2, slot3 = nil SetActive(slot0._painting, true) slot0.paintingName = "yanzhan" setPaintingPrefabAsync(slot0._painting, slot0.paintingName, "jiesuan", function () if findTF(slot0._painting, "fitter").childCount > 0 then ShipExpressionHelper.SetExpression(findTF(slot0._painting, "fitter"):GetChild(0), slot0.paintingName, "win_mvp") end end) SetActive(slot0._failPainting, false) if slot0.contextData.score > 1 then slot1, slot3, slot6 = ShipWordHelper.GetWordAndCV(205020, ShipWordHelper.WORD_TYPE_MVP) slot2 = slot6 else slot1, slot3, slot2 = ShipWordHelper.GetWordAndCV(205020, ShipWordHelper.WORD_TYPE_LOSE) end setText(slot0._chat:Find("Text"), slot2) if CHAT_POP_STR_LEN < #slot0._chat:Find("Text"):GetComponent(typeof(Text)).text then slot4.alignment = TextAnchor.MiddleLeft else slot4.alignment = TextAnchor.MiddleCenter end SetActive(slot0._chat, true) slot0._chat.transform.localScale = Vector3.New(0, 0, 0) LeanTween.moveX(rtf(slot0._painting), 50, 0.1):setOnComplete(System.Action(function () LeanTween.scale(rtf(slot0._chat.gameObject), Vector3.New(1, 1, 1), 0.1):setEase(LeanTweenType.easeOutBack) end)) slot0._stateFlag = BattleResultLayer.STATE_DISPLAYED end slot0.skip = function (slot0) if slot0._stateFlag == BattleResultLayer.STATE_REPORTED then slot0:displayBG() elseif slot0._stateFlag == BattleResultLayer.STATE_DISPLAYED then slot0:emit(BattleResultMediator.ON_BACK_TO_LEVEL_SCENE) end end slot0.onBackPressed = function (slot0) triggerButton(slot0._skipBtn) end slot0.willExit = function (slot0) LeanTween.cancel(go(slot0._tf)) pg.UIMgr.GetInstance():UnblurPanel(slot0._tf) end return slot0
-- "KittyCaT-Sonata" function update(elapsed) camShenigans() end function beatHit(beat) if (beat > 12 and beat < 231) or (beat > 394 and beat < 547) then if math.fmod(beat, 3) == 0 then cameraZoom = 0.76 camHudAngle = 2 * camVar else cameraZoom = 0.73 camHudAngle = 1 * camVar end elseif (beat > 252 and beat < 394) then if math.fmod(beat, 2) == 0 then cameraZoom = 0.78 camHudAngle = 2 * camVar else cameraZoom = 0.74 camHudAngle = 1 * camVar end end camVar = camVar * -1 end function camShenigans() local defaultCam = 0.7 local funnyVar = math.abs(camHudAngle / 15) cameraAngle = camHudAngle * -0.8 hudZoom = cameraZoom + 0.3 if camHudAngle > 0 then camHudAngle = camHudAngle - (funnyVar) elseif camHudAngle < 0 then camHudAngle = camHudAngle + (funnyVar) end if cameraZoom > defaultCam then cameraZoom = cameraZoom - 0.005 elseif cameraZoom < defaultCam then cameraZoom = defaultCam end end
local awful = require("awful") local beautiful = require("beautiful") local naughty = require("naughty") -- Themes define colours, icons, font and wallpapers. beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua") config.layouts = { -- awful.layout.suit.floating, awful.layout.suit.tile, -- awful.layout.suit.tile.left, awful.layout.suit.tile.bottom, -- awful.layout.suit.tile.top, awful.layout.suit.fair, -- awful.layout.suit.fair.horizontal, -- awful.layout.suit.spiral, -- awful.layout.suit.spiral.dwindle, awful.layout.suit.max, -- awful.layout.suit.max.fullscreen, awful.layout.suit.magnifier, -- awful.layout.suit.corner.nw, -- ??? awful.layout.suit.floating } awful.layout.layouts = config.layouts; -- Naughty for _,preset in pairs({"normal", "low", "critical"}) do naughty.config.presets[preset].font = "Droid Sans 10" naughty.config.presets[preset].timeout = 5 naughty.config.presets[preset].margin = 10 end
local BehaviorBase = import(".BehaviorBase"); ---组件工厂类 local behaviorsClass = { } local BehaviorFactory = {} function BehaviorFactory.typeof( obj,classObj ) -- body if obj.__supers then local isType isType = function (objData,name) -- body if objData.__supers and #objData.__supers>0 then for k,v in pairs(obj.__supers) do if isType(v,name) then return true; end end return false; else return objData.__cname == name; end end return isType(obj,classObj.__cname) end end function BehaviorFactory.createBehavior(behaviorName) local classObj = behaviorsClass[behaviorName] assert(classObj ~= nil, string.format("BehaviorFactory.createBehavior() - Invalid behavior name \"%s\"", tostring(behaviorName))) if BehaviorFactory.typeof(classObj,BehaviorBase) then return classObj.new() elseif type(classObj) == "table" and classObj.require and classObj.path then classObj = classObj.require(classObj.path); return classObj.new() else classObj = require(classObj); return classObj.new() end end function BehaviorFactory.createBehaviorByClass(behavior) local classObj = behavior -- dump(behavior) assert(classObj ~= nil, string.format("BehaviorFactory.createBehavior() - Invalid behavior name \"%s\"", tostring(behavior))) if BehaviorFactory.typeof(classObj,BehaviorBase) then print("yangshuai BehaviorFactory.typeof true") return classObj.new() elseif type(classObj) == "table" and classObj.require and classObj.path then classObj = classObj.require(classObj.path); print("yangshuai BehaviorFactory.typeof false") return classObj.new() end print("yangshuai BehaviorFactory.typeof false") if type(behavior) == "string" then error("behavior 不合法 类型是string") end end function BehaviorFactory.combineBehaviorsClass(newBehaviorsClass) for k, v in pairs(newBehaviorsClass) do assert(behaviorsClass[k] == nil, string.format("BehaviorFactory.combineBehaviorsClass() - Exists behavior name \"%s\"", tostring(k))) behaviorsClass[k] = v end end function BehaviorFactory.merge(newBehaviorsClass) for k, v in pairs(newBehaviorsClass) do behaviorsClass[k] = v end end function BehaviorFactory.removeBehaviorsClass(removeBehaviorsClass) for k, v in pairs(removeBehaviorsClass) do behaviorsClass[k] = nil; end end function BehaviorFactory.hasBehavior(key) return behaviorsClass[key] end return BehaviorFactory
local bind = require('utility.keybinding') local map_cr = bind.map_cr local map_cu = bind.map_cu local map_cmd = bind.map_cmd local keymap = {} keymap.set_mapleader = function() vim.g.mapleader = ' ' -- use <space> as <leader> end keymap.init = function() keymap.set_mapleader() local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end _G.enhance_jk_move = function(key) local map = key == 'j' and '<Plug>(accelerated_jk_gj_position)' or '<Plug>(accelerated_jk_gk_position)' return t(map) end _G.enhance_ft_move = function(key) local map = { f = '<Plug>(eft-f)', F = '<Plug>(eft-F)', t = '<Plug>(eft-t)', T = '<Plug>(eft-T)', [';'] = '<Plug>(eft-repeat)', } return t(map[key]) end _G.enhance_align = function(key) vim.cmd([[packadd vim-easy-align]]) local map = { ['nga'] = '<Plug>(EasyAlign)', ['xga'] = '<Plug>(EasyAlign)' } return t(map[key]) end -- the keymap for nvim builtin features keymap.builtin = { -- tab switches ['n|<leader>1'] = map_cmd('1gt'), ['n|<leader>2'] = map_cmd('2gt'), ['n|<leader>3'] = map_cmd('3gt'), ['n|<leader>4'] = map_cmd('4gt'), ['n|<leader>5'] = map_cmd('5gt'), ['n|<leader>j'] = map_cmd('gt'), ['n|<leader>k'] = map_cmd('gT'), -- options for windows ['n|<C-h>'] = map_cmd('<C-w>h'), ['n|<C-j>'] = map_cmd('<C-w>j'), ['n|<C-k>'] = map_cmd('<C-w>k'), ['n|<C-l>'] = map_cmd('<C-w>l'), ['n|<A-[>'] = map_cr('vertical resize -5'):with_silent(), ['n|<A-]>'] = map_cr('vertical resize +5'):with_silent(), ['n|<A-;>'] = map_cr('resize -2'), ["n|<A-'>"] = map_cr('resize +2'), ['n|<C-q>'] = map_cr('wq!'):with_silent(), -- edit ['n|Y'] = map_cmd('y$'), ['n|D'] = map_cmd('D$'), ['n|n'] = map_cmd('nzzzv'), -- n zz zv ['n|N'] = map_cmd('Nzzzv'), -- N zz zv -- command line ['c|<C-b>'] = map_cmd('<Left>'), ['c|<C-f>'] = map_cmd('<Right>'), ['c|<C-a>'] = map_cmd('<Home>'), ['c|<C-e>'] = map_cmd('<End>'), ['c|<C-d>'] = map_cmd('<Del>'), ['c|<C-h>'] = map_cmd('<BS>'), ['c|<C-t>'] = map_cmd([[<C-R>=expand('%:p:h') . '/' <CR>]]), ['c|w!!'] = map_cmd([[execute 'silent! write !sudo tee % >/dev/null' <bar> edit!]]), -- Visual ['v|J'] = map_cmd(":m '>+1<cr>gv=gv"), ['v|K'] = map_cmd(":m '<-2<cr>gv=gv"), ['v|<'] = map_cmd('<gv'), ['v|>'] = map_cmd('>gv'), -- others ['n|<F10>'] = map_cr('ccl'):with_nowait():with_silent(), } -- the keymap for features provided via plugins -- some keymap configured via field 'config' in specifications of packer.nvim, see modules/*/config keymap.plugins = { -- packer.nvim ['n|<leader>ps'] = map_cr('PackerSync'):with_silent():with_nowait(), ['n|<leader>pu'] = map_cr('PackerUpdate'):with_silent():with_nowait(), ['n|<leader>pi'] = map_cr('PackerInstall'):with_silent():with_nowait(), ['n|<leader>pc'] = map_cr('PackerClean'):with_silent():with_nowait(), -- nvim-lspconfig, nvim-lspinstaller, lspsaga, nvim-lsp, ... ['n|g['] = map_cr('Lspsaga diagnostic_jump_prev'):with_silent(), ['n|g]'] = map_cr('Lspsaga diagnostic_jump_next'):with_silent(), ['n|gs'] = map_cr('Lspsaga signature_help'):with_silent(), ['n|<leader>rn'] = map_cr('Lspsaga rename'):with_silent(), ['n|K'] = map_cr('Lspsaga hover_doc'):with_silent(), ['n|<C-Up>'] = map_cr([[lua require('lspsaga.action').smart_scroll_with_saga(-1)]]):with_silent(), ['n|<C-Down>'] = map_cr([[lua require('lspsaga.action').smart_scroll_with_saga(1)]]):with_silent(), ['n|<leader>ca'] = map_cr('Lspsaga code_action'):with_silent(), ['v|<leader>ca'] = map_cu('Lspsaga range_code_action'):with_silent(), ['n|gp'] = map_cr('Lspsaga preview_definition'):with_silent(), ['n|gd'] = map_cr('lua vim.lsp.buf.definition()'):with_silent(), -- aerial.nvim ['n|<leader>o'] = map_cu('SymbolsOutline'):with_silent(), -- Trouble ['n|gt'] = map_cr('TroubleToggle'):with_silent(), ['n|gr'] = map_cr('TroubleToggle lsp_references'):with_silent(), ['n|<leader>cd'] = map_cr('TroubleToggle lsp_document_diagnostics'):with_silent(), ['n|<leader>cw'] = map_cr('TroubleToggle lsp_workspace_diagnostics'):with_silent(), ['n|<leader>cq'] = map_cr('TroubleToggle quickfix'):with_silent(), ['n|<leader>cl'] = map_cr('TroubleToggle loclist'):with_silent(), -- Telescope ['n|<leader>ts'] = map_cr('Telescope lsp_dynamic_workspace_symbols'):with_silent(), ['n|<leader>tf'] = map_cr('Telescope find_files'):with_silent(), ['n|<leader>tg'] = map_cr('Telescope grep_string'):with_silent(), -- nvim-comment ['n|<leader>/'] = map_cr('CommentToggle'):with_silent(), ['v|<leader>/'] = map_cr('CommentToggle'):with_silent(), -- Hop ['n|<leader>w'] = map_cu('HopWord'):with_nowait():with_silent(), ['n|<leader>l'] = map_cu('HopLine'):with_nowait():with_silent(), ['n|<leader>c'] = map_cu('HopChar1'):with_nowait():with_silent(), ['n|<leader>cc'] = map_cu('HopChar2'):with_nowait():with_silent(), -- accelerate-jk ['n|j'] = map_cmd([[v:lua.enhance_jk_move('j')]]):with_silent():with_expr():with_recursive(), ['n|k'] = map_cmd([[v:lua.enhance_jk_move('k')]]):with_silent():with_expr():with_recursive(), -- vim-eft ['n|f'] = map_cmd([[v:lua.enhance_ft_move('f')]]):with_expr():with_recursive(), ['n|F'] = map_cmd([[v:lua.enhance_ft_move('F')]]):with_expr():with_recursive(), ['n|t'] = map_cmd([[v:lua.enhance_ft_move('t')]]):with_expr():with_recursive(), ['n|T'] = map_cmd([[v:lua.enhance_ft_move('T')]]):with_expr():with_recursive(), ['n|;'] = map_cmd([[v:lua.enhance_ft_move(';')]]):with_expr():with_recursive(), -- Plugin EasyAlign ['n|ga'] = map_cmd([['v:lua.enhance_align('nga')]]):with_expr():with_recursive(), ['x|ga'] = map_cmd([[v:lua.enhance_align('xga')]]):with_expr():with_recursive(), -- bufferline ['n|gb'] = map_cr('BufferLinePick'):with_silent(), ['n|<A-j>'] = map_cr('BufferLineCycleNext'):with_silent(), ['n|<A-k>'] = map_cr('BufferLineCyclePrev'):with_silent(), ['n|<leader>be'] = map_cr('BufferLineSortByExtension'), ['n|<leader>bd'] = map_cr('BufferLineSortByDirectory'), ['n|<A-1>'] = map_cr('BufferLineGoToBuffer 1'):with_silent(), ['n|<A-2>'] = map_cr('BufferLineGoToBuffer 2'):with_silent(), ['n|<A-3>'] = map_cr('BufferLineGoToBuffer 3'):with_silent(), ['n|<A-4>'] = map_cr('BufferLineGoToBuffer 4'):with_silent(), ['n|<A-5>'] = map_cr('BufferLineGoToBuffer 5'):with_silent(), ['n|<A-6>'] = map_cr('BufferLineGoToBuffer 6'):with_silent(), ['n|<A-7>'] = map_cr('BufferLineGoToBuffer 7'):with_silent(), ['n|<A-8>'] = map_cr('BufferLineGoToBuffer 8'):with_silent(), ['n|<A-9>'] = map_cr('BufferLineGoToBuffer 9'):with_silent(), -- nvim-tree ['n|<leader>e'] = map_cr('NvimTreeToggle'):with_silent(), ['n|<Leader>ef'] = map_cr('NvimTreeFindFile'):with_silent(), ['n|<Leader>er'] = map_cr('NvimTreeRefresh'):with_silent(), -- auto-session ['n|<leader>ss'] = map_cu('SaveSession'):with_silent(), ['n|<leader>sr'] = map_cu('RestoreSession'):with_silent(), ['n|<leader>sd'] = map_cu('DeleteSesion'):with_silent(), -- Plugin split-term ['n|<C-w>t'] = map_cr('VTerm'):with_silent(), } end keymap.setup = function() keymap.init() bind.nvim_load_mapping(keymap.builtin) bind.nvim_load_mapping(keymap.plugins) end return keymap
local _M = {_VERSION="0.1.11"} local table_insert = table.insert local table_concat = table.concat function _M.getTime() return ngx and ngx.time() or os.time() end function _M.addParamToUrl(urlString, paramName,paramValue) if urlString==nil then urlString="" end if paramValue==nill then paramValue="" end if paramName==nil then return urlString end if string.find(urlString,"?") then urlString=urlString.."&" else urlString=urlString.."?" end urlString=urlString..paramName.."="..paramValue return urlString end function _M._86_64() return 0xfffffffff==0xffffffff and 32 or 64 end function _M.removeParamFromUrl(urlString, paramName) if urlString==nil then urlString="" end if paramName==nil then return urlString end urlString=string.gsub (urlString,"[\\?\\&]"..paramName.."=?[^&$]*", "") ngx.log(ngx.DEBUG,"urlString:"+urlString) local qmarkindex=string.find(urlString,"\\?") local andmarkindex=string.find(urlString,"\\&") if qmarkindex==-1 and andmarkindex>0 then urlString=string.gsub (urlString,"\\&", "?") end return urlString end --get url or post arguments from request function _M.getArgsFromRequest(argName) local args=ngx.req.get_uri_args() local result=args[argName] if result==nil and "POST" == ngx.var.request_method then ngx.req.read_body() args = ngx.req.get_post_args() result=args[argName] end return result end function _M.error(msg, detail, status) local cjson=require("cjson") if status then ngx.status = status end ngx.say(cjson.encode({ msg = msg, detail = detail })) ngx.log(ngx.ERR,cjson.encode({ msg = msg, detail = detail })) if status then ngx.exit(status) end end local errors = { UNAVAILABLE = 'upstream-unavailable', QUERY_ERROR = 'query-failed' } _M.errors = errors local function request(method) return function(url, payload, headers) headers = headers or {} headers['Content-Type'] = 'application/x-www-form-urlencoded' local httpc = require( "resty.http" ).new() local params = {headers = headers, method = method } if string.sub(string.lower(url),1,5)=='https' then params.ssl_verify = true end if method == 'GET' then params.query = payload else params.body = payload end local res, err = httpc:request_uri(url, params) if err then ngx.log(ngx.ERR, table.concat( {method .. ' fail', url, payload}, '|' )) return nil, nil, errors.UNAVAILABLE else if res.status >= 400 then ngx.log(ngx.ERR, table.concat({ method .. ' fail code', url, res.status, res.body, }, '|')) return res.status, res.body, errors.QUERY_ERROR else return res.status, res.body, nil end end end end _M.jget = request('GET') _M.jput = request('PUT') _M.jpost = request('POST') function _M.unzip(inputString) local zlib=require('suproxy.utils.ffi-zlib') -- Reset vars local chunk = 16384 local output_table = {} local count = 0 local input = function(bufsize) ngx.log(ngx.DEBUG,"count:"..count) local start = count > 0 and bufsize*count or 1 local data = inputString:sub(start, (bufsize*(count+1)-1) ) count = count + 1 ngx.log(ngx.INFO,"--------data-----------") ngx.log(ngx.INFO,data) return data end local output = function(data) table_insert(output_table, data) end local ok, err = zlib.inflateGzip(input, output, chunk) if not ok then ngx.log(ngx.ERR,"unzip error") end local output_data = table_concat(output_table,'') return output_data end return _M
--[[ Classical Game of Life using Cell Families ]] ------------ -- Interface ------------ -- Number of Mobile Agents Interface:create_slider('N_Mobiles', 0, 10, 1, 5) ----------------- -- Setup Function ----------------- SETUP = function() -- We don't reset everything to reuse the grid of cells between simulations -- Restart the time Simulation:reset() -- Create a Family of Structural Agents declare_FamilyCell('Cells') Cells:create_grid(40,40,0,0) -- width, height, offset x, offset y -- Set color of the cells for _,c in ordered(Cells) do c.color = {1,1,1,.5} c.food = 1 -- food to be stored in the cell end -- Create a Family of mobile agents declare_FamilyMobile('Agents') for i = 1, Interface:get_value('N_Mobiles') do Agents:new({ shape = "circle" ,pos = copy(one_of(Cells).pos) ,color = {0,0,1,1} ,scale = 1 }) end end ----------------- -- Step Function ----------------- STEP = function() for _,ag in ordered(Agents) do -- Every agent move to one neighbors cell local c = Cells:cell_of(ag) ag:move_to((c.neighbors):one_of()) -- consume some food there c = Cells:cell_of(ag) c.food = c.food - .2 c.food = c.food < 0 and 0 or c.food c.color = {c.food,c.food,c.food,.5} end -- Food grow slowly in the cells for _,c in ordered(Cells) do c.food = c.food + .001 c.food = c.food > 1 and 1 or c.food c.color = {c.food,c.food,c.food,.5} end end
slot2 = "BaseGameBattleView" BaseGameBattleView = class(slot1) BaseGameBattleView.ctor = function (slot0, slot1, slot2) if not slot2 and slot0.btnMenu then slot8 = 80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnMenu, UIConfig.ALIGN_LEFT_UP) end if not slot2 and slot0.btnMenu1 then slot8 = 80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnMenu1, UIConfig.ALIGN_LEFT_UP) end if not slot2 and slot0.btnMenu2 then slot8 = 80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnMenu2, UIConfig.ALIGN_LEFT_UP) end if not slot1 and slot0.btnChat then slot8 = 80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnChat, UIConfig.ALIGN_LEFT_UP) end if slot0.btnAuto then slot8 = -80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnAuto, UIConfig.ALIGN_RIGHT) end if slot0.btnDisableAuto then slot8 = -80 slot0.controller.adjustSlimWidth(slot4, slot0.controller, slot0.btnDisableAuto, UIConfig.ALIGN_RIGHT) end end BaseGameBattleView.destroy = function (slot0) return end return
-- config.lua -- config = {} config.ssid = "a2:20:a6:12:52:f6" config.pwd = "IIIlll111" config.host = "192.168.4.1" config.port = 11272 -- timeout = timeout * 5 s config.timeout = 10 return config
-- https://github.com/rxi/lite/blob/master/src/main.c#L129 -- https://github.com/rxi/lite/blob/master/data/core/init.lua#L77 -- https://github.com/rxi/lite/blob/master/data/core/init.lua#L451 core = {} function core.init() print('core.init') end function core.run() print('core.run') end return core
require 'modshogun' require 'load' traindat = load_dna('../data/fm_train_dna.dat') testdat = load_dna('../data/fm_test_dna.dat') parameter_list = {{traindat,testdat,3},{traindat,testdat,20}} function kernel_weighted_degree_string_modular (fm_train_dna,fm_test_dna,degree) --feats_train=modshogun.StringCharFeatures(fm_train_dna, modshogun.DNA) --feats_test=modshogun.StringCharFeatures(fm_test_dna, modshogun.DNA) -- --kernel=modshogun.WeightedDegreeStringKernel(feats_train, feats_train, degree) -- --weights = {} --for i = degree, 1, -1 do --table.insert(weights, 2*i/((degree+1)*degree)) --end --kernel:set_wd_weights(weights) -- --km_train=kernel:get_kernel_matrix() --kernel:init(feats_train, feats_test) --km_test=kernel:get_kernel_matrix() -- --return km_train, km_test, kernel end if debug.getinfo(3) == nill then print 'WeightedDegreeString' kernel_weighted_degree_string_modular(unpack(parameter_list[1])) end
function BetterScreenScale() return math.Clamp(ScrH() / 1080, 0.6, 1) end function EasyLabel(parent, text, font, textcolor) local dpanel = vgui.Create("DLabel", parent) if font then dpanel:SetFont(font or "DefaultFont") end dpanel:SetText(text) dpanel:SizeToContents() if textcolor then dpanel:SetTextColor(textcolor) end dpanel:SetKeyboardInputEnabled(false) dpanel:SetMouseInputEnabled(false) return dpanel end function EasyButton(parent, text, xpadding, ypadding) local dpanel = vgui.Create("DButton", parent) if textcolor then dpanel:SetFGColor(textcolor or color_white) end if text then dpanel:SetText(text) end dpanel:SizeToContents() if xpadding then dpanel:SetWide(dpanel:GetWide() + xpadding * 2) end if ypadding then dpanel:SetTall(dpanel:GetTall() + ypadding * 2) end return dpanel end function EasyURL(parent, text, font, textcolor) local dpanel = vgui.Create("DLabel", parent) if font then dpanel:SetFont(font or "DefaultFont") end dpanel:SetEnabled(true) dpanel:SetText(text) dpanel:SizeToContents() if textcolor then dpanel:SetTextColor(textcolor) end dpanel:SetKeyboardInputEnabled(false) dpanel:SetMouseInputEnabled(false) dpanel.DoClick = function(self) gui.OpenURL(self:GetText()) end return dpanel end function draw.OutlinedBox( x, y, w, h, thickness, clr ) surface.SetDrawColor( clr ) for i=0, thickness - 1 do surface.DrawOutlinedRect( x + i, y + i, w - i * 2, h - i * 2 ) end end function draw.DrawSimpleRect(x, y, w, h, col) surface.SetDrawColor(col) surface.DrawRect(x, y, w, h) end function draw.DrawSimpleOutlined(x, y, w, h, col) surface.SetDrawColor(col) surface.DrawOutlinedRect(x, y, w, h) end
bf_orig_y = 0 bf_orig_x = 0 gf_orig_y = 0 gf_orig_x = 0 function start (song) bf_orig_y = getActorY("boyfriend") bf_orig_x = getActorX("boyfriend") gf_orig_y = getActorY("girlfriend") gf_orig_x = getActorX("girlfriend") print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll) end function update (elapsed) -- example https://twitter.com/KadeDeveloper/status/1382178179184422918 -- local currentBeat = (songPos / 1000)*(bpm/60) -- for i=0,7 do -- setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((currentBeat + i*0.25) * math.pi), i) -- setActorY(_G['defaultStrum'..i..'Y'] + 32 * math.cos((currentBeat + i*0.25) * math.pi), i) -- end -- if curStep >= 672 and curStep < 820 then local currentBeat = (songPos / 1000)*(bpm/60) --for i=0,7 do -- setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((currentBeat + i*0.25) * math.pi), i) -- setActorY(_G['defaultStrum'..i..'Y'] + 32 * math.cos((currentBeat + i*0.25) * math.pi), i) --end -- setActorX(_G['defaultStrum5X'], 6) -- setActorY(_G['defaultStrum5Y'], 6) -- setActorX(_G['defaultStrum6X'], 5) -- setActorY(_G['defaultStrum6Y'], 5) for i=0,7 do setActorAngle(currentBeat, i) setActorX(_G['defaultStrum'..i..'X'] + 32 * math.sin((currentBeat + i*0.25) * math.pi), i) setActorY(_G['defaultStrum'..i..'Y'] + 2* 32 * math.cos((currentBeat + i*0.25) * math.pi), i) end -- camHudAngle = camHudAngle + currentBeat/100; -- setCamPosition(32 * math.sin((currentBeat) * math.pi), 32 * math.cos((currentBeat) * math.pi)) -- setHudPosition(32 * math.cos((currentBeat) * math.pi), 32 * math.sin((currentBeat) * math.pi)) -- setActorAngle(currentBeat, "dad") setActorScale(math.abs((currentBeat*0.5)%2 - 1), "dad") setActorX(bf_orig_x + 32 * math.sin(currentBeat*5) * math.pi, "boyfriend") setActorY(bf_orig_y + 32 * math.cos(currentBeat*5) * math.pi, "boyfriend") --if currentBeat % 2 >= 1 then -- setActorX(bf_orig_x*(currentBeat%2), "girlfriend") -- setActorY(bf_orig_y*(currentBeat%2), "girlfriend") --else -- setActorX(gf_orig_x*(currentBeat%2), "girlfriend") -- setActorY(gf_orig_y*(currentBeat%2), "girlfriend") --end -- else -- setActorX(_G['defaultStrum5X'], 5) -- setActorY(_G['defaultStrum5Y'], 5) -- setActorX(_G['defaultStrum6X'], 6) -- setActorY(_G['defaultStrum6Y'], 6) -- for i=0,7 do -- setActorX(_G['defaultStrum'..i..'X'],i) -- setActorX(_G['defaultStrum'..i..'Y'],i) -- end -- end --if getRenderedNotes() ~= 0 then -- closest_note_x = getRenderedNoteX(0) -- closest_note_y = getRenderedNoteY(0) -- if closest_note_x > hudWidth/2 then -- BF -- -- setRenderedNotePos(closest_note_x + 32 * math.sin((currentBeat + i*0.25) * math.pi), closest_note_y, 0) -- setRenderedNotePos(closest_note_x + 32, 0, 0) -- end --end -- diff = _G['defaultStrum4X'] - _G['defaultStrum0X'] rendered_notes = getRenderedNotes() --[[if rendered_notes ~= 0 then for i=0, rendered_notes-1 do closest_note_x = getRenderedNoteX(i) closest_note_y = getRenderedNoteY(i) if closest_note_y > hudHeight/3 then -- setRenderedNotePos(closest_note_x + 32 * math.sin((currentBeat + i*0.25) * math.pi), closest_note_y, 0) -- setRenderedNotePos(closest_note_x, hudHeight/3 + (hudHeight-closest_note_y), i) -- setRenderedNotePos(closest_note_x, hudHeight/3 + (closest_note_y-hudHeight/3)/1.5, i) if closest_note_x > hudWidth/2 then -- BF setRenderedNotePos(closest_note_x - diff, closest_note_y, i) else setRenderedNotePos(closest_note_x + diff, closest_note_y, i) end end end end]] --[[if rendered_notes ~= 0 then for i=0, rendered_notes-1 do note_x = getRenderedNoteX(i) note_y = getRenderedNoteY(i) setRenderedNoteAlpha(((screenHeight-note_y)/screenHeight), i) -- setRenderedNoteScale(2*((screenHeight-note_y)/screenHeight)-1, i) -- setRenderedNotePos(note_x, note_y, i) end end]] end function beatHit (beat) -- do nothing end function stepHit (step) -- do nothing end print("Mod Chart script loaded :)")
Include 'THlib\\UI\\uiconfig.lua' Include 'THlib\\UI\\font.lua' Include 'THlib\\UI\\title.lua' Include 'THlib\\UI\\sc_pr.lua' LoadTexture('boss_ui', 'THlib\\UI\\boss_ui.png') LoadImage('boss_spell_name_bg', 'boss_ui', 0, 0, 256, 36) SetImageCenter('boss_spell_name_bg', 256, 0) LoadImage('boss_pointer', 'boss_ui', 0, 64, 48, 16) SetImageCenter('boss_pointer', 24, 0) LoadImage('boss_sc_left', 'boss_ui', 64, 64, 32, 32) SetImageState('boss_sc_left', '', Color(0xFF80FF80)) LoadTexture('hint', 'THlib\\UI\\hint.png', true) LoadImage('hint.bonusfail', 'hint', 0, 64, 256, 64) LoadImage('hint.getbonus', 'hint', 0, 128, 396, 64) LoadImage('hint.extend', 'hint', 0, 192, 160, 64) LoadImage('hint.power', 'hint', 0, 12, 84, 32) LoadImage('hint.graze', 'hint', 86, 12, 74, 32) LoadImage('hint.point', 'hint', 160, 12, 120, 32) LoadImage('hint.life', 'hint', 288, 0, 16, 15) LoadImage('hint.lifeleft', 'hint', 304, 0, 16, 15) LoadImage('hint.bomb', 'hint', 320, 0, 16, 16) LoadImage('hint.bombleft', 'hint', 336, 0, 16, 16) LoadImage('kill_time', 'hint', 232, 200, 152, 56, 16, 16) SetImageCenter('hint.power', 0, 16) SetImageCenter('hint.graze', 0, 16) SetImageCenter('hint.point', 0, 16) LoadImageGroup('lifechip', 'hint', 288, 16, 16, 15, 4, 1, 0, 0) LoadImageGroup('bombchip', 'hint', 288, 32, 16, 16, 4, 1, 0, 0) LoadImage('hint.hiscore', 'hint', 424, 8, 80, 20) LoadImage('hint.score', 'hint', 424, 30, 64, 20) LoadImage('hint.Pnumber', 'hint', 352, 8, 56, 20) LoadImage('hint.Bnumber', 'hint', 352, 30, 72, 20) LoadImage('hint.Cnumber', 'hint', 352, 52, 40, 20) SetImageCenter('hint.hiscore', 0, 10) SetImageCenter('hint.score', 0, 10) SetImageCenter('hint.Pnumber', 0, 10) SetImageCenter('hint.Bnumber', 0, 10) LoadTexture('line', 'THlib\\UI\\line.png', true) LoadImageGroup('line_', 'line', 0, 0, 200, 8, 1, 7, 0, 0) LoadTexture('ui_rank', 'THlib\\UI\\rank.png') LoadImage('rank_Easy', 'ui_rank', 0, 0, 144, 32) LoadImage('rank_Normal', 'ui_rank', 0, 32, 144, 32) LoadImage('rank_Hard', 'ui_rank', 0, 64, 144, 32) LoadImage('rank_Lunatic', 'ui_rank', 0, 96, 144, 32) LoadImage('rank_Extra', 'ui_rank', 0, 128, 144, 32) ---@class THlib.ui ui = {} ---UI菜单参数 ui.menu = { font_size = 0.625, line_height = 24, char_width = 20, num_width = 12.5, title_color = { 255, 255, 255 }, unfocused_color = { 128, 128, 128 }, --unfocused_color={255,255,255}, focused_color1 = { 255, 255, 255 }, focused_color2 = { 255, 192, 192 }, blink_speed = 7, shake_time = 9, shake_speed = 40, shake_range = 3, --符卡练习每页行数 sc_pr_line_per_page = 12, -- 符卡练习每行高度 sc_pr_line_height = 22, --符卡练习每行宽度 sc_pr_width = 320, sc_pr_margin = 8, rep_font_size = 0.6, rep_line_height = 20, } function ui.DrawMenu(title, text, pos, x, y, alpha, timer, shake, align) align = align or 'center' local yos if title == '' then yos = (#text + 1) * ui.menu.line_height * 0.5 else yos = (#text - 1) * ui.menu.line_height * 0.5 SetFontState('menu', '', Color(alpha * 255, unpack(ui.menu.title_color))) RenderText('menu', title, x, y + yos + ui.menu.line_height, ui.menu.font_size, align, 'vcenter') end for i = 1, #text do if i == pos then local color = {} local k = cos(timer * ui.menu.blink_speed) ^ 2 for j = 1, 3 do color[j] = ui.menu.focused_color1[j] * k + ui.menu.focused_color2[j] * (1 - k) end local xos = ui.menu.shake_range * sin(ui.menu.shake_speed * shake) SetFontState('menu', '', Color(alpha * 255, unpack(color))) RenderText('menu', text[i], x + xos, y - i * ui.menu.line_height + yos, ui.menu.font_size, align, 'vcenter') -- RenderTTF('menuttf',text[i],x+xos+2,x+xos+2,y-i*ui.menu.line_height+yos,y-i*ui.menu.line_height+yos,Color(alpha*255,0,0,0),'centerpoint') -- RenderTTF('menuttf',text[i],x+xos,x+xos,y-i*ui.menu.line_height+yos,y-i*ui.menu.line_height+yos,Color(alpha*255,unpack(color)),'centerpoint') else SetFontState('menu', '', Color(alpha * 255, unpack(ui.menu.unfocused_color))) RenderText('menu', text[i], x, y - i * ui.menu.line_height + yos, ui.menu.font_size, align, 'vcenter') -- RenderTTF('menuttf',text[i],x+2,x+2,y-i*ui.menu.line_height+yos,y-i*ui.menu.line_height+yos,Color(alpha*255,0,0,0),'centerpoint') -- RenderTTF('menuttf',text[i],x,x,y-i*ui.menu.line_height+yos,y-i*ui.menu.line_height+yos,Color(alpha*255,unpack(ui.menu.unfocused_color)),'centerpoint') end end end function ui.DrawMenuTTF(ttfname, title, text, pos, x, y, alpha, timer, shake, align) align = align or 'center' local yos if title == '' then yos = (#text + 1) * ui.menu.sc_pr_line_height * 0.5 else yos = (#text - 1) * ui.menu.sc_pr_line_height * 0.5 RenderTTF(ttfname, title, x, x, y + yos + ui.menu.sc_pr_line_height, y + yos + ui.menu.sc_pr_line_height, Color(alpha * 255, unpack(ui.menu.title_color)), align, 'vcenter', 'noclip') end for i = 1, #text do if i == pos then local color = {} local k = cos(timer * ui.menu.blink_speed) ^ 2 for j = 1, 3 do color[j] = ui.menu.focused_color1[j] * k + ui.menu.focused_color2[j] * (1 - k) end local xos = ui.menu.shake_range * sin(ui.menu.shake_speed * shake) RenderTTF(ttfname, text[i], x + xos, x + xos, y - i * ui.menu.sc_pr_line_height + yos, y - i * ui.menu.sc_pr_line_height + yos, Color(alpha * 255, unpack(color)), align, 'vcenter', 'noclip') else RenderTTF(ttfname, text[i], x, x, y - i * ui.menu.sc_pr_line_height + yos, y - i * ui.menu.sc_pr_line_height + yos, Color(alpha * 255, unpack(ui.menu.unfocused_color)), align, 'vcenter', 'noclip') end end end function ui.DrawMenuTTFBlack(ttfname, title, text, pos, x, y, alpha, timer, shake, align) align = align or 'center' local yos if title == '' then yos = (#text + 1) * ui.menu.sc_pr_line_height * 0.5 else yos = (#text - 1) * ui.menu.sc_pr_line_height * 0.5 RenderTTF(ttfname, title, x, x, y + yos + ui.menu.sc_pr_line_height, y + yos + ui.menu.sc_pr_line_height, Color(0xFF000000), align, 'vcenter', 'noclip') end for i = 1, #text do if i == pos then local xos = ui.menu.shake_range * sin(ui.menu.shake_speed * shake) RenderTTF(ttfname, text[i], x + xos, x + xos, y - i * ui.menu.sc_pr_line_height + yos, y - i * ui.menu.sc_pr_line_height + yos, Color(0xFF000000), align, 'vcenter', 'noclip') else RenderTTF(ttfname, text[i], x, x, y - i * ui.menu.sc_pr_line_height + yos, y - i * ui.menu.sc_pr_line_height + yos, Color(0xFF000000), align, 'vcenter', 'noclip') end end end function ui.DrawRepText(ttfname, title, text, pos, x, y, alpha, timer, shake) local yos if title == '' then yos = (#text + 1) * ui.menu.sc_pr_line_height * 0.5 else yos = (#text - 1) * ui.menu.sc_pr_line_height * 0.5 Render(title, x, y + ui.menu.sc_pr_line_height + yos) -- RenderTTF(ttfname,title,x,x,y+yos+ui.menu.sc_pr_line_height+1,y+yos+ui.menu.sc_pr_line_height-1,Color(0xFF000000),'center','vcenter','noclip') -- RenderTTF(ttfname,title,x,x,y+yos+ui.menu.sc_pr_line_height,y+yos+ui.menu.sc_pr_line_height,Color(255,unpack(ui.menu.title_color)),'center','vcenter','noclip') end local _text = text local xos = { -300, -240, -120, 20, 130, 240 } for i = 1, #_text do if i == pos then local color = {} local k = cos(timer * ui.menu.blink_speed) ^ 2 for j = 1, 3 do color[j] = ui.menu.focused_color1[j] * k + ui.menu.focused_color2[j] * (1 - k) end -- local xos=ui.menu.shake_range*sin(ui.menu.shake_speed*shake) SetFontState('replay', '', Color(0xFFFFFF30)) -- RenderTTF(ttfname,text[i],x+xos,x+xos,y-i*ui.menu.sc_pr_line_height+yos,y-i*ui.menu.sc_pr_line_height+yos,Color(alpha*255,unpack(color)),align,'vcenter','noclip') for m = 1, 6 do RenderText('replay', _text[i][m], x + xos[m], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'left') end else SetFontState('replay', '', Color(0xFF808080)) -- RenderTTF(ttfname,text[i],x,x,y-i*ui.menu.sc_pr_line_height+yos,y-i*ui.menu.sc_pr_line_height+yos,Color(alpha*255,unpack(ui.menu.unfocused_color)),align,'vcenter','noclip') for m = 1, 6 do RenderText('replay', _text[i][m], x + xos[m], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'left') end end end end function ui.DrawRepText2(ttfname, title, text, pos, x, y, alpha, timer, shake) local yos if title == '' then yos = (#text + 1) * ui.menu.sc_pr_line_height * 0.5 else yos = (#text - 1) * ui.menu.sc_pr_line_height * 0.5 Render(title, x, y + ui.menu.sc_pr_line_height + yos) -- RenderTTF(ttfname,title,x,x,y+yos+ui.menu.sc_pr_line_height+1,y+yos+ui.menu.sc_pr_line_height-1,Color(0xFF000000),'center','vcenter','noclip') -- RenderTTF(ttfname,title,x,x,y+yos+ui.menu.sc_pr_line_height,y+yos+ui.menu.sc_pr_line_height,Color(255,unpack(ui.menu.title_color)),'center','vcenter','noclip') end local _text = text local xos = { -80, 120 } for i = 1, #_text do if i == pos then local color = {} local k = cos(timer * ui.menu.blink_speed) ^ 2 for j = 1, 3 do color[j] = ui.menu.focused_color1[j] * k + ui.menu.focused_color2[j] * (1 - k) end -- local xos=ui.menu.shake_range*sin(ui.menu.shake_speed*shake) SetFontState('replay', '', Color(0xFFFFFF30)) -- RenderTTF(ttfname,text[i],x+xos,x+xos,y-i*ui.menu.sc_pr_line_height+yos,y-i*ui.menu.sc_pr_line_height+yos,Color(alpha*255,unpack(color)),align,'vcenter','noclip') RenderText('replay', _text[i][1], x + xos[1], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'center') RenderText('replay', _text[i][2], x + xos[2], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'right') else SetFontState('replay', '', Color(0xFF808080)) -- RenderTTF(ttfname,text[i],x,x,y-i*ui.menu.sc_pr_line_height+yos,y-i*ui.menu.sc_pr_line_height+yos,Color(alpha*255,unpack(ui.menu.unfocused_color)),align,'vcenter','noclip') RenderText('replay', _text[i][1], x + xos[1], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'center') RenderText('replay', _text[i][2], x + xos[2], y - i * ui.menu.rep_line_height + yos, ui.menu.rep_font_size, 'vcenter', 'right') end end end ---RenderScore(fontname,score,x,y,size,mode) ---格式化并使用RenderText渲染数字(分数) function RenderScore(fontname, score, x, y, size, mode) if score < 1000 then RenderText(fontname, string.format('%d', score), x, y, size, mode) elseif score < 1000000 then RenderText(fontname, string.format('%d,%03d', math.floor(score / 1000), score % 1000), x, y, size, mode) elseif score < 1000000000 then RenderText(fontname, string.format('%d,%03d,%03d', math.floor(score / 1000000), math.floor(int(score / 1000)) % 1000, score % 1000), x, y, size, mode) elseif score < 100000000000 then RenderText(fontname, string.format('%d,%03d,%03d,%03d', math.floor(score / 1000000000), math.floor(int(score / 1000000)) % 1000, math.floor(score / 1000) % 1000, score % 1000), x, y, size, mode) else RenderText(fontname, string.format('99,999,999,999'), x, y, size, mode) end end -- if setting.resx > setting.resy then if not CheckRes('img', 'image:UI_img') then LoadImageFromFile('ui_bg', 'THlib\\UI\\ui_bg.png') end if not CheckRes('img', 'image:LOGO_img') then LoadImageFromFile('logo', 'THlib\\UI\\logo.png') end SetImageCenter('logo', 0, 0) LoadImageFromFile('menu_bg', 'THlib\\UI\\menu_bg.png') function ui.DrawFrame() if CheckRes('img', 'image:UI_img') then Render('image:UI_img', 320, 240) else Render('ui_bg', 320, 240) end if CheckRes('img', 'image:LOGO_img') then Render('image:LOGO_img', 400, 150, 0, 0.5, 0.5) else Render('logo', 400, 150, 0, 0.5, 0.5) end SetFontState('menu', '', Color(0xFFFFFFFF)) RenderText('menu', string.format('%.1ffps', GetFPS()), 636, 1, 0.25, 'right', 'bottom') end function ui.DrawMenuBG() -- SetViewMode'ui' Render('menu_bg', 320, 240) SetFontState('menu', '', Color(0xFFFFFFFF)) RenderText('menu', string.format('%.1ffps', GetFPS()), 636, 1, 0.25, 'right', 'bottom') end function ui.DrawScore() SetFontState('score3', '', Color(0xFFADADAD)) local diff = string.match(stage.current_stage.name, "[%w_][%w_ ]*$") local diffimg = CheckRes('img', 'image:diff_' .. diff) if diffimg then Render('image:diff_' .. diff, 528, 448) else if diff == 'Easy' or diff == 'Normal' or diff == 'Hard' or diff == 'Lunatic' or diff == 'Extra' then Render('rank_' .. diff, 528, 448, 0.5, 0.5) else RenderText('score', diff, 528, 466, 0.5, 'center') end end Render('line_1', 525, 419, 0, 1, 1) Render('line_2', 525, 397, 0, 1, 1) Render('line_3', 525, 349, 0, 1, 1) Render('line_4', 525, 311, 0, 1, 1) Render('line_5', 525, 247, 0, 1, 1) Render('line_6', 525, 224, 0, 1, 1) Render('line_7', 525, 202, 0, 1, 1) Render('hint.hiscore', 428, 425, 0, 1, 1) Render('hint.score', 428, 403, 0, 1, 1) Render('hint.Pnumber', 428, 371, 0, 1, 1) Render('hint.Bnumber', 428, 334, 0, 1, 1) Render('hint.Cnumber', 554, 316, 0, 0.85, 0.85) Render('hint.Cnumber', 554, 354, 0, 0.85, 0.85) Render('hint.power', 455, 253, 0, 0.5, 0.5) Render('hint.point', 455, 230, 0, 0.5, 0.5) Render('hint.graze', 470, 208, 0, 0.5, 0.5) --RenderText('score','HiScore\nScore\nPlayer\nSpell\nGraze',432,424,0.5,'left') for i = 1, 8 do Render('hint.life', 505 + 13 * i, 371, 0, 1, 1) end for i = 1, lstg.var.lifeleft do Render('hint.lifeleft', 505 + 13 * i, 371, 0, 1, 1) end for i = 1, 8 do Render('hint.bomb', 505 + 13 * i, 334, 0, 1, 1) end for i = 1, lstg.var.bomb do Render('hint.bombleft', 505 + 13 * i, 334, 0, 1, 1) end local Lchip = lstg.var.chip if Lchip > 0 and Lchip < 5 then Render('lifechip' .. Lchip, 505 + 13 * (lstg.var.lifeleft + 1), 371, 0, 1, 1) end local Bchip = lstg.var.bombchip if Bchip > 0 and Bchip < 5 then Render('bombchip' .. Bchip, 505 + 13 * (lstg.var.bomb + 1), 334, 0, 1, 1) end SetFontState('score3', '', Color(0xFFADADAD)) RenderScore('score3', max(lstg.tmpvar.hiscore or 0, lstg.var.score), 622, 436, 0.43, 'right') SetFontState('score3', '', Color(0xFFFFFFFF)) RenderScore('score3', lstg.var.score, 622, 414, 0.43, 'right') RenderText('score3', string.format('%d/5', lstg.var.chip), 596, 361, 0.35, 'left') RenderText('score3', string.format('%d/5', lstg.var.bombchip), 596, 323, 0.35, 'left') --Render('hint.power',450,258,0,0.5) --Render('hint.point',452,240,0,0.5) --Render('hint.graze',466,222,0,0.5) SetFontState('score1', '', Color(0xFFCD6600)) SetFontState('score2', '', Color(0xFF22D8DD)) -- RenderText('score1', string.format('%d. /4. ', math.floor(lstg.var.power / 100)), 610, 262, 0.4, 'right') RenderText('score1', string.format(' %d%d 00', math.floor((lstg.var.power % 100) / 10), lstg.var.power % 10), 611, 258.5, 0.3, 'right') RenderText('score2', string.format('%d,%d%d%d', math.floor(lstg.var.pointrate / 1000), math.floor(lstg.var.pointrate / 100) % 10, math.floor(lstg.var.pointrate / 10) % 10, lstg.var.pointrate % 10), 610, 239, 0.4, 'right') SetFontState('score3', '', Color(0xFFADADAD)) RenderText('score3', string.format('%d', lstg.var.graze), 610, 216, 0.4, 'right') end else LoadImageFromFile('ui_bg', 'THlib\\UI\\ui_bg_2.png') LoadImageFromFile('logo', 'THlib\\UI\\logo.png') LoadImageFromFile('menu_bg', 'THlib\\UI\\menu_bg_2.png') function ui.DrawFrame() Render('ui_bg', 198, 264) end function ui.DrawMenuBG() SetViewMode 'ui' Render('menu_bg', 198, 264) SetFontState('menu', '', Color(0xFFFFFFFF)) RenderText('menu', string.format('%.1ffps', GetFPS()), 392, 1, 0.25, 'right', 'bottom') end function ui.DrawScore() RenderText('score', 'HiScore', 8, 520, 0.5, 'left', 'top') RenderText('score', string.format('%d', max(lstg.tmpvar.hiscore or 0, lstg.var.score)), 190, 520, 0.5, 'right', 'top') RenderText('score', 'Score', 206, 520, 0.5, 'left', 'top') RenderText('score', string.format('%d', lstg.var.score), 388, 520, 0.5, 'right', 'top') SetFontState('score', '', Color(0xFFFF4040)) RenderText('score', string.format('%1.2f', lstg.var.power / 100), 8, 496, 0.5, 'left', 'top') SetFontState('score', '', Color(0xFF40FF40)) RenderText('score', string.format('%d', lstg.var.faith), 84, 496, 0.5, 'left', 'top') SetFontState('score', '', Color(0xFF4040FF)) RenderText('score', string.format('%d', lstg.var.pointrate), 160, 496, 0.5, 'left', 'top') SetFontState('score', '', Color(0xFFFFFFFF)) RenderText('score', string.format('%d', lstg.var.graze), 236, 496, 0.5, 'left', 'top') RenderText('score', string.rep('*', max(0, lstg.var.lifeleft)), 388, 496, 0.5, 'right', 'top') RenderText('score', string.rep('*', max(0, lstg.var.bomb)), 380, 490, 0.5, 'right', 'top') end end ---@class THlib.diff_render_obj:object diff_render_obj = Class(object) function diff_render_obj:init(x, y, _type, img) self.group = GROUP_GHOST self.bound = false self.x = x self.y = y self.rot, self. self .layer = LAYER_TOP self.img = _type .. img self._a, self._r, self._g, self._b = 255, 255, 255, 255 ui_diff = self end function diff_render_obj:render() Render(self.img, self.x, self.y, self.rot, self.hscale, self.vscale) end
local args = {...} return function () local createServer = require('coro-net').createServer local uv = require('uv') local httpCodec = require('http-codec') local websocketCodec = require('websocket-codec') local wrapIo = require('coro-websocket').wrapIo local log = require('log').log local makeRemote = require('codec').makeRemote local core = require('core')() local handlers = require('handlers')(core) local handleRequest = require('api')(core.db, args[2]) -- Ignore SIGPIPE if it exists on platform if uv.constants.SIGPIPE then uv.new_signal():start("sigpipe") end createServer({ host = "0.0.0.0", port = 4822, decode = httpCodec.decoder(), encode = httpCodec.encoder(), }, function (read, write, socket, updateDecoder, updateEncoder, close) local function upgrade(res) write(res) -- Upgrade the protocol to websocket updateDecoder(websocketCodec.decode) updateEncoder(websocketCodec.encode) read, write = wrapIo(read, write, { mask = false }) -- Log the client connection local peerName = socket:getpeername() peerName = peerName.ip .. ':' .. peerName.port log("client connected", peerName) -- Proces the client using server handles local remote = makeRemote(read, write) local success, err = xpcall(function () for command, data in remote.read do log("client command", peerName .. " - " .. command) local handler = handlers[command] if handler then handler(remote, data) else remote.writeAs("error", "no such command " .. command) end end end, debug.traceback) if not success then log("client error", err, "err") remote.writeAs("error", string.match(err, ":%d+: *([^\n]*)")) remote.close() end log("client disconnected", peerName) end for req in read do local body = {} for chunk in read do if #chunk == 0 then break end body[#body + 1] = chunk end local res, err = websocketCodec.handleHandshake(req, "lit") if res then return upgrade(res) end body = table.concat(body) if req.method == "GET" or req.method == "HEAD" then req.body = #body > 0 and body or nil local now = uv.now() res, err = handleRequest(req) local delay = (uv.now() - now) .. "ms" res[#res + 1] = {"X-Request-Time", delay} print(req.method .. " " .. req.path .. " " .. res.code .. " " .. delay) end if not res then write({code=400}) write(err or "lit websocket request required") write() if not socket:is_closing() then socket:close() end return end write(res) write(res.body) end write() end) -- Never return so that the command keeps running. coroutine.yield() end
local AS = unpack(AddOnSkins) if not AS:CheckAddOn('ServerHop') then return end function AS:ServerHop() local hopAddOn = _G["ServerHop"] local hopFrame = hopAddOn.hopFrame AS:SkinFrame(hopFrame) AS:SkinButton(hopFrame.buttonHop, true) hopFrame.buttonHop:SetPoint("LEFT", 20, 0) AS:SkinCloseButton(hopAddOn.closeButton) hopAddOn.closeButton:SetPoint("TOPRIGHT", 0, 0) AS:SkinButton(hopAddOn.buttonOptions) hopAddOn.buttonOptions:SetPoint("TOPLEFT", 0, 0) AS:SkinEditBox(hopFrame.description, 205, 18) AS:SkinButton(sh_clearblbut) sh_clearblbut:SetSize(24, 24) AS:SkinDropDownBox(hopFramepvpDrop) AS:SkinDropDownBox(CountDrop) end AS:RegisterSkin('ServerHop', AS.ServerHop)
--- `:augroup` support. -- -- Provides overrides that allow you to specify a callable -- as the second parameter to `bex.cmd.augroup`. It will -- be invoked after entering the augroup and generate -- an `:augroup END` automatically afterwards. This allows -- usage like: -- -- local cmd = require('bex.cmd') -- -- cmd.augroup('my_augroup', function() -- cmd.autocmd.bang() -- cmd.autocmd(...) -- ... -- end) local cmd = require('bex.cmd') local param = require('bex.param') local function body(ctx) ctx.augroup_body = ctx:pop() end cmd.augroup.params = {param.default, body} function cmd.augroup.post(ctx, result) if ctx.augroup_body then local status, ret = pcall(ctx.augroup_body) vim.cmd("augroup END") if not status then error(ret) end end return result end
-- Workaround for the map canvas pins, which behave as buttons -- using OnMouseDown, making the interface cursor dismiss the objects as -- regular unclickable frames. local _, db = ... db.PLUGINS['Blizzard_MapCanvas'] = function(self) local NodeMixin, pins, maps, nodes = {}, {}, {}, {} local Mixin = db.table.mixin function NodeMixin:OnLeave() self.pin:OnMouseLeave() end function NodeMixin:OnClick() self.pin:OnClick('LeftButton') end function NodeMixin:OnEnter() local map = self.pin.owningMap self.pin:OnMouseEnter() if ( GameTooltip:GetOwner() == self.pin ) and db.Mouse.Cursor.Special and GetMouseFocus() ~= self and map:ShouldZoomInOnClick() then if map:IsZoomedIn() or map:IsZoomingIn() then map:PanTo(self.pin.normalizedX, self.pin.normalizedY) GameTooltip:AddLine(db.CLICK.MAP_CANVAS_ZOOM_OUT, 1, 1, 1) else GameTooltip:AddLine(db.CLICK.MAP_CANVAS_ZOOM_IN, 1, 1, 1) end GameTooltip:Show() end end function NodeMixin:SpecialClick() local map = self.pin.owningMap if not map:ShouldZoomInOnClick() then return end if map:IsZoomedIn() or map:IsZoomingIn() then map:ZoomOut() else local normalizedX, normalizedY = self.pin.normalizedX, self.pin.normalizedY map:PanAndZoomTo(normalizedX, normalizedY) end end local function CreateNode(pin) if pins[pin] then return end local node = CreateFrame('Button', 'CanvasNode'..#nodes+1, pin) node.pin = pin node:SetSize(4, 4) node:SetPoint('CENTER') node.noAnimation = true Mixin(node, NodeMixin) nodes[#nodes + 1] = node pins[pin] = true pin.includeChildren = true end local function AddToMixinTracker(self) if not maps[self] then ConsolePort:AddFrame(self) ConsolePort:UpdateFrames() maps[self] = true self.ScrollContainer.ignoreScroll = true end end local function AcquirePin(self, pinTemplate, ...) for pin in self:EnumeratePinsByTemplate(pinTemplate) do CreateNode(pin, self, pinTemplate) end AddToMixinTracker(self) end hooksecurefunc(MapCanvasMixin, 'AcquirePin', AcquirePin) if ( WorldMapFrame and WorldMapFrame.AcquirePin ) then hooksecurefunc(WorldMapFrame, 'AcquirePin', AcquirePin) AddToMixinTracker(WorldMapFrame) end end
-- Automatically generated by build.lua, do not edit return [[ 048D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SEMISOFT SIGN 048F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ER WITH TICK 0491 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER GHE WITH UPTURN 0493 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER GHE WITH STROKE 0495 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK 0497 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZHE WITH DESCENDER 0499 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZE WITH DESCENDER 049B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KA WITH DESCENDER 049D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE 049F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KA WITH STROKE 04A1 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BASHKIR KA 04A3 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EN WITH DESCENDER 04A5 ; Changes_When_Titlecased # L& CYRILLIC SMALL LIGATURE EN GHE 04A7 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK 04A9 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ABKHASIAN HA 04AB ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ES WITH DESCENDER 04AD ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TE WITH DESCENDER 04AF ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER STRAIGHT U 04B1 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE 04B3 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER HA WITH DESCENDER 04B5 ; Changes_When_Titlecased # L& CYRILLIC SMALL LIGATURE TE TSE 04B7 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CHE WITH DESCENDER 04B9 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE 04BB ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SHHA 04BD ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ABKHASIAN CHE 04BF ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER 04C2 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZHE WITH BREVE 04C4 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KA WITH HOOK 04C6 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EL WITH TAIL 04C8 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EN WITH HOOK 04CA ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EN WITH TAIL 04CC ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KHAKASSIAN CHE 04CE..04CF ; Changes_When_Titlecased # L& [2] CYRILLIC SMALL LETTER EM WITH TAIL..CYRILLIC SMALL LETTER PALOCHKA 04D1 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER A WITH BREVE 04D3 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER A WITH DIAERESIS 04D5 ; Changes_When_Titlecased # L& CYRILLIC SMALL LIGATURE A IE 04D7 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER IE WITH BREVE 04D9 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SCHWA 04DB ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS 04DD ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZHE WITH DIAERESIS 04DF ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZE WITH DIAERESIS 04E1 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ABKHASIAN DZE 04E3 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER I WITH MACRON 04E5 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER I WITH DIAERESIS 04E7 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER O WITH DIAERESIS 04E9 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BARRED O 04EB ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS 04ED ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER E WITH DIAERESIS 04EF ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER U WITH MACRON 04F1 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER U WITH DIAERESIS 04F3 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE 04F5 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CHE WITH DIAERESIS 04F7 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER GHE WITH DESCENDER 04F9 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER YERU WITH DIAERESIS 04FB ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER GHE WITH STROKE AND HOOK 04FD ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER HA WITH HOOK 04FF ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER HA WITH STROKE 0501 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI DE 0503 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI DJE 0505 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI ZJE 0507 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI DZJE 0509 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI LJE 050B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI NJE 050D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI SJE 050F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER KOMI TJE 0511 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER REVERSED ZE 0513 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EL WITH HOOK 0515 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER LHA 0517 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER RHA 0519 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER YAE 051B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER QA 051D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER WE 051F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ALEUT KA 0521 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK 0523 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK 0525 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER PE WITH DESCENDER 0527 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SHHA WITH DESCENDER 0529 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EN WITH LEFT HOOK 052B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DZZHE 052D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DCHE 052F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER EL WITH DESCENDER 0561..0587 ; Changes_When_Titlecased # L& [39] ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LIGATURE ECH YIWN 13F8..13FD ; Changes_When_Titlecased # L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV 1C80..1C88 ; Changes_When_Titlecased # L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK 1D79 ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR G 1D7D ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH STROKE 1E01 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH RING BELOW 1E03 ; Changes_When_Titlecased # L& LATIN SMALL LETTER B WITH DOT ABOVE 1E05 ; Changes_When_Titlecased # L& LATIN SMALL LETTER B WITH DOT BELOW 1E07 ; Changes_When_Titlecased # L& LATIN SMALL LETTER B WITH LINE BELOW 1E09 ; Changes_When_Titlecased # L& LATIN SMALL LETTER C WITH CEDILLA AND ACUTE 1E0B ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH DOT ABOVE 1E0D ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH DOT BELOW 1E0F ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH LINE BELOW 1E11 ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH CEDILLA 1E13 ; Changes_When_Titlecased # L& LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW 1E15 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH MACRON AND GRAVE 1E17 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH MACRON AND ACUTE 1E19 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW 1E1B ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH TILDE BELOW 1E1D ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CEDILLA AND BREVE 1E1F ; Changes_When_Titlecased # L& LATIN SMALL LETTER F WITH DOT ABOVE 1E21 ; Changes_When_Titlecased # L& LATIN SMALL LETTER G WITH MACRON 1E23 ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH DOT ABOVE 1E25 ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH DOT BELOW 1E27 ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH DIAERESIS 1E29 ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH CEDILLA 1E2B ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH BREVE BELOW 1E2D ; Changes_When_Titlecased # L& LATIN SMALL LETTER I WITH TILDE BELOW 1E2F ; Changes_When_Titlecased # L& LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE 1E31 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH ACUTE 1E33 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH DOT BELOW 1E35 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH LINE BELOW 1E37 ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH DOT BELOW 1E39 ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH DOT BELOW AND MACRON 1E3B ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH LINE BELOW 1E3D ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW 1E3F ; Changes_When_Titlecased # L& LATIN SMALL LETTER M WITH ACUTE 1E41 ; Changes_When_Titlecased # L& LATIN SMALL LETTER M WITH DOT ABOVE 1E43 ; Changes_When_Titlecased # L& LATIN SMALL LETTER M WITH DOT BELOW 1E45 ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH DOT ABOVE 1E47 ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH DOT BELOW 1E49 ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH LINE BELOW 1E4B ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW 1E4D ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH TILDE AND ACUTE 1E4F ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH TILDE AND DIAERESIS 1E51 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH MACRON AND GRAVE 1E53 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH MACRON AND ACUTE 1E55 ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH ACUTE 1E57 ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH DOT ABOVE 1E59 ; Changes_When_Titlecased # L& LATIN SMALL LETTER R WITH DOT ABOVE 1E5B ; Changes_When_Titlecased # L& LATIN SMALL LETTER R WITH DOT BELOW 1E5D ; Changes_When_Titlecased # L& LATIN SMALL LETTER R WITH DOT BELOW AND MACRON 1E5F ; Changes_When_Titlecased # L& LATIN SMALL LETTER R WITH LINE BELOW 1E61 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH DOT ABOVE 1E63 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH DOT BELOW 1E65 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE 1E67 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH CARON AND DOT ABOVE 1E69 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE 1E6B ; Changes_When_Titlecased # L& LATIN SMALL LETTER T WITH DOT ABOVE 1E6D ; Changes_When_Titlecased # L& LATIN SMALL LETTER T WITH DOT BELOW 1E6F ; Changes_When_Titlecased # L& LATIN SMALL LETTER T WITH LINE BELOW 1E71 ; Changes_When_Titlecased # L& LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW 1E73 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH DIAERESIS BELOW 1E75 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH TILDE BELOW 1E77 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW 1E79 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH TILDE AND ACUTE 1E7B ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH MACRON AND DIAERESIS 1E7D ; Changes_When_Titlecased # L& LATIN SMALL LETTER V WITH TILDE 1E7F ; Changes_When_Titlecased # L& LATIN SMALL LETTER V WITH DOT BELOW 1E81 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH GRAVE 1E83 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH ACUTE 1E85 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH DIAERESIS 1E87 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH DOT ABOVE 1E89 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH DOT BELOW 1E8B ; Changes_When_Titlecased # L& LATIN SMALL LETTER X WITH DOT ABOVE 1E8D ; Changes_When_Titlecased # L& LATIN SMALL LETTER X WITH DIAERESIS 1E8F ; Changes_When_Titlecased # L& LATIN SMALL LETTER Y WITH DOT ABOVE 1E91 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Z WITH CIRCUMFLEX 1E93 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Z WITH DOT BELOW 1E95..1E9B ; Changes_When_Titlecased # L& [7] LATIN SMALL LETTER Z WITH LINE BELOW..LATIN SMALL LETTER LONG S WITH DOT ABOVE 1EA1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH DOT BELOW 1EA3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH HOOK ABOVE 1EA5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE 1EA7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE 1EA9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE 1EAB ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE 1EAD ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW 1EAF ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH BREVE AND ACUTE 1EB1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH BREVE AND GRAVE 1EB3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE 1EB5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH BREVE AND TILDE 1EB7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER A WITH BREVE AND DOT BELOW 1EB9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH DOT BELOW 1EBB ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH HOOK ABOVE 1EBD ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH TILDE 1EBF ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE 1EC1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE 1EC3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE 1EC5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE 1EC7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW 1EC9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER I WITH HOOK ABOVE 1ECB ; Changes_When_Titlecased # L& LATIN SMALL LETTER I WITH DOT BELOW 1ECD ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH DOT BELOW 1ECF ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HOOK ABOVE 1ED1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE 1ED3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE 1ED5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE 1ED7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE 1ED9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW 1EDB ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HORN AND ACUTE 1EDD ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HORN AND GRAVE 1EDF ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE 1EE1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HORN AND TILDE 1EE3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH HORN AND DOT BELOW 1EE5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH DOT BELOW 1EE7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HOOK ABOVE 1EE9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HORN AND ACUTE 1EEB ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HORN AND GRAVE 1EED ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE 1EEF ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HORN AND TILDE 1EF1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER U WITH HORN AND DOT BELOW 1EF3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Y WITH GRAVE 1EF5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Y WITH DOT BELOW 1EF7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Y WITH HOOK ABOVE 1EF9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Y WITH TILDE 1EFB ; Changes_When_Titlecased # L& LATIN SMALL LETTER MIDDLE-WELSH LL 1EFD ; Changes_When_Titlecased # L& LATIN SMALL LETTER MIDDLE-WELSH V 1EFF..1F07 ; Changes_When_Titlecased # L& [9] LATIN SMALL LETTER Y WITH LOOP..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI 1F10..1F15 ; Changes_When_Titlecased # L& [6] GREEK SMALL LETTER EPSILON WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA 1F20..1F27 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI 1F30..1F37 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER IOTA WITH PSILI..GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI 1F40..1F45 ; Changes_When_Titlecased # L& [6] GREEK SMALL LETTER OMICRON WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA 1F50..1F57 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI 1F60..1F67 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER OMEGA WITH PSILI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI 1F70..1F7D ; Changes_When_Titlecased # L& [14] GREEK SMALL LETTER ALPHA WITH VARIA..GREEK SMALL LETTER OMEGA WITH OXIA 1F80..1F87 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI 1F90..1F97 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI 1FA0..1FA7 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI 1FB0..1FB4 ; Changes_When_Titlecased # L& [5] GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI 1FB6..1FB7 ; Changes_When_Titlecased # L& [2] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI 1FBE ; Changes_When_Titlecased # L& GREEK PROSGEGRAMMENI 1FC2..1FC4 ; Changes_When_Titlecased # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI 1FC6..1FC7 ; Changes_When_Titlecased # L& [2] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI 1FD0..1FD3 ; Changes_When_Titlecased # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA 1FD6..1FD7 ; Changes_When_Titlecased # L& [2] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI 1FE0..1FE7 ; Changes_When_Titlecased # L& [8] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI 1FF2..1FF4 ; Changes_When_Titlecased # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI 1FF6..1FF7 ; Changes_When_Titlecased # L& [2] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI 214E ; Changes_When_Titlecased # L& TURNED SMALL F 2170..217F ; Changes_When_Titlecased # Nl [16] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND 2184 ; Changes_When_Titlecased # L& LATIN SMALL LETTER REVERSED C 24D0..24E9 ; Changes_When_Titlecased # So [26] CIRCLED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z 2C30..2C5E ; Changes_When_Titlecased # L& [47] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE 2C61 ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH DOUBLE BAR 2C65..2C66 ; Changes_When_Titlecased # L& [2] LATIN SMALL LETTER A WITH STROKE..LATIN SMALL LETTER T WITH DIAGONAL STROKE 2C68 ; Changes_When_Titlecased # L& LATIN SMALL LETTER H WITH DESCENDER 2C6A ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH DESCENDER 2C6C ; Changes_When_Titlecased # L& LATIN SMALL LETTER Z WITH DESCENDER 2C73 ; Changes_When_Titlecased # L& LATIN SMALL LETTER W WITH HOOK 2C76 ; Changes_When_Titlecased # L& LATIN SMALL LETTER HALF H 2C81 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER ALFA 2C83 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER VIDA 2C85 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER GAMMA 2C87 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER DALDA 2C89 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER EIE 2C8B ; Changes_When_Titlecased # L& COPTIC SMALL LETTER SOU 2C8D ; Changes_When_Titlecased # L& COPTIC SMALL LETTER ZATA 2C8F ; Changes_When_Titlecased # L& COPTIC SMALL LETTER HATE 2C91 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER THETHE 2C93 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER IAUDA 2C95 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER KAPA 2C97 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER LAULA 2C99 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER MI 2C9B ; Changes_When_Titlecased # L& COPTIC SMALL LETTER NI 2C9D ; Changes_When_Titlecased # L& COPTIC SMALL LETTER KSI 2C9F ; Changes_When_Titlecased # L& COPTIC SMALL LETTER O 2CA1 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER PI 2CA3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER RO 2CA5 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER SIMA 2CA7 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER TAU 2CA9 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER UA 2CAB ; Changes_When_Titlecased # L& COPTIC SMALL LETTER FI 2CAD ; Changes_When_Titlecased # L& COPTIC SMALL LETTER KHI 2CAF ; Changes_When_Titlecased # L& COPTIC SMALL LETTER PSI 2CB1 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OOU 2CB3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER DIALECT-P ALEF 2CB5 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC AIN 2CB7 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER CRYPTOGRAMMIC EIE 2CB9 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER DIALECT-P KAPA 2CBB ; Changes_When_Titlecased # L& COPTIC SMALL LETTER DIALECT-P NI 2CBD ; Changes_When_Titlecased # L& COPTIC SMALL LETTER CRYPTOGRAMMIC NI 2CBF ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC OOU 2CC1 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER SAMPI 2CC3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER CROSSED SHEI 2CC5 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC SHEI 2CC7 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC ESH 2CC9 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER AKHMIMIC KHEI 2CCB ; Changes_When_Titlecased # L& COPTIC SMALL LETTER DIALECT-P HORI 2CCD ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC HORI 2CCF ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC HA 2CD1 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER L-SHAPED HA 2CD3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC HEI 2CD5 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC HAT 2CD7 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC GANGIA 2CD9 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC DJA 2CDB ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD COPTIC SHIMA 2CDD ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD NUBIAN SHIMA 2CDF ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD NUBIAN NGI 2CE1 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD NUBIAN NYI 2CE3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER OLD NUBIAN WAU 2CEC ; Changes_When_Titlecased # L& COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI 2CEE ; Changes_When_Titlecased # L& COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA 2CF3 ; Changes_When_Titlecased # L& COPTIC SMALL LETTER BOHAIRIC KHEI 2D00..2D25 ; Changes_When_Titlecased # L& [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE 2D27 ; Changes_When_Titlecased # L& GEORGIAN SMALL LETTER YN 2D2D ; Changes_When_Titlecased # L& GEORGIAN SMALL LETTER AEN A641 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZEMLYA A643 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DZELO A645 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER REVERSED DZE A647 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER IOTA A649 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DJERV A64B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER MONOGRAPH UK A64D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BROAD OMEGA A64F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER NEUTRAL YER A651 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER YERU WITH BACK YER A653 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER IOTIFIED YAT A655 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER REVERSED YU A657 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER IOTIFIED A A659 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CLOSED LITTLE YUS A65B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BLENDED YUS A65D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE YUS A65F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER YN A661 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER REVERSED TSE A663 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SOFT DE A665 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SOFT EL A667 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SOFT EM A669 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER MONOCULAR O A66B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER BINOCULAR O A66D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DOUBLE MONOCULAR O A681 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DWE A683 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DZWE A685 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER ZHWE A687 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CCHE A689 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DZZE A68B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK A68D ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TWE A68F ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TSWE A691 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TSSE A693 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER TCHE A695 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER HWE A697 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER SHWE A699 ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER DOUBLE O A69B ; Changes_When_Titlecased # L& CYRILLIC SMALL LETTER CROSSED O A723 ; Changes_When_Titlecased # L& LATIN SMALL LETTER EGYPTOLOGICAL ALEF A725 ; Changes_When_Titlecased # L& LATIN SMALL LETTER EGYPTOLOGICAL AIN A727 ; Changes_When_Titlecased # L& LATIN SMALL LETTER HENG A729 ; Changes_When_Titlecased # L& LATIN SMALL LETTER TZ A72B ; Changes_When_Titlecased # L& LATIN SMALL LETTER TRESILLO A72D ; Changes_When_Titlecased # L& LATIN SMALL LETTER CUATRILLO A72F ; Changes_When_Titlecased # L& LATIN SMALL LETTER CUATRILLO WITH COMMA A733 ; Changes_When_Titlecased # L& LATIN SMALL LETTER AA A735 ; Changes_When_Titlecased # L& LATIN SMALL LETTER AO A737 ; Changes_When_Titlecased # L& LATIN SMALL LETTER AU A739 ; Changes_When_Titlecased # L& LATIN SMALL LETTER AV A73B ; Changes_When_Titlecased # L& LATIN SMALL LETTER AV WITH HORIZONTAL BAR A73D ; Changes_When_Titlecased # L& LATIN SMALL LETTER AY A73F ; Changes_When_Titlecased # L& LATIN SMALL LETTER REVERSED C WITH DOT A741 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH STROKE A743 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH DIAGONAL STROKE A745 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH STROKE AND DIAGONAL STROKE A747 ; Changes_When_Titlecased # L& LATIN SMALL LETTER BROKEN L A749 ; Changes_When_Titlecased # L& LATIN SMALL LETTER L WITH HIGH STROKE A74B ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH LONG STROKE OVERLAY A74D ; Changes_When_Titlecased # L& LATIN SMALL LETTER O WITH LOOP A74F ; Changes_When_Titlecased # L& LATIN SMALL LETTER OO A751 ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER A753 ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH FLOURISH A755 ; Changes_When_Titlecased # L& LATIN SMALL LETTER P WITH SQUIRREL TAIL A757 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Q WITH STROKE THROUGH DESCENDER A759 ; Changes_When_Titlecased # L& LATIN SMALL LETTER Q WITH DIAGONAL STROKE A75B ; Changes_When_Titlecased # L& LATIN SMALL LETTER R ROTUNDA A75D ; Changes_When_Titlecased # L& LATIN SMALL LETTER RUM ROTUNDA A75F ; Changes_When_Titlecased # L& LATIN SMALL LETTER V WITH DIAGONAL STROKE A761 ; Changes_When_Titlecased # L& LATIN SMALL LETTER VY A763 ; Changes_When_Titlecased # L& LATIN SMALL LETTER VISIGOTHIC Z A765 ; Changes_When_Titlecased # L& LATIN SMALL LETTER THORN WITH STROKE A767 ; Changes_When_Titlecased # L& LATIN SMALL LETTER THORN WITH STROKE THROUGH DESCENDER A769 ; Changes_When_Titlecased # L& LATIN SMALL LETTER VEND A76B ; Changes_When_Titlecased # L& LATIN SMALL LETTER ET A76D ; Changes_When_Titlecased # L& LATIN SMALL LETTER IS A76F ; Changes_When_Titlecased # L& LATIN SMALL LETTER CON A77A ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR D A77C ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR F A77F ; Changes_When_Titlecased # L& LATIN SMALL LETTER TURNED INSULAR G A781 ; Changes_When_Titlecased # L& LATIN SMALL LETTER TURNED L A783 ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR R A785 ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR S A787 ; Changes_When_Titlecased # L& LATIN SMALL LETTER INSULAR T A78C ; Changes_When_Titlecased # L& LATIN SMALL LETTER SALTILLO A791 ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH DESCENDER A793 ; Changes_When_Titlecased # L& LATIN SMALL LETTER C WITH BAR A797 ; Changes_When_Titlecased # L& LATIN SMALL LETTER B WITH FLOURISH A799 ; Changes_When_Titlecased # L& LATIN SMALL LETTER F WITH STROKE A79B ; Changes_When_Titlecased # L& LATIN SMALL LETTER VOLAPUK AE A79D ; Changes_When_Titlecased # L& LATIN SMALL LETTER VOLAPUK OE A79F ; Changes_When_Titlecased # L& LATIN SMALL LETTER VOLAPUK UE A7A1 ; Changes_When_Titlecased # L& LATIN SMALL LETTER G WITH OBLIQUE STROKE A7A3 ; Changes_When_Titlecased # L& LATIN SMALL LETTER K WITH OBLIQUE STROKE A7A5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER N WITH OBLIQUE STROKE A7A7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER R WITH OBLIQUE STROKE A7A9 ; Changes_When_Titlecased # L& LATIN SMALL LETTER S WITH OBLIQUE STROKE A7B5 ; Changes_When_Titlecased # L& LATIN SMALL LETTER BETA A7B7 ; Changes_When_Titlecased # L& LATIN SMALL LETTER OMEGA AB53 ; Changes_When_Titlecased # L& LATIN SMALL LETTER CHI AB70..ABBF ; Changes_When_Titlecased # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA FB00..FB06 ; Changes_When_Titlecased # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST FB13..FB17 ; Changes_When_Titlecased # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH FF41..FF5A ; Changes_When_Titlecased # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z 10428..1044F ; Changes_When_Titlecased # L& [40] DESERET SMALL LETTER LONG I..DESERET SMALL LETTER EW 104D8..104FB ; Changes_When_Titlecased # L& [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA 10CC0..10CF2 ; Changes_When_Titlecased # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US 118C0..118DF ; Changes_When_Titlecased # L& [32] WARANG CITI SMALL LETTER NGAA..WARANG CITI SMALL LETTER VIYO 1E922..1E943 ; Changes_When_Titlecased # L& [34] ADLAM SMALL LETTER ALIF..ADLAM SMALL LETTER SHA # Total code points: 1369 # ================================================ # Derived Property: Changes_When_Casefolded (CWCF) # Characters whose normalized forms are not stable under case folding. # For more information, see D142 in Section 3.13, "Default Case Algorithms". # Changes_When_Casefolded(X) is true when toCasefold(toNFD(X)) != toNFD(X) 0041..005A ; Changes_When_Casefolded # L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z 00B5 ; Changes_When_Casefolded # L& MICRO SIGN 00C0..00D6 ; Changes_When_Casefolded # L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS 00D8..00DF ; Changes_When_Casefolded # L& [8] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER SHARP S 0100 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH MACRON 0102 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE 0104 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH OGONEK 0106 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH ACUTE 0108 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH CIRCUMFLEX 010A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH DOT ABOVE 010C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH CARON 010E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH CARON 0110 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH STROKE 0112 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH MACRON 0114 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH BREVE 0116 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH DOT ABOVE 0118 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH OGONEK 011A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CARON 011C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH CIRCUMFLEX 011E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH BREVE 0120 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH DOT ABOVE 0122 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH CEDILLA 0124 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH CIRCUMFLEX 0126 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH STROKE 0128 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH TILDE 012A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH MACRON 012C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH BREVE 012E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH OGONEK 0130 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH DOT ABOVE 0132 ; Changes_When_Casefolded # L& LATIN CAPITAL LIGATURE IJ 0134 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER J WITH CIRCUMFLEX 0136 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH CEDILLA 0139 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH ACUTE 013B ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH CEDILLA 013D ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH CARON 013F ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH MIDDLE DOT 0141 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH STROKE 0143 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH ACUTE 0145 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH CEDILLA 0147 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH CARON 0149..014A ; Changes_When_Casefolded # L& [2] LATIN SMALL LETTER N PRECEDED BY APOSTROPHE..LATIN CAPITAL LETTER ENG 014C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH MACRON 014E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH BREVE 0150 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DOUBLE ACUTE 0152 ; Changes_When_Casefolded # L& LATIN CAPITAL LIGATURE OE 0154 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH ACUTE 0156 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH CEDILLA 0158 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH CARON 015A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH ACUTE 015C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH CIRCUMFLEX 015E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH CEDILLA 0160 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH CARON 0162 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH CEDILLA 0164 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH CARON 0166 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH STROKE 0168 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH TILDE 016A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH MACRON 016C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH BREVE 016E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH RING ABOVE 0170 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DOUBLE ACUTE 0172 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH OGONEK 0174 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH CIRCUMFLEX 0176 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH CIRCUMFLEX 0178..0179 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER Y WITH DIAERESIS..LATIN CAPITAL LETTER Z WITH ACUTE 017B ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH DOT ABOVE 017D ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH CARON 017F ; Changes_When_Casefolded # L& LATIN SMALL LETTER LONG S 0181..0182 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER B WITH HOOK..LATIN CAPITAL LETTER B WITH TOPBAR 0184 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TONE SIX 0186..0187 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER OPEN O..LATIN CAPITAL LETTER C WITH HOOK 0189..018B ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER AFRICAN D..LATIN CAPITAL LETTER D WITH TOPBAR 018E..0191 ; Changes_When_Casefolded # L& [4] LATIN CAPITAL LETTER REVERSED E..LATIN CAPITAL LETTER F WITH HOOK 0193..0194 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER G WITH HOOK..LATIN CAPITAL LETTER GAMMA 0196..0198 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER IOTA..LATIN CAPITAL LETTER K WITH HOOK 019C..019D ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER TURNED M..LATIN CAPITAL LETTER N WITH LEFT HOOK 019F..01A0 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER O WITH MIDDLE TILDE..LATIN CAPITAL LETTER O WITH HORN 01A2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER OI 01A4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH HOOK 01A6..01A7 ; Changes_When_Casefolded # L& [2] LATIN LETTER YR..LATIN CAPITAL LETTER TONE TWO 01A9 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER ESH 01AC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH HOOK 01AE..01AF ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER T WITH RETROFLEX HOOK..LATIN CAPITAL LETTER U WITH HORN 01B1..01B3 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER UPSILON..LATIN CAPITAL LETTER Y WITH HOOK 01B5 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH STROKE 01B7..01B8 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER EZH..LATIN CAPITAL LETTER EZH REVERSED 01BC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TONE FIVE 01C4..01C5 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER DZ WITH CARON..LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON 01C7..01C8 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER LJ..LATIN CAPITAL LETTER L WITH SMALL LETTER J 01CA..01CB ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER NJ..LATIN CAPITAL LETTER N WITH SMALL LETTER J 01CD ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CARON 01CF ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH CARON 01D1 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CARON 01D3 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH CARON 01D5 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON 01D7 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE 01D9 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON 01DB ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE 01DE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON 01E0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON 01E2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AE WITH MACRON 01E4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH STROKE 01E6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH CARON 01E8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH CARON 01EA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH OGONEK 01EC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH OGONEK AND MACRON 01EE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER EZH WITH CARON 01F1..01F2 ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER DZ..LATIN CAPITAL LETTER D WITH SMALL LETTER Z 01F4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH ACUTE 01F6..01F8 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER HWAIR..LATIN CAPITAL LETTER N WITH GRAVE 01FA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE 01FC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AE WITH ACUTE 01FE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH STROKE AND ACUTE 0200 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH DOUBLE GRAVE 0202 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH INVERTED BREVE 0204 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH DOUBLE GRAVE 0206 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH INVERTED BREVE 0208 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH DOUBLE GRAVE 020A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH INVERTED BREVE 020C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DOUBLE GRAVE 020E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH INVERTED BREVE 0210 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH DOUBLE GRAVE 0212 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH INVERTED BREVE 0214 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DOUBLE GRAVE 0216 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH INVERTED BREVE 0218 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH COMMA BELOW 021A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH COMMA BELOW 021C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER YOGH 021E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH CARON 0220 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH LONG RIGHT LEG 0222 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER OU 0224 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH HOOK 0226 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH DOT ABOVE 0228 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CEDILLA 022A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON 022C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH TILDE AND MACRON 022E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DOT ABOVE 0230 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON 0232 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH MACRON 023A..023B ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER A WITH STROKE..LATIN CAPITAL LETTER C WITH STROKE 023D..023E ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER L WITH BAR..LATIN CAPITAL LETTER T WITH DIAGONAL STROKE 0241 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER GLOTTAL STOP 0243..0246 ; Changes_When_Casefolded # L& [4] LATIN CAPITAL LETTER B WITH STROKE..LATIN CAPITAL LETTER E WITH STROKE 0248 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER J WITH STROKE 024A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL 024C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH STROKE 024E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH STROKE 0345 ; Changes_When_Casefolded # Mn COMBINING GREEK YPOGEGRAMMENI 0370 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER HETA 0372 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER ARCHAIC SAMPI 0376 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA 037F ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER YOT 0386 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER ALPHA WITH TONOS 0388..038A ; Changes_When_Casefolded # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS 038C ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER OMICRON WITH TONOS 038E..038F ; Changes_When_Casefolded # L& [2] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER OMEGA WITH TONOS 0391..03A1 ; Changes_When_Casefolded # L& [17] GREEK CAPITAL LETTER ALPHA..GREEK CAPITAL LETTER RHO 03A3..03AB ; Changes_When_Casefolded # L& [9] GREEK CAPITAL LETTER SIGMA..GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA 03C2 ; Changes_When_Casefolded # L& GREEK SMALL LETTER FINAL SIGMA 03CF..03D1 ; Changes_When_Casefolded # L& [3] GREEK CAPITAL KAI SYMBOL..GREEK THETA SYMBOL 03D5..03D6 ; Changes_When_Casefolded # L& [2] GREEK PHI SYMBOL..GREEK PI SYMBOL 03D8 ; Changes_When_Casefolded # L& GREEK LETTER ARCHAIC KOPPA 03DA ; Changes_When_Casefolded # L& GREEK LETTER STIGMA 03DC ; Changes_When_Casefolded # L& GREEK LETTER DIGAMMA 03DE ; Changes_When_Casefolded # L& GREEK LETTER KOPPA 03E0 ; Changes_When_Casefolded # L& GREEK LETTER SAMPI 03E2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER SHEI 03E4 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER FEI 03E6 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER KHEI 03E8 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER HORI 03EA ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER GANGIA 03EC ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER SHIMA 03EE ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DEI 03F0..03F1 ; Changes_When_Casefolded # L& [2] GREEK KAPPA SYMBOL..GREEK RHO SYMBOL 03F4..03F5 ; Changes_When_Casefolded # L& [2] GREEK CAPITAL THETA SYMBOL..GREEK LUNATE EPSILON SYMBOL 03F7 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER SHO 03F9..03FA ; Changes_When_Casefolded # L& [2] GREEK CAPITAL LUNATE SIGMA SYMBOL..GREEK CAPITAL LETTER SAN 03FD..042F ; Changes_When_Casefolded # L& [51] GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL..CYRILLIC CAPITAL LETTER YA 0460 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER OMEGA 0462 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER YAT 0464 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED E 0466 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER LITTLE YUS 0468 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS 046A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BIG YUS 046C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS 046E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KSI 0470 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER PSI 0472 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER FITA 0474 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IZHITSA 0476 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT 0478 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER UK 047A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ROUND OMEGA 047C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER OMEGA WITH TITLO 047E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER OT 0480 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOPPA 048A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SHORT I WITH TAIL 048C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SEMISOFT SIGN 048E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ER WITH TICK 0490 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER GHE WITH UPTURN 0492 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER GHE WITH STROKE 0494 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK 0496 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER 0498 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZE WITH DESCENDER 049A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KA WITH DESCENDER 049C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE 049E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KA WITH STROKE 04A0 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BASHKIR KA 04A2 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EN WITH DESCENDER 04A4 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LIGATURE EN GHE 04A6 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK 04A8 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ABKHASIAN HA 04AA ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ES WITH DESCENDER 04AC ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TE WITH DESCENDER 04AE ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER STRAIGHT U 04B0 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE 04B2 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER HA WITH DESCENDER 04B4 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LIGATURE TE TSE 04B6 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CHE WITH DESCENDER 04B8 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE 04BA ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SHHA 04BC ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ABKHASIAN CHE 04BE ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER 04C0..04C1 ; Changes_When_Casefolded # L& [2] CYRILLIC LETTER PALOCHKA..CYRILLIC CAPITAL LETTER ZHE WITH BREVE 04C3 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KA WITH HOOK 04C5 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EL WITH TAIL 04C7 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EN WITH HOOK 04C9 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EN WITH TAIL 04CB ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KHAKASSIAN CHE 04CD ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EM WITH TAIL 04D0 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER A WITH BREVE 04D2 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER A WITH DIAERESIS 04D4 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LIGATURE A IE 04D6 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IE WITH BREVE 04D8 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SCHWA 04DA ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS 04DC ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS 04DE ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS 04E0 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ABKHASIAN DZE 04E2 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER I WITH MACRON 04E4 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER I WITH DIAERESIS 04E6 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER O WITH DIAERESIS 04E8 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BARRED O 04EA ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS 04EC ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER E WITH DIAERESIS 04EE ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER U WITH MACRON 04F0 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER U WITH DIAERESIS 04F2 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE 04F4 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS 04F6 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER GHE WITH DESCENDER 04F8 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS 04FA ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK 04FC ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER HA WITH HOOK 04FE ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER HA WITH STROKE 0500 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI DE 0502 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI DJE 0504 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI ZJE 0506 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI DZJE 0508 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI LJE 050A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI NJE 050C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI SJE 050E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER KOMI TJE 0510 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER REVERSED ZE 0512 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EL WITH HOOK 0514 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER LHA 0516 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER RHA 0518 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER YAE 051A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER QA 051C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER WE 051E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ALEUT KA 0520 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK 0522 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK 0524 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER PE WITH DESCENDER 0526 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER 0528 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK 052A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DZZHE 052C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DCHE 052E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER EL WITH DESCENDER 0531..0556 ; Changes_When_Casefolded # L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH 0587 ; Changes_When_Casefolded # L& ARMENIAN SMALL LIGATURE ECH YIWN 10A0..10C5 ; Changes_When_Casefolded # L& [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE 10C7 ; Changes_When_Casefolded # L& GEORGIAN CAPITAL LETTER YN 10CD ; Changes_When_Casefolded # L& GEORGIAN CAPITAL LETTER AEN 13F8..13FD ; Changes_When_Casefolded # L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV 1C80..1C88 ; Changes_When_Casefolded # L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK 1E00 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH RING BELOW 1E02 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER B WITH DOT ABOVE 1E04 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER B WITH DOT BELOW 1E06 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER B WITH LINE BELOW 1E08 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE 1E0A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH DOT ABOVE 1E0C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH DOT BELOW 1E0E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH LINE BELOW 1E10 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH CEDILLA 1E12 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW 1E14 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH MACRON AND GRAVE 1E16 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH MACRON AND ACUTE 1E18 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW 1E1A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH TILDE BELOW 1E1C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE 1E1E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER F WITH DOT ABOVE 1E20 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH MACRON 1E22 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH DOT ABOVE 1E24 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH DOT BELOW 1E26 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH DIAERESIS 1E28 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH CEDILLA 1E2A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH BREVE BELOW 1E2C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH TILDE BELOW 1E2E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE 1E30 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH ACUTE 1E32 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH DOT BELOW 1E34 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH LINE BELOW 1E36 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH DOT BELOW 1E38 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON 1E3A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH LINE BELOW 1E3C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW 1E3E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER M WITH ACUTE 1E40 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER M WITH DOT ABOVE 1E42 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER M WITH DOT BELOW 1E44 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH DOT ABOVE 1E46 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH DOT BELOW 1E48 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH LINE BELOW 1E4A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW 1E4C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH TILDE AND ACUTE 1E4E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS 1E50 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH MACRON AND GRAVE 1E52 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH MACRON AND ACUTE 1E54 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH ACUTE 1E56 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH DOT ABOVE 1E58 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH DOT ABOVE 1E5A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH DOT BELOW 1E5C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON 1E5E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH LINE BELOW 1E60 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH DOT ABOVE 1E62 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH DOT BELOW 1E64 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE 1E66 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE 1E68 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE 1E6A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH DOT ABOVE 1E6C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH DOT BELOW 1E6E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH LINE BELOW 1E70 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW 1E72 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DIAERESIS BELOW 1E74 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH TILDE BELOW 1E76 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW 1E78 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH TILDE AND ACUTE 1E7A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS 1E7C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER V WITH TILDE 1E7E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER V WITH DOT BELOW 1E80 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH GRAVE 1E82 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH ACUTE 1E84 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH DIAERESIS 1E86 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH DOT ABOVE 1E88 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH DOT BELOW 1E8A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER X WITH DOT ABOVE 1E8C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER X WITH DIAERESIS 1E8E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH DOT ABOVE 1E90 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH CIRCUMFLEX 1E92 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH DOT BELOW 1E94 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH LINE BELOW 1E9A..1E9B ; Changes_When_Casefolded # L& [2] LATIN SMALL LETTER A WITH RIGHT HALF RING..LATIN SMALL LETTER LONG S WITH DOT ABOVE 1E9E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER SHARP S 1EA0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH DOT BELOW 1EA2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH HOOK ABOVE 1EA4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE 1EA6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE 1EA8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE 1EAA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE 1EAC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW 1EAE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE AND ACUTE 1EB0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE AND GRAVE 1EB2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE 1EB4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE AND TILDE 1EB6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW 1EB8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH DOT BELOW 1EBA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH HOOK ABOVE 1EBC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH TILDE 1EBE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE 1EC0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE 1EC2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE 1EC4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE 1EC6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW 1EC8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH HOOK ABOVE 1ECA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER I WITH DOT BELOW 1ECC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH DOT BELOW 1ECE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HOOK ABOVE 1ED0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE 1ED2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE 1ED4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE 1ED6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE 1ED8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW 1EDA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HORN AND ACUTE 1EDC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HORN AND GRAVE 1EDE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE 1EE0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HORN AND TILDE 1EE2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW 1EE4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH DOT BELOW 1EE6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HOOK ABOVE 1EE8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HORN AND ACUTE 1EEA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HORN AND GRAVE 1EEC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE 1EEE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HORN AND TILDE 1EF0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW 1EF2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH GRAVE 1EF4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH DOT BELOW 1EF6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH HOOK ABOVE 1EF8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH TILDE 1EFA ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER MIDDLE-WELSH LL 1EFC ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER MIDDLE-WELSH V 1EFE ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Y WITH LOOP 1F08..1F0F ; Changes_When_Casefolded # L& [8] GREEK CAPITAL LETTER ALPHA WITH PSILI..GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI 1F18..1F1D ; Changes_When_Casefolded # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA 1F28..1F2F ; Changes_When_Casefolded # L& [8] GREEK CAPITAL LETTER ETA WITH PSILI..GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI 1F38..1F3F ; Changes_When_Casefolded # L& [8] GREEK CAPITAL LETTER IOTA WITH PSILI..GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI 1F48..1F4D ; Changes_When_Casefolded # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA 1F59 ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER UPSILON WITH DASIA 1F5B ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA 1F5D ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA 1F5F ; Changes_When_Casefolded # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI 1F68..1F6F ; Changes_When_Casefolded # L& [8] GREEK CAPITAL LETTER OMEGA WITH PSILI..GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI 1F80..1FAF ; Changes_When_Casefolded # L& [48] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI 1FB2..1FB4 ; Changes_When_Casefolded # L& [3] GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI 1FB7..1FBC ; Changes_When_Casefolded # L& [6] GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI 1FC2..1FC4 ; Changes_When_Casefolded # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI 1FC7..1FCC ; Changes_When_Casefolded # L& [6] GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI 1FD8..1FDB ; Changes_When_Casefolded # L& [4] GREEK CAPITAL LETTER IOTA WITH VRACHY..GREEK CAPITAL LETTER IOTA WITH OXIA 1FE8..1FEC ; Changes_When_Casefolded # L& [5] GREEK CAPITAL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA 1FF2..1FF4 ; Changes_When_Casefolded # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI 1FF7..1FFC ; Changes_When_Casefolded # L& [6] GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI 2126 ; Changes_When_Casefolded # L& OHM SIGN 212A..212B ; Changes_When_Casefolded # L& [2] KELVIN SIGN..ANGSTROM SIGN 2132 ; Changes_When_Casefolded # L& TURNED CAPITAL F 2160..216F ; Changes_When_Casefolded # Nl [16] ROMAN NUMERAL ONE..ROMAN NUMERAL ONE THOUSAND 2183 ; Changes_When_Casefolded # L& ROMAN NUMERAL REVERSED ONE HUNDRED 24B6..24CF ; Changes_When_Casefolded # So [26] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN CAPITAL LETTER Z 2C00..2C2E ; Changes_When_Casefolded # L& [47] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE 2C60 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH DOUBLE BAR 2C62..2C64 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER L WITH MIDDLE TILDE..LATIN CAPITAL LETTER R WITH TAIL 2C67 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER H WITH DESCENDER 2C69 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH DESCENDER 2C6B ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Z WITH DESCENDER 2C6D..2C70 ; Changes_When_Casefolded # L& [4] LATIN CAPITAL LETTER ALPHA..LATIN CAPITAL LETTER TURNED ALPHA 2C72 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER W WITH HOOK 2C75 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER HALF H 2C7E..2C80 ; Changes_When_Casefolded # L& [3] LATIN CAPITAL LETTER S WITH SWASH TAIL..COPTIC CAPITAL LETTER ALFA 2C82 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER VIDA 2C84 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER GAMMA 2C86 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DALDA 2C88 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER EIE 2C8A ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER SOU 2C8C ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER ZATA 2C8E ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER HATE 2C90 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER THETHE 2C92 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER IAUDA 2C94 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER KAPA 2C96 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER LAULA 2C98 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER MI 2C9A ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER NI 2C9C ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER KSI 2C9E ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER O 2CA0 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER PI 2CA2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER RO 2CA4 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER SIMA 2CA6 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER TAU 2CA8 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER UA 2CAA ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER FI 2CAC ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER KHI 2CAE ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER PSI 2CB0 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OOU 2CB2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DIALECT-P ALEF 2CB4 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC AIN 2CB6 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE 2CB8 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DIALECT-P KAPA 2CBA ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DIALECT-P NI 2CBC ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI 2CBE ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC OOU 2CC0 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER SAMPI 2CC2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER CROSSED SHEI 2CC4 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC SHEI 2CC6 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC ESH 2CC8 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER AKHMIMIC KHEI 2CCA ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER DIALECT-P HORI 2CCC ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC HORI 2CCE ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC HA 2CD0 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER L-SHAPED HA 2CD2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC HEI 2CD4 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC HAT 2CD6 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC GANGIA 2CD8 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC DJA 2CDA ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD COPTIC SHIMA 2CDC ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD NUBIAN SHIMA 2CDE ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD NUBIAN NGI 2CE0 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD NUBIAN NYI 2CE2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER OLD NUBIAN WAU 2CEB ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI 2CED ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA 2CF2 ; Changes_When_Casefolded # L& COPTIC CAPITAL LETTER BOHAIRIC KHEI A640 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZEMLYA A642 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DZELO A644 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER REVERSED DZE A646 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTA A648 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DJERV A64A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER MONOGRAPH UK A64C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BROAD OMEGA A64E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER NEUTRAL YER A650 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER YERU WITH BACK YER A652 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED YAT A654 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER REVERSED YU A656 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED A A658 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS A65A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BLENDED YUS A65C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS A65E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER YN A660 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER REVERSED TSE A662 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SOFT DE A664 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SOFT EL A666 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SOFT EM A668 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER MONOCULAR O A66A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER BINOCULAR O A66C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O A680 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DWE A682 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DZWE A684 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER ZHWE A686 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CCHE A688 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DZZE A68A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK A68C ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TWE A68E ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TSWE A690 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TSSE A692 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER TCHE A694 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER HWE A696 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER SHWE A698 ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER DOUBLE O A69A ; Changes_When_Casefolded # L& CYRILLIC CAPITAL LETTER CROSSED O A722 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF A724 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER EGYPTOLOGICAL AIN A726 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER HENG A728 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TZ A72A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TRESILLO A72C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER CUATRILLO A72E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER CUATRILLO WITH COMMA A732 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AA A734 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AO A736 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AU A738 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AV A73A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR A73C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER AY A73E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER REVERSED C WITH DOT A740 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH STROKE A742 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH DIAGONAL STROKE A744 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE A746 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER BROKEN L A748 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER L WITH HIGH STROKE A74A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY A74C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER O WITH LOOP A74E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER OO A750 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER A752 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH FLOURISH A754 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER P WITH SQUIRREL TAIL A756 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER A758 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE A75A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R ROTUNDA A75C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER RUM ROTUNDA A75E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER V WITH DIAGONAL STROKE A760 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VY A762 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VISIGOTHIC Z A764 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER THORN WITH STROKE A766 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER A768 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VEND A76A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER ET A76C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER IS A76E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER CON A779 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER INSULAR D A77B ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER INSULAR F A77D..A77E ; Changes_When_Casefolded # L& [2] LATIN CAPITAL LETTER INSULAR G..LATIN CAPITAL LETTER TURNED INSULAR G A780 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TURNED L A782 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER INSULAR R A784 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER INSULAR S A786 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER INSULAR T A78B ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER SALTILLO A78D ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER TURNED H A790 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH DESCENDER A792 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER C WITH BAR A796 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER B WITH FLOURISH A798 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER F WITH STROKE A79A ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VOLAPUK AE A79C ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VOLAPUK OE A79E ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER VOLAPUK UE A7A0 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER G WITH OBLIQUE STROKE A7A2 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER K WITH OBLIQUE STROKE A7A4 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER N WITH OBLIQUE STROKE A7A6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER R WITH OBLIQUE STROKE A7A8 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER S WITH OBLIQUE STROKE A7AA..A7AE ; Changes_When_Casefolded # L& [5] LATIN CAPITAL LETTER H WITH HOOK..LATIN CAPITAL LETTER SMALL CAPITAL I A7B0..A7B4 ; Changes_When_Casefolded # L& [5] LATIN CAPITAL LETTER TURNED K..LATIN CAPITAL LETTER BETA A7B6 ; Changes_When_Casefolded # L& LATIN CAPITAL LETTER OMEGA AB70..ABBF ; Changes_When_Casefolded # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA FB00..FB06 ; Changes_When_Casefolded # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST FB13..FB17 ; Changes_When_Casefolded # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH FF21..FF3A ; Changes_When_Casefolded # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z 10400..10427 ; Changes_When_Casefolded # L& [40] DESERET CAPITAL LETTER LONG I..DESERET CAPITAL LETTER EW 104B0..104D3 ; Changes_When_Casefolded # L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA 10C80..10CB2 ; Changes_When_Casefolded # L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US 118A0..118BF ; Changes_When_Casefolded # L& [32] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI CAPITAL LETTER VIYO 1E900..1E921 ; Changes_When_Casefolded # L& [34] ADLAM CAPITAL LETTER ALIF..ADLAM CAPITAL LETTER SHA # Total code points: 1377 # ================================================ # Derived Property: Changes_When_Casemapped (CWCM) # Characters whose normalized forms are not stable under case mapping. # For more information, see D143 in Section 3.13, "Default Case Algorithms". # Changes_When_Casemapped(X) is true when CWL(X), or CWT(X), or CWU(X) 0041..005A ; Changes_When_Casemapped # L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z 0061..007A ; Changes_When_Casemapped # L& [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z 00B5 ; Changes_When_Casemapped # L& MICRO SIGN 00C0..00D6 ; Changes_When_Casemapped # L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS 00D8..00F6 ; Changes_When_Casemapped # L& [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS 00F8..0137 ; Changes_When_Casemapped # L& [64] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER K WITH CEDILLA 0139..018C ; Changes_When_Casemapped # L& [84] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER D WITH TOPBAR 018E..019A ; Changes_When_Casemapped # L& [13] LATIN CAPITAL LETTER REVERSED E..LATIN SMALL LETTER L WITH BAR 019C..01A9 ; Changes_When_Casemapped # L& [14] LATIN CAPITAL LETTER TURNED M..LATIN CAPITAL LETTER ESH 01AC..01B9 ; Changes_When_Casemapped # L& [14] LATIN CAPITAL LETTER T WITH HOOK..LATIN SMALL LETTER EZH REVERSED 01BC..01BD ; Changes_When_Casemapped # L& [2] LATIN CAPITAL LETTER TONE FIVE..LATIN SMALL LETTER TONE FIVE 01BF ; Changes_When_Casemapped # L& LATIN LETTER WYNN 01C4..0220 ; Changes_When_Casemapped # L& [93] LATIN CAPITAL LETTER DZ WITH CARON..LATIN CAPITAL LETTER N WITH LONG RIGHT LEG 0222..0233 ; Changes_When_Casemapped # L& [18] LATIN CAPITAL LETTER OU..LATIN SMALL LETTER Y WITH MACRON 023A..0254 ; Changes_When_Casemapped # L& [27] LATIN CAPITAL LETTER A WITH STROKE..LATIN SMALL LETTER OPEN O 0256..0257 ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER D WITH TAIL..LATIN SMALL LETTER D WITH HOOK 0259 ; Changes_When_Casemapped # L& LATIN SMALL LETTER SCHWA 025B..025C ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER OPEN E..LATIN SMALL LETTER REVERSED OPEN E 0260..0261 ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER G WITH HOOK..LATIN SMALL LETTER SCRIPT G 0263 ; Changes_When_Casemapped # L& LATIN SMALL LETTER GAMMA 0265..0266 ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER TURNED H..LATIN SMALL LETTER H WITH HOOK 0268..026C ; Changes_When_Casemapped # L& [5] LATIN SMALL LETTER I WITH STROKE..LATIN SMALL LETTER L WITH BELT 026F ; Changes_When_Casemapped # L& LATIN SMALL LETTER TURNED M 0271..0272 ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER M WITH HOOK..LATIN SMALL LETTER N WITH LEFT HOOK 0275 ; Changes_When_Casemapped # L& LATIN SMALL LETTER BARRED O 027D ; Changes_When_Casemapped # L& LATIN SMALL LETTER R WITH TAIL 0280 ; Changes_When_Casemapped # L& LATIN LETTER SMALL CAPITAL R 0283 ; Changes_When_Casemapped # L& LATIN SMALL LETTER ESH 0287..028C ; Changes_When_Casemapped # L& [6] LATIN SMALL LETTER TURNED T..LATIN SMALL LETTER TURNED V 0292 ; Changes_When_Casemapped # L& LATIN SMALL LETTER EZH 029D..029E ; Changes_When_Casemapped # L& [2] LATIN SMALL LETTER J WITH CROSSED-TAIL..LATIN SMALL LETTER TURNED K 0345 ; Changes_When_Casemapped # Mn COMBINING GREEK YPOGEGRAMMENI 0370..0373 ; Changes_When_Casemapped # L& [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI 0376..0377 ; Changes_When_Casemapped # L& [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA 037B..037D ; Changes_When_Casemapped # L& [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL 037F ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER YOT 0386 ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER ALPHA WITH TONOS 0388..038A ; Changes_When_Casemapped # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS 038C ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER OMICRON WITH TONOS 038E..03A1 ; Changes_When_Casemapped # L& [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO 03A3..03D1 ; Changes_When_Casemapped # L& [47] GREEK CAPITAL LETTER SIGMA..GREEK THETA SYMBOL 03D5..03F5 ; Changes_When_Casemapped # L& [33] GREEK PHI SYMBOL..GREEK LUNATE EPSILON SYMBOL 03F7..03FB ; Changes_When_Casemapped # L& [5] GREEK CAPITAL LETTER SHO..GREEK SMALL LETTER SAN 03FD..0481 ; Changes_When_Casemapped # L& [133] GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL..CYRILLIC SMALL LETTER KOPPA 048A..052F ; Changes_When_Casemapped # L& [166] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER EL WITH DESCENDER 0531..0556 ; Changes_When_Casemapped # L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH 0561..0587 ; Changes_When_Casemapped # L& [39] ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LIGATURE ECH YIWN 10A0..10C5 ; Changes_When_Casemapped # L& [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE 10C7 ; Changes_When_Casemapped # L& GEORGIAN CAPITAL LETTER YN 10CD ; Changes_When_Casemapped # L& GEORGIAN CAPITAL LETTER AEN 13A0..13F5 ; Changes_When_Casemapped # L& [86] CHEROKEE LETTER A..CHEROKEE LETTER MV 13F8..13FD ; Changes_When_Casemapped # L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV 1C80..1C88 ; Changes_When_Casemapped # L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK 1D79 ; Changes_When_Casemapped # L& LATIN SMALL LETTER INSULAR G 1D7D ; Changes_When_Casemapped # L& LATIN SMALL LETTER P WITH STROKE 1E00..1E9B ; Changes_When_Casemapped # L& [156] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER LONG S WITH DOT ABOVE 1E9E ; Changes_When_Casemapped # L& LATIN CAPITAL LETTER SHARP S 1EA0..1F15 ; Changes_When_Casemapped # L& [118] LATIN CAPITAL LETTER A WITH DOT BELOW..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA 1F18..1F1D ; Changes_When_Casemapped # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA 1F20..1F45 ; Changes_When_Casemapped # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA 1F48..1F4D ; Changes_When_Casemapped # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA 1F50..1F57 ; Changes_When_Casemapped # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI 1F59 ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER UPSILON WITH DASIA 1F5B ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA 1F5D ; Changes_When_Casemapped # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA 1F5F..1F7D ; Changes_When_Casemapped # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA 1F80..1FB4 ; Changes_When_Casemapped # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI 1FB6..1FBC ; Changes_When_Casemapped # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI 1FBE ; Changes_When_Casemapped # L& GREEK PROSGEGRAMMENI 1FC2..1FC4 ; Changes_When_Casemapped # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI 1FC6..1FCC ; Changes_When_Casemapped # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI 1FD0..1FD3 ; Changes_When_Casemapped # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA 1FD6..1FDB ; Changes_When_Casemapped # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA 1FE0..1FEC ; Changes_When_Casemapped # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA 1FF2..1FF4 ; Changes_When_Casemapped # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI 1FF6..1FFC ; Changes_When_Casemapped # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI 2126 ; Changes_When_Casemapped # L& OHM SIGN 212A..212B ; Changes_When_Casemapped # L& [2] KELVIN SIGN..ANGSTROM SIGN 2132 ; Changes_When_Casemapped # L& TURNED CAPITAL F 214E ; Changes_When_Casemapped # L& TURNED SMALL F 2160..217F ; Changes_When_Casemapped # Nl [32] ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND 2183..2184 ; Changes_When_Casemapped # L& [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C 24B6..24E9 ; Changes_When_Casemapped # So [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z 2C00..2C2E ; Changes_When_Casemapped # L& [47] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE 2C30..2C5E ; Changes_When_Casemapped # L& [47] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE 2C60..2C70 ; Changes_When_Casemapped # L& [17] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN CAPITAL LETTER TURNED ALPHA 2C72..2C73 ; Changes_When_Casemapped # L& [2] LATIN CAPITAL LETTER W WITH HOOK..LATIN SMALL LETTER W WITH HOOK 2C75..2C76 ; Changes_When_Casemapped # L& [2] LATIN CAPITAL LETTER HALF H..LATIN SMALL LETTER HALF H 2C7E..2CE3 ; Changes_When_Casemapped # L& [102] LATIN CAPITAL LETTER S WITH SWASH TAIL..COPTIC SMALL LETTER OLD NUBIAN WAU 2CEB..2CEE ; Changes_When_Casemapped # L& [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA 2CF2..2CF3 ; Changes_When_Casemapped # L& [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI 2D00..2D25 ; Changes_When_Casemapped # L& [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE 2D27 ; Changes_When_Casemapped # L& GEORGIAN SMALL LETTER YN 2D2D ; Changes_When_Casemapped # L& GEORGIAN SMALL LETTER AEN A640..A66D ; Changes_When_Casemapped # L& [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O A680..A69B ; Changes_When_Casemapped # L& [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O A722..A72F ; Changes_When_Casemapped # L& [14] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CUATRILLO WITH COMMA A732..A76F ; Changes_When_Casemapped # L& [62] LATIN CAPITAL LETTER AA..LATIN SMALL LETTER CON A779..A787 ; Changes_When_Casemapped # L& [15] LATIN CAPITAL LETTER INSULAR D..LATIN SMALL LETTER INSULAR T A78B..A78D ; Changes_When_Casemapped # L& [3] LATIN CAPITAL LETTER SALTILLO..LATIN CAPITAL LETTER TURNED H A790..A793 ; Changes_When_Casemapped # L& [4] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER C WITH BAR A796..A7AE ; Changes_When_Casemapped # L& [25] LATIN CAPITAL LETTER B WITH FLOURISH..LATIN CAPITAL LETTER SMALL CAPITAL I A7B0..A7B7 ; Changes_When_Casemapped # L& [8] LATIN CAPITAL LETTER TURNED K..LATIN SMALL LETTER OMEGA AB53 ; Changes_When_Casemapped # L& LATIN SMALL LETTER CHI AB70..ABBF ; Changes_When_Casemapped # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA FB00..FB06 ; Changes_When_Casemapped # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST FB13..FB17 ; Changes_When_Casemapped # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH FF21..FF3A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z FF41..FF5A ; Changes_When_Casemapped # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z 10400..1044F ; Changes_When_Casemapped # L& [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW 104B0..104D3 ; Changes_When_Casemapped # L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA 104D8..104FB ; Changes_When_Casemapped # L& [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA 10C80..10CB2 ; Changes_When_Casemapped # L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US 10CC0..10CF2 ; Changes_When_Casemapped # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US 118A0..118DF ; Changes_When_Casemapped # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO 1E900..1E943 ; Changes_When_Casemapped # L& [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA # Total code points: 2669 # ================================================ # Derived Property: ID_Start # Characters that can start an identifier. # Generated from: # Lu + Ll + Lt + Lm + Lo + Nl # + Other_ID_Start # - Pattern_Syntax # - Pattern_White_Space # NOTE: See UAX #31 for more information 0041..005A ; ID_Start # L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z 0061..007A ; ID_Start # L& [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z 00AA ; ID_Start # Lo FEMININE ORDINAL INDICATOR 00B5 ; ID_Start # L& MICRO SIGN 00BA ; ID_Start # Lo MASCULINE ORDINAL INDICATOR 00C0..00D6 ; ID_Start # L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS 00D8..00F6 ; ID_Start # L& [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS 00F8..01BA ; ID_Start # L& [195] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL 01BB ; ID_Start # Lo LATIN LETTER TWO WITH STROKE 01BC..01BF ; ID_Start # L& [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN 01C0..01C3 ; ID_Start # Lo [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK 01C4..0293 ; ID_Start # L& [208] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER EZH WITH CURL 0294 ; ID_Start # Lo LATIN LETTER GLOTTAL STOP 0295..02AF ; ID_Start # L& [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL 02B0..02C1 ; ID_Start # Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP 02C6..02D1 ; ID_Start # Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON 02E0..02E4 ; ID_Start # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP 02EC ; ID_Start # Lm MODIFIER LETTER VOICING 02EE ; ID_Start # Lm MODIFIER LETTER DOUBLE APOSTROPHE 0370..0373 ; ID_Start # L& [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI 0374 ; ID_Start # Lm GREEK NUMERAL SIGN 0376..0377 ; ID_Start # L& [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA 037A ; ID_Start # Lm GREEK YPOGEGRAMMENI 037B..037D ; ID_Start # L& [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL 037F ; ID_Start # L& GREEK CAPITAL LETTER YOT 0386 ; ID_Start # L& GREEK CAPITAL LETTER ALPHA WITH TONOS 0388..038A ; ID_Start # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS 038C ; ID_Start # L& GREEK CAPITAL LETTER OMICRON WITH TONOS 038E..03A1 ; ID_Start # L& [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO 03A3..03F5 ; ID_Start # L& [83] GREEK CAPITAL LETTER SIGMA..GREEK LUNATE EPSILON SYMBOL 03F7..0481 ; ID_Start # L& [139] GREEK CAPITAL LETTER SHO..CYRILLIC SMALL LETTER KOPPA 048A..052F ; ID_Start # L& [166] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER EL WITH DESCENDER 0531..0556 ; ID_Start # L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH 0559 ; ID_Start # Lm ARMENIAN MODIFIER LETTER LEFT HALF RING 0561..0587 ; ID_Start # L& [39] ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LIGATURE ECH YIWN 05D0..05EA ; ID_Start # Lo [27] HEBREW LETTER ALEF..HEBREW LETTER TAV 05F0..05F2 ; ID_Start # Lo [3] HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW LIGATURE YIDDISH DOUBLE YOD 0620..063F ; ID_Start # Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE 0640 ; ID_Start # Lm ARABIC TATWEEL 0641..064A ; ID_Start # Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH 066E..066F ; ID_Start # Lo [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF 0671..06D3 ; ID_Start # Lo [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE 06D5 ; ID_Start # Lo ARABIC LETTER AE 06E5..06E6 ; ID_Start # Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH 06EE..06EF ; ID_Start # Lo [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V 06FA..06FC ; ID_Start # Lo [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW 06FF ; ID_Start # Lo ARABIC LETTER HEH WITH INVERTED V 0710 ; ID_Start # Lo SYRIAC LETTER ALAPH 0712..072F ; ID_Start # Lo [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH 074D..07A5 ; ID_Start # Lo [89] SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER WAAVU 07B1 ; ID_Start # Lo THAANA LETTER NAA 07CA..07EA ; ID_Start # Lo [33] NKO LETTER A..NKO LETTER JONA RA 07F4..07F5 ; ID_Start # Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE 07FA ; ID_Start # Lm NKO LAJANYALAN 0800..0815 ; ID_Start # Lo [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF 081A ; ID_Start # Lm SAMARITAN MODIFIER LETTER EPENTHETIC YUT 0824 ; ID_Start # Lm SAMARITAN MODIFIER LETTER SHORT A 0828 ; ID_Start # Lm SAMARITAN MODIFIER LETTER I 0840..0858 ; ID_Start # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN 0860..086A ; ID_Start # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA 08A0..08B4 ; ID_Start # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW 08B6..08BD ; ID_Start # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON 0904..0939 ; ID_Start # Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA 093D ; ID_Start # Lo DEVANAGARI SIGN AVAGRAHA 0950 ; ID_Start # Lo DEVANAGARI OM 0958..0961 ; ID_Start # Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL 0971 ; ID_Start # Lm DEVANAGARI SIGN HIGH SPACING DOT 0972..0980 ; ID_Start # Lo [15] DEVANAGARI LETTER CANDRA A..BENGALI ANJI 0985..098C ; ID_Start # Lo [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L 098F..0990 ; ID_Start # Lo [2] BENGALI LETTER E..BENGALI LETTER AI 0993..09A8 ; ID_Start # Lo [22] BENGALI LETTER O..BENGALI LETTER NA 09AA..09B0 ; ID_Start # Lo [7] BENGALI LETTER PA..BENGALI LETTER RA 09B2 ; ID_Start # Lo BENGALI LETTER LA 09B6..09B9 ; ID_Start # Lo [4] BENGALI LETTER SHA..BENGALI LETTER HA 09BD ; ID_Start # Lo BENGALI SIGN AVAGRAHA 09CE ; ID_Start # Lo BENGALI LETTER KHANDA TA 09DC..09DD ; ID_Start # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA 09DF..09E1 ; ID_Start # Lo [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL 09F0..09F1 ; ID_Start # Lo [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL 09FC ; ID_Start # Lo BENGALI LETTER VEDIC ANUSVARA 0A05..0A0A ; ID_Start # Lo [6] GURMUKHI LETTER A..GURMUKHI LETTER UU 0A0F..0A10 ; ID_Start # Lo [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI 0A13..0A28 ; ID_Start # Lo [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA 0A2A..0A30 ; ID_Start # Lo [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA 0A32..0A33 ; ID_Start # Lo [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA 0A35..0A36 ; ID_Start # Lo [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA 0A38..0A39 ; ID_Start # Lo [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA 0A59..0A5C ; ID_Start # Lo [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA 0A5E ; ID_Start # Lo GURMUKHI LETTER FA 0A72..0A74 ; ID_Start # Lo [3] GURMUKHI IRI..GURMUKHI EK ONKAR 0A85..0A8D ; ID_Start # Lo [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E 0A8F..0A91 ; ID_Start # Lo [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O 0A93..0AA8 ; ID_Start # Lo [22] GUJARATI LETTER O..GUJARATI LETTER NA 0AAA..0AB0 ; ID_Start # Lo [7] GUJARATI LETTER PA..GUJARATI LETTER RA 0AB2..0AB3 ; ID_Start # Lo [2] GUJARATI LETTER LA..GUJARATI LETTER LLA 0AB5..0AB9 ; ID_Start # Lo [5] GUJARATI LETTER VA..GUJARATI LETTER HA 0ABD ; ID_Start # Lo GUJARATI SIGN AVAGRAHA 0AD0 ; ID_Start # Lo GUJARATI OM 0AE0..0AE1 ; ID_Start # Lo [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL 0AF9 ; ID_Start # Lo GUJARATI LETTER ZHA 0B05..0B0C ; ID_Start # Lo [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L 0B0F..0B10 ; ID_Start # Lo [2] ORIYA LETTER E..ORIYA LETTER AI 0B13..0B28 ; ID_Start # Lo [22] ORIYA LETTER O..ORIYA LETTER NA 0B2A..0B30 ; ID_Start # Lo [7] ORIYA LETTER PA..ORIYA LETTER RA 0B32..0B33 ; ID_Start # Lo [2] ORIYA LETTER LA..ORIYA LETTER LLA 0B35..0B39 ; ID_Start # Lo [5] ORIYA LETTER VA..ORIYA LETTER HA 0B3D ; ID_Start # Lo ORIYA SIGN AVAGRAHA 0B5C..0B5D ; ID_Start # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA 0B5F..0B61 ; ID_Start # Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL 0B71 ; ID_Start # Lo ORIYA LETTER WA 0B83 ; ID_Start # Lo TAMIL SIGN VISARGA 0B85..0B8A ; ID_Start # Lo [6] TAMIL LETTER A..TAMIL LETTER UU 0B8E..0B90 ; ID_Start # Lo [3] TAMIL LETTER E..TAMIL LETTER AI 0B92..0B95 ; ID_Start # Lo [4] TAMIL LETTER O..TAMIL LETTER KA 0B99..0B9A ; ID_Start # Lo [2] TAMIL LETTER NGA..TAMIL LETTER CA 0B9C ; ID_Start # Lo TAMIL LETTER JA 0B9E..0B9F ; ID_Start # Lo [2] TAMIL LETTER NYA..TAMIL LETTER TTA 0BA3..0BA4 ; ID_Start # Lo [2] TAMIL LETTER NNA..TAMIL LETTER TA 0BA8..0BAA ; ID_Start # Lo [3] TAMIL LETTER NA..TAMIL LETTER PA 0BAE..0BB9 ; ID_Start # Lo [12] TAMIL LETTER MA..TAMIL LETTER HA 0BD0 ; ID_Start # Lo TAMIL OM 0C05..0C0C ; ID_Start # Lo [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L 0C0E..0C10 ; ID_Start # Lo [3] TELUGU LETTER E..TELUGU LETTER AI 0C12..0C28 ; ID_Start # Lo [23] TELUGU LETTER O..TELUGU LETTER NA 0C2A..0C39 ; ID_Start # Lo [16] TELUGU LETTER PA..TELUGU LETTER HA 0C3D ; ID_Start # Lo TELUGU SIGN AVAGRAHA 0C58..0C5A ; ID_Start # Lo [3] TELUGU LETTER TSA..TELUGU LETTER RRRA 0C60..0C61 ; ID_Start # Lo [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL 0C80 ; ID_Start # Lo KANNADA SIGN SPACING CANDRABINDU 0C85..0C8C ; ID_Start # Lo [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L 0C8E..0C90 ; ID_Start # Lo [3] KANNADA LETTER E..KANNADA LETTER AI 0C92..0CA8 ; ID_Start # Lo [23] KANNADA LETTER O..KANNADA LETTER NA 0CAA..0CB3 ; ID_Start # Lo [10] KANNADA LETTER PA..KANNADA LETTER LLA 0CB5..0CB9 ; ID_Start # Lo [5] KANNADA LETTER VA..KANNADA LETTER HA 0CBD ; ID_Start # Lo KANNADA SIGN AVAGRAHA 0CDE ; ID_Start # Lo KANNADA LETTER FA 0CE0..0CE1 ; ID_Start # Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL 0CF1..0CF2 ; ID_Start # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA 0D05..0D0C ; ID_Start # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L 0D0E..0D10 ; ID_Start # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI 0D12..0D3A ; ID_Start # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA 0D3D ; ID_Start # Lo MALAYALAM SIGN AVAGRAHA 0D4E ; ID_Start # Lo MALAYALAM LETTER DOT REPH 0D54..0D56 ; ID_Start # Lo [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL 0D5F..0D61 ; ID_Start # Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL 0D7A..0D7F ; ID_Start # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K 0D85..0D96 ; ID_Start # Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA 0D9A..0DB1 ; ID_Start # Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA 0DB3..0DBB ; ID_Start # Lo [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA 0DBD ; ID_Start # Lo SINHALA LETTER DANTAJA LAYANNA 0DC0..0DC6 ; ID_Start # Lo [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA 0E01..0E30 ; ID_Start # Lo [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A 0E32..0E33 ; ID_Start # Lo [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM 0E40..0E45 ; ID_Start # Lo [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO 0E46 ; ID_Start # Lm THAI CHARACTER MAIYAMOK 0E81..0E82 ; ID_Start # Lo [2] LAO LETTER KO..LAO LETTER KHO SUNG 0E84 ; ID_Start # Lo LAO LETTER KHO TAM 0E87..0E88 ; ID_Start # Lo [2] LAO LETTER NGO..LAO LETTER CO 0E8A ; ID_Start # Lo LAO LETTER SO TAM 0E8D ; ID_Start # Lo LAO LETTER NYO 0E94..0E97 ; ID_Start # Lo [4] LAO LETTER DO..LAO LETTER THO TAM 0E99..0E9F ; ID_Start # Lo [7] LAO LETTER NO..LAO LETTER FO SUNG 0EA1..0EA3 ; ID_Start # Lo [3] LAO LETTER MO..LAO LETTER LO LING 0EA5 ; ID_Start # Lo LAO LETTER LO LOOT 0EA7 ; ID_Start # Lo LAO LETTER WO 0EAA..0EAB ; ID_Start # Lo [2] LAO LETTER SO SUNG..LAO LETTER HO SUNG 0EAD..0EB0 ; ID_Start # Lo [4] LAO LETTER O..LAO VOWEL SIGN A 0EB2..0EB3 ; ID_Start # Lo [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM 0EBD ; ID_Start # Lo LAO SEMIVOWEL SIGN NYO 0EC0..0EC4 ; ID_Start # Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI 0EC6 ; ID_Start # Lm LAO KO LA 0EDC..0EDF ; ID_Start # Lo [4] LAO HO NO..LAO LETTER KHMU NYO 0F00 ; ID_Start # Lo TIBETAN SYLLABLE OM 0F40..0F47 ; ID_Start # Lo [8] TIBETAN LETTER KA..TIBETAN LETTER JA 0F49..0F6C ; ID_Start # Lo [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA 0F88..0F8C ; ID_Start # Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN 1000..102A ; ID_Start # Lo [43] MYANMAR LETTER KA..MYANMAR LETTER AU 103F ; ID_Start # Lo MYANMAR LETTER GREAT SA 1050..1055 ; ID_Start # Lo [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL 105A..105D ; ID_Start # Lo [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE 1061 ; ID_Start # Lo MYANMAR LETTER SGAW KAREN SHA 1065..1066 ; ID_Start # Lo [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA 106E..1070 ; ID_Start # Lo [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA 1075..1081 ; ID_Start # Lo [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA 108E ; ID_Start # Lo MYANMAR LETTER RUMAI PALAUNG FA 10A0..10C5 ; ID_Start # L& [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE 10C7 ; ID_Start # L& GEORGIAN CAPITAL LETTER YN 10CD ; ID_Start # L& GEORGIAN CAPITAL LETTER AEN 10D0..10FA ; ID_Start # Lo [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN 10FC ; ID_Start # Lm MODIFIER LETTER GEORGIAN NAR 10FD..1248 ; ID_Start # Lo [332] GEORGIAN LETTER AEN..ETHIOPIC SYLLABLE QWA 124A..124D ; ID_Start # Lo [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE 1250..1256 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO 1258 ; ID_Start # Lo ETHIOPIC SYLLABLE QHWA 125A..125D ; ID_Start # Lo [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE 1260..1288 ; ID_Start # Lo [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA 128A..128D ; ID_Start # Lo [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE 1290..12B0 ; ID_Start # Lo [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA 12B2..12B5 ; ID_Start # Lo [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE 12B8..12BE ; ID_Start # Lo [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO 12C0 ; ID_Start # Lo ETHIOPIC SYLLABLE KXWA 12C2..12C5 ; ID_Start # Lo [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE 12C8..12D6 ; ID_Start # Lo [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O 12D8..1310 ; ID_Start # Lo [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA 1312..1315 ; ID_Start # Lo [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE 1318..135A ; ID_Start # Lo [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA 1380..138F ; ID_Start # Lo [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE 13A0..13F5 ; ID_Start # L& [86] CHEROKEE LETTER A..CHEROKEE LETTER MV 13F8..13FD ; ID_Start # L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV 1401..166C ; ID_Start # Lo [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA 166F..167F ; ID_Start # Lo [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W 1681..169A ; ID_Start # Lo [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH 16A0..16EA ; ID_Start # Lo [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X 16EE..16F0 ; ID_Start # Nl [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL 16F1..16F8 ; ID_Start # Lo [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC 1700..170C ; ID_Start # Lo [13] TAGALOG LETTER A..TAGALOG LETTER YA 170E..1711 ; ID_Start # Lo [4] TAGALOG LETTER LA..TAGALOG LETTER HA 1720..1731 ; ID_Start # Lo [18] HANUNOO LETTER A..HANUNOO LETTER HA 1740..1751 ; ID_Start # Lo [18] BUHID LETTER A..BUHID LETTER HA 1760..176C ; ID_Start # Lo [13] TAGBANWA LETTER A..TAGBANWA LETTER YA 176E..1770 ; ID_Start # Lo [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA 1780..17B3 ; ID_Start # Lo [52] KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU 17D7 ; ID_Start # Lm KHMER SIGN LEK TOO 17DC ; ID_Start # Lo KHMER SIGN AVAKRAHASANYA 1820..1842 ; ID_Start # Lo [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI 1843 ; ID_Start # Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN 1844..1877 ; ID_Start # Lo [52] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER MANCHU ZHA 1880..1884 ; ID_Start # Lo [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA 1885..1886 ; ID_Start # Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA 1887..18A8 ; ID_Start # Lo [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA 18AA ; ID_Start # Lo MONGOLIAN LETTER MANCHU ALI GALI LHA 18B0..18F5 ; ID_Start # Lo [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S 1900..191E ; ID_Start # Lo [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA 1950..196D ; ID_Start # Lo [30] TAI LE LETTER KA..TAI LE LETTER AI 1970..1974 ; ID_Start # Lo [5] TAI LE LETTER TONE-2..TAI LE LETTER TONE-6 1980..19AB ; ID_Start # Lo [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA 19B0..19C9 ; ID_Start # Lo [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2 1A00..1A16 ; ID_Start # Lo [23] BUGINESE LETTER KA..BUGINESE LETTER HA 1A20..1A54 ; ID_Start # Lo [53] TAI THAM LETTER HIGH KA..TAI THAM LETTER GREAT SA 1AA7 ; ID_Start # Lm TAI THAM SIGN MAI YAMOK 1B05..1B33 ; ID_Start # Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA 1B45..1B4B ; ID_Start # Lo [7] BALINESE LETTER KAF SASAK..BALINESE LETTER ASYURA SASAK 1B83..1BA0 ; ID_Start # Lo [30] SUNDANESE LETTER A..SUNDANESE LETTER HA 1BAE..1BAF ; ID_Start # Lo [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA 1BBA..1BE5 ; ID_Start # Lo [44] SUNDANESE AVAGRAHA..BATAK LETTER U 1C00..1C23 ; ID_Start # Lo [36] LEPCHA LETTER KA..LEPCHA LETTER A 1C4D..1C4F ; ID_Start # Lo [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA 1C5A..1C77 ; ID_Start # Lo [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH 1C78..1C7D ; ID_Start # Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD 1C80..1C88 ; ID_Start # L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK 1CE9..1CEC ; ID_Start # Lo [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL 1CEE..1CF1 ; ID_Start # Lo [4] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ANUSVARA UBHAYATO MUKHA 1CF5..1CF6 ; ID_Start # Lo [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA 1D00..1D2B ; ID_Start # L& [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL 1D2C..1D6A ; ID_Start # Lm [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI 1D6B..1D77 ; ID_Start # L& [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G 1D78 ; ID_Start # Lm MODIFIER LETTER CYRILLIC EN 1D79..1D9A ; ID_Start # L& [34] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK 1D9B..1DBF ; ID_Start # Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA 1E00..1F15 ; ID_Start # L& [278] LATIN CAPITAL LETTER A WITH RING BELOW..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA 1F18..1F1D ; ID_Start # L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA 1F20..1F45 ; ID_Start # L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA 1F48..1F4D ; ID_Start # L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA 1F50..1F57 ; ID_Start # L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI 1F59 ; ID_Start # L& GREEK CAPITAL LETTER UPSILON WITH DASIA 1F5B ; ID_Start # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA 1F5D ; ID_Start # L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA 1F5F..1F7D ; ID_Start # L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA 1F80..1FB4 ; ID_Start # L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI 1FB6..1FBC ; ID_Start # L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI 1FBE ; ID_Start # L& GREEK PROSGEGRAMMENI 1FC2..1FC4 ; ID_Start # L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI 1FC6..1FCC ; ID_Start # L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI 1FD0..1FD3 ; ID_Start # L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA 1FD6..1FDB ; ID_Start # L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA 1FE0..1FEC ; ID_Start # L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA 1FF2..1FF4 ; ID_Start # L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI 1FF6..1FFC ; ID_Start # L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI 2071 ; ID_Start # Lm SUPERSCRIPT LATIN SMALL LETTER I 207F ; ID_Start # Lm SUPERSCRIPT LATIN SMALL LETTER N 2090..209C ; ID_Start # Lm [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T 2102 ; ID_Start # L& DOUBLE-STRUCK CAPITAL C 2107 ; ID_Start # L& EULER CONSTANT 210A..2113 ; ID_Start # L& [10] SCRIPT SMALL G..SCRIPT SMALL L 2115 ; ID_Start # L& DOUBLE-STRUCK CAPITAL N 2118 ; ID_Start # Sm SCRIPT CAPITAL P 2119..211D ; ID_Start # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R 2124 ; ID_Start # L& DOUBLE-STRUCK CAPITAL Z 2126 ; ID_Start # L& OHM SIGN 2128 ; ID_Start # L& BLACK-LETTER CAPITAL Z 212A..212D ; ID_Start # L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C 212E ; ID_Start # So ESTIMATED SYMBOL 212F..2134 ; ID_Start # L& [6] SCRIPT SMALL E..SCRIPT SMALL O 2135..2138 ; ID_Start # Lo [4] ALEF SYMBOL..DALET SYMBOL 2139 ; ID_Start # L& INFORMATION SOURCE 213C..213F ; ID_Start # L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI 2145..2149 ; ID_Start # L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J 214E ; ID_Start # L& TURNED SMALL F 2160..2182 ; ID_Start # Nl [35] ROMAN NUMERAL ONE..ROMAN NUMERAL TEN THOUSAND 2183..2184 ; ID_Start # L& [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C 2185..2188 ; ID_Start # Nl [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND 2C00..2C2E ; ID_Start # L& [47] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE 2C30..2C5E ; ID_Start # L& [47] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE 2C60..2C7B ; ID_Start # L& [28] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN LETTER SMALL CAPITAL TURNED E 2C7C..2C7D ; ID_Start # Lm [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V 2C7E..2CE4 ; ID_Start # L& [103] LATIN CAPITAL LETTER S WITH SWASH TAIL..COPTIC SYMBOL KAI 2CEB..2CEE ; ID_Start # L& [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA 2CF2..2CF3 ; ID_Start # L& [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI 2D00..2D25 ; ID_Start # L& [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE 2D27 ; ID_Start # L& GEORGIAN SMALL LETTER YN 2D2D ; ID_Start # L& GEORGIAN SMALL LETTER AEN 2D30..2D67 ; ID_Start # Lo [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO 2D6F ; ID_Start # Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK 2D80..2D96 ; ID_Start # Lo [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE 2DA0..2DA6 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO 2DA8..2DAE ; ID_Start # Lo [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO 2DB0..2DB6 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO 2DB8..2DBE ; ID_Start # Lo [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO 2DC0..2DC6 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO 2DC8..2DCE ; ID_Start # Lo [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO 2DD0..2DD6 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO 2DD8..2DDE ; ID_Start # Lo [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO 3005 ; ID_Start # Lm IDEOGRAPHIC ITERATION MARK 3006 ; ID_Start # Lo IDEOGRAPHIC CLOSING MARK 3007 ; ID_Start # Nl IDEOGRAPHIC NUMBER ZERO 3021..3029 ; ID_Start # Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE 3031..3035 ; ID_Start # Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF 3038..303A ; ID_Start # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY 303B ; ID_Start # Lm VERTICAL IDEOGRAPHIC ITERATION MARK 303C ; ID_Start # Lo MASU MARK 3041..3096 ; ID_Start # Lo [86] HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE 309B..309C ; ID_Start # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK 309D..309E ; ID_Start # Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK 309F ; ID_Start # Lo HIRAGANA DIGRAPH YORI 30A1..30FA ; ID_Start # Lo [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO 30FC..30FE ; ID_Start # Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK 30FF ; ID_Start # Lo KATAKANA DIGRAPH KOTO 3105..312E ; ID_Start # Lo [42] BOPOMOFO LETTER B..BOPOMOFO LETTER O WITH DOT ABOVE 3131..318E ; ID_Start # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE 31A0..31BA ; ID_Start # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY 31F0..31FF ; ID_Start # Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO 3400..4DB5 ; ID_Start # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5 4E00..9FEA ; ID_Start # Lo [20971] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEA A000..A014 ; ID_Start # Lo [21] YI SYLLABLE IT..YI SYLLABLE E A015 ; ID_Start # Lm YI SYLLABLE WU A016..A48C ; ID_Start # Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR A4D0..A4F7 ; ID_Start # Lo [40] LISU LETTER BA..LISU LETTER OE A4F8..A4FD ; ID_Start # Lm [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU A500..A60B ; ID_Start # Lo [268] VAI SYLLABLE EE..VAI SYLLABLE NG A60C ; ID_Start # Lm VAI SYLLABLE LENGTHENER A610..A61F ; ID_Start # Lo [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG A62A..A62B ; ID_Start # Lo [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO A640..A66D ; ID_Start # L& [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O A66E ; ID_Start # Lo CYRILLIC LETTER MULTIOCULAR O A67F ; ID_Start # Lm CYRILLIC PAYEROK A680..A69B ; ID_Start # L& [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O A69C..A69D ; ID_Start # Lm [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN A6A0..A6E5 ; ID_Start # Lo [70] BAMUM LETTER A..BAMUM LETTER KI A6E6..A6EF ; ID_Start # Nl [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM A717..A71F ; ID_Start # Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK A722..A76F ; ID_Start # L& [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON A770 ; ID_Start # Lm MODIFIER LETTER US A771..A787 ; ID_Start # L& [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T A788 ; ID_Start # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT A78B..A78E ; ID_Start # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT A78F ; ID_Start # Lo LATIN LETTER SINOLOGICAL DOT A790..A7AE ; ID_Start # L& [31] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN CAPITAL LETTER SMALL CAPITAL I A7B0..A7B7 ; ID_Start # L& [8] LATIN CAPITAL LETTER TURNED K..LATIN SMALL LETTER OMEGA A7F7 ; ID_Start # Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I A7F8..A7F9 ; ID_Start # Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE A7FA ; ID_Start # L& LATIN LETTER SMALL CAPITAL TURNED M A7FB..A801 ; ID_Start # Lo [7] LATIN EPIGRAPHIC LETTER REVERSED F..SYLOTI NAGRI LETTER I A803..A805 ; ID_Start # Lo [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O A807..A80A ; ID_Start # Lo [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO A80C..A822 ; ID_Start # Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO A840..A873 ; ID_Start # Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU A882..A8B3 ; ID_Start # Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA A8F2..A8F7 ; ID_Start # Lo [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA A8FB ; ID_Start # Lo DEVANAGARI HEADSTROKE A8FD ; ID_Start # Lo DEVANAGARI JAIN OM A90A..A925 ; ID_Start # Lo [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO A930..A946 ; ID_Start # Lo [23] REJANG LETTER KA..REJANG LETTER A A960..A97C ; ID_Start # Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH A984..A9B2 ; ID_Start # Lo [47] JAVANESE LETTER A..JAVANESE LETTER HA A9CF ; ID_Start # Lm JAVANESE PANGRANGKEP A9E0..A9E4 ; ID_Start # Lo [5] MYANMAR LETTER SHAN GHA..MYANMAR LETTER SHAN BHA A9E6 ; ID_Start # Lm MYANMAR MODIFIER LETTER SHAN REDUPLICATION A9E7..A9EF ; ID_Start # Lo [9] MYANMAR LETTER TAI LAING NYA..MYANMAR LETTER TAI LAING NNA A9FA..A9FE ; ID_Start # Lo [5] MYANMAR LETTER TAI LAING LLA..MYANMAR LETTER TAI LAING BHA AA00..AA28 ; ID_Start # Lo [41] CHAM LETTER A..CHAM LETTER HA AA40..AA42 ; ID_Start # Lo [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG AA44..AA4B ; ID_Start # Lo [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS AA60..AA6F ; ID_Start # Lo [16] MYANMAR LETTER KHAMTI GA..MYANMAR LETTER KHAMTI FA AA70 ; ID_Start # Lm MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION AA71..AA76 ; ID_Start # Lo [6] MYANMAR LETTER KHAMTI XA..MYANMAR LOGOGRAM KHAMTI HM AA7A ; ID_Start # Lo MYANMAR LETTER AITON RA AA7E..AAAF ; ID_Start # Lo [50] MYANMAR LETTER SHWE PALAUNG CHA..TAI VIET LETTER HIGH O AAB1 ; ID_Start # Lo TAI VIET VOWEL AA AAB5..AAB6 ; ID_Start # Lo [2] TAI VIET VOWEL E..TAI VIET VOWEL O AAB9..AABD ; ID_Start # Lo [5] TAI VIET VOWEL UEA..TAI VIET VOWEL AN AAC0 ; ID_Start # Lo TAI VIET TONE MAI NUENG AAC2 ; ID_Start # Lo TAI VIET TONE MAI SONG AADB..AADC ; ID_Start # Lo [2] TAI VIET SYMBOL KON..TAI VIET SYMBOL NUENG AADD ; ID_Start # Lm TAI VIET SYMBOL SAM AAE0..AAEA ; ID_Start # Lo [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA AAF2 ; ID_Start # Lo MEETEI MAYEK ANJI AAF3..AAF4 ; ID_Start # Lm [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK AB01..AB06 ; ID_Start # Lo [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO AB09..AB0E ; ID_Start # Lo [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO AB11..AB16 ; ID_Start # Lo [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO AB20..AB26 ; ID_Start # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO AB28..AB2E ; ID_Start # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO AB30..AB5A ; ID_Start # L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG AB5C..AB5F ; ID_Start # Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK AB60..AB65 ; ID_Start # L& [6] LATIN SMALL LETTER SAKHA YAT..GREEK LETTER SMALL CAPITAL OMEGA AB70..ABBF ; ID_Start # L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA ABC0..ABE2 ; ID_Start # Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM AC00..D7A3 ; ID_Start # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH D7B0..D7C6 ; ID_Start # Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E D7CB..D7FB ; ID_Start # Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH F900..FA6D ; ID_Start # Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D FA70..FAD9 ; ID_Start # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9 FB00..FB06 ; ID_Start # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST FB13..FB17 ; ID_Start # L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH FB1D ; ID_Start # Lo HEBREW LETTER YOD WITH HIRIQ FB1F..FB28 ; ID_Start # Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV FB2A..FB36 ; ID_Start # Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH FB38..FB3C ; ID_Start # Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH FB3E ; ID_Start # Lo HEBREW LETTER MEM WITH DAGESH FB40..FB41 ; ID_Start # Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH FB43..FB44 ; ID_Start # Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH FB46..FBB1 ; ID_Start # Lo [108] HEBREW LETTER TSADI WITH DAGESH..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM FBD3..FD3D ; ID_Start # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM FD50..FD8F ; ID_Start # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM FD92..FDC7 ; ID_Start # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM FDF0..FDFB ; ID_Start # Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU FE70..FE74 ; ID_Start # Lo [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM FE76..FEFC ; ID_Start # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM FF21..FF3A ; ID_Start # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z FF41..FF5A ; ID_Start # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z FF66..FF6F ; ID_Start # Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU FF70 ; ID_Start # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK FF71..FF9D ; ID_Start # Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N FF9E..FF9F ; ID_Start # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK FFA0..FFBE ; ID_Start # Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH FFC2..FFC7 ; ID_Start # Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E FFCA..FFCF ; ID_Start # Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE FFD2..FFD7 ; ID_Start # Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU FFDA..FFDC ; ID_Start # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I 10000..1000B ; ID_Start # Lo [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE 1000D..10026 ; ID_Start # Lo [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO 10028..1003A ; ID_Start # Lo [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO 1003C..1003D ; ID_Start # Lo [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE 1003F..1004D ; ID_Start # Lo [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO 10050..1005D ; ID_Start # Lo [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089 10080..100FA ; ID_Start # Lo [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305 10140..10174 ; ID_Start # Nl [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS 10280..1029C ; ID_Start # Lo [29] LYCIAN LETTER A..LYCIAN LETTER X 102A0..102D0 ; ID_Start # Lo [49] CARIAN LETTER A..CARIAN LETTER UUU3 10300..1031F ; ID_Start # Lo [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS 1032D..10340 ; ID_Start # Lo [20] OLD ITALIC LETTER YE..GOTHIC LETTER PAIRTHRA 10341 ; ID_Start # Nl GOTHIC LETTER NINETY 10342..10349 ; ID_Start # Lo [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL 1034A ; ID_Start # Nl GOTHIC LETTER NINE HUNDRED 10350..10375 ; ID_Start # Lo [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA 10380..1039D ; ID_Start # Lo [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU 103A0..103C3 ; ID_Start # Lo [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA 103C8..103CF ; ID_Start # Lo [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH 103D1..103D5 ; ID_Start # Nl [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED 10400..1044F ; ID_Start # L& [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW 10450..1049D ; ID_Start # Lo [78] SHAVIAN LETTER PEEP..OSMANYA LETTER OO 104B0..104D3 ; ID_Start # L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA 104D8..104FB ; ID_Start # L& [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA 10500..10527 ; ID_Start # Lo [40] ELBASAN LETTER A..ELBASAN LETTER KHE 10530..10563 ; ID_Start # Lo [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW 10600..10736 ; ID_Start # Lo [311] LINEAR A SIGN AB001..LINEAR A SIGN A664 10740..10755 ; ID_Start # Lo [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE 10760..10767 ; ID_Start # Lo [8] LINEAR A SIGN A800..LINEAR A SIGN A807 10800..10805 ; ID_Start # Lo [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA 10808 ; ID_Start # Lo CYPRIOT SYLLABLE JO 1080A..10835 ; ID_Start # Lo [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO 10837..10838 ; ID_Start # Lo [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE 1083C ; ID_Start # Lo CYPRIOT SYLLABLE ZA 1083F..10855 ; ID_Start # Lo [23] CYPRIOT SYLLABLE ZO..IMPERIAL ARAMAIC LETTER TAW 10860..10876 ; ID_Start # Lo [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW 10880..1089E ; ID_Start # Lo [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW 108E0..108F2 ; ID_Start # Lo [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH 108F4..108F5 ; ID_Start # Lo [2] HATRAN LETTER SHIN..HATRAN LETTER TAW 10900..10915 ; ID_Start # Lo [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU 10920..10939 ; ID_Start # Lo [26] LYDIAN LETTER A..LYDIAN LETTER C 10980..109B7 ; ID_Start # Lo [56] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC CURSIVE LETTER DA 109BE..109BF ; ID_Start # Lo [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN 10A00 ; ID_Start # Lo KHAROSHTHI LETTER A 10A10..10A13 ; ID_Start # Lo [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA 10A15..10A17 ; ID_Start # Lo [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA 10A19..10A33 ; ID_Start # Lo [27] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER TTTHA 10A60..10A7C ; ID_Start # Lo [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH 10A80..10A9C ; ID_Start # Lo [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH 10AC0..10AC7 ; ID_Start # Lo [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW 10AC9..10AE4 ; ID_Start # Lo [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW 10B00..10B35 ; ID_Start # Lo [54] AVESTAN LETTER A..AVESTAN LETTER HE 10B40..10B55 ; ID_Start # Lo [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW 10B60..10B72 ; ID_Start # Lo [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW 10B80..10B91 ; ID_Start # Lo [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW 10C00..10C48 ; ID_Start # Lo [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH 10C80..10CB2 ; ID_Start # L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US 10CC0..10CF2 ; ID_Start # L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US 11003..11037 ; ID_Start # Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA 11083..110AF ; ID_Start # Lo [45] KAITHI LETTER A..KAITHI LETTER HA 110D0..110E8 ; ID_Start # Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE 11103..11126 ; ID_Start # Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA 11150..11172 ; ID_Start # Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA 11176 ; ID_Start # Lo MAHAJANI LIGATURE SHRI 11183..111B2 ; ID_Start # Lo [48] SHARADA LETTER A..SHARADA LETTER HA 111C1..111C4 ; ID_Start # Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM 111DA ; ID_Start # Lo SHARADA EKAM 111DC ; ID_Start # Lo SHARADA HEADSTROKE 11200..11211 ; ID_Start # Lo [18] KHOJKI LETTER A..KHOJKI LETTER JJA 11213..1122B ; ID_Start # Lo [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA 11280..11286 ; ID_Start # Lo [7] MULTANI LETTER A..MULTANI LETTER GA 11288 ; ID_Start # Lo MULTANI LETTER GHA 1128A..1128D ; ID_Start # Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA 1128F..1129D ; ID_Start # Lo [15] MULTANI LETTER NYA..MULTANI LETTER BA 1129F..112A8 ; ID_Start # Lo [10] MULTANI LETTER BHA..MULTANI LETTER RHA 112B0..112DE ; ID_Start # Lo [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA 11305..1130C ; ID_Start # Lo [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L 1130F..11310 ; ID_Start # Lo [2] GRANTHA LETTER EE..GRANTHA LETTER AI 11313..11328 ; ID_Start # Lo [22] GRANTHA LETTER OO..GRANTHA LETTER NA 1132A..11330 ; ID_Start # Lo [7] GRANTHA LETTER PA..GRANTHA LETTER RA 11332..11333 ; ID_Start # Lo [2] GRANTHA LETTER LA..GRANTHA LETTER LLA 11335..11339 ; ID_Start # Lo [5] GRANTHA LETTER VA..GRANTHA LETTER HA 1133D ; ID_Start # Lo GRANTHA SIGN AVAGRAHA 11350 ; ID_Start # Lo GRANTHA OM 1135D..11361 ; ID_Start # Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL 11400..11434 ; ID_Start # Lo [53] NEWA LETTER A..NEWA LETTER HA 11447..1144A ; ID_Start # Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI 11480..114AF ; ID_Start # Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA 114C4..114C5 ; ID_Start # Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG 114C7 ; ID_Start # Lo TIRHUTA OM 11580..115AE ; ID_Start # Lo [47] SIDDHAM LETTER A..SIDDHAM LETTER HA 115D8..115DB ; ID_Start # Lo [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U 11600..1162F ; ID_Start # Lo [48] MODI LETTER A..MODI LETTER LLA 11644 ; ID_Start # Lo MODI SIGN HUVA 11680..116AA ; ID_Start # Lo [43] TAKRI LETTER A..TAKRI LETTER RRA 11700..11719 ; ID_Start # Lo [26] AHOM LETTER KA..AHOM LETTER JHA 118A0..118DF ; ID_Start # L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO 118FF ; ID_Start # Lo WARANG CITI OM 11A00 ; ID_Start # Lo ZANABAZAR SQUARE LETTER A 11A0B..11A32 ; ID_Start # Lo [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA 11A3A ; ID_Start # Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA 11A50 ; ID_Start # Lo SOYOMBO LETTER A 11A5C..11A83 ; ID_Start # Lo [40] SOYOMBO LETTER KA..SOYOMBO LETTER KSSA 11A86..11A89 ; ID_Start # Lo [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA 11AC0..11AF8 ; ID_Start # Lo [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL 11C00..11C08 ; ID_Start # Lo [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L 11C0A..11C2E ; ID_Start # Lo [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA 11C40 ; ID_Start # Lo BHAIKSUKI SIGN AVAGRAHA 11C72..11C8F ; ID_Start # Lo [30] MARCHEN LETTER KA..MARCHEN LETTER A 11D00..11D06 ; ID_Start # Lo [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E 11D08..11D09 ; ID_Start # Lo [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O 11D0B..11D30 ; ID_Start # Lo [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA 11D46 ; ID_Start # Lo MASARAM GONDI REPHA 12000..12399 ; ID_Start # Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U 12400..1246E ; ID_Start # Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM 12480..12543 ; ID_Start # Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU 13000..1342E ; ID_Start # Lo [1071] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032 14400..14646 ; ID_Start # Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 16800..16A38 ; ID_Start # Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ 16A40..16A5E ; ID_Start # Lo [31] MRO LETTER TA..MRO LETTER TEK 16AD0..16AED ; ID_Start # Lo [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I 16B00..16B2F ; ID_Start # Lo [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU 16B40..16B43 ; ID_Start # Lm [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM 16B63..16B77 ; ID_Start # Lo [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS 16B7D..16B8F ; ID_Start # Lo [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ 16F00..16F44 ; ID_Start # Lo [69] MIAO LETTER PA..MIAO LETTER HHA 16F50 ; ID_Start # Lo MIAO LETTER NASALIZATION 16F93..16F9F ; ID_Start # Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 16FE0..16FE1 ; ID_Start # Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK 17000..187EC ; ID_Start # Lo [6125] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187EC 18800..18AF2 ; ID_Start # Lo [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755 1B000..1B11E ; ID_Start # Lo [287] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER N-MU-MO-2 1B170..1B2FB ; ID_Start # Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB 1BC00..1BC6A ; ID_Start # Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M 1BC70..1BC7C ; ID_Start # Lo [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK 1BC80..1BC88 ; ID_Start # Lo [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL 1BC90..1BC99 ; ID_Start # Lo [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW 1D400..1D454 ; ID_Start # L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G 1D456..1D49C ; ID_Start # L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A 1D49E..1D49F ; ID_Start # L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D 1D4A2 ; ID_Start # L& MATHEMATICAL SCRIPT CAPITAL G 1D4A5..1D4A6 ; ID_Start # L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K 1D4A9..1D4AC ; ID_Start # L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q 1D4AE..1D4B9 ; ID_Start # L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D 1D4BB ; ID_Start # L& MATHEMATICAL SCRIPT SMALL F 1D4BD..1D4C3 ; ID_Start # L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N 1D4C5..1D505 ; ID_Start # L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B 1D507..1D50A ; ID_Start # L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G 1D50D..1D514 ; ID_Start # L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q 1D516..1D51C ; ID_Start # L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y 1D51E..1D539 ; ID_Start # L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B 1D53B..1D53E ; ID_Start # L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G 1D540..1D544 ; ID_Start # L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M 1D546 ; ID_Start # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O 1D54A..1D550 ; ID_Start # L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y 1D552..1D6A5 ; ID_Start # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J 1D6A8..1D6C0 ; ID_Start # L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA 1D6C2..1D6DA ; ID_Start # L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA 1D6DC..1D6FA ; ID_Start # L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA 1D6FC..1D714 ; ID_Start # L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA 1D716..1D734 ; ID_Start # L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA 1D736..1D74E ; ID_Start # L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA 1D750..1D76E ; ID_Start # L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA 1D770..1D788 ; ID_Start # L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA 1D78A..1D7A8 ; ID_Start # L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA 1D7AA..1D7C2 ; ID_Start # L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA 1D7C4..1D7CB ; ID_Start # L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA 1E800..1E8C4 ; ID_Start # Lo [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON 1E900..1E943 ; ID_Start # L& [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA 1EE00..1EE03 ; ID_Start # Lo [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL 1EE05..1EE1F ; ID_Start # Lo [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF 1EE21..1EE22 ; ID_Start # Lo [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM 1EE24 ; ID_Start # Lo ARABIC MATHEMATICAL INITIAL HEH 1EE27 ; ID_Start # Lo ARABIC MATHEMATICAL INITIAL HAH 1EE29..1EE32 ; ID_Start # Lo [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF 1EE34..1EE37 ; ID_Start # Lo [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH 1EE39 ; ID_Start # Lo ARABIC MATHEMATICAL INITIAL DAD 1EE3B ; ID_Start # Lo ARABIC MATHEMATICAL INITIAL GHAIN 1EE42 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED JEEM 1EE47 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED HAH 1EE49 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED YEH 1EE4B ; ID_Start # Lo ARABIC MATHEMATICAL TAILED LAM 1EE4D..1EE4F ; ID_Start # Lo [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN 1EE51..1EE52 ; ID_Start # Lo [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF 1EE54 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED SHEEN 1EE57 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED KHAH 1EE59 ; ID_Start # Lo ARABIC MATHEMATICAL TAILED DAD 1EE5B ; ID_Start # Lo ARABIC MATHEMATICAL TAILED GHAIN 1EE5D ; ID_Start # Lo ARABIC MATHEMATICAL TAILED DOTLESS NOON 1EE5F ; ID_Start # Lo ARABIC MATHEMATICAL TAILED DOTLESS QAF 1EE61..1EE62 ; ID_Start # Lo [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM 1EE64 ; ID_Start # Lo ARABIC MATHEMATICAL STRETCHED HEH 1EE67..1EE6A ; ID_Start # Lo [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF 1EE6C..1EE72 ; ID_Start # Lo [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF 1EE74..1EE77 ; ID_Start # Lo [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH 1EE79..1EE7C ; ID_Start # Lo [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH 1EE7E ; ID_Start # Lo ARABIC MATHEMATICAL STRETCHED DOTLESS FEH 1EE80..1EE89 ; ID_Start # Lo [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH 1EE8B..1EE9B ; ID_Start # Lo [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN 1EEA1..1EEA3 ; ID_Start # Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL 1EEA5..1EEA9 ; ID_Start # Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH 1EEAB..1EEBB ; ID_Start # Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN 20000..2A6D6 ; ID_Start # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6 2A700..2B734 ; ID_Start # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 2B740..2B81D ; ID_Start # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B820..2CEA1 ; ID_Start # Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 2CEB0..2EBE0 ; ID_Start # Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 2F800..2FA1D ; ID_Start # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D # Total code points: 125334 # ================================================ # Derived Property: ID_Continue # Characters that can continue an identifier. # Generated from: # ID_Start # + Mn + Mc + Nd + Pc # + Other_ID_Continue # - Pattern_Syntax # - Pattern_White_Space # NOTE: See UAX #31 for more information 0030..0039 ; ID_Continue # Nd [10] DIGIT ZERO..DIGIT NINE 0041..005A ; ID_Continue # L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z 005F ; ID_Continue # Pc LOW LINE 0061..007A ; ID_Continue # L& [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z 00AA ; ID_Continue # Lo FEMININE ORDINAL INDICATOR 00B5 ; ID_Continue # L& MICRO SIGN 00B7 ; ID_Continue # Po MIDDLE DOT 00BA ; ID_Continue # Lo MASCULINE ORDINAL INDICATOR 00C0..00D6 ; ID_Continue # L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS 00D8..00F6 ; ID_Continue # L& [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS 00F8..01BA ; ID_Continue # L& [195] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL 01BB ; ID_Continue # Lo LATIN LETTER TWO WITH STROKE 01BC..01BF ; ID_Continue # L& [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN 01C0..01C3 ; ID_Continue # Lo [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK 01C4..0293 ; ID_Continue # L& [208] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER EZH WITH CURL 0294 ; ID_Continue # Lo LATIN LETTER GLOTTAL STOP 0295..02AF ; ID_Continue # L& [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL 02B0..02C1 ; ID_Continue # Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP 02C6..02D1 ; ID_Continue # Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON 02E0..02E4 ; ID_Continue # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP 02EC ; ID_Continue # Lm MODIFIER LETTER VOICING 02EE ; ID_Continue # Lm MODIFIER LETTER DOUBLE APOSTROPHE 0300..036F ; ID_Continue # Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X 0370..0373 ; ID_Continue # L& [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI 0374 ; ID_Continue # Lm GREEK NUMERAL SIGN 0376..0377 ; ID_Continue # L& [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA 037A ; ID_Continue # Lm GREEK YPOGEGRAMMENI 037B..037D ; ID_Continue # L& [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL 037F ; ID_Continue # L& GREEK CAPITAL LETTER YOT 0386 ; ID_Continue # L& GREEK CAPITAL LETTER ALPHA WITH TONOS 0387 ; ID_Continue # Po GREEK ANO TELEIA 0388..038A ; ID_Continue # L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS 038C ; ID_Continue # L& GREEK CAPITAL LETTER OMICRON WITH TONOS 038E..03A1 ; ID_Continue # L& [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO 03A3..03F5 ; ID_Continue # L& [83] GREEK CAPITAL LETTER SIGMA..GREEK LUNATE EPSILON SYMBOL 03F7..0481 ; ID_Continue # L& [139] GREEK CAPITAL LETTER SHO..CYRILLIC SMALL LETTER KOPPA 0483..0487 ; ID_Continue # Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE 048A..052F ; ID_Continue # L& [166] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER EL WITH DESCENDER 0531..0556 ; ID_Continue # L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH 0559 ; ID_Continue # Lm ARMENIAN MODIFIER LETTER LEFT HALF RING 0561..0587 ; ID_Continue # L& [39] ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LIGATURE ECH YIWN 0591..05BD ; ID_Continue # Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG 05BF ; ID_Continue # Mn HEBREW POINT RAFE 05C1..05C2 ; ID_Continue # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT 05C4..05C5 ; ID_Continue # Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT 05C7 ; ID_Continue # Mn HEBREW POINT QAMATS QATAN 05D0..05EA ; ID_Continue # Lo [27] HEBREW LETTER ALEF..HEBREW LETTER TAV 05F0..05F2 ; ID_Continue # Lo [3] HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW LIGATURE YIDDISH DOUBLE YOD 0610..061A ; ID_Continue # Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA 0620..063F ; ID_Continue # Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE 0640 ; ID_Continue # Lm ARABIC TATWEEL 0641..064A ; ID_Continue # Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH 064B..065F ; ID_Continue # Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW 0660..0669 ; ID_Continue # Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE 066E..066F ; ID_Continue # Lo [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF 0670 ; ID_Continue # Mn ARABIC LETTER SUPERSCRIPT ALEF 0671..06D3 ; ID_Continue # Lo [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE 06D5 ; ID_Continue # Lo ARABIC LETTER AE 06D6..06DC ; ID_Continue # Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN 06DF..06E4 ; ID_Continue # Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA 06E5..06E6 ; ID_Continue # Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH 06E7..06E8 ; ID_Continue # Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON 06EA..06ED ; ID_Continue # Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM 06EE..06EF ; ID_Continue # Lo [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V 06F0..06F9 ; ID_Continue # Nd [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE 06FA..06FC ; ID_Continue # Lo [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW 06FF ; ID_Continue # Lo ARABIC LETTER HEH WITH INVERTED V 0710 ; ID_Continue # Lo SYRIAC LETTER ALAPH 0711 ; ID_Continue # Mn SYRIAC LETTER SUPERSCRIPT ALAPH 0712..072F ; ID_Continue # Lo [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH 0730..074A ; ID_Continue # Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH 074D..07A5 ; ID_Continue # Lo [89] SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER WAAVU 07A6..07B0 ; ID_Continue # Mn [11] THAANA ABAFILI..THAANA SUKUN 07B1 ; ID_Continue # Lo THAANA LETTER NAA 07C0..07C9 ; ID_Continue # Nd [10] NKO DIGIT ZERO..NKO DIGIT NINE 07CA..07EA ; ID_Continue # Lo [33] NKO LETTER A..NKO LETTER JONA RA 07EB..07F3 ; ID_Continue # Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE 07F4..07F5 ; ID_Continue # Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE 07FA ; ID_Continue # Lm NKO LAJANYALAN 0800..0815 ; ID_Continue # Lo [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF 0816..0819 ; ID_Continue # Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH 081A ; ID_Continue # Lm SAMARITAN MODIFIER LETTER EPENTHETIC YUT 081B..0823 ; ID_Continue # Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A 0824 ; ID_Continue # Lm SAMARITAN MODIFIER LETTER SHORT A 0825..0827 ; ID_Continue # Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U 0828 ; ID_Continue # Lm SAMARITAN MODIFIER LETTER I 0829..082D ; ID_Continue # Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA 0840..0858 ; ID_Continue # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN 0859..085B ; ID_Continue # Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK 0860..086A ; ID_Continue # Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA 08A0..08B4 ; ID_Continue # Lo [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW 08B6..08BD ; ID_Continue # Lo [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON 08D4..08E1 ; ID_Continue # Mn [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA 08E3..0902 ; ID_Continue # Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA 0903 ; ID_Continue # Mc DEVANAGARI SIGN VISARGA 0904..0939 ; ID_Continue # Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA 093A ; ID_Continue # Mn DEVANAGARI VOWEL SIGN OE 093B ; ID_Continue # Mc DEVANAGARI VOWEL SIGN OOE 093C ; ID_Continue # Mn DEVANAGARI SIGN NUKTA 093D ; ID_Continue # Lo DEVANAGARI SIGN AVAGRAHA 093E..0940 ; ID_Continue # Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II 0941..0948 ; ID_Continue # Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI 0949..094C ; ID_Continue # Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU 094D ; ID_Continue # Mn DEVANAGARI SIGN VIRAMA 094E..094F ; ID_Continue # Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW 0950 ; ID_Continue # Lo DEVANAGARI OM 0951..0957 ; ID_Continue # Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE 0958..0961 ; ID_Continue # Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL 0962..0963 ; ID_Continue # Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL 0966..096F ; ID_Continue # Nd [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE 0971 ; ID_Continue # Lm DEVANAGARI SIGN HIGH SPACING DOT 0972..0980 ; ID_Continue # Lo [15] DEVANAGARI LETTER CANDRA A..BENGALI ANJI 0981 ; ID_Continue # Mn BENGALI SIGN CANDRABINDU 0982..0983 ; ID_Continue # Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA 0985..098C ; ID_Continue # Lo [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L 098F..0990 ; ID_Continue # Lo [2] BENGALI LETTER E..BENGALI LETTER AI 0993..09A8 ; ID_Continue # Lo [22] BENGALI LETTER O..BENGALI LETTER NA 09AA..09B0 ; ID_Continue # Lo [7] BENGALI LETTER PA..BENGALI LETTER RA 09B2 ; ID_Continue # Lo BENGALI LETTER LA 09B6..09B9 ; ID_Continue # Lo [4] BENGALI LETTER SHA..BENGALI LETTER HA 09BC ; ID_Continue # Mn BENGALI SIGN NUKTA 09BD ; ID_Continue # Lo BENGALI SIGN AVAGRAHA 09BE..09C0 ; ID_Continue # Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II 09C1..09C4 ; ID_Continue # Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR 09C7..09C8 ; ID_Continue # Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI 09CB..09CC ; ID_Continue # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU 09CD ; ID_Continue # Mn BENGALI SIGN VIRAMA 09CE ; ID_Continue # Lo BENGALI LETTER KHANDA TA 09D7 ; ID_Continue # Mc BENGALI AU LENGTH MARK 09DC..09DD ; ID_Continue # Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA 09DF..09E1 ; ID_Continue # Lo [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL 09E2..09E3 ; ID_Continue # Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL 09E6..09EF ; ID_Continue # Nd [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE 09F0..09F1 ; ID_Continue # Lo [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL 09FC ; ID_Continue # Lo BENGALI LETTER VEDIC ANUSVARA 0A01..0A02 ; ID_Continue # Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI 0A03 ; ID_Continue # Mc GURMUKHI SIGN VISARGA 0A05..0A0A ; ID_Continue # Lo [6] GURMUKHI LETTER A..GURMUKHI LETTER UU 0A0F..0A10 ; ID_Continue # Lo [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI 0A13..0A28 ; ID_Continue # Lo [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA 0A2A..0A30 ; ID_Continue # Lo [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA 0A32..0A33 ; ID_Continue # Lo [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA 0A35..0A36 ; ID_Continue # Lo [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA 0A38..0A39 ; ID_Continue # Lo [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA 0A3C ; ID_Continue # Mn GURMUKHI SIGN NUKTA 0A3E..0A40 ; ID_Continue # Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II 0A41..0A42 ; ID_Continue # Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU 0A47..0A48 ; ID_Continue # Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI 0A4B..0A4D ; ID_Continue # Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA 0A51 ; ID_Continue # Mn GURMUKHI SIGN UDAAT 0A59..0A5C ; ID_Continue # Lo [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA 0A5E ; ID_Continue # Lo GURMUKHI LETTER FA 0A66..0A6F ; ID_Continue # Nd [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE 0A70..0A71 ; ID_Continue # Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK 0A72..0A74 ; ID_Continue # Lo [3] GURMUKHI IRI..GURMUKHI EK ONKAR 0A75 ; ID_Continue # Mn GURMUKHI SIGN YAKASH 0A81..0A82 ; ID_Continue # Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA 0A83 ; ID_Continue # Mc GUJARATI SIGN VISARGA 0A85..0A8D ; ID_Continue # Lo [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E 0A8F..0A91 ; ID_Continue # Lo [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O 0A93..0AA8 ; ID_Continue # Lo [22] GUJARATI LETTER O..GUJARATI LETTER NA 0AAA..0AB0 ; ID_Continue # Lo [7] GUJARATI LETTER PA..GUJARATI LETTER RA 0AB2..0AB3 ; ID_Continue # Lo [2] GUJARATI LETTER LA..GUJARATI LETTER LLA 0AB5..0AB9 ; ID_Continue # Lo [5] GUJARATI LETTER VA..GUJARATI LETTER HA 0ABC ; ID_Continue # Mn GUJARATI SIGN NUKTA 0ABD ; ID_Continue # Lo GUJARATI SIGN AVAGRAHA 0ABE..0AC0 ; ID_Continue # Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II 0AC1..0AC5 ; ID_Continue # Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E 0AC7..0AC8 ; ID_Continue # Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI 0AC9 ; ID_Continue # Mc GUJARATI VOWEL SIGN CANDRA O 0ACB..0ACC ; ID_Continue # Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU 0ACD ; ID_Continue # Mn GUJARATI SIGN VIRAMA 0AD0 ; ID_Continue # Lo GUJARATI OM 0AE0..0AE1 ; ID_Continue # Lo [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL 0AE2..0AE3 ; ID_Continue # Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL 0AE6..0AEF ; ID_Continue # Nd [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE 0AF9 ; ID_Continue # Lo GUJARATI LETTER ZHA 0AFA..0AFF ; ID_Continue # Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE 0B01 ; ID_Continue # Mn ORIYA SIGN CANDRABINDU 0B02..0B03 ; ID_Continue # Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA 0B05..0B0C ; ID_Continue # Lo [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L 0B0F..0B10 ; ID_Continue # Lo [2] ORIYA LETTER E..ORIYA LETTER AI 0B13..0B28 ; ID_Continue # Lo [22] ORIYA LETTER O..ORIYA LETTER NA 0B2A..0B30 ; ID_Continue # Lo [7] ORIYA LETTER PA..ORIYA LETTER RA 0B32..0B33 ; ID_Continue # Lo [2] ORIYA LETTER LA..ORIYA LETTER LLA 0B35..0B39 ; ID_Continue # Lo [5] ORIYA LETTER VA..ORIYA LETTER HA 0B3C ; ID_Continue # Mn ORIYA SIGN NUKTA 0B3D ; ID_Continue # Lo ORIYA SIGN AVAGRAHA 0B3E ; ID_Continue # Mc ORIYA VOWEL SIGN AA 0B3F ; ID_Continue # Mn ORIYA VOWEL SIGN I 0B40 ; ID_Continue # Mc ORIYA VOWEL SIGN II 0B41..0B44 ; ID_Continue # Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR 0B47..0B48 ; ID_Continue # Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI 0B4B..0B4C ; ID_Continue # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU 0B4D ; ID_Continue # Mn ORIYA SIGN VIRAMA 0B56 ; ID_Continue # Mn ORIYA AI LENGTH MARK 0B57 ; ID_Continue # Mc ORIYA AU LENGTH MARK 0B5C..0B5D ; ID_Continue # Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA 0B5F..0B61 ; ID_Continue # Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL 0B62..0B63 ; ID_Continue # Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL 0B66..0B6F ; ID_Continue # Nd [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE 0B71 ; ID_Continue # Lo ORIYA LETTER WA 0B82 ; ID_Continue # Mn TAMIL SIGN ANUSVARA 0B83 ; ID_Continue # Lo TAMIL SIGN VISARGA 0B85..0B8A ; ID_Continue # Lo [6] TAMIL LETTER A..TAMIL LETTER UU 0B8E..0B90 ; ID_Continue # Lo [3] TAMIL LETTER E..TAMIL LETTER AI 0B92..0B95 ; ID_Continue # Lo [4] TAMIL LETTER O..TAMIL LETTER KA 0B99..0B9A ; ID_Continue # Lo [2] TAMIL LETTER NGA..TAMIL LETTER CA 0B9C ; ID_Continue # Lo TAMIL LETTER JA 0B9E..0B9F ; ID_Continue # Lo [2] TAMIL LETTER NYA..TAMIL LETTER TTA 0BA3..0BA4 ; ID_Continue # Lo [2] TAMIL LETTER NNA..TAMIL LETTER TA 0BA8..0BAA ; ID_Continue # Lo [3] TAMIL LETTER NA..TAMIL LETTER PA 0BAE..0BB9 ; ID_Continue # Lo [12] TAMIL LETTER MA..TAMIL LETTER HA 0BBE..0BBF ; ID_Continue # Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I 0BC0 ; ID_Continue # Mn TAMIL VOWEL SIGN II 0BC1..0BC2 ; ID_Continue # Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU 0BC6..0BC8 ; ID_Continue # Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI 0BCA..0BCC ; ID_Continue # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU 0BCD ; ID_Continue # Mn TAMIL SIGN VIRAMA 0BD0 ; ID_Continue # Lo TAMIL OM 0BD7 ; ID_Continue # Mc TAMIL AU LENGTH MARK 0BE6..0BEF ; ID_Continue # Nd [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE 0C00 ; ID_Continue # Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE 0C01..0C03 ; ID_Continue # Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA 0C05..0C0C ; ID_Continue # Lo [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L 0C0E..0C10 ; ID_Continue # Lo [3] TELUGU LETTER E..TELUGU LETTER AI 0C12..0C28 ; ID_Continue # Lo [23] TELUGU LETTER O..TELUGU LETTER NA 0C2A..0C39 ; ID_Continue # Lo [16] TELUGU LETTER PA..TELUGU LETTER HA 0C3D ; ID_Continue # Lo TELUGU SIGN AVAGRAHA 0C3E..0C40 ; ID_Continue # Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II 0C41..0C44 ; ID_Continue # Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR 0C46..0C48 ; ID_Continue # Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI 0C4A..0C4D ; ID_Continue # Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA 0C55..0C56 ; ID_Continue # Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK 0C58..0C5A ; ID_Continue # Lo [3] TELUGU LETTER TSA..TELUGU LETTER RRRA 0C60..0C61 ; ID_Continue # Lo [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL 0C62..0C63 ; ID_Continue # Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL 0C66..0C6F ; ID_Continue # Nd [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE 0C80 ; ID_Continue # Lo KANNADA SIGN SPACING CANDRABINDU 0C81 ; ID_Continue # Mn KANNADA SIGN CANDRABINDU 0C82..0C83 ; ID_Continue # Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA 0C85..0C8C ; ID_Continue # Lo [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L 0C8E..0C90 ; ID_Continue # Lo [3] KANNADA LETTER E..KANNADA LETTER AI 0C92..0CA8 ; ID_Continue # Lo [23] KANNADA LETTER O..KANNADA LETTER NA 0CAA..0CB3 ; ID_Continue # Lo [10] KANNADA LETTER PA..KANNADA LETTER LLA 0CB5..0CB9 ; ID_Continue # Lo [5] KANNADA LETTER VA..KANNADA LETTER HA 0CBC ; ID_Continue # Mn KANNADA SIGN NUKTA 0CBD ; ID_Continue # Lo KANNADA SIGN AVAGRAHA 0CBE ; ID_Continue # Mc KANNADA VOWEL SIGN AA 0CBF ; ID_Continue # Mn KANNADA VOWEL SIGN I 0CC0..0CC4 ; ID_Continue # Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR 0CC6 ; ID_Continue # Mn KANNADA VOWEL SIGN E 0CC7..0CC8 ; ID_Continue # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI 0CCA..0CCB ; ID_Continue # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO 0CCC..0CCD ; ID_Continue # Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA 0CD5..0CD6 ; ID_Continue # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK 0CDE ; ID_Continue # Lo KANNADA LETTER FA 0CE0..0CE1 ; ID_Continue # Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL 0CE2..0CE3 ; ID_Continue # Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL 0CE6..0CEF ; ID_Continue # Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE 0CF1..0CF2 ; ID_Continue # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA 0D00..0D01 ; ID_Continue # Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU 0D02..0D03 ; ID_Continue # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA 0D05..0D0C ; ID_Continue # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L 0D0E..0D10 ; ID_Continue # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI 0D12..0D3A ; ID_Continue # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA 0D3B..0D3C ; ID_Continue # Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA 0D3D ; ID_Continue # Lo MALAYALAM SIGN AVAGRAHA 0D3E..0D40 ; ID_Continue # Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II 0D41..0D44 ; ID_Continue # Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR 0D46..0D48 ; ID_Continue # Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI 0D4A..0D4C ; ID_Continue # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU 0D4D ; ID_Continue # Mn MALAYALAM SIGN VIRAMA 0D4E ; ID_Continue # Lo MALAYALAM LETTER DOT REPH 0D54..0D56 ; ID_Continue # Lo [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL 0D57 ; ID_Continue # Mc MALAYALAM AU LENGTH MARK 0D5F..0D61 ; ID_Continue # Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL 0D62..0D63 ; ID_Continue # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL 0D66..0D6F ; ID_Continue # Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE 0D7A..0D7F ; ID_Continue # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K 0D82..0D83 ; ID_Continue # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA 0D85..0D96 ; ID_Continue # Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA 0D9A..0DB1 ; ID_Continue # Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA 0DB3..0DBB ; ID_Continue # Lo [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA 0DBD ; ID_Continue # Lo SINHALA LETTER DANTAJA LAYANNA 0DC0..0DC6 ; ID_Continue # Lo [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA 0DCA ; ID_Continue # Mn SINHALA SIGN AL-LAKUNA 0DCF..0DD1 ; ID_Continue # Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA 0DD2..0DD4 ; ID_Continue # Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA 0DD6 ; ID_Continue # Mn SINHALA VOWEL SIGN DIGA PAA-PILLA 0DD8..0DDF ; ID_Continue # Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA 0DE6..0DEF ; ID_Continue # Nd [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE 0DF2..0DF3 ; ID_Continue # Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA 0E01..0E30 ; ID_Continue # Lo [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A 0E31 ; ID_Continue # Mn THAI CHARACTER MAI HAN-AKAT 0E32..0E33 ; ID_Continue # Lo [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM 0E34..0E3A ; ID_Continue # Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU 0E40..0E45 ; ID_Continue # Lo [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO 0E46 ; ID_Continue # Lm THAI CHARACTER MAIYAMOK 0E47..0E4E ; ID_Continue # Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN 0E50..0E59 ; ID_Continue # Nd [10] THAI DIGIT ZERO..THAI DIGIT NINE 0E81..0E82 ; ID_Continue # Lo [2] LAO LETTER KO..LAO LETTER KHO SUNG 0E84 ; ID_Continue # Lo LAO LETTER KHO TAM 0E87..0E88 ; ID_Continue # Lo [2] LAO LETTER NGO..LAO LETTER CO 0E8A ; ID_Continue # Lo LAO LETTER SO TAM 0E8D ; ID_Continue # Lo LAO LETTER NYO 0E94..0E97 ; ID_Continue # Lo [4] LAO LETTER DO..LAO LETTER THO TAM 0E99..0E9F ; ID_Continue # Lo [7] LAO LETTER NO..LAO LETTER FO SUNG 0EA1..0EA3 ; ID_Continue # Lo [3] LAO LETTER MO..LAO LETTER LO LING 0EA5 ; ID_Continue # Lo LAO LETTER LO LOOT 0EA7 ; ID_Continue # Lo LAO LETTER WO 0EAA..0EAB ; ID_Continue # Lo [2] LAO LETTER SO SUNG..LAO LETTER HO SUNG 0EAD..0EB0 ; ID_Continue # Lo [4] LAO LETTER O..LAO VOWEL SIGN A 0EB1 ; ID_Continue # Mn LAO VOWEL SIGN MAI KAN 0EB2..0EB3 ; ID_Continue # Lo [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM 0EB4..0EB9 ; ID_Continue # Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU 0EBB..0EBC ; ID_Continue # Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO 0EBD ; ID_Continue # Lo LAO SEMIVOWEL SIGN NYO 0EC0..0EC4 ; ID_Continue # Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI 0EC6 ; ID_Continue # Lm LAO KO LA 0EC8..0ECD ; ID_Continue # Mn [6] LAO TONE MAI EK..LAO NIGGAHITA 0ED0..0ED9 ; ID_Continue # Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE 0EDC..0EDF ; ID_Continue # Lo [4] LAO HO NO..LAO LETTER KHMU NYO 0F00 ; ID_Continue # Lo TIBETAN SYLLABLE OM 0F18..0F19 ; ID_Continue # Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS 0F20..0F29 ; ID_Continue # Nd [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE 0F35 ; ID_Continue # Mn TIBETAN MARK NGAS BZUNG NYI ZLA 0F37 ; ID_Continue # Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS 0F39 ; ID_Continue # Mn TIBETAN MARK TSA -PHRU 0F3E..0F3F ; ID_Continue # Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES 0F40..0F47 ; ID_Continue # Lo [8] TIBETAN LETTER KA..TIBETAN LETTER JA 0F49..0F6C ; ID_Continue # Lo [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA 0F71..0F7E ; ID_Continue # Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO 0F7F ; ID_Continue # Mc TIBETAN SIGN RNAM BCAD 0F80..0F84 ; ID_Continue # Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA 0F86..0F87 ; ID_Continue # Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS 0F88..0F8C ; ID_Continue # Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN 0F8D..0F97 ; ID_Continue # Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA 0F99..0FBC ; ID_Continue # Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA 0FC6 ; ID_Continue # Mn TIBETAN SYMBOL PADMA GDAN 1000..102A ; ID_Continue # Lo [43] MYANMAR LETTER KA..MYANMAR LETTER AU 102B..102C ; ID_Continue # Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA 102D..1030 ; ID_Continue # Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU 1031 ; ID_Continue # Mc MYANMAR VOWEL SIGN E 1032..1037 ; ID_Continue # Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW 1038 ; ID_Continue # Mc MYANMAR SIGN VISARGA 1039..103A ; ID_Continue # Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT 103B..103C ; ID_Continue # Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA 103D..103E ; ID_Continue # Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA 103F ; ID_Continue # Lo MYANMAR LETTER GREAT SA 1040..1049 ; ID_Continue # Nd [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE 1050..1055 ; ID_Continue # Lo [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL 1056..1057 ; ID_Continue # Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR 1058..1059 ; ID_Continue # Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL 105A..105D ; ID_Continue # Lo [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE 105E..1060 ; ID_Continue # Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA 1061 ; ID_Continue # Lo MYANMAR LETTER SGAW KAREN SHA 1062..1064 ; ID_Continue # Mc [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO 1065..1066 ; ID_Continue # Lo [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA 1067..106D ; ID_Continue # Mc [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5 106E..1070 ; ID_Continue # Lo [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA 1071..1074 ; ID_Continue # Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE 1075..1081 ; ID_Continue # Lo [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA 1082 ; ID_Continue # Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA 1083..1084 ; ID_Continue # Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E 1085..1086 ; ID_Continue # Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y 1087..108C ; ID_Continue # Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3 108D ; ID_Continue # Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE 108E ; ID_Continue # Lo MYANMAR LETTER RUMAI PALAUNG FA 108F ; ID_Continue # Mc MYANMAR SIGN RUMAI PALAUNG TONE-5 1090..1099 ; ID_Continue # Nd [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE 109A..109C ; ID_Continue # Mc [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A 109D ; ID_Continue # Mn MYANMAR VOWEL SIGN AITON AI ]]
------------------------------------------------------------------------------ -- Config class ------------------------------------------------------------------------------ local ctrl = { nick = "config", parent = iup.WIDGET, creation = "", funcname = "Config", callback = { recent_cb = "", }, include = "iup_config.h", extrafuncs = 1, } ctrl.SetVariable = iup.ConfigSetVariable ctrl.SetVariableId = iup.ConfigSetVariableId ctrl.GetVariable = iup.ConfigGetVariable ctrl.GetVariableId = iup.ConfigGetVariableId ctrl.GetVariableDef = iup.ConfigGetVariableDef ctrl.GetVariableIdDef = iup.ConfigGetVariableIdDef ctrl.Load = iup.ConfigLoad ctrl.Save = iup.ConfigSave ctrl.RecentInit = iup.ConfigRecentInit ctrl.RecentUpdate = iup.ConfigRecentUpdate ctrl.DialogShow = iup.ConfigDialogShow ctrl.DialogClosed = iup.ConfigDialogClosed function ctrl.createElement(class, param) return iup.Config() end iup.RegisterWidget(ctrl) iup.SetClass(ctrl, "iupWidget")
local tonumber = tonumber local tostring = tostring local error = error module('tango.utils.socket_message') local send = function(socket,message) -- send length of the string as ascii line local sent,err = socket:send(tostring(#message)..'\n') if not sent then error(err) end -- send the actual message data sent,err = socket:send(message) if not sent then error(err) end end local receive = function(socket,on_error) local responselen,err = socket:receive('*l') if not responselen then error(err) end -- convert ascii len to number of bytes responselen = tonumber(responselen) if not responselen then error('length as ascii number string expected') end -- receive the actual response table dataa local response,err = socket:receive(responselen) if not response then error(err) end return response end return { send = send, receive = receive }
local function CanSafelyEnterGameplayCourse() for pn in ivalues(GAMESTATE:GetEnabledPlayers()) do if GAMESTATE:GetCurrentTrail(pn) == nil and GAMESTATE:IsPlayerEnabled(pn) then return false,"Trail for "..pname(pn).." was not set."; end end; if not GAMESTATE:GetCurrentCourse() then return false,"No course was set." end; if GAMESTATE:GetCurrentSong() then return false,"There is a song set in GAMESTATE." end; if not GAMESTATE:IsCourseMode() then return false,"The IsCourseMode flag was not set." end; return true end --We don't want any songs set! Though I'm not sure how this is possible. GAMESTATE:SetCurrentSong(nil); --We want the names of the items in the RIO_COURSE_FOLDERS so we need a separate table local folderNames = {}; for k,v in pairs(RIO_COURSE_FOLDERS) do if v['Style'] == "StepsType_Pump_Double" then if GAMESTATE:GetNumSidesJoined() == 1 then --Don't add doubles groups in multiplayer folderNames[#folderNames+1] = k end; else folderNames[#folderNames+1] = k end; end; assert(#folderNames > 0,"Wat?"); --TrailCache; local numWheelItems = 15 -- Scroller for the courses local courseScroller = setmetatable({disable_wrapping= false}, item_scroller_mt) local courseSelection = 1; local item_mt_course= { __index= { -- create_actors must return an actor. The name field is a convenience. create_actors= function(self, params) self.name= params.name return Def.ActorFrame{ InitCommand= function(subself) -- Setting self.container to point to the actor gives a convenient -- handle for manipulating the actor. self.container= subself subself:SetDrawByZPosition(true); --subself:zoom(.75); end; Def.Sprite{ Name="banner"; --InitCommand=cmd(scaletofit,0,0,1,1;); }; --[[Def.BitmapText{ Name= "text", Text="HELLO WORLD!!!!!!!!!"; Font= "Common Normal", InitCommand=cmd(addy,100;DiffuseAndStroke,Color("White"),Color("Black");shadowlength,1); };]] }; end, -- item_index is the index in the list, ranging from 1 to num_items. -- is_focus is only useful if the disable_wrapping flag in the scroller is -- set to false. --[[ function RioWheel(self,offsetFromCenter,itemIndex,numItems) local spacing = 210; local edgeSpacing = 135; if math.abs(offsetFromCenter) < .5 then if not MUSICWHEEL_SONG_NAMES then self:zoom(1+math.cos(offsetFromCenter*math.pi)/3); end; self:x(offsetFromCenter*(spacing+edgeSpacing*2)); else if offsetFromCenter >= .5 then self:x(offsetFromCenter*spacing+edgeSpacing); elseif offsetFromCenter <= -.5 then self:x(offsetFromCenter*spacing-edgeSpacing); end; --self:zoom(1); end; end; ]] transform= function(self, item_index, num_items, is_focus) local offsetFromCenter = item_index-math.floor(numWheelItems/2) local spacing = 210; local edgeSpacing = 135; self.container:stoptweening(); if math.abs(offsetFromCenter) < 5 then self.container:decelerate(.42); self.container:visible(true); else self.container:visible(false); end; self.container:x(offsetFromCenter*spacing); --[[if offsetFromCenter == 0 then self.container:diffuse(Color("Red")); else self.container:diffuse(Color("White")); end;]] end, -- info is one entry in the info set that is passed to the scroller. -- In this case, those are course objects. set= function(self, info) --self.container:GetChild("text"):settext(info); --TODO local banner = info:GetBannerPath() if banner == nil then self.container:GetChild("banner"):Load(THEME:GetPathG("common","fallback banner")); else self.container:GetChild("banner"):Load(banner); --self.container:GetChild("text"):visible(false); end; self.container:GetChild("banner"):scaletoclipped(204,204); end, --[[gettext=function(self) --return self.container:GetChild("text"):gettext() return self.get_info_at_focus_pos(); end,]] }} -- Scroller for course groups local groupScroller = setmetatable({disable_wrapping= false}, item_scroller_mt) local groupSelection = 1; local item_mt_group= { __index= { -- create_actors must return an actor. The name field is a convenience. create_actors= function(self, params) self.name= params.name return Def.ActorFrame{ InitCommand= function(subself) -- Setting self.container to point to the actor gives a convenient -- handle for manipulating the actor. self.container= subself subself:SetDrawByZPosition(true); --subself:zoom(.75); end; Def.Sprite{ Name="banner"; --InitCommand=cmd(scaletofit,0,0,1,1;); }; --[[Def.BitmapText{ Name= "text", Text="HELLO WORLD!!!!!!!!!"; Font= "Common Normal", InitCommand=cmd(addy,100;DiffuseAndStroke,Color("White"),Color("Black");shadowlength,1); };]] }; end, -- item_index is the index in the list, ranging from 1 to num_items. -- is_focus is only useful if the disable_wrapping flag in the scroller is -- set to false. transform= function(self, item_index, num_items, is_focus) local offsetFromCenter = item_index-math.floor(numWheelItems/2) --PrimeWheel(self.container,offsetFromCenter,item_index,numWheelItems) --self.container:hurrytweening(2); --self.container:finishtweening(); self.container:stoptweening(); if math.abs(offsetFromCenter) < 4 then self.container:decelerate(.45); self.container:visible(true); else self.container:visible(false); end; self.container:x(offsetFromCenter*350) --self.container:rotationy(offsetFromCenter*-45); self.container:zoom(math.cos(offsetFromCenter*math.pi/3)*.9):diffusealpha(math.cos(offsetFromCenter*math.pi/3)*.9); --[[if offsetFromCenter == 0 then self.container:diffuse(Color("Red")); else self.container:diffuse(Color("White")); end;]] end, -- info is one entry in the info set that is passed to the scroller. set= function(self, info) --self.container:GetChild("text"):settext(info); --TODO --local banner = SONGMAN:GetCourseGroupBannerPath(info); if FILEMAN:DoesFileExist("/Courses/"..info.."/banner.png") then self.container:GetChild("banner"):Load("/Courses/"..info.."/banner.png"); else self.container:GetChild("banner"):Load(THEME:GetPathG("common","fallback group")); end; self.container:GetChild("banner"):scaletofit(-500,-200,500,200); end, --[[gettext=function(self) --return self.container:GetChild("text"):gettext() return self.get_info_at_focus_pos(); end,]] }} local STATE_PICKING_FOLDER = 0; local STATE_PICKING_COURSE = 1; local STATE_READY = 2; local curState = STATE_PICKING_FOLDER; local currentCourseGroup; local lastSelectedGroupIndex = 0; local function updateCurrentCourse() assert(currentCourseGroup[courseSelection],"This course selection is nil! Selection:"..courseSelection); if RIO_COURSE_FOLDERS[folderNames[groupSelection]]['Style'] then setenv("TrailCache",currentCourseGroup[courseSelection]:GetTrails(RIO_COURSE_FOLDERS[folderNames[groupSelection]]['Style'])[1]); else setenv("TrailCache",currentCourseGroup[courseSelection]:GetAllTrails()[1]); end; assert(getenv("TrailCache")); GAMESTATE:SetCurrentCourse(currentCourseGroup[courseSelection]) --So this actually fires CurrentCourseChanged but I didn't know that... And I reimplemented it so it would have selection and total values.. So it's firing twice? MESSAGEMAN:Broadcast("CurrentCourseChanged",{Selection=courseSelection,Total=#currentCourseGroup}); end; local screen; --To go to next screen and to check if OptionsList is currently open. --To open OptionsList using LRLR --[[local buttonHistory = { [PLAYER_1] = {"none","none","none","none"}, [PLAYER_2] = {"none","none","none","none"} }]] local function inputs(event) local pn= event.PlayerNumber local button = event.button -- If the PlayerNumber isn't set, the button isn't mapped. Ignore it. --Also we only want it to activate when they're NOT selecting the difficulty. --[[if not pn or not SCREENMAN:get_input_redirected(pn) then --SCREENMAN:SystemMessage("Not redirected"); return end]] -- If it's a release, ignore it. if event.type == "InputEventType_Release" or not pn or not screen:CanOpenOptionsList(pn) or --Don't move wheel when OptionsList is open button == "Select" --Select opens OptionsList then return end if curState == STATE_READY then if button == "UpRight" or button == "UpLeft" or button == "Up" or button == "MenuUp" then curState = STATE_PICKING_COURSE; MESSAGEMAN:Broadcast("SongUnchosen"); elseif button == "Center" or button == "Start" then local can, reason = CanSafelyEnterGameplayCourse(); if can then if RIO_COURSE_FOLDERS[folderNames[groupSelection]]['Lifebar'] == "Pro" then setenv("Lifebar","Pro") end; SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToNextScreen"); else SCREENMAN:SystemMessage(reason); end; end; elseif curState == STATE_PICKING_COURSE then if button == "UpRight" or button == "UpLeft" or button == "Up" or button == "MenuUp" then curState = STATE_PICKING_FOLDER; --Has no effect? --SOUND:DimMusic(0, math.huge) MESSAGEMAN:Broadcast("StartSelectingGroup"); elseif button == "DownLeft" or button == "Left" or button == "MenuLeft" then SOUND:PlayOnce(THEME:GetPathS("MusicWheel", "change"), true); if courseSelection == 1 then courseSelection = #currentCourseGroup; else courseSelection = courseSelection - 1 ; end; courseScroller:scroll_by_amount(-1); updateCurrentCourse() elseif button == "DownRight" or button == "Right" or button == "MenuRight" then SOUND:PlayOnce(THEME:GetPathS("MusicWheel", "change"), true); if courseSelection == #currentCourseGroup then courseSelection = 1; else courseSelection = courseSelection + 1 end courseScroller:scroll_by_amount(1); updateCurrentCourse() elseif button == "Center" or button == "Start" then --The trail should be set immediately on selection so the score can be obtained. local course = GAMESTATE:GetCurrentCourse(); local trail = getenv("TrailCache"); if trail ~= nil then --Is this actually necessary? AutoSetStyle should take care of it. --if RIO_COURSE_FOLDERS[folderNames[groupSelection]]['Style'] then -- GAMESTATE:SetCurrentStyle(string.match(RIO_COURSE_FOLDERS[folderNames[groupSelection]]['Style'],"_([^_]+)$")) --end; for pn in ivalues(GAMESTATE:GetEnabledPlayers()) do GAMESTATE:SetCurrentTrail(pn, trail) --GAMESTATE:SetCurrentSteps(pn, trail:GetTrailEntry(0):GetSteps()); end; else SCREENMAN:SystemMessage("Trail was nil! Number of trails: "..#course:GetAllTrails().. " | Course: "..course:GetDisplayFullTitle()); end; curState = STATE_READY; MESSAGEMAN:Broadcast("SongChosen"); elseif button == "Back" then SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToPrevScreen"); end; else if button == "Center" or button == "Start" then --[[SCREENMAN:set_input_redirected(PLAYER_1, false); SCREENMAN:set_input_redirected(PLAYER_2, false);]] if lastSelectedGroupIndex ~= groupSelection then currentCourseGroup = SONGMAN:GetCoursesInGroup(folderNames[groupSelection],true) assert(#currentCourseGroup > 0,"Hey idiot, you don't have any courses in this group.") courseScroller:set_info_set(currentCourseGroup,1); courseSelection = 1; updateCurrentCourse() lastSelectedGroupIndex = groupSelection; end; --SOUND:PlayOnce(THEME:GetPathS("", "SongChosen"), true); MESSAGEMAN:Broadcast("StartSelectingSong"); curState = STATE_PICKING_COURSE; elseif button == "DownLeft" or button == "Left" or button == "MenuLeft" then SOUND:PlayOnce(THEME:GetPathS("MusicWheel", "change"), true); if groupSelection == 1 then groupSelection = #folderNames; else groupSelection = groupSelection - 1 ; end; groupScroller:scroll_by_amount(-1); setenv("cur_group",folderNames[groupSelection]); MESSAGEMAN:Broadcast("GroupChange"); MESSAGEMAN:Broadcast("PreviousGroup"); elseif button == "DownRight" or button == "Right" or button == "MenuRight" then SOUND:PlayOnce(THEME:GetPathS("MusicWheel", "change"), true); if groupSelection == #folderNames then groupSelection = 1; else groupSelection = groupSelection + 1 end groupScroller:scroll_by_amount(1); setenv("cur_group",folderNames[groupSelection]); MESSAGEMAN:Broadcast("GroupChange"); MESSAGEMAN:Broadcast("NextGroup"); --elseif button == "UpLeft" or button == "UpRight" then --SCREENMAN:AddNewScreenToTop("ScreenSelectSort"); elseif button == "Back" then --[[SCREENMAN:set_input_redirected(PLAYER_1, false); SCREENMAN:set_input_redirected(PLAYER_2, false);]] SCREENMAN:GetTopScreen():StartTransitioningScreen("SM_GoToPrevScreen"); elseif button == "MenuDown" then --[[local curItem = scroller:get_actor_item_at_focus_pos().container:GetChild("banner"); local scaledHeight = testScaleToWidth(curItem:GetWidth(), curItem:GetHeight(), 500); SCREENMAN:SystemMessage(curItem:GetWidth().."x"..curItem:GetHeight().." -> 500x"..scaledHeight);]] --local curItem = scroller:get_actor_item_at_focus_pos(); --SCREENMAN:SystemMessage(ListActorChildren(curItem.container)); else SCREENMAN:SystemMessage("unknown button: "..button) --SCREENMAN:SystemMessage(strArrayToString(button_history)); --musicwheel:SetOpenSection(""); --SCREENMAN:SystemMessage(musicwheel:GetNumItems()); --[[local wheelFolders = {}; for i = 1,7,1 do wheelFolders[#wheelFolders+1] = musicwheel:GetWheelItem(i):GetText(); end; SCREENMAN:SystemMessage(strArrayToString(wheelFolders));]] --SCREENMAN:SystemMessage(musicwheel:GetWheelItem(0):GetText()); end; end; --Not needed, CodeNames will handle it --[[buttonHistory[pn][1] = buttonHistory[pn][2]; buttonHistory[pn][2] = buttonHistory[pn][3]; buttonHistory[pn][3] = buttonHistory[pn][4]; buttonHistory[pn][4] = button; if buttonHistory[pn][1] == "DownLeft" and buttonHistory[pn][2] == "DownRight" and buttonHistory[pn][3] == "DownLeft" and buttonHistory[pn][4] == "DownRight" end;]] end; local t = Def.ActorFrame{ OnCommand=function(self) screen = SCREENMAN:GetTopScreen(); screen:AddInputCallback(inputs); --[[SCREENMAN:set_input_redirected(PLAYER_1, true); SCREENMAN:set_input_redirected(PLAYER_2, true);]] end; } --CourseScroller frame local curSongPlaying = 1; local s = Def.ActorFrame{ --READY COMMAND LoadActor(THEME:GetPathS("","ready/select.mp3"))..{ --SongChosenMessageCommand=cmd(play); --StepsChosenMessageCommand=cmd(playcommand,"Check2";); --[[Check2Command=function(self) if state == 2 then state = 3; self:stoptweening(); self:play(); end; end;]] }; LoadActor(THEME:GetPathS("","SongChosen"))..{ SongChosenMessageCommand=cmd(play); StartSelectingSongMessageCommand=cmd(play); }; --UPRIGHT/UPLEFT LoadActor(THEME:GetPathS("","SongUnchosen"))..{ TwoPartConfirmCanceledMessageCommand=cmd(play); StartSelectingGroupMessageCommand=cmd(play); SongUnchosenMessageCommand=cmd(play); --[[StepsUnchosenMessageCommand=cmd(playcommand,"Check";); SongUnchosenMessageCommand=cmd(playcommand,"Check";); TwoPartConfirmCanceledMessageCommand=cmd(playcommand,"Check"); StartSelectingGroupMessageCommand=cmd(playcommand,"Check"); CheckCommand=function(self) if state == 1 then--StartGroupSelection self:stoptweening(); self:play(); state = 0; elseif state == 2 then--SelectSongSelectingAgain self:stoptweening(); self:play(); state = 1; elseif state == 3 then--SelectSongSelectingAgain self:stoptweening(); self:play(); state = 2; end; end;]] }; LoadActor(THEME:GetPathS("","ready/offcommand"))..{ OffCommand=cmd(play); }; CurrentCourseChangedMessageCommand=function(self) curSongPlaying = 1; self:stoptweening():queuecommand("PlayCourseMusics"); end; PlayCourseMusicsCommand=function(self) stop_music(); local song = getenv("TrailCache"):GetTrailEntries()[curSongPlaying]:GetSong(); play_sample_music(song,5); if curSongPlaying < #getenv("TrailCache"):GetTrailEntries() then curSongPlaying = curSongPlaying + 1; self:sleep(5):queuecommand("PlayCourseMusics"); end; end; --handle opening the OptionsList here CodeMessageCommand=function(self,param) local codeName = param.Name -- code name, matches the one in metrics --local pn = param.PlayerNumber -- which player entered the code if codeName == "OpenOpList" or codeName == "OpenOpList2" or codeName == "Select" then screen:OpenOptionsList(param.PlayerNumber); end; end; } --THE BACKGROUND VIDEO s[#s+1] = LoadActor(THEME:GetPathG("","background/common_bg"))..{}; s[#s+1] = courseScroller:create_actors("foo", numWheelItems, item_mt_course, SCREEN_CENTER_X, SCREEN_CENTER_Y-25); s[#s+1] = LoadActor("coursePreview"); s[#s+1] = LoadActor("otherDecorations"); s[#s+1] = LoadActor("difficultyIcons"); --GroupScroller frame local g = Def.ActorFrame{ --InitCommand=cmd(diffusealpha,0); OnCommand=function(self) groupScroller:set_info_set(folderNames, 1); end; StartSelectingGroupMessageCommand=function(self,params) local curItem = groupScroller:get_actor_item_at_focus_pos(); --SCREENMAN:SystemMessage(ListActorChildren(curItem.container)); curItem.container:GetChild("banner"):stoptweening():scaletofit(-500,-200,500,200); self:stoptweening():linear(.5):diffusealpha(1); --SOUND:DimMusic(0.3,65536); MESSAGEMAN:Broadcast("GroupChange"); end; StartSelectingSongMessageCommand=function(self) self:linear(.3):diffusealpha(0); groupScroller:get_actor_item_at_focus_pos().container:GetChild("banner"):linear(.3):zoom(0); end; } --THE BACKGROUND VIDEO g[#g+1] = LoadActor(THEME:GetPathG("","background/common_bg"))..{ --InitCommand=cmd(diffusealpha,0); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1); StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); }; g[#g+1] = Def.Quad{ InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,0,0,0,0;fadetop,1;blend,Blend.Add); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,0.87); StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); } --FLASH g[#g+1] = Def.Quad{ InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,1,1,1,0); StartSelectingSongMessageCommand=cmd(stoptweening;diffusealpha,1;linear,0.3;diffusealpha,0); }; --Add scroller here g[#g+1] = groupScroller:create_actors("foo", numWheelItems, item_mt_group, SCREEN_CENTER_X, SCREEN_CENTER_Y); --Game Folder counters --Text BACKGROUND g[#g+1] = LoadActor(THEME:GetPathB("ScreenSelectMusic","overlay/songartist_name"))..{ InitCommand=cmd(x,_screen.cx;y,SCREEN_BOTTOM-75;zoomto,547,46); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1;playcommand,"Text"); StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); }; g[#g+1] = LoadFont("monsterrat/_montserrat light 60px")..{ InitCommand=cmd(Center;zoom,0.2;y,SCREEN_BOTTOM-75;uppercase,true;strokecolor,0,0.15,0.3,0.5;); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1;playcommand,"GroupChangeMessage"); StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); GroupChangeMessageCommand=function(self) self:finishtweening(); self:linear(0.3); self:diffusealpha(1); --songcounter = string.format(THEME:GetString("ScreenSelectGroup","SongCount"),#SONGMAN:GetSongsInGroup(getenv("cur_group"))-1) local songcounter = string.format(THEME:GetString("ScreenSelectCourse","CourseCount"),#SONGMAN:GetCoursesInGroup(folderNames[groupSelection],true)) local foldercounter = string.format("%02i",groupSelection).." / "..string.format("%02i",#RIO_COURSE_FOLDERS) self:settext(songcounter.."\n"..foldercounter); end; }; t[#t+1] = s; t[#t+1] = g; --Current Group/Playlist t[#t+1] = LoadActor(THEME:GetPathB("ScreenSelectMusic","overlay/current_group"))..{ InitCommand=cmd(x,0;y,5;horizalign,left;vertalign,top;zoomx,1;cropbottom,0.3); --StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1;playcommand,"Text"); --StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); }; t[#t+1] = LoadFont("monsterrat/_montserrat light 60px")..{ InitCommand=cmd(uppercase,true;horizalign,left;x,SCREEN_LEFT+18;y,SCREEN_TOP+10;zoom,0.185;skewx,-0.1); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1;playcommand,"GroupChangeMessage"); StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); GroupChangeMessageCommand=function(self) self:uppercase(true); self:settext("Pick mixtapes"); end; }; t[#t+1] = LoadFont("monsterrat/_montserrat semi bold 60px")..{ Name="CurrentGroupName"; InitCommand=cmd(uppercase,true;horizalign,left;x,SCREEN_LEFT+16;y,SCREEN_TOP+30;zoom,0.6;skewx,-0.25); OnCommand=cmd(playcommand,"UpdateText"); StartSelectingGroupMessageCommand=cmd(stoptweening;linear,0.35;diffusealpha,1;playcommand,"UpdateText"); --StartSelectingSongMessageCommand=cmd(stoptweening;linear,0.3;diffusealpha,0); GroupChangeMessageCommand=cmd(playcommand,"UpdateText"); UpdateTextCommand=function(self) self:settext(folderNames[groupSelection]); end; }; --OpList t[#t+1] = LoadActor(THEME:GetPathB("ScreenSelectMusic","overlay/OptionsList")); t[#t+1] = LoadActor(THEME:GetPathB("ScreenSelectMusic","overlay/arrow_shine"))..{}; return t;
local types = require "resty.nettle.types.common" local context = require "resty.nettle.types.serpent" local lib = require "resty.nettle.library" local ffi = require "ffi" local ffi_new = ffi.new local ffi_copy = ffi.copy local ffi_str = ffi.string local ceil = math.ceil local setmetatable = setmetatable local serpent = {} serpent.__index = serpent function serpent.new(key) local len = #key if len ~= 16 and len ~= 24 and len ~= 32 then return nil, "the SERPENT supported key sizes are 128, 192, and 256 bits, and the 256 bits is " .. "the recommended key size" end local ct = ffi_new(context) if len == 16 then lib.nettle_serpent128_set_key(ct, key) elseif len == 24 then lib.nettle_serpent192_set_key(ct, key) elseif len == 32 then lib.nettle_serpent256_set_key(ct, key) end return setmetatable({ context = ct }, serpent) end function serpent:encrypt(src, len) len = len or #src local dln = ceil(len / 16) * 16 local dst if dln == len then dst = types.buffers(dln) else dst = types.zerobuffers(dln) end ffi_copy(dst, src, len) lib.nettle_serpent_encrypt(self.context, dln, dst, dst) return ffi_str(dst, dln) end function serpent:decrypt(src, len) len = len or #src local dln = ceil(len / 16) * 16 local dst = types.buffers(dln) lib.nettle_serpent_decrypt(self.context, dln, dst, src) return ffi_str(dst, len) end return serpent
local kRagdollTime = 9.5 function Ragdoll:OnCreate() Entity.OnCreate(self) local now = Shared.GetTime() self.dissolveStart = now self.dissolveAmount = 0 if Server then self:AddTimedCallback(Ragdoll.TimeUp, kRagdollTime) end self:SetUpdates(true) InitMixin(self, BaseModelMixin) InitMixin(self, ModelMixin) self:SetRelevancyDistance(kMaxRelevancyDistance) end function CreateRagdoll(fromEntity) local useModelName = fromEntity:GetModelName() local useGraphName = fromEntity:GetGraphName() if useModelName and string.len(useModelName) > 0 and useGraphName and string.len(useGraphName) > 0 then local ragdoll = CreateEntity(Ragdoll.kMapName, fromEntity:GetOrigin()) ragdoll:SetCoords(fromEntity:GetCoords()) ragdoll:SetModel(useModelName, useGraphName) ragdoll:SetPhysicsType(PhysicsType.Dynamic) --if fromEntity.GetPlayInstantRagdoll and fromEntity:GetPlayInstantRagdoll() then ragdoll:SetPhysicsGroup(PhysicsGroup.RagdollGroup) -- else -- ragdoll:SetPhysicsGroup(PhysicsGroup.SmallStructuresGroup) --end ragdoll:SetPhysicsGroupFilterMask(PhysicsMask.DroppedWeaponFilter) ragdoll:CopyAnimationState(fromEntity) end end function Ragdoll:OnUpdateRender() PROFILE("Ragdoll:OnUpdateRender") local now = Shared.GetTime() local amount = 0.5 if self.dissolveStart < now then if self.dissolveAmount < 1 then local t = (now - self.dissolveStart) / kRagdollTime self.dissolveAmount = Clamp( t * 0.5 + 0.5, 0.0, 1.0 ) end amount = 1-self.dissolveAmount end self:SetOpacity(amount, "dissolveAmount") end
require("ffi").cdef[[ typedef struct ImFontAtlasCustomRect ImFontAtlasCustomRect; typedef struct ImDrawCmdHeader ImDrawCmdHeader; typedef struct ImGuiStoragePair ImGuiStoragePair; typedef struct ImGuiTextRange ImGuiTextRange; typedef struct ImVec4 ImVec4; typedef struct ImVec2 ImVec2; typedef struct ImGuiWindowClass ImGuiWindowClass; typedef struct ImGuiViewport ImGuiViewport; typedef struct ImGuiTextFilter ImGuiTextFilter; typedef struct ImGuiTextBuffer ImGuiTextBuffer; typedef struct ImGuiTableColumnSortSpecs ImGuiTableColumnSortSpecs; typedef struct ImGuiTableSortSpecs ImGuiTableSortSpecs; typedef struct ImGuiStyle ImGuiStyle; typedef struct ImGuiStorage ImGuiStorage; typedef struct ImGuiSizeCallbackData ImGuiSizeCallbackData; typedef struct ImGuiPlatformMonitor ImGuiPlatformMonitor; typedef struct ImGuiPlatformIO ImGuiPlatformIO; typedef struct ImGuiPayload ImGuiPayload; typedef struct ImGuiOnceUponAFrame ImGuiOnceUponAFrame; typedef struct ImGuiListClipper ImGuiListClipper; typedef struct ImGuiInputTextCallbackData ImGuiInputTextCallbackData; typedef struct ImGuiIO ImGuiIO; typedef struct ImGuiContext ImGuiContext; typedef struct ImColor ImColor; typedef struct ImFontGlyphRangesBuilder ImFontGlyphRangesBuilder; typedef struct ImFontGlyph ImFontGlyph; typedef struct ImFontConfig ImFontConfig; typedef struct ImFontBuilderIO ImFontBuilderIO; typedef struct ImFontAtlas ImFontAtlas; typedef struct ImFont ImFont; typedef struct ImDrawVert ImDrawVert; typedef struct ImDrawListSplitter ImDrawListSplitter; typedef struct ImDrawListSharedData ImDrawListSharedData; typedef struct ImDrawList ImDrawList; typedef struct ImDrawData ImDrawData; typedef struct ImDrawCmd ImDrawCmd; typedef struct ImDrawChannel ImDrawChannel; struct ImDrawChannel; struct ImDrawCmd; struct ImDrawData; struct ImDrawList; struct ImDrawListSharedData; struct ImDrawListSplitter; struct ImDrawVert; struct ImFont; struct ImFontAtlas; struct ImFontBuilderIO; struct ImFontConfig; struct ImFontGlyph; struct ImFontGlyphRangesBuilder; struct ImColor; struct ImGuiContext; struct ImGuiIO; struct ImGuiInputTextCallbackData; struct ImGuiListClipper; struct ImGuiOnceUponAFrame; struct ImGuiPayload; struct ImGuiPlatformIO; struct ImGuiPlatformMonitor; struct ImGuiSizeCallbackData; struct ImGuiStorage; struct ImGuiStyle; struct ImGuiTableSortSpecs; struct ImGuiTableColumnSortSpecs; struct ImGuiTextBuffer; struct ImGuiTextFilter; struct ImGuiViewport; struct ImGuiWindowClass; typedef int ImGuiCol; typedef int ImGuiCond; typedef int ImGuiDataType; typedef int ImGuiDir; typedef int ImGuiKey; typedef int ImGuiNavInput; typedef int ImGuiMouseButton; typedef int ImGuiMouseCursor; typedef int ImGuiSortDirection; typedef int ImGuiStyleVar; typedef int ImGuiTableBgTarget; typedef int ImDrawFlags; typedef int ImDrawListFlags; typedef int ImFontAtlasFlags; typedef int ImGuiBackendFlags; typedef int ImGuiButtonFlags; typedef int ImGuiColorEditFlags; typedef int ImGuiConfigFlags; typedef int ImGuiComboFlags; typedef int ImGuiDockNodeFlags; typedef int ImGuiDragDropFlags; typedef int ImGuiFocusedFlags; typedef int ImGuiHoveredFlags; typedef int ImGuiInputTextFlags; typedef int ImGuiKeyModFlags; typedef int ImGuiPopupFlags; typedef int ImGuiSelectableFlags; typedef int ImGuiSliderFlags; typedef int ImGuiTabBarFlags; typedef int ImGuiTabItemFlags; typedef int ImGuiTableFlags; typedef int ImGuiTableColumnFlags; typedef int ImGuiTableRowFlags; typedef int ImGuiTreeNodeFlags; typedef int ImGuiViewportFlags; typedef int ImGuiWindowFlags; typedef void* ImTextureID; typedef unsigned int ImGuiID; typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data); typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); typedef void* (*ImGuiMemAllocFunc)(size_t sz, void* user_data); typedef void (*ImGuiMemFreeFunc)(void* ptr, void* user_data); typedef unsigned short ImWchar16; typedef unsigned int ImWchar32; typedef ImWchar16 ImWchar; typedef signed char ImS8; typedef unsigned char ImU8; typedef signed short ImS16; typedef unsigned short ImU16; typedef signed int ImS32; typedef unsigned int ImU32; typedef int64_t ImS64; typedef uint64_t ImU64; typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd); typedef unsigned short ImDrawIdx; typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector; typedef struct ImVector_ImDrawChannel {int Size;int Capacity;ImDrawChannel* Data;} ImVector_ImDrawChannel; typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd; typedef struct ImVector_ImDrawIdx {int Size;int Capacity;ImDrawIdx* Data;} ImVector_ImDrawIdx; typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert; typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr; typedef struct ImVector_ImFontAtlasCustomRect {int Size;int Capacity;ImFontAtlasCustomRect* Data;} ImVector_ImFontAtlasCustomRect; typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig; typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph; typedef struct ImVector_ImGuiPlatformMonitor {int Size;int Capacity;ImGuiPlatformMonitor* Data;} ImVector_ImGuiPlatformMonitor; typedef struct ImVector_ImGuiStoragePair {int Size;int Capacity;ImGuiStoragePair* Data;} ImVector_ImGuiStoragePair; typedef struct ImVector_ImGuiTextRange {int Size;int Capacity;ImGuiTextRange* Data;} ImVector_ImGuiTextRange; typedef struct ImVector_ImGuiViewportPtr {int Size;int Capacity;ImGuiViewport** Data;} ImVector_ImGuiViewportPtr; typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID; typedef struct ImVector_ImU32 {int Size;int Capacity;ImU32* Data;} ImVector_ImU32; typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2; typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4; typedef struct ImVector_ImWchar {int Size;int Capacity;ImWchar* Data;} ImVector_ImWchar; typedef struct ImVector_char {int Size;int Capacity;char* Data;} ImVector_char; typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float; struct ImVec2 { float x, y; }; struct ImVec4 { float x, y, z, w; }; typedef enum { ImGuiWindowFlags_None = 0, ImGuiWindowFlags_NoTitleBar = 1 << 0, ImGuiWindowFlags_NoResize = 1 << 1, ImGuiWindowFlags_NoMove = 1 << 2, ImGuiWindowFlags_NoScrollbar = 1 << 3, ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, ImGuiWindowFlags_NoCollapse = 1 << 5, ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, ImGuiWindowFlags_NoBackground = 1 << 7, ImGuiWindowFlags_NoSavedSettings = 1 << 8, ImGuiWindowFlags_NoMouseInputs = 1 << 9, ImGuiWindowFlags_MenuBar = 1 << 10, ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, ImGuiWindowFlags_NoNavInputs = 1 << 18, ImGuiWindowFlags_NoNavFocus = 1 << 19, ImGuiWindowFlags_UnsavedDocument = 1 << 20, ImGuiWindowFlags_NoDocking = 1 << 21, ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_NavFlattened = 1 << 23, ImGuiWindowFlags_ChildWindow = 1 << 24, ImGuiWindowFlags_Tooltip = 1 << 25, ImGuiWindowFlags_Popup = 1 << 26, ImGuiWindowFlags_Modal = 1 << 27, ImGuiWindowFlags_ChildMenu = 1 << 28, ImGuiWindowFlags_DockNodeHost = 1 << 29 }ImGuiWindowFlags_; typedef enum { ImGuiInputTextFlags_None = 0, ImGuiInputTextFlags_CharsDecimal = 1 << 0, ImGuiInputTextFlags_CharsHexadecimal = 1 << 1, ImGuiInputTextFlags_CharsUppercase = 1 << 2, ImGuiInputTextFlags_CharsNoBlank = 1 << 3, ImGuiInputTextFlags_AutoSelectAll = 1 << 4, ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5, ImGuiInputTextFlags_CallbackCompletion = 1 << 6, ImGuiInputTextFlags_CallbackHistory = 1 << 7, ImGuiInputTextFlags_CallbackAlways = 1 << 8, ImGuiInputTextFlags_CallbackCharFilter = 1 << 9, ImGuiInputTextFlags_AllowTabInput = 1 << 10, ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11, ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12, ImGuiInputTextFlags_AlwaysOverwrite = 1 << 13, ImGuiInputTextFlags_ReadOnly = 1 << 14, ImGuiInputTextFlags_Password = 1 << 15, ImGuiInputTextFlags_NoUndoRedo = 1 << 16, ImGuiInputTextFlags_CharsScientific = 1 << 17, ImGuiInputTextFlags_CallbackResize = 1 << 18, ImGuiInputTextFlags_CallbackEdit = 1 << 19 }ImGuiInputTextFlags_; typedef enum { ImGuiTreeNodeFlags_None = 0, ImGuiTreeNodeFlags_Selected = 1 << 0, ImGuiTreeNodeFlags_Framed = 1 << 1, ImGuiTreeNodeFlags_AllowItemOverlap = 1 << 2, ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3, ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4, ImGuiTreeNodeFlags_DefaultOpen = 1 << 5, ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6, ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7, ImGuiTreeNodeFlags_Leaf = 1 << 8, ImGuiTreeNodeFlags_Bullet = 1 << 9, ImGuiTreeNodeFlags_FramePadding = 1 << 10, ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13, ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog }ImGuiTreeNodeFlags_; typedef enum { ImGuiPopupFlags_None = 0, ImGuiPopupFlags_MouseButtonLeft = 0, ImGuiPopupFlags_MouseButtonRight = 1, ImGuiPopupFlags_MouseButtonMiddle = 2, ImGuiPopupFlags_MouseButtonMask_ = 0x1F, ImGuiPopupFlags_MouseButtonDefault_ = 1, ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 5, ImGuiPopupFlags_NoOpenOverItems = 1 << 6, ImGuiPopupFlags_AnyPopupId = 1 << 7, ImGuiPopupFlags_AnyPopupLevel = 1 << 8, ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel }ImGuiPopupFlags_; typedef enum { ImGuiSelectableFlags_None = 0, ImGuiSelectableFlags_DontClosePopups = 1 << 0, ImGuiSelectableFlags_SpanAllColumns = 1 << 1, ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, ImGuiSelectableFlags_Disabled = 1 << 3, ImGuiSelectableFlags_AllowItemOverlap = 1 << 4 }ImGuiSelectableFlags_; typedef enum { ImGuiComboFlags_None = 0, ImGuiComboFlags_PopupAlignLeft = 1 << 0, ImGuiComboFlags_HeightSmall = 1 << 1, ImGuiComboFlags_HeightRegular = 1 << 2, ImGuiComboFlags_HeightLarge = 1 << 3, ImGuiComboFlags_HeightLargest = 1 << 4, ImGuiComboFlags_NoArrowButton = 1 << 5, ImGuiComboFlags_NoPreview = 1 << 6, ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest }ImGuiComboFlags_; typedef enum { ImGuiTabBarFlags_None = 0, ImGuiTabBarFlags_Reorderable = 1 << 0, ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, ImGuiTabBarFlags_TabListPopupButton = 1 << 2, ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, ImGuiTabBarFlags_NoTooltip = 1 << 5, ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6, ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7, ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll, ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown }ImGuiTabBarFlags_; typedef enum { ImGuiTabItemFlags_None = 0, ImGuiTabItemFlags_UnsavedDocument = 1 << 0, ImGuiTabItemFlags_SetSelected = 1 << 1, ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, ImGuiTabItemFlags_NoPushId = 1 << 3, ImGuiTabItemFlags_NoTooltip = 1 << 4, ImGuiTabItemFlags_NoReorder = 1 << 5, ImGuiTabItemFlags_Leading = 1 << 6, ImGuiTabItemFlags_Trailing = 1 << 7 }ImGuiTabItemFlags_; typedef enum { ImGuiTableFlags_None = 0, ImGuiTableFlags_Resizable = 1 << 0, ImGuiTableFlags_Reorderable = 1 << 1, ImGuiTableFlags_Hideable = 1 << 2, ImGuiTableFlags_Sortable = 1 << 3, ImGuiTableFlags_NoSavedSettings = 1 << 4, ImGuiTableFlags_ContextMenuInBody = 1 << 5, ImGuiTableFlags_RowBg = 1 << 6, ImGuiTableFlags_BordersInnerH = 1 << 7, ImGuiTableFlags_BordersOuterH = 1 << 8, ImGuiTableFlags_BordersInnerV = 1 << 9, ImGuiTableFlags_BordersOuterV = 1 << 10, ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, ImGuiTableFlags_NoBordersInBody = 1 << 11, ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, ImGuiTableFlags_SizingFixedFit = 1 << 13, ImGuiTableFlags_SizingFixedSame = 2 << 13, ImGuiTableFlags_SizingStretchProp = 3 << 13, ImGuiTableFlags_SizingStretchSame = 4 << 13, ImGuiTableFlags_NoHostExtendX = 1 << 16, ImGuiTableFlags_NoHostExtendY = 1 << 17, ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, ImGuiTableFlags_PreciseWidths = 1 << 19, ImGuiTableFlags_NoClip = 1 << 20, ImGuiTableFlags_PadOuterX = 1 << 21, ImGuiTableFlags_NoPadOuterX = 1 << 22, ImGuiTableFlags_NoPadInnerX = 1 << 23, ImGuiTableFlags_ScrollX = 1 << 24, ImGuiTableFlags_ScrollY = 1 << 25, ImGuiTableFlags_SortMulti = 1 << 26, ImGuiTableFlags_SortTristate = 1 << 27, ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame }ImGuiTableFlags_; typedef enum { ImGuiTableColumnFlags_None = 0, ImGuiTableColumnFlags_DefaultHide = 1 << 0, ImGuiTableColumnFlags_DefaultSort = 1 << 1, ImGuiTableColumnFlags_WidthStretch = 1 << 2, ImGuiTableColumnFlags_WidthFixed = 1 << 3, ImGuiTableColumnFlags_NoResize = 1 << 4, ImGuiTableColumnFlags_NoReorder = 1 << 5, ImGuiTableColumnFlags_NoHide = 1 << 6, ImGuiTableColumnFlags_NoClip = 1 << 7, ImGuiTableColumnFlags_NoSort = 1 << 8, ImGuiTableColumnFlags_NoSortAscending = 1 << 9, ImGuiTableColumnFlags_NoSortDescending = 1 << 10, ImGuiTableColumnFlags_NoHeaderWidth = 1 << 11, ImGuiTableColumnFlags_PreferSortAscending = 1 << 12, ImGuiTableColumnFlags_PreferSortDescending = 1 << 13, ImGuiTableColumnFlags_IndentEnable = 1 << 14, ImGuiTableColumnFlags_IndentDisable = 1 << 15, ImGuiTableColumnFlags_IsEnabled = 1 << 20, ImGuiTableColumnFlags_IsVisible = 1 << 21, ImGuiTableColumnFlags_IsSorted = 1 << 22, ImGuiTableColumnFlags_IsHovered = 1 << 23, ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30 }ImGuiTableColumnFlags_; typedef enum { ImGuiTableRowFlags_None = 0, ImGuiTableRowFlags_Headers = 1 << 0 }ImGuiTableRowFlags_; typedef enum { ImGuiTableBgTarget_None = 0, ImGuiTableBgTarget_RowBg0 = 1, ImGuiTableBgTarget_RowBg1 = 2, ImGuiTableBgTarget_CellBg = 3 }ImGuiTableBgTarget_; typedef enum { ImGuiFocusedFlags_None = 0, ImGuiFocusedFlags_ChildWindows = 1 << 0, ImGuiFocusedFlags_RootWindow = 1 << 1, ImGuiFocusedFlags_AnyWindow = 1 << 2, ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows }ImGuiFocusedFlags_; typedef enum { ImGuiHoveredFlags_None = 0, ImGuiHoveredFlags_ChildWindows = 1 << 0, ImGuiHoveredFlags_RootWindow = 1 << 1, ImGuiHoveredFlags_AnyWindow = 1 << 2, ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3, ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5, ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6, ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7, ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows }ImGuiHoveredFlags_; typedef enum { ImGuiDockNodeFlags_None = 0, ImGuiDockNodeFlags_KeepAliveOnly = 1 << 0, ImGuiDockNodeFlags_NoDockingInCentralNode = 1 << 2, ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3, ImGuiDockNodeFlags_NoSplit = 1 << 4, ImGuiDockNodeFlags_NoResize = 1 << 5, ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6 }ImGuiDockNodeFlags_; typedef enum { ImGuiDragDropFlags_None = 0, ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0, ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1, ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2, ImGuiDragDropFlags_SourceAllowNullID = 1 << 3, ImGuiDragDropFlags_SourceExtern = 1 << 4, ImGuiDragDropFlags_SourceAutoExpirePayload = 1 << 5, ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10, ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11, ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12, ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect }ImGuiDragDropFlags_; typedef enum { ImGuiDataType_S8, ImGuiDataType_U8, ImGuiDataType_S16, ImGuiDataType_U16, ImGuiDataType_S32, ImGuiDataType_U32, ImGuiDataType_S64, ImGuiDataType_U64, ImGuiDataType_Float, ImGuiDataType_Double, ImGuiDataType_COUNT }ImGuiDataType_; typedef enum { ImGuiDir_None = -1, ImGuiDir_Left = 0, ImGuiDir_Right = 1, ImGuiDir_Up = 2, ImGuiDir_Down = 3, ImGuiDir_COUNT }ImGuiDir_; typedef enum { ImGuiSortDirection_None = 0, ImGuiSortDirection_Ascending = 1, ImGuiSortDirection_Descending = 2 }ImGuiSortDirection_; typedef enum { ImGuiKey_Tab, ImGuiKey_LeftArrow, ImGuiKey_RightArrow, ImGuiKey_UpArrow, ImGuiKey_DownArrow, ImGuiKey_PageUp, ImGuiKey_PageDown, ImGuiKey_Home, ImGuiKey_End, ImGuiKey_Insert, ImGuiKey_Delete, ImGuiKey_Backspace, ImGuiKey_Space, ImGuiKey_Enter, ImGuiKey_Escape, ImGuiKey_KeyPadEnter, ImGuiKey_A, ImGuiKey_C, ImGuiKey_V, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z, ImGuiKey_COUNT }ImGuiKey_; typedef enum { ImGuiKeyModFlags_None = 0, ImGuiKeyModFlags_Ctrl = 1 << 0, ImGuiKeyModFlags_Shift = 1 << 1, ImGuiKeyModFlags_Alt = 1 << 2, ImGuiKeyModFlags_Super = 1 << 3 }ImGuiKeyModFlags_; typedef enum { ImGuiNavInput_Activate, ImGuiNavInput_Cancel, ImGuiNavInput_Input, ImGuiNavInput_Menu, ImGuiNavInput_DpadLeft, ImGuiNavInput_DpadRight, ImGuiNavInput_DpadUp, ImGuiNavInput_DpadDown, ImGuiNavInput_LStickLeft, ImGuiNavInput_LStickRight, ImGuiNavInput_LStickUp, ImGuiNavInput_LStickDown, ImGuiNavInput_FocusPrev, ImGuiNavInput_FocusNext, ImGuiNavInput_TweakSlow, ImGuiNavInput_TweakFast, ImGuiNavInput_KeyMenu_, ImGuiNavInput_KeyLeft_, ImGuiNavInput_KeyRight_, ImGuiNavInput_KeyUp_, ImGuiNavInput_KeyDown_, ImGuiNavInput_COUNT, ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_ }ImGuiNavInput_; typedef enum { ImGuiConfigFlags_None = 0, ImGuiConfigFlags_NavEnableKeyboard = 1 << 0, ImGuiConfigFlags_NavEnableGamepad = 1 << 1, ImGuiConfigFlags_NavEnableSetMousePos = 1 << 2, ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3, ImGuiConfigFlags_NoMouse = 1 << 4, ImGuiConfigFlags_NoMouseCursorChange = 1 << 5, ImGuiConfigFlags_DockingEnable = 1 << 6, ImGuiConfigFlags_ViewportsEnable = 1 << 10, ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 14, ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 15, ImGuiConfigFlags_IsSRGB = 1 << 20, ImGuiConfigFlags_IsTouchScreen = 1 << 21 }ImGuiConfigFlags_; typedef enum { ImGuiBackendFlags_None = 0, ImGuiBackendFlags_HasGamepad = 1 << 0, ImGuiBackendFlags_HasMouseCursors = 1 << 1, ImGuiBackendFlags_HasSetMousePos = 1 << 2, ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3, ImGuiBackendFlags_PlatformHasViewports = 1 << 10, ImGuiBackendFlags_HasMouseHoveredViewport=1 << 11, ImGuiBackendFlags_RendererHasViewports = 1 << 12 }ImGuiBackendFlags_; typedef enum { ImGuiCol_Text, ImGuiCol_TextDisabled, ImGuiCol_WindowBg, ImGuiCol_ChildBg, ImGuiCol_PopupBg, ImGuiCol_Border, ImGuiCol_BorderShadow, ImGuiCol_FrameBg, ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive, ImGuiCol_TitleBg, ImGuiCol_TitleBgActive, ImGuiCol_TitleBgCollapsed, ImGuiCol_MenuBarBg, ImGuiCol_ScrollbarBg, ImGuiCol_ScrollbarGrab, ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabActive, ImGuiCol_CheckMark, ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, ImGuiCol_Button, ImGuiCol_ButtonHovered, ImGuiCol_ButtonActive, ImGuiCol_Header, ImGuiCol_HeaderHovered, ImGuiCol_HeaderActive, ImGuiCol_Separator, ImGuiCol_SeparatorHovered, ImGuiCol_SeparatorActive, ImGuiCol_ResizeGrip, ImGuiCol_ResizeGripHovered, ImGuiCol_ResizeGripActive, ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive, ImGuiCol_DockingPreview, ImGuiCol_DockingEmptyBg, ImGuiCol_PlotLines, ImGuiCol_PlotLinesHovered, ImGuiCol_PlotHistogram, ImGuiCol_PlotHistogramHovered, ImGuiCol_TableHeaderBg, ImGuiCol_TableBorderStrong, ImGuiCol_TableBorderLight, ImGuiCol_TableRowBg, ImGuiCol_TableRowBgAlt, ImGuiCol_TextSelectedBg, ImGuiCol_DragDropTarget, ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight, ImGuiCol_NavWindowingDimBg, ImGuiCol_ModalWindowDimBg, ImGuiCol_COUNT }ImGuiCol_; typedef enum { ImGuiStyleVar_Alpha, ImGuiStyleVar_WindowPadding, ImGuiStyleVar_WindowRounding, ImGuiStyleVar_WindowBorderSize, ImGuiStyleVar_WindowMinSize, ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ChildRounding, ImGuiStyleVar_ChildBorderSize, ImGuiStyleVar_PopupRounding, ImGuiStyleVar_PopupBorderSize, ImGuiStyleVar_FramePadding, ImGuiStyleVar_FrameRounding, ImGuiStyleVar_FrameBorderSize, ImGuiStyleVar_ItemSpacing, ImGuiStyleVar_ItemInnerSpacing, ImGuiStyleVar_IndentSpacing, ImGuiStyleVar_CellPadding, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabMinSize, ImGuiStyleVar_GrabRounding, ImGuiStyleVar_TabRounding, ImGuiStyleVar_ButtonTextAlign, ImGuiStyleVar_SelectableTextAlign, ImGuiStyleVar_COUNT }ImGuiStyleVar_; typedef enum { ImGuiButtonFlags_None = 0, ImGuiButtonFlags_MouseButtonLeft = 1 << 0, ImGuiButtonFlags_MouseButtonRight = 1 << 1, ImGuiButtonFlags_MouseButtonMiddle = 1 << 2, ImGuiButtonFlags_MouseButtonMask_ = ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle, ImGuiButtonFlags_MouseButtonDefault_ = ImGuiButtonFlags_MouseButtonLeft }ImGuiButtonFlags_; typedef enum { ImGuiColorEditFlags_None = 0, ImGuiColorEditFlags_NoAlpha = 1 << 1, ImGuiColorEditFlags_NoPicker = 1 << 2, ImGuiColorEditFlags_NoOptions = 1 << 3, ImGuiColorEditFlags_NoSmallPreview = 1 << 4, ImGuiColorEditFlags_NoInputs = 1 << 5, ImGuiColorEditFlags_NoTooltip = 1 << 6, ImGuiColorEditFlags_NoLabel = 1 << 7, ImGuiColorEditFlags_NoSidePreview = 1 << 8, ImGuiColorEditFlags_NoDragDrop = 1 << 9, ImGuiColorEditFlags_NoBorder = 1 << 10, ImGuiColorEditFlags_AlphaBar = 1 << 16, ImGuiColorEditFlags_AlphaPreview = 1 << 17, ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18, ImGuiColorEditFlags_HDR = 1 << 19, ImGuiColorEditFlags_DisplayRGB = 1 << 20, ImGuiColorEditFlags_DisplayHSV = 1 << 21, ImGuiColorEditFlags_DisplayHex = 1 << 22, ImGuiColorEditFlags_Uint8 = 1 << 23, ImGuiColorEditFlags_Float = 1 << 24, ImGuiColorEditFlags_PickerHueBar = 1 << 25, ImGuiColorEditFlags_PickerHueWheel = 1 << 26, ImGuiColorEditFlags_InputRGB = 1 << 27, ImGuiColorEditFlags_InputHSV = 1 << 28, ImGuiColorEditFlags__OptionsDefault = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar, ImGuiColorEditFlags__DisplayMask = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex, ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float, ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar, ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV }ImGuiColorEditFlags_; typedef enum { ImGuiSliderFlags_None = 0, ImGuiSliderFlags_AlwaysClamp = 1 << 4, ImGuiSliderFlags_Logarithmic = 1 << 5, ImGuiSliderFlags_NoRoundToFormat = 1 << 6, ImGuiSliderFlags_NoInput = 1 << 7, ImGuiSliderFlags_InvalidMask_ = 0x7000000F }ImGuiSliderFlags_; typedef enum { ImGuiMouseButton_Left = 0, ImGuiMouseButton_Right = 1, ImGuiMouseButton_Middle = 2, ImGuiMouseButton_COUNT = 5 }ImGuiMouseButton_; typedef enum { ImGuiMouseCursor_None = -1, ImGuiMouseCursor_Arrow = 0, ImGuiMouseCursor_TextInput, ImGuiMouseCursor_ResizeAll, ImGuiMouseCursor_ResizeNS, ImGuiMouseCursor_ResizeEW, ImGuiMouseCursor_ResizeNESW, ImGuiMouseCursor_ResizeNWSE, ImGuiMouseCursor_Hand, ImGuiMouseCursor_NotAllowed, ImGuiMouseCursor_COUNT }ImGuiMouseCursor_; typedef enum { ImGuiCond_None = 0, ImGuiCond_Always = 1 << 0, ImGuiCond_Once = 1 << 1, ImGuiCond_FirstUseEver = 1 << 2, ImGuiCond_Appearing = 1 << 3 }ImGuiCond_; struct ImGuiStyle { float Alpha; ImVec2 WindowPadding; float WindowRounding; float WindowBorderSize; ImVec2 WindowMinSize; ImVec2 WindowTitleAlign; ImGuiDir WindowMenuButtonPosition; float ChildRounding; float ChildBorderSize; float PopupRounding; float PopupBorderSize; ImVec2 FramePadding; float FrameRounding; float FrameBorderSize; ImVec2 ItemSpacing; ImVec2 ItemInnerSpacing; ImVec2 CellPadding; ImVec2 TouchExtraPadding; float IndentSpacing; float ColumnsMinSpacing; float ScrollbarSize; float ScrollbarRounding; float GrabMinSize; float GrabRounding; float LogSliderDeadzone; float TabRounding; float TabBorderSize; float TabMinWidthForCloseButton; ImGuiDir ColorButtonPosition; ImVec2 ButtonTextAlign; ImVec2 SelectableTextAlign; ImVec2 DisplayWindowPadding; ImVec2 DisplaySafeAreaPadding; float MouseCursorScale; _Bool AntiAliasedLines; _Bool AntiAliasedLinesUseTex; _Bool AntiAliasedFill; float CurveTessellationTol; float CircleTessellationMaxError; ImVec4 Colors[ImGuiCol_COUNT]; }; struct ImGuiIO { ImGuiConfigFlags ConfigFlags; ImGuiBackendFlags BackendFlags; ImVec2 DisplaySize; float DeltaTime; float IniSavingRate; const char* IniFilename; const char* LogFilename; float MouseDoubleClickTime; float MouseDoubleClickMaxDist; float MouseDragThreshold; int KeyMap[ImGuiKey_COUNT]; float KeyRepeatDelay; float KeyRepeatRate; void* UserData; ImFontAtlas*Fonts; float FontGlobalScale; _Bool FontAllowUserScaling; ImFont* FontDefault; ImVec2 DisplayFramebufferScale; _Bool ConfigDockingNoSplit; _Bool ConfigDockingAlwaysTabBar; _Bool ConfigDockingTransparentPayload; _Bool ConfigViewportsNoAutoMerge; _Bool ConfigViewportsNoTaskBarIcon; _Bool ConfigViewportsNoDecoration; _Bool ConfigViewportsNoDefaultParent; _Bool MouseDrawCursor; _Bool ConfigMacOSXBehaviors; _Bool ConfigInputTextCursorBlink; _Bool ConfigDragClickToInputText; _Bool ConfigWindowsResizeFromEdges; _Bool ConfigWindowsMoveFromTitleBarOnly; float ConfigMemoryCompactTimer; const char* BackendPlatformName; const char* BackendRendererName; void* BackendPlatformUserData; void* BackendRendererUserData; void* BackendLanguageUserData; const char* (*GetClipboardTextFn)(void* user_data); void (*SetClipboardTextFn)(void* user_data, const char* text); void* ClipboardUserData; ImVec2 MousePos; _Bool MouseDown[5]; float MouseWheel; float MouseWheelH; ImGuiID MouseHoveredViewport; _Bool KeyCtrl; _Bool KeyShift; _Bool KeyAlt; _Bool KeySuper; _Bool KeysDown[512]; float NavInputs[ImGuiNavInput_COUNT]; _Bool WantCaptureMouse; _Bool WantCaptureKeyboard; _Bool WantTextInput; _Bool WantSetMousePos; _Bool WantSaveIniSettings; _Bool NavActive; _Bool NavVisible; float Framerate; int MetricsRenderVertices; int MetricsRenderIndices; int MetricsRenderWindows; int MetricsActiveWindows; int MetricsActiveAllocations; ImVec2 MouseDelta; ImGuiKeyModFlags KeyMods; ImVec2 MousePosPrev; ImVec2 MouseClickedPos[5]; double MouseClickedTime[5]; _Bool MouseClicked[5]; _Bool MouseDoubleClicked[5]; _Bool MouseReleased[5]; _Bool MouseDownOwned[5]; _Bool MouseDownWasDoubleClick[5]; float MouseDownDuration[5]; float MouseDownDurationPrev[5]; ImVec2 MouseDragMaxDistanceAbs[5]; float MouseDragMaxDistanceSqr[5]; float KeysDownDuration[512]; float KeysDownDurationPrev[512]; float NavInputsDownDuration[ImGuiNavInput_COUNT]; float NavInputsDownDurationPrev[ImGuiNavInput_COUNT]; float PenPressure; ImWchar16 InputQueueSurrogate; ImVector_ImWchar InputQueueCharacters; }; struct ImGuiInputTextCallbackData { ImGuiInputTextFlags EventFlag; ImGuiInputTextFlags Flags; void* UserData; ImWchar EventChar; ImGuiKey EventKey; char* Buf; int BufTextLen; int BufSize; _Bool BufDirty; int CursorPos; int SelectionStart; int SelectionEnd; }; struct ImGuiSizeCallbackData { void* UserData; ImVec2 Pos; ImVec2 CurrentSize; ImVec2 DesiredSize; }; struct ImGuiWindowClass { ImGuiID ClassId; ImGuiID ParentViewportId; ImGuiViewportFlags ViewportFlagsOverrideSet; ImGuiViewportFlags ViewportFlagsOverrideClear; ImGuiTabItemFlags TabItemFlagsOverrideSet; ImGuiDockNodeFlags DockNodeFlagsOverrideSet; ImGuiDockNodeFlags DockNodeFlagsOverrideClear; _Bool DockingAlwaysTabBar; _Bool DockingAllowUnclassed; }; struct ImGuiPayload { void* Data; int DataSize; ImGuiID SourceId; ImGuiID SourceParentId; int DataFrameCount; char DataType[32 + 1]; _Bool Preview; _Bool Delivery; }; struct ImGuiTableColumnSortSpecs { ImGuiID ColumnUserID; ImS16 ColumnIndex; ImS16 SortOrder; ImGuiSortDirection SortDirection : 8; }; struct ImGuiTableSortSpecs { const ImGuiTableColumnSortSpecs* Specs; int SpecsCount; _Bool SpecsDirty; }; struct ImGuiOnceUponAFrame { int RefFrame; }; struct ImGuiTextRange { const char* b; const char* e; }; struct ImGuiTextFilter { char InputBuf[256]; ImVector_ImGuiTextRange Filters; int CountGrep; }; struct ImGuiTextBuffer { ImVector_char Buf; }; struct ImGuiStoragePair { ImGuiID key; union { int val_i; float val_f; void* val_p; }; }; struct ImGuiStorage { ImVector_ImGuiStoragePair Data; }; struct ImGuiListClipper { int DisplayStart; int DisplayEnd; int ItemsCount; int StepNo; int ItemsFrozen; float ItemsHeight; float StartPosY; }; struct ImColor { ImVec4 Value; }; struct ImDrawCmd { ImVec4 ClipRect; ImTextureID TextureId; unsigned int VtxOffset; unsigned int IdxOffset; unsigned int ElemCount; ImDrawCallback UserCallback; void* UserCallbackData; }; struct ImDrawVert { ImVec2 pos; ImVec2 uv; ImU32 col; }; struct ImDrawCmdHeader { ImVec4 ClipRect; ImTextureID TextureId; unsigned int VtxOffset; }; struct ImDrawChannel { ImVector_ImDrawCmd _CmdBuffer; ImVector_ImDrawIdx _IdxBuffer; }; struct ImDrawListSplitter { int _Current; int _Count; ImVector_ImDrawChannel _Channels; }; typedef enum { ImDrawFlags_None = 0, ImDrawFlags_Closed = 1 << 0, ImDrawFlags_RoundCornersTopLeft = 1 << 4, ImDrawFlags_RoundCornersTopRight = 1 << 5, ImDrawFlags_RoundCornersBottomLeft = 1 << 6, ImDrawFlags_RoundCornersBottomRight = 1 << 7, ImDrawFlags_RoundCornersNone = 1 << 8, ImDrawFlags_RoundCornersTop = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight, ImDrawFlags_RoundCornersBottom = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight, ImDrawFlags_RoundCornersLeft = ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersTopLeft, ImDrawFlags_RoundCornersRight = ImDrawFlags_RoundCornersBottomRight | ImDrawFlags_RoundCornersTopRight, ImDrawFlags_RoundCornersAll = ImDrawFlags_RoundCornersTopLeft | ImDrawFlags_RoundCornersTopRight | ImDrawFlags_RoundCornersBottomLeft | ImDrawFlags_RoundCornersBottomRight, ImDrawFlags_RoundCornersDefault_ = ImDrawFlags_RoundCornersAll, ImDrawFlags_RoundCornersMask_ = ImDrawFlags_RoundCornersAll | ImDrawFlags_RoundCornersNone }ImDrawFlags_; typedef enum { ImDrawListFlags_None = 0, ImDrawListFlags_AntiAliasedLines = 1 << 0, ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, ImDrawListFlags_AntiAliasedFill = 1 << 2, ImDrawListFlags_AllowVtxOffset = 1 << 3 }ImDrawListFlags_; struct ImDrawList { ImVector_ImDrawCmd CmdBuffer; ImVector_ImDrawIdx IdxBuffer; ImVector_ImDrawVert VtxBuffer; ImDrawListFlags Flags; unsigned int _VtxCurrentIdx; const ImDrawListSharedData* _Data; const char* _OwnerName; ImDrawVert* _VtxWritePtr; ImDrawIdx* _IdxWritePtr; ImVector_ImVec4 _ClipRectStack; ImVector_ImTextureID _TextureIdStack; ImVector_ImVec2 _Path; ImDrawCmdHeader _CmdHeader; ImDrawListSplitter _Splitter; float _FringeScale; }; struct ImDrawData { _Bool Valid; int CmdListsCount; int TotalIdxCount; int TotalVtxCount; ImDrawList** CmdLists; ImVec2 DisplayPos; ImVec2 DisplaySize; ImVec2 FramebufferScale; ImGuiViewport* OwnerViewport; }; struct ImFontConfig { void* FontData; int FontDataSize; _Bool FontDataOwnedByAtlas; int FontNo; float SizePixels; int OversampleH; int OversampleV; _Bool PixelSnapH; ImVec2 GlyphExtraSpacing; ImVec2 GlyphOffset; const ImWchar* GlyphRanges; float GlyphMinAdvanceX; float GlyphMaxAdvanceX; _Bool MergeMode; unsigned int FontBuilderFlags; float RasterizerMultiply; ImWchar EllipsisChar; char Name[40]; ImFont* DstFont; }; struct ImFontGlyph { unsigned int Colored : 1; unsigned int Visible : 1; unsigned int Codepoint : 30; float AdvanceX; float X0, Y0, X1, Y1; float U0, V0, U1, V1; }; struct ImFontGlyphRangesBuilder { ImVector_ImU32 UsedChars; }; struct ImFontAtlasCustomRect { unsigned short Width, Height; unsigned short X, Y; unsigned int GlyphID; float GlyphAdvanceX; ImVec2 GlyphOffset; ImFont* Font; }; typedef enum { ImFontAtlasFlags_None = 0, ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, ImFontAtlasFlags_NoMouseCursors = 1 << 1, ImFontAtlasFlags_NoBakedLines = 1 << 2 }ImFontAtlasFlags_; struct ImFontAtlas { ImFontAtlasFlags Flags; ImTextureID TexID; int TexDesiredWidth; int TexGlyphPadding; _Bool Locked; _Bool TexPixelsUseColors; unsigned char* TexPixelsAlpha8; unsigned int* TexPixelsRGBA32; int TexWidth; int TexHeight; ImVec2 TexUvScale; ImVec2 TexUvWhitePixel; ImVector_ImFontPtr Fonts; ImVector_ImFontAtlasCustomRect CustomRects; ImVector_ImFontConfig ConfigData; ImVec4 TexUvLines[(63) + 1]; const ImFontBuilderIO* FontBuilderIO; unsigned int FontBuilderFlags; int PackIdMouseCursors; int PackIdLines; }; struct ImFont { ImVector_float IndexAdvanceX; float FallbackAdvanceX; float FontSize; ImVector_ImWchar IndexLookup; ImVector_ImFontGlyph Glyphs; const ImFontGlyph* FallbackGlyph; ImFontAtlas* ContainerAtlas; const ImFontConfig* ConfigData; short ConfigDataCount; ImWchar FallbackChar; ImWchar EllipsisChar; _Bool DirtyLookupTables; float Scale; float Ascent, Descent; int MetricsTotalSurface; ImU8 Used4kPagesMap[(0xFFFF +1)/4096/8]; }; typedef enum { ImGuiViewportFlags_None = 0, ImGuiViewportFlags_IsPlatformWindow = 1 << 0, ImGuiViewportFlags_IsPlatformMonitor = 1 << 1, ImGuiViewportFlags_OwnedByApp = 1 << 2, ImGuiViewportFlags_NoDecoration = 1 << 3, ImGuiViewportFlags_NoTaskBarIcon = 1 << 4, ImGuiViewportFlags_NoFocusOnAppearing = 1 << 5, ImGuiViewportFlags_NoFocusOnClick = 1 << 6, ImGuiViewportFlags_NoInputs = 1 << 7, ImGuiViewportFlags_NoRendererClear = 1 << 8, ImGuiViewportFlags_TopMost = 1 << 9, ImGuiViewportFlags_Minimized = 1 << 10, ImGuiViewportFlags_NoAutoMerge = 1 << 11, ImGuiViewportFlags_CanHostOtherWindows = 1 << 12 }ImGuiViewportFlags_; struct ImGuiViewport { ImGuiID ID; ImGuiViewportFlags Flags; ImVec2 Pos; ImVec2 Size; ImVec2 WorkPos; ImVec2 WorkSize; float DpiScale; ImGuiID ParentViewportId; ImDrawData* DrawData; void* RendererUserData; void* PlatformUserData; void* PlatformHandle; void* PlatformHandleRaw; _Bool PlatformRequestMove; _Bool PlatformRequestResize; _Bool PlatformRequestClose; }; struct ImGuiPlatformIO { void (*Platform_CreateWindow)(ImGuiViewport* vp); void (*Platform_DestroyWindow)(ImGuiViewport* vp); void (*Platform_ShowWindow)(ImGuiViewport* vp); void (*Platform_SetWindowPos)(ImGuiViewport* vp, ImVec2 pos); ImVec2 (*Platform_GetWindowPos)(ImGuiViewport* vp); void (*Platform_SetWindowSize)(ImGuiViewport* vp, ImVec2 size); ImVec2 (*Platform_GetWindowSize)(ImGuiViewport* vp); void (*Platform_SetWindowFocus)(ImGuiViewport* vp); _Bool (*Platform_GetWindowFocus)(ImGuiViewport* vp); _Bool (*Platform_GetWindowMinimized)(ImGuiViewport* vp); void (*Platform_SetWindowTitle)(ImGuiViewport* vp, const char* str); void (*Platform_SetWindowAlpha)(ImGuiViewport* vp, float alpha); void (*Platform_UpdateWindow)(ImGuiViewport* vp); void (*Platform_RenderWindow)(ImGuiViewport* vp, void* render_arg); void (*Platform_SwapBuffers)(ImGuiViewport* vp, void* render_arg); float (*Platform_GetWindowDpiScale)(ImGuiViewport* vp); void (*Platform_OnChangedViewport)(ImGuiViewport* vp); void (*Platform_SetImeInputPos)(ImGuiViewport* vp, ImVec2 pos); int (*Platform_CreateVkSurface)(ImGuiViewport* vp, ImU64 vk_inst, const void* vk_allocators, ImU64* out_vk_surface); void (*Renderer_CreateWindow)(ImGuiViewport* vp); void (*Renderer_DestroyWindow)(ImGuiViewport* vp); void (*Renderer_SetWindowSize)(ImGuiViewport* vp, ImVec2 size); void (*Renderer_RenderWindow)(ImGuiViewport* vp, void* render_arg); void (*Renderer_SwapBuffers)(ImGuiViewport* vp, void* render_arg); ImVector_ImGuiPlatformMonitor Monitors; ImVector_ImGuiViewportPtr Viewports; }; struct ImGuiPlatformMonitor { ImVec2 MainPos, MainSize; ImVec2 WorkPos, WorkSize; float DpiScale; }; extern ImVec2* ImVec2_ImVec2_Nil(void); extern void ImVec2_destroy(ImVec2* self); extern ImVec2* ImVec2_ImVec2_Float(float _x,float _y); extern ImVec4* ImVec4_ImVec4_Nil(void); extern void ImVec4_destroy(ImVec4* self); extern ImVec4* ImVec4_ImVec4_Float(float _x,float _y,float _z,float _w); extern ImGuiContext* igCreateContext(ImFontAtlas* shared_font_atlas); extern void igDestroyContext(ImGuiContext* ctx); extern ImGuiContext* igGetCurrentContext(void); extern void igSetCurrentContext(ImGuiContext* ctx); extern ImGuiIO* igGetIO(void); extern ImGuiStyle* igGetStyle(void); extern void igNewFrame(void); extern void igEndFrame(void); extern void igRender(void); extern ImDrawData* igGetDrawData(void); extern void igShowDemoWindow(_Bool* p_open); extern void igShowMetricsWindow(_Bool* p_open); extern void igShowAboutWindow(_Bool* p_open); extern void igShowStyleEditor(ImGuiStyle* ref); extern _Bool igShowStyleSelector(const char* label); extern void igShowFontSelector(const char* label); extern void igShowUserGuide(void); extern const char* igGetVersion(void); extern void igStyleColorsDark(ImGuiStyle* dst); extern void igStyleColorsLight(ImGuiStyle* dst); extern void igStyleColorsClassic(ImGuiStyle* dst); extern _Bool igBegin(const char* name,_Bool* p_open,ImGuiWindowFlags flags); extern void igEnd(void); extern _Bool igBeginChild_Str(const char* str_id,const ImVec2 size,_Bool border,ImGuiWindowFlags flags); extern _Bool igBeginChild_ID(ImGuiID id,const ImVec2 size,_Bool border,ImGuiWindowFlags flags); extern void igEndChild(void); extern _Bool igIsWindowAppearing(void); extern _Bool igIsWindowCollapsed(void); extern _Bool igIsWindowFocused(ImGuiFocusedFlags flags); extern _Bool igIsWindowHovered(ImGuiHoveredFlags flags); extern ImDrawList* igGetWindowDrawList(void); extern float igGetWindowDpiScale(void); extern void igGetWindowPos(ImVec2 *pOut); extern void igGetWindowSize(ImVec2 *pOut); extern float igGetWindowWidth(void); extern float igGetWindowHeight(void); extern ImGuiViewport* igGetWindowViewport(void); extern void igSetNextWindowPos(const ImVec2 pos,ImGuiCond cond,const ImVec2 pivot); extern void igSetNextWindowSize(const ImVec2 size,ImGuiCond cond); extern void igSetNextWindowSizeConstraints(const ImVec2 size_min,const ImVec2 size_max,ImGuiSizeCallback custom_callback,void* custom_callback_data); extern void igSetNextWindowContentSize(const ImVec2 size); extern void igSetNextWindowCollapsed(_Bool collapsed,ImGuiCond cond); extern void igSetNextWindowFocus(void); extern void igSetNextWindowBgAlpha(float alpha); extern void igSetNextWindowViewport(ImGuiID viewport_id); extern void igSetWindowPos_Vec2(const ImVec2 pos,ImGuiCond cond); extern void igSetWindowSize_Vec2(const ImVec2 size,ImGuiCond cond); extern void igSetWindowCollapsed_Bool(_Bool collapsed,ImGuiCond cond); extern void igSetWindowFocus_Nil(void); extern void igSetWindowFontScale(float scale); extern void igSetWindowPos_Str(const char* name,const ImVec2 pos,ImGuiCond cond); extern void igSetWindowSize_Str(const char* name,const ImVec2 size,ImGuiCond cond); extern void igSetWindowCollapsed_Str(const char* name,_Bool collapsed,ImGuiCond cond); extern void igSetWindowFocus_Str(const char* name); extern void igGetContentRegionAvail(ImVec2 *pOut); extern void igGetContentRegionMax(ImVec2 *pOut); extern void igGetWindowContentRegionMin(ImVec2 *pOut); extern void igGetWindowContentRegionMax(ImVec2 *pOut); extern float igGetWindowContentRegionWidth(void); extern float igGetScrollX(void); extern float igGetScrollY(void); extern void igSetScrollX(float scroll_x); extern void igSetScrollY(float scroll_y); extern float igGetScrollMaxX(void); extern float igGetScrollMaxY(void); extern void igSetScrollHereX(float center_x_ratio); extern void igSetScrollHereY(float center_y_ratio); extern void igSetScrollFromPosX(float local_x,float center_x_ratio); extern void igSetScrollFromPosY(float local_y,float center_y_ratio); extern void igPushFont(ImFont* font); extern void igPopFont(void); extern void igPushStyleColor_U32(ImGuiCol idx,ImU32 col); extern void igPushStyleColor_Vec4(ImGuiCol idx,const ImVec4 col); extern void igPopStyleColor(int count); extern void igPushStyleVar_Float(ImGuiStyleVar idx,float val); extern void igPushStyleVar_Vec2(ImGuiStyleVar idx,const ImVec2 val); extern void igPopStyleVar(int count); extern void igPushAllowKeyboardFocus(_Bool allow_keyboard_focus); extern void igPopAllowKeyboardFocus(void); extern void igPushButtonRepeat(_Bool repeat); extern void igPopButtonRepeat(void); extern void igPushItemWidth(float item_width); extern void igPopItemWidth(void); extern void igSetNextItemWidth(float item_width); extern float igCalcItemWidth(void); extern void igPushTextWrapPos(float wrap_local_pos_x); extern void igPopTextWrapPos(void); extern ImFont* igGetFont(void); extern float igGetFontSize(void); extern void igGetFontTexUvWhitePixel(ImVec2 *pOut); extern ImU32 igGetColorU32_Col(ImGuiCol idx,float alpha_mul); extern ImU32 igGetColorU32_Vec4(const ImVec4 col); extern ImU32 igGetColorU32_U32(ImU32 col); extern const ImVec4* igGetStyleColorVec4(ImGuiCol idx); extern void igSeparator(void); extern void igSameLine(float offset_from_start_x,float spacing); extern void igNewLine(void); extern void igSpacing(void); extern void igDummy(const ImVec2 size); extern void igIndent(float indent_w); extern void igUnindent(float indent_w); extern void igBeginGroup(void); extern void igEndGroup(void); extern void igGetCursorPos(ImVec2 *pOut); extern float igGetCursorPosX(void); extern float igGetCursorPosY(void); extern void igSetCursorPos(const ImVec2 local_pos); extern void igSetCursorPosX(float local_x); extern void igSetCursorPosY(float local_y); extern void igGetCursorStartPos(ImVec2 *pOut); extern void igGetCursorScreenPos(ImVec2 *pOut); extern void igSetCursorScreenPos(const ImVec2 pos); extern void igAlignTextToFramePadding(void); extern float igGetTextLineHeight(void); extern float igGetTextLineHeightWithSpacing(void); extern float igGetFrameHeight(void); extern float igGetFrameHeightWithSpacing(void); extern void igPushID_Str(const char* str_id); extern void igPushID_StrStr(const char* str_id_begin,const char* str_id_end); extern void igPushID_Ptr(const void* ptr_id); extern void igPushID_Int(int int_id); extern void igPopID(void); extern ImGuiID igGetID_Str(const char* str_id); extern ImGuiID igGetID_StrStr(const char* str_id_begin,const char* str_id_end); extern ImGuiID igGetID_Ptr(const void* ptr_id); extern void igTextUnformatted(const char* text,const char* text_end); extern void igText(const char* fmt,...); extern void igTextV(const char* fmt,va_list args); extern void igTextColored(const ImVec4 col,const char* fmt,...); extern void igTextColoredV(const ImVec4 col,const char* fmt,va_list args); extern void igTextDisabled(const char* fmt,...); extern void igTextDisabledV(const char* fmt,va_list args); extern void igTextWrapped(const char* fmt,...); extern void igTextWrappedV(const char* fmt,va_list args); extern void igLabelText(const char* label,const char* fmt,...); extern void igLabelTextV(const char* label,const char* fmt,va_list args); extern void igBulletText(const char* fmt,...); extern void igBulletTextV(const char* fmt,va_list args); extern _Bool igButton(const char* label,const ImVec2 size); extern _Bool igSmallButton(const char* label); extern _Bool igInvisibleButton(const char* str_id,const ImVec2 size,ImGuiButtonFlags flags); extern _Bool igArrowButton(const char* str_id,ImGuiDir dir); extern void igImage(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col); extern _Bool igImageButton(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,int frame_padding,const ImVec4 bg_col,const ImVec4 tint_col); extern _Bool igCheckbox(const char* label,_Bool* v); extern _Bool igCheckboxFlags_IntPtr(const char* label,int* flags,int flags_value); extern _Bool igCheckboxFlags_UintPtr(const char* label,unsigned int* flags,unsigned int flags_value); extern _Bool igRadioButton_Bool(const char* label,_Bool active); extern _Bool igRadioButton_IntPtr(const char* label,int* v,int v_button); extern void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay); extern void igBullet(void); extern _Bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags); extern void igEndCombo(void); extern _Bool igCombo_Str_arr(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items); extern _Bool igCombo_Str(const char* label,int* current_item,const char* items_separated_by_zeros,int popup_max_height_in_items); extern _Bool igCombo_FnBoolPtr(const char* label,int* current_item,_Bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items); extern _Bool igDragFloat(const char* label,float* v,float v_speed,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragFloat2(const char* label,float v[2],float v_speed,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragFloat3(const char* label,float v[3],float v_speed,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragFloat4(const char* label,float v[4],float v_speed,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragFloatRange2(const char* label,float* v_current_min,float* v_current_max,float v_speed,float v_min,float v_max,const char* format,const char* format_max,ImGuiSliderFlags flags); extern _Bool igDragInt(const char* label,int* v,float v_speed,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragInt2(const char* label,int v[2],float v_speed,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragInt3(const char* label,int v[3],float v_speed,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragInt4(const char* label,int v[4],float v_speed,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragIntRange2(const char* label,int* v_current_min,int* v_current_max,float v_speed,int v_min,int v_max,const char* format,const char* format_max,ImGuiSliderFlags flags); extern _Bool igDragScalar(const char* label,ImGuiDataType data_type,void* p_data,float v_speed,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags); extern _Bool igDragScalarN(const char* label,ImGuiDataType data_type,void* p_data,int components,float v_speed,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderFloat(const char* label,float* v,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderFloat2(const char* label,float v[2],float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderFloat3(const char* label,float v[3],float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderFloat4(const char* label,float v[4],float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderAngle(const char* label,float* v_rad,float v_degrees_min,float v_degrees_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderInt(const char* label,int* v,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderInt2(const char* label,int v[2],int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderInt3(const char* label,int v[3],int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderInt4(const char* label,int v[4],int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderScalar(const char* label,ImGuiDataType data_type,void* p_data,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags); extern _Bool igSliderScalarN(const char* label,ImGuiDataType data_type,void* p_data,int components,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags); extern _Bool igVSliderFloat(const char* label,const ImVec2 size,float* v,float v_min,float v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igVSliderInt(const char* label,const ImVec2 size,int* v,int v_min,int v_max,const char* format,ImGuiSliderFlags flags); extern _Bool igVSliderScalar(const char* label,const ImVec2 size,ImGuiDataType data_type,void* p_data,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags); extern _Bool igInputText(const char* label,char* buf,size_t buf_size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data); extern _Bool igInputTextMultiline(const char* label,char* buf,size_t buf_size,const ImVec2 size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data); extern _Bool igInputTextWithHint(const char* label,const char* hint,char* buf,size_t buf_size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data); extern _Bool igInputFloat(const char* label,float* v,float step,float step_fast,const char* format,ImGuiInputTextFlags flags); extern _Bool igInputFloat2(const char* label,float v[2],const char* format,ImGuiInputTextFlags flags); extern _Bool igInputFloat3(const char* label,float v[3],const char* format,ImGuiInputTextFlags flags); extern _Bool igInputFloat4(const char* label,float v[4],const char* format,ImGuiInputTextFlags flags); extern _Bool igInputInt(const char* label,int* v,int step,int step_fast,ImGuiInputTextFlags flags); extern _Bool igInputInt2(const char* label,int v[2],ImGuiInputTextFlags flags); extern _Bool igInputInt3(const char* label,int v[3],ImGuiInputTextFlags flags); extern _Bool igInputInt4(const char* label,int v[4],ImGuiInputTextFlags flags); extern _Bool igInputDouble(const char* label,double* v,double step,double step_fast,const char* format,ImGuiInputTextFlags flags); extern _Bool igInputScalar(const char* label,ImGuiDataType data_type,void* p_data,const void* p_step,const void* p_step_fast,const char* format,ImGuiInputTextFlags flags); extern _Bool igInputScalarN(const char* label,ImGuiDataType data_type,void* p_data,int components,const void* p_step,const void* p_step_fast,const char* format,ImGuiInputTextFlags flags); extern _Bool igColorEdit3(const char* label,float col[3],ImGuiColorEditFlags flags); extern _Bool igColorEdit4(const char* label,float col[4],ImGuiColorEditFlags flags); extern _Bool igColorPicker3(const char* label,float col[3],ImGuiColorEditFlags flags); extern _Bool igColorPicker4(const char* label,float col[4],ImGuiColorEditFlags flags,const float* ref_col); extern _Bool igColorButton(const char* desc_id,const ImVec4 col,ImGuiColorEditFlags flags,ImVec2 size); extern void igSetColorEditOptions(ImGuiColorEditFlags flags); extern _Bool igTreeNode_Str(const char* label); extern _Bool igTreeNode_StrStr(const char* str_id,const char* fmt,...); extern _Bool igTreeNode_Ptr(const void* ptr_id,const char* fmt,...); extern _Bool igTreeNodeV_Str(const char* str_id,const char* fmt,va_list args); extern _Bool igTreeNodeV_Ptr(const void* ptr_id,const char* fmt,va_list args); extern _Bool igTreeNodeEx_Str(const char* label,ImGuiTreeNodeFlags flags); extern _Bool igTreeNodeEx_StrStr(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,...); extern _Bool igTreeNodeEx_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,...); extern _Bool igTreeNodeExV_Str(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args); extern _Bool igTreeNodeExV_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args); extern void igTreePush_Str(const char* str_id); extern void igTreePush_Ptr(const void* ptr_id); extern void igTreePop(void); extern float igGetTreeNodeToLabelSpacing(void); extern _Bool igCollapsingHeader_TreeNodeFlags(const char* label,ImGuiTreeNodeFlags flags); extern _Bool igCollapsingHeader_BoolPtr(const char* label,_Bool* p_visible,ImGuiTreeNodeFlags flags); extern void igSetNextItemOpen(_Bool is_open,ImGuiCond cond); extern _Bool igSelectable_Bool(const char* label,_Bool selected,ImGuiSelectableFlags flags,const ImVec2 size); extern _Bool igSelectable_BoolPtr(const char* label,_Bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size); extern _Bool igBeginListBox(const char* label,const ImVec2 size); extern void igEndListBox(void); extern _Bool igListBox_Str_arr(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items); extern _Bool igListBox_FnBoolPtr(const char* label,int* current_item,_Bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items); extern void igPlotLines_FloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride); extern void igPlotLines_FnFloatPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size); extern void igPlotHistogram_FloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride); extern void igPlotHistogram_FnFloatPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size); extern void igValue_Bool(const char* prefix,_Bool b); extern void igValue_Int(const char* prefix,int v); extern void igValue_Uint(const char* prefix,unsigned int v); extern void igValue_Float(const char* prefix,float v,const char* float_format); extern _Bool igBeginMenuBar(void); extern void igEndMenuBar(void); extern _Bool igBeginMainMenuBar(void); extern void igEndMainMenuBar(void); extern _Bool igBeginMenu(const char* label,_Bool enabled); extern void igEndMenu(void); extern _Bool igMenuItem_Bool(const char* label,const char* shortcut,_Bool selected,_Bool enabled); extern _Bool igMenuItem_BoolPtr(const char* label,const char* shortcut,_Bool* p_selected,_Bool enabled); extern void igBeginTooltip(void); extern void igEndTooltip(void); extern void igSetTooltip(const char* fmt,...); extern void igSetTooltipV(const char* fmt,va_list args); extern _Bool igBeginPopup(const char* str_id,ImGuiWindowFlags flags); extern _Bool igBeginPopupModal(const char* name,_Bool* p_open,ImGuiWindowFlags flags); extern void igEndPopup(void); extern void igOpenPopup_Str(const char* str_id,ImGuiPopupFlags popup_flags); extern void igOpenPopup_ID(ImGuiID id,ImGuiPopupFlags popup_flags); extern void igOpenPopupOnItemClick(const char* str_id,ImGuiPopupFlags popup_flags); extern void igCloseCurrentPopup(void); extern _Bool igBeginPopupContextItem(const char* str_id,ImGuiPopupFlags popup_flags); extern _Bool igBeginPopupContextWindow(const char* str_id,ImGuiPopupFlags popup_flags); extern _Bool igBeginPopupContextVoid(const char* str_id,ImGuiPopupFlags popup_flags); extern _Bool igIsPopupOpen(const char* str_id,ImGuiPopupFlags flags); extern _Bool igBeginTable(const char* str_id,int column,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width); extern void igEndTable(void); extern void igTableNextRow(ImGuiTableRowFlags row_flags,float min_row_height); extern _Bool igTableNextColumn(void); extern _Bool igTableSetColumnIndex(int column_n); extern void igTableSetupColumn(const char* label,ImGuiTableColumnFlags flags,float init_width_or_weight,ImGuiID user_id); extern void igTableSetupScrollFreeze(int cols,int rows); extern void igTableHeadersRow(void); extern void igTableHeader(const char* label); extern ImGuiTableSortSpecs* igTableGetSortSpecs(void); extern int igTableGetColumnCount(void); extern int igTableGetColumnIndex(void); extern int igTableGetRowIndex(void); extern const char* igTableGetColumnName(int column_n); extern ImGuiTableColumnFlags igTableGetColumnFlags(int column_n); extern void igTableSetColumnEnabled(int column_n,_Bool v); extern void igTableSetBgColor(ImGuiTableBgTarget target,ImU32 color,int column_n); extern void igColumns(int count,const char* id,_Bool border); extern void igNextColumn(void); extern int igGetColumnIndex(void); extern float igGetColumnWidth(int column_index); extern void igSetColumnWidth(int column_index,float width); extern float igGetColumnOffset(int column_index); extern void igSetColumnOffset(int column_index,float offset_x); extern int igGetColumnsCount(void); extern _Bool igBeginTabBar(const char* str_id,ImGuiTabBarFlags flags); extern void igEndTabBar(void); extern _Bool igBeginTabItem(const char* label,_Bool* p_open,ImGuiTabItemFlags flags); extern void igEndTabItem(void); extern _Bool igTabItemButton(const char* label,ImGuiTabItemFlags flags); extern void igSetTabItemClosed(const char* tab_or_docked_window_label); extern ImGuiID igDockSpace(ImGuiID id,const ImVec2 size,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class); extern ImGuiID igDockSpaceOverViewport(const ImGuiViewport* viewport,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class); extern void igSetNextWindowDockID(ImGuiID dock_id,ImGuiCond cond); extern void igSetNextWindowClass(const ImGuiWindowClass* window_class); extern ImGuiID igGetWindowDockID(void); extern _Bool igIsWindowDocked(void); extern void igLogToTTY(int auto_open_depth); extern void igLogToFile(int auto_open_depth,const char* filename); extern void igLogToClipboard(int auto_open_depth); extern void igLogFinish(void); extern void igLogButtons(void); extern void igLogTextV(const char* fmt,va_list args); extern _Bool igBeginDragDropSource(ImGuiDragDropFlags flags); extern _Bool igSetDragDropPayload(const char* type,const void* data,size_t sz,ImGuiCond cond); extern void igEndDragDropSource(void); extern _Bool igBeginDragDropTarget(void); extern const ImGuiPayload* igAcceptDragDropPayload(const char* type,ImGuiDragDropFlags flags); extern void igEndDragDropTarget(void); extern const ImGuiPayload* igGetDragDropPayload(void); extern void igPushClipRect(const ImVec2 clip_rect_min,const ImVec2 clip_rect_max,_Bool intersect_with_current_clip_rect); extern void igPopClipRect(void); extern void igSetItemDefaultFocus(void); extern void igSetKeyboardFocusHere(int offset); extern _Bool igIsItemHovered(ImGuiHoveredFlags flags); extern _Bool igIsItemActive(void); extern _Bool igIsItemFocused(void); extern _Bool igIsItemClicked(ImGuiMouseButton mouse_button); extern _Bool igIsItemVisible(void); extern _Bool igIsItemEdited(void); extern _Bool igIsItemActivated(void); extern _Bool igIsItemDeactivated(void); extern _Bool igIsItemDeactivatedAfterEdit(void); extern _Bool igIsItemToggledOpen(void); extern _Bool igIsAnyItemHovered(void); extern _Bool igIsAnyItemActive(void); extern _Bool igIsAnyItemFocused(void); extern void igGetItemRectMin(ImVec2 *pOut); extern void igGetItemRectMax(ImVec2 *pOut); extern void igGetItemRectSize(ImVec2 *pOut); extern void igSetItemAllowOverlap(void); extern ImGuiViewport* igGetMainViewport(void); extern _Bool igIsRectVisible_Nil(const ImVec2 size); extern _Bool igIsRectVisible_Vec2(const ImVec2 rect_min,const ImVec2 rect_max); extern double igGetTime(void); extern int igGetFrameCount(void); extern ImDrawList* igGetBackgroundDrawList_Nil(void); extern ImDrawList* igGetForegroundDrawList_Nil(void); extern ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport); extern ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport); extern ImDrawListSharedData* igGetDrawListSharedData(void); extern const char* igGetStyleColorName(ImGuiCol idx); extern void igSetStateStorage(ImGuiStorage* storage); extern ImGuiStorage* igGetStateStorage(void); extern void igCalcListClipping(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end); extern _Bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags); extern void igEndChildFrame(void); extern void igCalcTextSize(ImVec2 *pOut,const char* text,const char* text_end,_Bool hide_text_after_double_hash,float wrap_width); extern void igColorConvertU32ToFloat4(ImVec4 *pOut,ImU32 in); extern ImU32 igColorConvertFloat4ToU32(const ImVec4 in); extern void igColorConvertRGBtoHSV(float r,float g,float b,float* out_h,float* out_s,float* out_v); extern void igColorConvertHSVtoRGB(float h,float s,float v,float* out_r,float* out_g,float* out_b); extern int igGetKeyIndex(ImGuiKey imgui_key); extern _Bool igIsKeyDown(int user_key_index); extern _Bool igIsKeyPressed(int user_key_index,_Bool repeat); extern _Bool igIsKeyReleased(int user_key_index); extern int igGetKeyPressedAmount(int key_index,float repeat_delay,float rate); extern void igCaptureKeyboardFromApp(_Bool want_capture_keyboard_value); extern _Bool igIsMouseDown(ImGuiMouseButton button); extern _Bool igIsMouseClicked(ImGuiMouseButton button,_Bool repeat); extern _Bool igIsMouseReleased(ImGuiMouseButton button); extern _Bool igIsMouseDoubleClicked(ImGuiMouseButton button); extern _Bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,_Bool clip); extern _Bool igIsMousePosValid(const ImVec2* mouse_pos); extern _Bool igIsAnyMouseDown(void); extern void igGetMousePos(ImVec2 *pOut); extern void igGetMousePosOnOpeningCurrentPopup(ImVec2 *pOut); extern _Bool igIsMouseDragging(ImGuiMouseButton button,float lock_threshold); extern void igGetMouseDragDelta(ImVec2 *pOut,ImGuiMouseButton button,float lock_threshold); extern void igResetMouseDragDelta(ImGuiMouseButton button); extern ImGuiMouseCursor igGetMouseCursor(void); extern void igSetMouseCursor(ImGuiMouseCursor cursor_type); extern void igCaptureMouseFromApp(_Bool want_capture_mouse_value); extern const char* igGetClipboardText(void); extern void igSetClipboardText(const char* text); extern void igLoadIniSettingsFromDisk(const char* ini_filename); extern void igLoadIniSettingsFromMemory(const char* ini_data,size_t ini_size); extern void igSaveIniSettingsToDisk(const char* ini_filename); extern const char* igSaveIniSettingsToMemory(size_t* out_ini_size); extern _Bool igDebugCheckVersionAndDataLayout(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert,size_t sz_drawidx); extern void igSetAllocatorFunctions(ImGuiMemAllocFunc alloc_func,ImGuiMemFreeFunc free_func,void* user_data); extern void igGetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func,ImGuiMemFreeFunc* p_free_func,void** p_user_data); extern void* igMemAlloc(size_t size); extern void igMemFree(void* ptr); extern ImGuiPlatformIO* igGetPlatformIO(void); extern void igUpdatePlatformWindows(void); extern void igRenderPlatformWindowsDefault(void* platform_render_arg,void* renderer_render_arg); extern void igDestroyPlatformWindows(void); extern ImGuiViewport* igFindViewportByID(ImGuiID id); extern ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle); extern ImGuiStyle* ImGuiStyle_ImGuiStyle(void); extern void ImGuiStyle_destroy(ImGuiStyle* self); extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self,float scale_factor); extern void ImGuiIO_AddInputCharacter(ImGuiIO* self,unsigned int c); extern void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* self,ImWchar16 c); extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* str); extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); extern ImGuiIO* ImGuiIO_ImGuiIO(void); extern void ImGuiIO_destroy(ImGuiIO* self); extern ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void); extern void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self); extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self,int pos,int bytes_count); extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self,int pos,const char* text,const char* text_end); extern void ImGuiInputTextCallbackData_SelectAll(ImGuiInputTextCallbackData* self); extern void ImGuiInputTextCallbackData_ClearSelection(ImGuiInputTextCallbackData* self); extern _Bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); extern ImGuiWindowClass* ImGuiWindowClass_ImGuiWindowClass(void); extern void ImGuiWindowClass_destroy(ImGuiWindowClass* self); extern ImGuiPayload* ImGuiPayload_ImGuiPayload(void); extern void ImGuiPayload_destroy(ImGuiPayload* self); extern void ImGuiPayload_Clear(ImGuiPayload* self); extern _Bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type); extern _Bool ImGuiPayload_IsPreview(ImGuiPayload* self); extern _Bool ImGuiPayload_IsDelivery(ImGuiPayload* self); extern ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void); extern void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self); extern ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void); extern void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self); extern ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void); extern void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self); extern ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(const char* default_filter); extern void ImGuiTextFilter_destroy(ImGuiTextFilter* self); extern _Bool ImGuiTextFilter_Draw(ImGuiTextFilter* self,const char* label,float width); extern _Bool ImGuiTextFilter_PassFilter(ImGuiTextFilter* self,const char* text,const char* text_end); extern void ImGuiTextFilter_Build(ImGuiTextFilter* self); extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); extern _Bool ImGuiTextFilter_IsActive(ImGuiTextFilter* self); extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Nil(void); extern void ImGuiTextRange_destroy(ImGuiTextRange* self); extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Str(const char* _b,const char* _e); extern _Bool ImGuiTextRange_empty(ImGuiTextRange* self); extern void ImGuiTextRange_split(ImGuiTextRange* self,char separator,ImVector_ImGuiTextRange* out); extern ImGuiTextBuffer* ImGuiTextBuffer_ImGuiTextBuffer(void); extern void ImGuiTextBuffer_destroy(ImGuiTextBuffer* self); extern const char* ImGuiTextBuffer_begin(ImGuiTextBuffer* self); extern const char* ImGuiTextBuffer_end(ImGuiTextBuffer* self); extern int ImGuiTextBuffer_size(ImGuiTextBuffer* self); extern _Bool ImGuiTextBuffer_empty(ImGuiTextBuffer* self); extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); extern void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self,int capacity); extern const char* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); extern void ImGuiTextBuffer_append(ImGuiTextBuffer* self,const char* str,const char* str_end); extern void ImGuiTextBuffer_appendfv(ImGuiTextBuffer* self,const char* fmt,va_list args); extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(ImGuiID _key,int _val_i); extern void ImGuiStoragePair_destroy(ImGuiStoragePair* self); extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(ImGuiID _key,float _val_f); extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,void* _val_p); extern void ImGuiStorage_Clear(ImGuiStorage* self); extern int ImGuiStorage_GetInt(ImGuiStorage* self,ImGuiID key,int default_val); extern void ImGuiStorage_SetInt(ImGuiStorage* self,ImGuiID key,int val); extern _Bool ImGuiStorage_GetBool(ImGuiStorage* self,ImGuiID key,_Bool default_val); extern void ImGuiStorage_SetBool(ImGuiStorage* self,ImGuiID key,_Bool val); extern float ImGuiStorage_GetFloat(ImGuiStorage* self,ImGuiID key,float default_val); extern void ImGuiStorage_SetFloat(ImGuiStorage* self,ImGuiID key,float val); extern void* ImGuiStorage_GetVoidPtr(ImGuiStorage* self,ImGuiID key); extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self,ImGuiID key,void* val); extern int* ImGuiStorage_GetIntRef(ImGuiStorage* self,ImGuiID key,int default_val); extern _Bool* ImGuiStorage_GetBoolRef(ImGuiStorage* self,ImGuiID key,_Bool default_val); extern float* ImGuiStorage_GetFloatRef(ImGuiStorage* self,ImGuiID key,float default_val); extern void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self,ImGuiID key,void* default_val); extern void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val); extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(void); extern void ImGuiListClipper_destroy(ImGuiListClipper* self); extern void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height); extern void ImGuiListClipper_End(ImGuiListClipper* self); extern _Bool ImGuiListClipper_Step(ImGuiListClipper* self); extern ImColor* ImColor_ImColor_Nil(void); extern void ImColor_destroy(ImColor* self); extern ImColor* ImColor_ImColor_Int(int r,int g,int b,int a); extern ImColor* ImColor_ImColor_U32(ImU32 rgba); extern ImColor* ImColor_ImColor_Float(float r,float g,float b,float a); extern ImColor* ImColor_ImColor_Vec4(const ImVec4 col); extern void ImColor_SetHSV(ImColor* self,float h,float s,float v,float a); extern void ImColor_HSV(ImColor *pOut,float h,float s,float v,float a); extern ImDrawCmd* ImDrawCmd_ImDrawCmd(void); extern void ImDrawCmd_destroy(ImDrawCmd* self); extern ImTextureID ImDrawCmd_GetTexID(ImDrawCmd* self); extern ImDrawListSplitter* ImDrawListSplitter_ImDrawListSplitter(void); extern void ImDrawListSplitter_destroy(ImDrawListSplitter* self); extern void ImDrawListSplitter_Clear(ImDrawListSplitter* self); extern void ImDrawListSplitter_ClearFreeMemory(ImDrawListSplitter* self); extern void ImDrawListSplitter_Split(ImDrawListSplitter* self,ImDrawList* draw_list,int count); extern void ImDrawListSplitter_Merge(ImDrawListSplitter* self,ImDrawList* draw_list); extern void ImDrawListSplitter_SetCurrentChannel(ImDrawListSplitter* self,ImDrawList* draw_list,int channel_idx); extern ImDrawList* ImDrawList_ImDrawList(const ImDrawListSharedData* shared_data); extern void ImDrawList_destroy(ImDrawList* self); extern void ImDrawList_PushClipRect(ImDrawList* self,ImVec2 clip_rect_min,ImVec2 clip_rect_max,_Bool intersect_with_current_clip_rect); extern void ImDrawList_PushClipRectFullScreen(ImDrawList* self); extern void ImDrawList_PopClipRect(ImDrawList* self); extern void ImDrawList_PushTextureID(ImDrawList* self,ImTextureID texture_id); extern void ImDrawList_PopTextureID(ImDrawList* self); extern void ImDrawList_GetClipRectMin(ImVec2 *pOut,ImDrawList* self); extern void ImDrawList_GetClipRectMax(ImVec2 *pOut,ImDrawList* self); extern void ImDrawList_AddLine(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,ImU32 col,float thickness); extern void ImDrawList_AddRect(ImDrawList* self,const ImVec2 p_min,const ImVec2 p_max,ImU32 col,float rounding,ImDrawFlags flags,float thickness); extern void ImDrawList_AddRectFilled(ImDrawList* self,const ImVec2 p_min,const ImVec2 p_max,ImU32 col,float rounding,ImDrawFlags flags); extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self,const ImVec2 p_min,const ImVec2 p_max,ImU32 col_upr_left,ImU32 col_upr_right,ImU32 col_bot_right,ImU32 col_bot_left); extern void ImDrawList_AddQuad(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness); extern void ImDrawList_AddQuadFilled(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col); extern void ImDrawList_AddTriangle(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness); extern void ImDrawList_AddTriangleFilled(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col); extern void ImDrawList_AddCircle(ImDrawList* self,const ImVec2 center,float radius,ImU32 col,int num_segments,float thickness); extern void ImDrawList_AddCircleFilled(ImDrawList* self,const ImVec2 center,float radius,ImU32 col,int num_segments); extern void ImDrawList_AddNgon(ImDrawList* self,const ImVec2 center,float radius,ImU32 col,int num_segments,float thickness); extern void ImDrawList_AddNgonFilled(ImDrawList* self,const ImVec2 center,float radius,ImU32 col,int num_segments); extern void ImDrawList_AddText_Vec2(ImDrawList* self,const ImVec2 pos,ImU32 col,const char* text_begin,const char* text_end); extern void ImDrawList_AddText_FontPtr(ImDrawList* self,const ImFont* font,float font_size,const ImVec2 pos,ImU32 col,const char* text_begin,const char* text_end,float wrap_width,const ImVec4* cpu_fine_clip_rect); extern void ImDrawList_AddPolyline(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,ImDrawFlags flags,float thickness); extern void ImDrawList_AddConvexPolyFilled(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col); extern void ImDrawList_AddBezierCubic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments); extern void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness,int num_segments); extern void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col); extern void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col); extern void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawFlags flags); extern void ImDrawList_PathClear(ImDrawList* self); extern void ImDrawList_PathLineTo(ImDrawList* self,const ImVec2 pos); extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self,const ImVec2 pos); extern void ImDrawList_PathFillConvex(ImDrawList* self,ImU32 col); extern void ImDrawList_PathStroke(ImDrawList* self,ImU32 col,ImDrawFlags flags,float thickness); extern void ImDrawList_PathArcTo(ImDrawList* self,const ImVec2 center,float radius,float a_min,float a_max,int num_segments); extern void ImDrawList_PathArcToFast(ImDrawList* self,const ImVec2 center,float radius,int a_min_of_12,int a_max_of_12); extern void ImDrawList_PathBezierCubicCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,int num_segments); extern void ImDrawList_PathBezierQuadraticCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,int num_segments); extern void ImDrawList_PathRect(ImDrawList* self,const ImVec2 rect_min,const ImVec2 rect_max,float rounding,ImDrawFlags flags); extern void ImDrawList_AddCallback(ImDrawList* self,ImDrawCallback callback,void* callback_data); extern void ImDrawList_AddDrawCmd(ImDrawList* self); extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); extern void ImDrawList_ChannelsSplit(ImDrawList* self,int count); extern void ImDrawList_ChannelsMerge(ImDrawList* self); extern void ImDrawList_ChannelsSetCurrent(ImDrawList* self,int n); extern void ImDrawList_PrimReserve(ImDrawList* self,int idx_count,int vtx_count); extern void ImDrawList_PrimUnreserve(ImDrawList* self,int idx_count,int vtx_count); extern void ImDrawList_PrimRect(ImDrawList* self,const ImVec2 a,const ImVec2 b,ImU32 col); extern void ImDrawList_PrimRectUV(ImDrawList* self,const ImVec2 a,const ImVec2 b,const ImVec2 uv_a,const ImVec2 uv_b,ImU32 col); extern void ImDrawList_PrimQuadUV(ImDrawList* self,const ImVec2 a,const ImVec2 b,const ImVec2 c,const ImVec2 d,const ImVec2 uv_a,const ImVec2 uv_b,const ImVec2 uv_c,const ImVec2 uv_d,ImU32 col); extern void ImDrawList_PrimWriteVtx(ImDrawList* self,const ImVec2 pos,const ImVec2 uv,ImU32 col); extern void ImDrawList_PrimWriteIdx(ImDrawList* self,ImDrawIdx idx); extern void ImDrawList_PrimVtx(ImDrawList* self,const ImVec2 pos,const ImVec2 uv,ImU32 col); extern void ImDrawList__ResetForNewFrame(ImDrawList* self); extern void ImDrawList__ClearFreeMemory(ImDrawList* self); extern void ImDrawList__PopUnusedDrawCmd(ImDrawList* self); extern void ImDrawList__OnChangedClipRect(ImDrawList* self); extern void ImDrawList__OnChangedTextureID(ImDrawList* self); extern void ImDrawList__OnChangedVtxOffset(ImDrawList* self); extern int ImDrawList__CalcCircleAutoSegmentCount(ImDrawList* self,float radius); extern void ImDrawList__PathArcToFastEx(ImDrawList* self,const ImVec2 center,float radius,int a_min_sample,int a_max_sample,int a_step); extern void ImDrawList__PathArcToN(ImDrawList* self,const ImVec2 center,float radius,float a_min,float a_max,int num_segments); extern ImDrawData* ImDrawData_ImDrawData(void); extern void ImDrawData_destroy(ImDrawData* self); extern void ImDrawData_Clear(ImDrawData* self); extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); extern void ImDrawData_ScaleClipRects(ImDrawData* self,const ImVec2 fb_scale); extern ImFontConfig* ImFontConfig_ImFontConfig(void); extern void ImFontConfig_destroy(ImFontConfig* self); extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(void); extern void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self); extern void ImFontGlyphRangesBuilder_Clear(ImFontGlyphRangesBuilder* self); extern _Bool ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self,size_t n); extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self,size_t n); extern void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self,ImWchar c); extern void ImFontGlyphRangesBuilder_AddText(ImFontGlyphRangesBuilder* self,const char* text,const char* text_end); extern void ImFontGlyphRangesBuilder_AddRanges(ImFontGlyphRangesBuilder* self,const ImWchar* ranges); extern void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self,ImVector_ImWchar* out_ranges); extern ImFontAtlasCustomRect* ImFontAtlasCustomRect_ImFontAtlasCustomRect(void); extern void ImFontAtlasCustomRect_destroy(ImFontAtlasCustomRect* self); extern _Bool ImFontAtlasCustomRect_IsPacked(ImFontAtlasCustomRect* self); extern ImFontAtlas* ImFontAtlas_ImFontAtlas(void); extern void ImFontAtlas_destroy(ImFontAtlas* self); extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self,const ImFontConfig* font_cfg); extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* self,const ImFontConfig* font_cfg); extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self,const char* filename,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); extern ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* self,void* font_data,int font_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* self,const void* compressed_font_data,int compressed_font_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self,const char* compressed_font_data_base85,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); extern void ImFontAtlas_ClearInputData(ImFontAtlas* self); extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); extern void ImFontAtlas_ClearFonts(ImFontAtlas* self); extern void ImFontAtlas_Clear(ImFontAtlas* self); extern _Bool ImFontAtlas_Build(ImFontAtlas* self); extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel); extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel); extern _Bool ImFontAtlas_IsBuilt(ImFontAtlas* self); extern void ImFontAtlas_SetTexID(ImFontAtlas* self,ImTextureID id); extern const ImWchar* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); extern const ImWchar* ImFontAtlas_GetGlyphRangesVietnamese(ImFontAtlas* self); extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self,int width,int height); extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset); extern ImFontAtlasCustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index); extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self,const ImFontAtlasCustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max); extern _Bool ImFontAtlas_GetMouseCursorTexData(ImFontAtlas* self,ImGuiMouseCursor cursor,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2]); extern ImFont* ImFont_ImFont(void); extern void ImFont_destroy(ImFont* self); extern const ImFontGlyph* ImFont_FindGlyph(ImFont* self,ImWchar c); extern const ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self,ImWchar c); extern float ImFont_GetCharAdvance(ImFont* self,ImWchar c); extern _Bool ImFont_IsLoaded(ImFont* self); extern const char* ImFont_GetDebugName(ImFont* self); extern void ImFont_CalcTextSizeA(ImVec2 *pOut,ImFont* self,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining); extern const char* ImFont_CalcWordWrapPositionA(ImFont* self,float scale,const char* text,const char* text_end,float wrap_width); extern void ImFont_RenderChar(ImFont* self,ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,ImWchar c); extern void ImFont_RenderText(ImFont* self,ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,const ImVec4 clip_rect,const char* text_begin,const char* text_end,float wrap_width,_Bool cpu_fine_clip); extern void ImFont_BuildLookupTable(ImFont* self); extern void ImFont_ClearOutputData(ImFont* self); extern void ImFont_GrowIndex(ImFont* self,int new_size); extern void ImFont_AddGlyph(ImFont* self,const ImFontConfig* src_cfg,ImWchar c,float x0,float y0,float x1,float y1,float u0,float v0,float u1,float v1,float advance_x); extern void ImFont_AddRemapChar(ImFont* self,ImWchar dst,ImWchar src,_Bool overwrite_dst); extern void ImFont_SetGlyphVisible(ImFont* self,ImWchar c,_Bool visible); extern void ImFont_SetFallbackChar(ImFont* self,ImWchar c); extern _Bool ImFont_IsGlyphRangeUnused(ImFont* self,unsigned int c_begin,unsigned int c_last); extern ImGuiViewport* ImGuiViewport_ImGuiViewport(void); extern void ImGuiViewport_destroy(ImGuiViewport* self); extern void ImGuiViewport_GetCenter(ImVec2 *pOut,ImGuiViewport* self); extern void ImGuiViewport_GetWorkCenter(ImVec2 *pOut,ImGuiViewport* self); extern ImGuiPlatformIO* ImGuiPlatformIO_ImGuiPlatformIO(void); extern void ImGuiPlatformIO_destroy(ImGuiPlatformIO* self); extern ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor(void); extern void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self); extern void igLogText(const char *fmt, ...); extern void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...); extern float igGET_FLT_MAX(); extern float igGET_FLT_MIN(); extern ImVector_ImWchar* ImVector_ImWchar_create(); extern void ImVector_ImWchar_destroy(ImVector_ImWchar* self); extern void ImVector_ImWchar_Init(ImVector_ImWchar* p); extern void ImVector_ImWchar_UnInit(ImVector_ImWchar* p); ]]
--[[ Name: "sv_player.lua". Product: "nexus". --]] nexus.player = {}; nexus.player.property = {}; nexus.player.sharedVars = {}; -- A function to get whether a player is noclipping. function nexus.player.IsNoClipping(player) if ( player:GetMoveType() == MOVETYPE_NOCLIP and !player:InVehicle() ) then return true; end; end; -- A function to get whether a player is an admin. function nexus.player.IsAdmin(player) if ( nexus.player.HasFlags(player, "o") ) then return true; end; end; -- A function to get whether a player can hear another player. function nexus.player.CanHearPlayer(player, target, allowance) if ( nexus.config.Get("messages_must_see_player"):Get() ) then return nexus.player.CanSeePlayer(player, target, (allowance or 0.5), true); else return true; end; end; -- A functon to get all property. function nexus.player.GetAllProperty() return nexus.player.property; end; -- A function to register a player's shared variable. function nexus.player.RegisterSharedVar(name, class, playerOnly) nexus.player.sharedVars[name] = { playerOnly = playerOnly, class = class, name = name }; end; -- A function to set a player's action. function nexus.player.SetAction(player, action, duration, priority, Callback) local currentAction = nexus.player.GetAction(player); if (type(action) != "string" or action == "") then NEXUS:DestroyTimer( "Action: "..player:UniqueID() ); player:SetSharedVar("sh_StartActionTime", 0); player:SetSharedVar("sh_ActionDuration", 0); player:SetSharedVar("sh_Action", ""); return; elseif (duration == false or duration == 0) then if (currentAction == action) then return nexus.player.SetAction(player, false); else return false; end; end; if (player.action) then if ( ( priority and priority > player.action[2] ) or currentAction == "" or action == player.action[1] ) then player.action = nil; end; end; if (!player.action) then local curTime = CurTime(); player:SetSharedVar("sh_StartActionTime", curTime); player:SetSharedVar("sh_ActionDuration", duration); player:SetSharedVar("sh_Action", action); if (priority) then player.action = {action, priority}; else player.action = nil; end; NEXUS:CreateTimer("Action: "..player:UniqueID(), duration, 1, function() if (Callback) then Callback(); end; end); end; end; -- A function to set the player's character menu state. function nexus.player.SetCharacterMenuState(player, state) NEXUS:StartDataStream(player, "CharacterMenu", state); end; -- A function to get a player's action. function nexus.player.GetAction(player, percentage) local startActionTime = player:GetSharedVar("sh_StartActionTime"); local actionDuration = player:GetSharedVar("sh_ActionDuration"); local curTime = CurTime(); local action = player:GetSharedVar("sh_Action"); if (CurTime() < startActionTime + actionDuration) then if (percentage) then return action, (100 / actionDuration) * (actionDuration - ( (startActionTime + actionDuration) - curTime) ); else return action, actionDuration, startActionTime; end; else return "", 0, 0; end; end; -- A function to run a nexus command on a player. function nexus.player.RunNexusCommand(player, command, ...) return nexus.command.ConsoleCommand( player, "nx", {command, ...} ); end; -- A function to get a player's wages name. function nexus.player.GetWagesName(player) return nexus.class.Query( player:Team(), "wagesName", nexus.config.Get("wages_name"):Get() ); end; -- A function to get whether a player can see an NPC. function nexus.player.CanSeeNPC(player, target, allowance, ignoreEnts) if (player:GetEyeTraceNoCursor().Entity == target) then return true; else local trace = {}; trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER; trace.start = player:GetShootPos(); trace.endpos = target:GetShootPos(); trace.filter = {player, target}; if (ignoreEnts) then if (type(ignoreEnts) == "table") then table.Add(trace.filter, ignoreEnts); else table.Add( trace.filter, ents.GetAll() ); end; end; trace = util.TraceLine(trace); if ( trace.Fraction >= (allowance or 0.75) ) then return true; end; end; end; -- A function to get whether a player can see a player. function nexus.player.CanSeePlayer(player, target, allowance, ignoreEnts) if (player:GetEyeTraceNoCursor().Entity == target) then return true; elseif (target:GetEyeTraceNoCursor().Entity == player) then return true; else local trace = {}; trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER; trace.start = player:GetShootPos(); trace.endpos = target:GetShootPos(); trace.filter = {player, target}; if (ignoreEnts) then if (type(ignoreEnts) == "table") then table.Add(trace.filter, ignoreEnts); else table.Add( trace.filter, ents.GetAll() ); end; end; trace = util.TraceLine(trace); if ( trace.Fraction >= (allowance or 0.75) ) then return true; end; end; end; -- A function to get whether a player can see an entity. function nexus.player.CanSeeEntity(player, target, allowance, ignoreEnts) if (player:GetEyeTraceNoCursor().Entity == target) then return true; else local trace = {}; trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER; trace.start = player:GetShootPos(); trace.endpos = target:LocalToWorld( target:OBBCenter() ); trace.filter = {player, target}; if (ignoreEnts) then if (type(ignoreEnts) == "table") then table.Add(trace.filter, ignoreEnts); else table.Add( trace.filter, ents.GetAll() ); end; end; trace = util.TraceLine(trace); if ( trace.Fraction >= (allowance or 0.75) ) then return true; end; end; end; -- A function to get whether a player can see a position. function nexus.player.CanSeePosition(player, position, allowance, ignoreEnts) local trace = {}; trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER; trace.start = player:GetShootPos(); trace.endpos = position; trace.filter = {player}; if (ignoreEnts) then if (type(ignoreEnts) == "table") then table.Add(trace.filter, ignoreEnts); else table.Add( trace.filter, ents.GetAll() ); end; end; trace = util.TraceLine(trace); if ( trace.Fraction >= (allowance or 0.75) ) then return true; end; end; -- A function to update whether a player's weapon is raised. function nexus.player.UpdateWeaponRaised(player) local raised = nexus.player.GetWeaponRaised(player); local weapon = player:GetActiveWeapon(); player:SetSharedVar("sh_WeaponRaised", raised); if ( IsValid(weapon) ) then NEXUS:HandleWeaponFireDelay( player, raised, weapon, CurTime() ); end; end; -- A function to get whether a player's weapon is raised. function nexus.player.GetWeaponRaised(player, getCached) if ( !nexus.config.Get("raised_weapon_system"):Get() ) then return true; end; if (getCached) then return player:GetSharedVar("sh_WeaponRaised"); end; local weapon = player:GetActiveWeapon(); if ( IsValid(weapon) ) then if (!weapon.NeverRaised) then if (weapon.GetRaised) then local raised = weapon:GetRaised(); if (raised != nil) then return raised; end; end; local class = weapon:GetClass(); if (class != "weapon_physgun" and class != "weapon_physcannon" and class != "gmod_tool") then return nexus.mount.Call("GetPlayerWeaponRaised", player, class, weapon); else return true; end; end; end; return false; end; -- A function to toggle whether a player's weapon is raised. function nexus.player.ToggleWeaponRaised(player) nexus.player.SetWeaponRaised(player, !player.toggleWeaponRaised); end; -- A function to set whether a player's weapon is raised. function nexus.player.SetWeaponRaised(player, raised) local weapon = player:GetActiveWeapon(); if ( IsValid(weapon) ) then if (type(raised) == "number") then player.autoWeaponRaised = weapon:GetClass(); player:UpdateWeaponRaised(); NEXUS:CreateTimer("Auto Weapon Raised: "..player:UniqueID(), raised, 1, function() if ( IsValid(player) ) then player.autoWeaponRaised = nil; player:UpdateWeaponRaised(); end; end); elseif (raised) then if (!player.toggleWeaponRaised) then if (weapon.OnRaised) then weapon:OnRaised(); end; end; player.toggleWeaponRaised = weapon:GetClass(); player.autoWeaponRaised = nil; player:UpdateWeaponRaised(); else if (player.toggleWeaponRaised) then if (weapon.OnLowered) then weapon:OnLowered(); end; end; player.toggleWeaponRaised = nil; player.autoWeaponRaised = nil; player:UpdateWeaponRaised(); end; end; end; -- A function to setup a player's remove property delays. function nexus.player.SetupRemovePropertyDelays(player) local uniqueID = player:UniqueID(); local key = player:QueryCharacter("key"); for k, v in pairs( nexus.player.GetAllProperty() ) do local removeDelay = nexus.entity.QueryProperty(v, "removeDelay"); if (IsValid(v) and removeDelay) then if ( uniqueID == nexus.entity.QueryProperty(v, "uniqueID") ) then if ( key == nexus.entity.QueryProperty(v, "key") ) then NEXUS:CreateTimer("Remove Delay: "..v:EntIndex(), removeDelay, 1, function(entity) if ( IsValid(entity) ) then entity:Remove(); end; end, v); end; end; end; end; end; -- A function to disable a player's property. function nexus.player.DisableProperty(player) local uniqueID = player:UniqueID(); for k, v in pairs( nexus.player.GetAllProperty() ) do if ( IsValid(v) and uniqueID == nexus.entity.QueryProperty(v, "uniqueID") ) then nexus.entity.SetPropertyVar(v, "owner", NULL); if ( nexus.entity.QueryProperty(v, "networked") ) then v:SetNetworkedEntity("sh_Owner", NULL); end; if (v.SetPlayer) then v:SetVar("Founder", NULL); v:SetVar("FounderIndex", 0); v:SetNetworkedString("FounderName", ""); end; end; end; end; -- A function to give property to a player. function nexus.player.GiveProperty(player, entity, networked, removeDelay) NEXUS:DestroyTimer( "Remove Delay: "..entity:EntIndex() ); nexus.entity.ClearProperty(entity); entity.property = { key = player:QueryCharacter("key"), owner = player, owned = true, uniqueID = player:UniqueID(), networked = networked, removeDelay = removeDelay }; if ( IsValid(player) ) then if (entity.SetPlayer) then entity:SetPlayer(player); end; if (networked) then entity:SetNetworkedEntity("sh_Owner", player); end; end; entity:SetNetworkedBool("sh_Owned", true); nexus.player.GetAllProperty()[ entity:EntIndex() ] = entity; nexus.mount.Call("PlayerPropertyGiven", player, entity, networked, removeDelay); end; -- A function to give property to an offline player. function nexus.player.GivePropertyOffline(key, uniqueID, entity, networked, removeDelay) nexus.entity.ClearProperty(entity); if (key and uniqueID) then local propertyUniqueID = nexus.entity.QueryProperty(entity, "uniqueID"); local owner = player.GetByUniqueID(uniqueID); if (owner) then if (owner:QueryCharacter("key") != key) then owner = nil; else nexus.player.GiveProperty(owner, entity, networked, removeDelay); return; end; end; if (propertyUniqueID) then NEXUS:DestroyTimer("Remove Delay: "..entity:EntIndex().." "..propertyUniqueID); end; entity.property = { key = key, owner = owner, owned = true, uniqueID = uniqueID, networked = networked, removeDelay = removeDelay }; if ( IsValid(entity.property.owner) ) then if (entity.SetPlayer) then entity:SetPlayer(entity.property.owner); end; if (networked) then entity:SetNetworkedEntity("sh_Owner", entity.property.owner); end; end; entity:SetNetworkedBool("sh_Owned", true); nexus.player.GetAllProperty()[ entity:EntIndex() ] = entity; nexus.mount.Call("PlayerPropertyGivenOffline", key, uniqueID, entity, networked, removeDelay); end; end; -- A function to take property from an offline player. function nexus.player.TakePropertyOffline(key, uniqueID, entity) if (key and uniqueID) then local owner = player.GetByUniqueID(uniqueID); if (owner and owner:QueryCharacter("key") == key) then nexus.player.TakeProperty(owner, entity); return; end; if (nexus.entity.QueryProperty(entity, "uniqueID") == uniqueID) then if (nexus.entity.QueryProperty(entity, "key") == key) then entity.property = nil; entity:SetNetworkedEntity("sh_Owner", NULL); entity:SetNetworkedBool("sh_Owned", false); if (entity.SetPlayer) then entity:SetVar("Founder", nil); entity:SetVar("FounderIndex", nil); entity:SetNetworkedString("FounderName", ""); end; nexus.player.GetAllProperty()[ entity:EntIndex() ] = nil; nexus.mount.Call("PlayerPropertyTakenOffline", key, uniqueID, entity); end; end; end; end; -- A function to take property from a player. function nexus.player.TakeProperty(player, entity) if (nexus.entity.GetOwner(entity) == player) then entity.property = nil; entity:SetNetworkedEntity("sh_Owner", NULL); entity:SetNetworkedBool("sh_Owned", false); if (entity.SetPlayer) then entity:SetVar("Founder", nil); entity:SetVar("FounderIndex", nil); entity:SetNetworkedString("FounderName", ""); end; nexus.player.GetAllProperty()[ entity:EntIndex() ] = nil; nexus.mount.Call("PlayerPropertyTaken", player, entity); end; end; -- A function to set a player to their default skin. function nexus.player.SetDefaultSkin(player) player:SetSkin( nexus.player.GetDefaultSkin(player) ); end; -- A function to get a player's default skin. function nexus.player.GetDefaultSkin(player) return nexus.mount.Call("GetPlayerDefaultSkin", player); end; -- A function to set a player to their default model. function nexus.player.SetDefaultModel(player) player:SetModel( nexus.player.GetDefaultModel(player) ); end; -- A function to get a player's default model. function nexus.player.GetDefaultModel(player) return nexus.mount.Call("GetPlayerDefaultModel", player); end; -- A function to get whether a player is drunk. function nexus.player.GetDrunk(player) if (player.drunk) then return #player.drunk; end; end; -- A function to set whether a player is drunk. function nexus.player.SetDrunk(player, expire) local curTime = CurTime(); if (expire == false) then player.drunk = nil; elseif (!player.drunk) then player.drunk = {curTime + expire}; else player.drunk[#player.drunk + 1] = curTime + expire; end; player:SetSharedVar("sh_Drunk", nexus.player.GetDrunk(player) or 0); end; -- A function to strip a player's default ammo. function nexus.player.StripDefaultAmmo(player, weapon, itemTable) if (!itemTable) then itemTable = nexus.item.GetWeapon(weapon); end; if (itemTable) then if (itemTable.primaryDefaultAmmo) then local ammoClass = weapon:GetPrimaryAmmoType(); if (weapon:Clip1() != -1) then weapon:SetClip1(0); end; if (type(itemTable.primaryDefaultAmmo) == "number") then player:SetAmmo(math.max(player:GetAmmoCount(ammoClass) - itemTable.primaryDefaultAmmo, 0), ammoClass); end; end; if (itemTable.secondaryDefaultAmmo) then local ammoClass = weapon:GetSecondaryAmmoType(); if (weapon:Clip2() != -1) then weapon:SetClip2(0); end; if (type(itemTable.secondaryDefaultAmmo) == "number") then player:SetAmmo(math.max(player:GetAmmoCount(ammoClass) - itemTable.secondaryDefaultAmmo, 0), ammoClass); end; end; end; end; -- A function to restore a player's secondary ammo. function nexus.player.RestoreSecondaryAmmo(player) if (!weapon) then weapon = player:GetActiveWeapon(); end; if ( IsValid(weapon) ) then local spawnAmmo = nexus.player.GetSpawnAmmo(player); local class = weapon:GetClass(); local ammo = player:QueryCharacter("ammo"); if (weapon:Clip2() != -1) then if ( ammo["s_"..class] ) then weapon:SetClip2( ammo["s_"..class] ); elseif ( nexus.player.GetSpawnWeapon(player, class) ) then if ( spawnAmmo["s_"..class] ) then weapon:SetClip2( spawnAmmo["s_"..class] ); end; end; end; end; end; -- A function to restore a player's primary ammo. function nexus.player.RestorePrimaryAmmo(player, weapon) if (!weapon) then weapon = player:GetActiveWeapon(); end; if ( IsValid(weapon) ) then local spawnAmmo = nexus.player.GetSpawnAmmo(player); local class = weapon:GetClass(); local ammo = player:QueryCharacter("ammo"); if (weapon:Clip1() != -1) then if ( ammo["p_"..class] ) then weapon:SetClip1( ammo["p_"..class] ); elseif ( nexus.player.GetSpawnWeapon(player, class) ) then if ( spawnAmmo["p_"..class] ) then weapon:SetClip1( spawnAmmo["p_"..class] ); end; end; end; end; end; -- A function to save a player's secondary ammo. function nexus.player.SaveSecondaryAmmo(player, weapon) if (!weapon) then weapon = player:GetActiveWeapon(); end; if ( IsValid(weapon) ) then local spawnAmmo = nexus.player.GetSpawnAmmo(player); local class = weapon:GetClass(); local ammo = player:QueryCharacter("ammo"); if (weapon:Clip2() >= 0) then if ( nexus.player.GetSpawnWeapon(player, class) ) then spawnAmmo["s_"..class] = weapon:Clip2(); if (spawnAmmo["s_"..class] == 0) then spawnAmmo["s_"..class] = nil; end; else ammo["s_"..class] = weapon:Clip2(); if (ammo["s_"..class] == 0) then ammo["s_"..class] = nil; end; end; end; end; end; -- A function to save a player's primary ammo. function nexus.player.SavePrimaryAmmo(player, weapon) if (!weapon) then weapon = player:GetActiveWeapon(); end; if ( IsValid(weapon) ) then local spawnAmmo = nexus.player.GetSpawnAmmo(player); local class = weapon:GetClass(); local ammo = player:QueryCharacter("ammo"); if (weapon:Clip1() >= 0) then if ( nexus.player.GetSpawnWeapon(player, class) ) then spawnAmmo["p_"..class] = weapon:Clip1(); if (spawnAmmo["p_"..class] == 0) then spawnAmmo["p_"..class] = nil; end; else ammo["p_"..class] = weapon:Clip1(); if (ammo["p_"..class] == 0) then ammo["p_"..class] = nil; end; end; end; end; end; -- A function to get a player's secondary ammo. function nexus.player.GetSecondaryAmmo(player, class, bNotSpawn) local spawnAmmo = nexus.player.GetSpawnAmmo(player); local ammo = player:QueryCharacter("ammo"); if (spawnAmmo["s_"..class] and spawnAmmo["s_"..class] > 0 and !bNotSpawn) then return spawnAmmo["s_"..class]; elseif (ammo["s_"..class] and ammo["s_"..class] > 0) then return ammo["s_"..class]; else return 0; end; end; -- A function to get a player's primary ammo. function nexus.player.GetPrimaryAmmo(player, class, bNotSpawn) local spawnAmmo = nexus.player.GetSpawnAmmo(player); local ammo = player:QueryCharacter("ammo"); if (spawnAmmo["p_"..class] and spawnAmmo["p_"..class] > 0 and !bNotSpawn) then return spawnAmmo["p_"..class]; elseif (ammo["p_"..class] and ammo["p_"..class] > 0) then return ammo["p_"..class]; else return 0; end; end; -- A function to set a player's secondary ammo. function nexus.player.SetSecondaryAmmo(player, class, amount) player:QueryCharacter("ammo")["s_"..class] = amount; if ( player:HasWeapon(class) ) then player:GetWeapon(class):SetClip2(amount); end; end; -- A function to set a player's primary ammo. function nexus.player.SetPrimaryAmmo(player, class, amount) player:QueryCharacter("ammo")["p_"..class] = amount; if ( player:HasWeapon(class) ) then player:GetWeapon(class):SetClip1(amount); end; end; -- A function to take a player's secondary ammo. function nexus.player.TakeSecondaryAmmo(player, class) local ammo = player:QueryCharacter("ammo"); if (ammo["s_"..class] and ammo["s_"..class] > 0) then local amount = ammo["s_"..class]; ammo["s_"..class] = nil; if ( player:HasWeapon(class) ) then player:GetWeapon(class):SetClip2(0); end; return amount; else return 0; end; end; -- A function to take a player's primary ammo. function nexus.player.TakePrimaryAmmo(player, class) local ammo = player:QueryCharacter("ammo"); if (ammo["p_"..class] and ammo["p_"..class] > 0) then local amount = ammo["p_"..class]; ammo["p_"..class] = nil; if ( player:HasWeapon(class) ) then player:GetWeapon(class):SetClip1(0); end; return amount; else return 0; end; end; -- A function to check if a player is whitelisted for a faction. function nexus.player.IsWhitelisted(player, faction) return table.HasValue(player:GetData("whitelisted"), faction); end; -- A function to set whether a player is whitelisted for a faction. function nexus.player.SetWhitelisted(player, faction, boolean) local whitelisted = player:GetData("whitelisted"); if (boolean) then if ( !nexus.player.IsWhitelisted(player, faction) ) then whitelisted[#whitelisted + 1] = faction; end; else for k, v in pairs(whitelisted) do if (v == faction) then whitelisted[k] = nil; end; end; end; NEXUS:StartDataStream( player, "SetWhitelisted", {faction, boolean} ); end; -- A function to create a Condition timer. function nexus.player.ConditionTimer(player, delay, Condition, Callback) delay = CurTime() + delay; local uniqueID = player:UniqueID(); if (player.conditionTimer) then player.conditionTimer.Callback(false); player.conditionTimer = nil; end; player.conditionTimer = { delay = delay, Callback = Callback, Condition = Condition }; NEXUS:CreateTimer("Condition Timer: "..uniqueID, 0, 0, function() if ( IsValid(player) ) then if ( Condition() ) then if (CurTime() >= delay) then Callback(true); player.conditionTimer = nil; NEXUS:DestroyTimer("Condition Timer: "..uniqueID); end; else Callback(false); player.conditionTimer = nil; NEXUS:DestroyTimer("Condition Timer: "..uniqueID); end; else NEXUS:DestroyTimer("Condition Timer: "..uniqueID); end; end); end; -- A function to create an entity Condition timer. function nexus.player.EntityConditionTimer(player, target, entity, delay, distance, Condition, Callback) delay = CurTime() + delay; entity = entity or target; local uniqueID = player:UniqueID(); if (player.entityConditionTimer) then player.entityConditionTimer.Callback(false); player.entityConditionTimer = nil; end; player.entityConditionTimer = { delay = delay, target = target, entity = entity, distance = distance, Callback = Callback, Condition = Condition }; NEXUS:CreateTimer("Entity Condition Timer: "..uniqueID, 0, 0, function() if ( IsValid(player) ) then local trace = player:GetEyeTraceNoCursor(); if ( IsValid(target) and IsValid(entity) and trace.Entity == entity and trace.Entity:GetPos():Distance( player:GetShootPos() ) <= distance and Condition() ) then if (CurTime() >= delay) then Callback(true); player.entityConditionTimer = nil; NEXUS:DestroyTimer("Entity Condition Timer: "..uniqueID); end; else Callback(false); player.entityConditionTimer = nil; NEXUS:DestroyTimer("Entity Condition Timer: "..uniqueID); end; else NEXUS:DestroyTimer("Entity Condition Timer: "..uniqueID); end; end); end; -- A function to get a player's spawn ammo. function nexus.player.GetSpawnAmmo(player, ammo) if (ammo) then return player.spawnAmmo[ammo]; else return player.spawnAmmo; end; end; -- A function to get a player's spawn weapon. function nexus.player.GetSpawnWeapon(player, weapon) if (weapon) then return player.spawnWeapons[weapon]; else return player.spawnWeapons; end; end; -- A function to take spawn ammo from a player. function nexus.player.TakeSpawnAmmo(player, ammo, amount) if ( player.spawnAmmo[ammo] ) then if (player.spawnAmmo[ammo] < amount) then amount = player.spawnAmmo[ammo]; player.spawnAmmo[ammo] = nil; else player.spawnAmmo[ammo] = player.spawnAmmo[ammo] - amount; end; player:RemoveAmmo(amount, ammo); end; end; -- A function to give the player spawn ammo. function nexus.player.GiveSpawnAmmo(player, ammo, amount) if ( player.spawnAmmo[ammo] ) then player.spawnAmmo[ammo] = player.spawnAmmo[ammo] + amount; else player.spawnAmmo[ammo] = amount; end; player:GiveAmmo(amount, ammo); end; -- A function to take a player's spawn weapon. function nexus.player.TakeSpawnWeapon(player, class) player.spawnWeapons[class] = nil; player:StripWeapon(class); end; -- A function to give a player a spawn weapon. function nexus.player.GiveSpawnWeapon(player, class, uniqueID) player.spawnWeapons[class] = true; player:Give(class, uniqueID); end; -- A function to give a player an item weapon. function nexus.player.GiveItemWeapon(player, item) local itemTable = nexus.item.Get(item); if ( nexus.item.IsWeapon(itemTable) ) then player:Give(itemTable.weaponClass, itemTable.uniqueID); return true; end; end; -- A function to give a player a spawn item weapon. function nexus.player.GiveSpawnItemWeapon(player, item) local itemTable = nexus.item.Get(item); if ( nexus.item.IsWeapon(itemTable) ) then player.spawnWeapons[itemTable.weaponClass] = true; player:Give(itemTable.weaponClass, itemTable.uniqueID); return true; end; end; -- A function to give flags to a player. function nexus.player.GiveFlags(player, flags) for i = 1, string.len(flags) do local flag = string.sub(flags, i, i); if ( !string.find(player:QueryCharacter("flags"), flag) ) then player:SetCharacterData("flags", player:QueryCharacter("flags")..flag, true); nexus.mount.Call("PlayerFlagsGiven", player, flag); end; end; end; -- A function to play a sound to a player. function nexus.player.PlaySound(player, sound) umsg.Start("nx_PlaySound", player); umsg.String(sound); umsg.End(); end; -- A function to get a player's maximum characters. function nexus.player.GetMaximumCharacters(player) local maximum = nexus.config.Get("additional_characters"):Get(); for k, v in pairs(nexus.faction.stored) do if ( !v.whitelist or nexus.player.IsWhitelisted(player, v.name) ) then maximum = maximum + 1; end; end; return maximum; end; -- A function to query a player's character. function nexus.player.Query(player, key, default) local character = player:GetCharacter(); if (character) then return character[key] or default; else return default; end; end; -- A function to set a player to a safe position. function nexus.player.SetSafePosition(player, position, filter) position = nexus.player.GetSafePosition(player, position, filter); if (position) then player:SetMoveType(MOVETYPE_NOCLIP); player:SetPos(position); if ( player:IsInWorld() ) then player:SetMoveType(MOVETYPE_WALK); else player:Spawn(); end; end; end; -- A function to get the safest position near a position. function nexus.player.GetSafePosition(player, position, filter) local closestPosition = nil; local distanceAmount = 8; local directions = {}; local yawForward = player:EyeAngles().yaw; local angles = { math.NormalizeAngle(yawForward - 180), math.NormalizeAngle(yawForward - 135), math.NormalizeAngle(yawForward + 135), math.NormalizeAngle(yawForward + 45), math.NormalizeAngle(yawForward + 90), math.NormalizeAngle(yawForward - 45), math.NormalizeAngle(yawForward - 90), math.NormalizeAngle(yawForward) }; position = position + Vector(0, 0, 32); if (!filter) then filter = {player}; elseif (type(filter) != "table") then filter = {filter}; end; if ( !table.HasValue(filter, player) ) then filter[#filter + 1] = player; end; for i = 1, 8 do for k, v in ipairs(angles) do directions[#directions + 1] = {v, distanceAmount}; end; distanceAmount = distanceAmount * 2; end; -- A function to get a lower position. local function GetLowerPosition(testPosition, ignoreHeight) local trace = { filter = filter, endpos = testPosition - Vector(0, 0, 256), start = testPosition }; return util.TraceLine(trace).HitPos + Vector(0, 0, 32); end; local trace = { filter = filter, endpos = position + Vector(0, 0, 256), start = position }; local safePosition = GetLowerPosition(util.TraceLine(trace).HitPos); if (safePosition) then position = safePosition; end; for k, v in ipairs(directions) do local angleVector = Angle(0, v[1], 0):Forward(); local testPosition = position + ( angleVector * v[2] ); local trace = { filter = filter, endpos = testPosition, start = position }; local traceLine = util.TraceEntity(trace, player); if (traceLine.Hit) then trace = { filter = filter, endpos = traceLine.HitPos - ( angleVector * v[2] ), start = traceLine.HitPos }; traceLine = util.TraceEntity(trace, player); if (!traceLine.Hit) then position = traceLine.HitPos; end; end; if (!traceLine.Hit) then break; end; end; for k, v in ipairs(directions) do local angleVector = Angle(0, v[1], 0):Forward(); local testPosition = position + ( angleVector * v[2] ); local trace = { filter = filter, endpos = testPosition, start = position }; local traceLine = util.TraceEntity(trace, player); if (!traceLine.Hit) then return traceLine.HitPos; end; end; return position; end; -- A function to return a player's property. function nexus.player.ReturnProperty(player) local uniqueID = player:UniqueID(); local key = player:QueryCharacter("key"); for k, v in pairs( nexus.player.GetAllProperty() ) do if ( IsValid(v) ) then if ( uniqueID == nexus.entity.QueryProperty(v, "uniqueID") ) then if ( key == nexus.entity.QueryProperty(v, "key") ) then nexus.player.GiveProperty( player, v, nexus.entity.QueryProperty(v, "networked") ); end; end; end; end; nexus.mount.Call("PlayerReturnProperty", player); end; -- A function to take flags from a player. function nexus.player.TakeFlags(player, flags) for i = 1, string.len(flags) do local flag = string.sub(flags, i, i); if ( string.find(player:QueryCharacter("flags"), flag) ) then player:SetCharacterData("flags", string.gsub(player:QueryCharacter("flags"), flag, ""), true); nexus.mount.Call("PlayerFlagsTaken", player, flag); end; end; end; -- A function to set whether a player's menu is open. function nexus.player.SetMenuOpen(player, boolean) umsg.Start("nx_MenuOpen", player); umsg.Bool(boolean); umsg.End(); end; -- A function to set whether a player has intialized. function nexus.player.SetInitialized(player, initialized) player:SetSharedVar("sh_Initialized", initialized); end; -- A function to check if a player has any flags. function nexus.player.HasAnyFlags(player, flags, default) if ( player:GetCharacter() ) then local playerFlags = player:QueryCharacter("flags"); if ( nexus.class.HasAnyFlags(player:Team(), flags) and !default ) then return true; else -- local i; for i = 1, string.len(flags) do local flag = string.sub(flags, i, i); local success = true; if (!default) then local hasFlag = nexus.mount.Call("PlayerDoesHaveFlag", player, flag); if (hasFlag != false) then if (hasFlag) then return true; end; else success = nil; end; end; if (success) then if (flag == "s") then if ( player:IsSuperAdmin() ) then return true; end; elseif (flag == "a") then if ( player:IsAdmin() ) then return true; end; elseif (flag == "o") then if ( player:IsSuperAdmin() or player:IsAdmin() ) then return true; elseif ( player:IsUserGroup("operator") ) then return true; end; elseif ( string.find(playerFlags, flag) ) then return true; end; end; end; end; end; end; -- A function to check if a player has flags. function nexus.player.HasFlags(player, flags, default) if ( player:GetCharacter() ) then local playerFlags = player:QueryCharacter("flags"); if ( nexus.class.HasFlags(player:Team(), flags) and !default ) then return true; else for i = 1, string.len(flags) do local flag = string.sub(flags, i, i); local success; if (!default) then local hasFlag = nexus.mount.Call("PlayerDoesHaveFlag", player, flag); if (hasFlag != false) then if (hasFlag) then success = true; end; else return; end; end; if (!success) then if (flag == "s") then if ( !player:IsSuperAdmin() ) then return; end; elseif (flag == "a") then if ( !player:IsAdmin() ) then return; end; elseif (flag == "o") then if ( !player:IsSuperAdmin() and !player:IsAdmin() ) then if ( !player:IsUserGroup("operator") ) then return; end; end; elseif ( !string.find(playerFlags, flag) ) then return; end; end; end; end; return true; end; end; -- A function to use a player's death code. function nexus.player.UseDeathCode(player, commandTable, arguments) nexus.mount.Call("PlayerDeathCodeUsed", player, commandTable, arguments); nexus.player.TakeDeathCode(player); end; -- A function to get whether a player has a death code. function nexus.player.GetDeathCode(player, authenticated) if ( player.deathCode and (!authenticated or player.deathCodeAuthenticated) ) then return player.deathCode; end; end; -- A function to take a player's death code. function nexus.player.TakeDeathCode(player) player.deathCodeAuthenticated = nil; player.deathCode = nil; end; -- A function to give a player their death code. function nexus.player.GiveDeathCode(player) player.deathCode = math.random(0, 99999); player.deathCodeAuthenticated = nil; umsg.Start("nx_ChatBoxDeathCode", player); umsg.Long(player.deathCode); umsg.End(); end; -- A function to take a door from a player. function nexus.player.TakeDoor(player, door, force, thisDoorOnly, childrenOnly) local doorCost = nexus.config.Get("door_cost"):Get(); if (!thisDoorOnly) then local doorParent = nexus.entity.GetDoorParent(door); if (doorParent and !childrenOnly) then return nexus.player.TakeDoor(player, doorParent, force); else for k, v in pairs( nexus.entity.GetDoorChildren(door) ) do if ( IsValid(v) ) then nexus.player.TakeDoor(player, v, true, true); end; end; end; end; if ( nexus.mount.Call("PlayerCanUnlockEntity", player, door) ) then door:Fire("Unlock", "", 0); door:EmitSound("doors/door_latch3.wav"); end; nexus.entity.SetDoorText(door, false); nexus.player.TakeProperty(player, door) if (door:GetClass() == "prop_dynamic") then if ( !door:IsMapEntity() ) then door:Remove(); end; end; if (!force and doorCost > 0) then nexus.player.GiveCash(player, doorCost / 2, "selling a door"); end; end; -- A function to make a player say text as a radio broadcast. function nexus.player.SayRadio(player, text, check, noEavesdrop) local eavesdroppers = {}; local listeners = {}; local canRadio = true; local info = {listeners = {}, noEavesdrop = noEavesdrop, text = text}; nexus.mount.Call("PlayerAdjustRadioInfo", player, info); for k, v in pairs(info.listeners) do if (type(k) == "Player") then listeners[k] = k; elseif (type(v) == "Player") then listeners[v] = v; end; end; if (!info.noEavesdrop) then for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() and !listeners[v] ) then if ( v:GetShootPos():Distance( player:GetShootPos() ) <= nexus.config.Get("talk_radius"):Get() ) then eavesdroppers[v] = v; end; end; end; end; if (check) then canRadio = nexus.mount.Call("PlayerCanRadio", player, info.text, listeners, eavesdroppers); end; if (canRadio) then info = nexus.chatBox.Add(listeners, player, "radio", info.text); if ( info and IsValid(info.speaker) ) then nexus.chatBox.Add(eavesdroppers, info.speaker, "radio_eavesdrop", info.text); nexus.mount.Call("PlayerRadioUsed", player, info.text, listeners, eavesdroppers); end; end; end; -- A function to get a player's faction table. function nexus.player.GetFactionTable(player) return nexus.faction.stored[ player:QueryCharacter("faction") ]; end; -- A function to give a door to a player. function nexus.player.GiveDoor(player, door, name, unsellable, override) if ( nexus.entity.IsDoor(door) ) then local doorParent = nexus.entity.GetDoorParent(door); if (doorParent and !override) then nexus.player.GiveDoor(player, doorParent, name, unsellable); else for k, v in pairs( nexus.entity.GetDoorChildren(door) ) do if ( IsValid(v) ) then nexus.player.GiveDoor(player, v, name, unsellable, true); end; end; door.unsellable = unsellable; door.accessList = {}; nexus.entity.SetDoorText(door, name or "A purchased door."); nexus.player.GiveProperty(player, door, true); if ( nexus.mount.Call("PlayerCanUnlockEntity", player, door) ) then door:EmitSound("doors/door_latch3.wav"); door:Fire("Unlock", "", 0); end; end; end; end; -- A function to get a player's real trace. function nexus.player.GetRealTrace(player, useFilterTrace) local eyePos = player:EyePos(); local trace = player:GetEyeTraceNoCursor(); local newTrace = util.TraceLine( { endpos = eyePos + (player:GetAimVector() * 4096), filter = player, start = eyePos, mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER } ); if ( (IsValid(newTrace.Entity) and ( !IsValid(trace.Entity) or trace.Entity:IsVehicle() ) and !newTrace.HitWorld) or useFilterTrace ) then trace = newTrace; end; return trace; end; -- A function to check if a player recognises another player. function nexus.player.DoesRecognise(player, target, status, simple) if (!status) then return nexus.player.DoesRecognise(player, target, RECOGNISE_PARTIAL); elseif ( nexus.config.Get("recognise_system"):Get() ) then local recognisedNames = player:QueryCharacter("recognisedNames"); local default = false; local key = target:QueryCharacter("key"); if ( recognisedNames[key] ) then if (simple) then default = (recognisedNames[key] == status); else default = (recognisedNames[key] >= status); end; end; return nexus.mount.Call("PlayerDoesRecognisePlayer", player, target, status, simple, default); else return true; end; end; -- A function to send a player a creation fault. function nexus.player.CreationError(player, fault) if (!fault) then fault = "There has been an unknown error, please contact the administrator!"; end; umsg.Start("nx_CharacterFinish", player) umsg.Bool(false); umsg.String(fault); umsg.End(); end; -- A function to force a player to delete a character. function nexus.player.ForceDeleteCharacter(player, characterID) local charactersTable = nexus.config.Get("mysql_characters_table"):Get(); local schemaFolder = NEXUS:GetSchemaFolder(); local character = player.characters[characterID]; if (character) then tmysql.query("DELETE FROM "..charactersTable.." WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..player:SteamID().."\" AND _CharacterID = "..characterID); if ( !nexus.mount.Call("PlayerDeleteCharacter", player, character) ) then NEXUS:PrintDebug(player:SteamName().." deleted character '"..character.name.."'."); end; player.characters[characterID] = nil; umsg.Start("nx_CharacterRemove", player) umsg.Short(characterID); umsg.End(); end; end; -- A function to delete a player's character. function nexus.player.DeleteCharacter(player, characterID) local character = player.characters[characterID]; if (character) then if (player:GetCharacter() != character) then local fault = nexus.mount.Call("PlayerCanDeleteCharacter", player, character); if (fault == nil or fault == true) then nexus.player.ForceDeleteCharacter(player, characterID); return true; elseif (type(fault) != "string") then return false, "You cannot delete this character!"; else return false, fault; end; else return false, "You cannot delete the character you are using!"; end; else return false, "This character does not exist!"; end; end; -- A function to use a player's character. function nexus.player.UseCharacter(player, characterID) local currentCharacter = player:GetCharacter(); local character = player.characters[characterID]; if (character) then if (currentCharacter != character) then local factionTable = nexus.faction.Get(character.faction); local fault = nexus.mount.Call("PlayerCanUseCharacter", player, character); if (fault == nil or fault == true) then local players = #nexus.faction.GetPlayers(character.faction); local limit = nexus.faction.GetLimit(factionTable.name); if ( nexus.mount.Call("PlayerCanBypassFactionLimit", player, character) ) then limit = nil; end; if (limit and players == limit) then return false, "The "..character.faction.." faction is full ("..limit.."/"..limit..")!"; else if (currentCharacter) then local fault = nexus.mount.Call("PlayerCanSwitchCharacter", player, character); if (fault != nil and fault != true) then return false, fault or "You cannot switch to this character!"; end; end; NEXUS:PrintDebug(player:SteamName().." has loaded the character '"..character.name.."'."); nexus.player.LoadCharacter(player, characterID); return true; end; else return false, fault or "You cannot use this character!"; end; else return false, "You are already using this character!"; end; else return false, "This character does not exist!"; end; end; -- A function to get a player's character. function nexus.player.GetCharacter(player) return player.character; end; -- A function to get a player's storage entity. function nexus.player.GetStorageEntity(player) if ( player:GetStorageTable() ) then local entity = nexus.player.QueryStorage(player, "entity"); if ( IsValid(entity) ) then return entity; end; end; end; -- A function to get a player's storage table. function nexus.player.GetStorageTable(player) return player.storage; end; -- A function to query a player's storage. function nexus.player.QueryStorage(player, key, default) local storage = player:GetStorageTable(); if (storage) then return storage[key] or default; else return default; end; end; -- A function to close storage for a player. function nexus.player.CloseStorage(player, server) local storage = player:GetStorageTable(); local OnClose = nexus.player.QueryStorage(player, "OnClose"); local entity = nexus.player.QueryStorage(player, "entity"); if (storage and OnClose) then OnClose(player, storage, entity); end; if (!server) then umsg.Start("nx_StorageClose", player); umsg.End(); end; player.storage = nil; end; -- A function to get the weight of a player's storage. function nexus.player.GetStorageWeight(player) if ( player:GetStorageTable() ) then local inventory = nexus.player.QueryStorage(player, "inventory"); local cash = nexus.player.QueryStorage(player, "cash"); local weight = ( cash * nexus.config.Get("cash_weight"):Get() ); if ( nexus.player.QueryStorage(player, "noCashWeight") ) then weight = 0; end; for k, v in pairs(inventory) do local itemTable = nexus.item.Get(k); if (itemTable) then weight = weight + (math.max(itemTable.storageWeight or itemTable.weight, 0) * v ); end; end; return weight; else return 0; end; end; -- A function to open storage for a player. function nexus.player.OpenStorage(player, data) local storage = player:GetStorageTable(); local OnClose = nexus.player.QueryStorage(player, "OnClose"); if (storage and OnClose) then OnClose(player, storage, storage.entity); end; if ( !nexus.config.Get("cash_enabled"):Get() ) then data.cash = nil; end; if (data.noCashWeight == nil) then data.noCashWeight = false; end; data.inventory = data.inventory or {}; data.entity = data.entity or player; data.weight = data.weight or nexus.config.Get("default_inv_weight"):Get(); data.cash = data.cash or 0; data.name = data.name or "Storage"; player.storage = data; umsg.Start("nx_StorageStart", player); umsg.Bool(data.noCashWeight); umsg.Entity(data.entity); umsg.String(data.name); umsg.End(); nexus.player.UpdateStorageCash(player, data.cash); nexus.player.UpdateStorageWeight(player, data.weight); for k, v in pairs(data.inventory) do nexus.player.UpdateStorageItem(player, k); end; end; -- A function to update a player's storage cash. function nexus.player.UpdateStorageCash(player, cash) if ( nexus.config.Get("cash_enabled"):Get() ) then local storageTable = player:GetStorageTable(); if (storageTable) then local inventory = nexus.player.QueryStorage(player, "inventory"); for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( v:GetStorageTable() ) then if (nexus.player.QueryStorage(v, "inventory") == inventory) then v.storage.cash = cash; umsg.Start("nx_StorageCash", v); umsg.Long(cash); umsg.End(); end; end; end; end; end; end; end; -- A function to update a player's storage weight. function nexus.player.UpdateStorageWeight(player, weight) if ( player:GetStorageTable() ) then local inventory = nexus.player.QueryStorage(player, "inventory"); for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( v:GetStorageTable() ) then if (nexus.player.QueryStorage(v, "inventory") == inventory) then v.storage.weight = weight; umsg.Start("nx_StorageWeight", v); umsg.Float(weight); umsg.End(); end; end; end; end; end; end; -- A function to get whether a player can give to storage. function nexus.player.CanGiveToStorage(player, item) local itemTable = nexus.item.Get(item); local entity = nexus.player.QueryStorage(player, "entity"); if (itemTable) then local allowPlayerStorage = (!entity:IsPlayer() or itemTable.allowPlayerStorage != false); local allowEntityStorage = (entity:IsPlayer() or itemTable.allowEntityStorage != false); local allowPlayerGive = (!entity:IsPlayer() or itemTable.allowPlayerGive != false); local allowEntityGive = (entity:IsPlayer() or itemTable.allowEntityGive != false); local allowStorage = (itemTable.allowStorage != false); local allowGive = (itemTable.allowGive != false); local shipment = (entity and entity:GetClass() == "nx_shipment"); if ( shipment or (allowPlayerStorage and allowPlayerGive and allowStorage and allowGive) ) then return true; end; end; end; -- A function to get whether a player can take from storage. function nexus.player.CanTakeFromStorage(player, item) local itemTable = nexus.item.Get(item); local entity = nexus.player.QueryStorage(player, "entity"); if (itemTable) then local allowPlayerStorage = (!entity:IsPlayer() or itemTable.allowPlayerStorage != false); local allowEntityStorage = (entity:IsPlayer() or itemTable.allowEntityStorage != false); local allowPlayerTake = (!entity:IsPlayer() or itemTable.allowPlayerTake != false); local allowEntityTake = (entity:IsPlayer() or itemTable.allowEntityTake != false); local allowStorage = (itemTable.allowStorage != false); local allowTake = (itemTable.allowTake != false); local shipment = (entity and entity:GetClass() == "nx_shipment"); if ( shipment or (allowPlayerStorage and allowPlayerTake and allowStorage and allowTake) ) then return true; end; end; end; -- A function to update each player's storage for a player. function nexus.player.UpdateStorageForPlayer(player, item) local inventory = nexus.player.GetInventory(player); local cash = nexus.player.GetCash(player); if (item) then local itemTable = nexus.item.Get(item); if (itemTable) then for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( v:GetStorageTable() ) then if (nexus.player.QueryStorage(v, "inventory") == inventory) then umsg.Start("nx_StorageItem", v); umsg.Long(itemTable.index); umsg.Long(inventory[itemTable.uniqueID] or 0); umsg.End(); end; end; end; end; end; elseif ( nexus.config.Get("cash_enabled"):Get() ) then for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( v:GetStorageTable() ) then if (nexus.player.QueryStorage(v, "inventory") == inventory) then v.storage.cash = cash; umsg.Start("nx_StorageCash", v); umsg.Long(cash); umsg.End(); end; end; end; end; end; end; -- A function to update a storage item for a player. function nexus.player.UpdateStorageItem(player, item, amount) if ( player:GetStorageTable() ) then local inventory = nexus.player.QueryStorage(player, "inventory"); local itemTable = nexus.item.Get(item); if (itemTable) then item = itemTable.uniqueID; if (amount) then if ( amount < 0 and !nexus.player.CanTakeFromStorage(player, item) ) then return; elseif ( amount > 0 and !nexus.player.CanGiveToStorage(player, item) ) then return; end; end; if (amount) then inventory[item] = inventory[item] or 0; inventory[item] = inventory[item] + amount; end; if (inventory[item] and inventory[item] <= 0) then inventory[item] = nil; end; for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( v:GetStorageTable() ) then if (nexus.player.QueryStorage(v, "inventory") == inventory) then if (amount or player == v) then umsg.Start("nx_StorageItem", v); umsg.Long(itemTable.index); umsg.Long(inventory[item] or 0); umsg.End(); end; end; end; end; end; end; end; end; -- A function to get a player's gender. function nexus.player.GetGender(player) return player:QueryCharacter("gender"); end; -- A function to get a player's unrecognised name. function nexus.player.GetUnrecognisedName(player) local unrecognisedPhysDesc = nexus.player.GetPhysDesc(player); local unrecognisedName = nexus.config.Get("unrecognised_name"):Get(); local usedPhysDesc; if (unrecognisedPhysDesc != "") then unrecognisedName = unrecognisedPhysDesc; usedPhysDesc = true; end; return unrecognisedName, usedPhysDesc; end; -- A function to format text based on a relationship. function nexus.player.FormatRecognisedText(player, text, ...) for i = 1, #arg do if ( string.find(text, "%%s") and IsValid( arg[i] ) ) then local unrecognisedName = "["..nexus.player.GetUnrecognisedName( arg[i] ).."]"; if ( nexus.player.DoesRecognise( player, arg[i] ) ) then unrecognisedName = arg[i]:Name(); end; text = string.gsub(text, "%%s", unrecognisedName, 1); end; end; return text; end; -- A function to restore a recognised name. function nexus.player.RestoreRecognisedName(player, target) local recognisedNames = player:QueryCharacter("recognisedNames"); local key = target:QueryCharacter("key"); if ( recognisedNames[key] ) then if ( nexus.mount.Call("PlayerCanRestoreRecognisedName", player, target) ) then nexus.player.SetRecognises(player, target, recognisedNames[key], true); else recognisedNames[key] = nil; end; end; end; -- A function to restore a player's recognised names. function nexus.player.RestoreRecognisedNames(player) umsg.Start("nx_ClearRecognisedNames", player); umsg.End(); if ( nexus.config.Get("save_recognised_names"):Get() ) then for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then nexus.player.RestoreRecognisedName(player, v); nexus.player.RestoreRecognisedName(v, player); end; end; end; end; -- A function to set whether a player recognises a player. function nexus.player.SetRecognises(player, target, status, force) local recognisedNames = player:QueryCharacter("recognisedNames"); local name = target:Name(); local key = target:QueryCharacter("key"); if (status == RECOGNISE_SAVE) then if ( nexus.config.Get("save_recognised_names"):Get() ) then if ( !nexus.mount.Call("PlayerCanSaveRecognisedName", player, target) ) then status = RECOGNISE_TOTAL; end; else status = RECOGNISE_TOTAL; end; end; if ( !status or force or !nexus.player.DoesRecognise(player, target, status) ) then recognisedNames[key] = status or nil; status = status or 0; umsg.Start("nx_RecognisedName", player); umsg.Long(key); umsg.Short(status); umsg.End(); end; end; -- A function to get a player's physical description. function nexus.player.GetPhysDesc(player) local physDesc = player:GetSharedVar("sh_PhysDesc"); local team = player:Team(); if (physDesc == "") then physDesc = nexus.class.Query(team, "defaultPhysDesc", ""); end; if (physDesc == "") then physDesc = nexus.config.Get("default_physdesc"):Get(); end; if (!physDesc or physDesc == "") then physDesc = "This character has no physical description set."; else physDesc = NEXUS:ModifyPhysDesc(physDesc); end; local override = nexus.mount.Call("GetPlayerPhysDescOverride", player, physDesc); if (override) then physDesc = override; end; return physDesc; end; -- A function to clear a player's recognised names list. function nexus.player.ClearRecognisedNames(player, status, simple) if (!status) then local character = player:GetCharacter(); if (character) then character.recognisedNames = {}; umsg.Start("nx_ClearRecognisedNames", player); umsg.End(); end; else for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( nexus.player.DoesRecognise(player, v, status, simple) ) then nexus.player.SetRecognises(player, v, false); end; end; end; end; nexus.mount.Call("PlayerRecognisedNamesCleared", player, status, simple); end; -- A function to clear a player's name from being recognised. function nexus.player.ClearName(player, status, simple) for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( !status or nexus.player.DoesRecognise(v, player, status, simple) ) then nexus.player.SetRecognises(v, player, false); end; end; end; nexus.mount.Call("PlayerNameCleared", player, status, simple); end; -- A function to holsters all of a player's weapons. function nexus.player.HolsterAll(player) for k, v in pairs( player:GetWeapons() ) do local class = v:GetClass(); local itemTable = nexus.item.GetWeapon(v); if (itemTable) then if ( nexus.mount.Call("PlayerCanHolsterWeapon", player, itemTable, true, true) ) then player:StripWeapon(class); player:UpdateInventory(itemTable.uniqueID, 1, true); nexus.mount.Call("PlayerHolsterWeapon", player, itemTable, true); end; end; end; player:SelectWeapon("nx_hands"); end; -- A function to set a shared variable for a player. function nexus.player.SetSharedVar(player, key, value) if ( IsValid(player) ) then local sharedVarData = nexus.player.sharedVars[key]; local playerData = player.sharedVars[key]; if (sharedVarData) then if (sharedVarData.playerOnly) then local class = NEXUS:ConvertUserMessageClass(sharedVarData.class); local realValue = value; if (value == nil) then realValue = NEXUS:GetDefaultNetworkedValue(sharedVarData.class); end; if (playerData != realValue) then player.sharedVars[key] = realValue; umsg.Start("nx_SharedVar", player); umsg.String(key); umsg[class](realValue); umsg.End(); end; else local class = NEXUS:ConvertNetworkedClass(sharedVarData.class); if (class) then if (value == nil) then value = NEXUS:GetDefaultClassValue(class); end; player["SetNetworked"..class](player, key, value); else player:SetNetworkedVar(key, value); end; end; else player:SetNetworkedVar(key, value); end; end; end; -- A function to get a player's shared variable. function nexus.player.GetSharedVar(player, key) if ( IsValid(player) ) then local sharedVarData = nexus.player.sharedVars[key]; local playerData = player.sharedVars[key]; if (sharedVarData) then if (sharedVarData.playerOnly) then if (!playerData) then return NEXUS:GetDefaultNetworkedValue(sharedVarData.class); else return playerData; end; else local class = NEXUS:ConvertNetworkedClass(sharedVarData.class); if (class) then return player["GetNetworked"..class](player, key); else return player:GetNetworkedVar(key); end; end; else return player:GetNetworkedVar(key); end; end; end; -- A function to set whether a player's character is banned. function nexus.player.SetBanned(player, banned) player:SetCharacterData("banned", banned); player:SaveCharacter(); player:SetSharedVar("sh_Banned", banned); end; -- A function to set a player's name. function nexus.player.SetName(player, name, saveless) local previousName = player:QueryCharacter("name"); local newName = name; player:SetCharacterData("name", newName, true); player:SetSharedVar("sh_Name", newName); if (!player.firstSpawn) then nexus.mount.Call("PlayerNameChanged", player, previousName, newName); end; if (!saveless) then player:SaveCharacter(); end; end; -- A function to get a player's property count. function nexus.player.GetPropertyCount(player, class) local uniqueID = player:UniqueID(); local count = 0; local key = player:QueryCharacter("key"); for k, v in pairs( nexus.player.GetAllProperty() ) do if ( uniqueID == nexus.entity.QueryProperty(v, "uniqueID") ) then if ( key == nexus.entity.QueryProperty(v, "key") ) then if (!class or v:GetClass() == class) then count = count + 1; end; end; end; end; return count; end; -- A function to get a player's door count. function nexus.player.GetDoorCount(player) local uniqueID = player:UniqueID(); local count = 0; local key = player:QueryCharacter("key"); for k, v in pairs( nexus.player.GetAllProperty() ) do if ( nexus.entity.IsDoor(v) and !nexus.entity.GetDoorParent(v) ) then if ( uniqueID == nexus.entity.QueryProperty(v, "uniqueID") ) then if ( player:QueryCharacter("key") == nexus.entity.QueryProperty(v, "key") ) then count = count + 1; end; end; end; end; return count; end; -- A function to take a player's door access. function nexus.player.TakeDoorAccess(player, door) if (door.accessList) then door.accessList[ player:QueryCharacter("key") ] = false; end; end; -- A function to give a player door access. function nexus.player.GiveDoorAccess(player, door, access) local key = player:QueryCharacter("key"); if (!door.accessList) then door.accessList = { [key] = access }; else door.accessList[key] = access; end; end; -- A function to check if a player has door access. function nexus.player.HasDoorAccess(player, door, access, simple) if (!access) then return nexus.player.HasDoorAccess(player, door, DOOR_ACCESS_BASIC, simple); else local doorParent = nexus.entity.GetDoorParent(door); local key = player:QueryCharacter("key"); if ( doorParent and nexus.entity.DoorHasSharedAccess(doorParent) and (!door.accessList or door.accessList[key] == nil) ) then return nexus.mount.Call("PlayerDoesHaveDoorAccess", player, doorParent, access, simple); else return nexus.mount.Call("PlayerDoesHaveDoorAccess", player, door, access, simple); end; end; end; -- A function to get a player's inventory. function nexus.player.GetInventory(player) return player:QueryCharacter("inventory"); end; -- A function to get a player's cash. function nexus.player.GetCash(player) if ( nexus.config.Get("cash_enabled"):Get() ) then return player:QueryCharacter("cash"); else return 0; end; end; -- A function to check if a player can afford an amount. function nexus.player.CanAfford(player, amount) if ( nexus.config.Get("cash_enabled"):Get() ) then return nexus.player.GetCash(player) >= amount; else return true; end; end; -- A function to give a player an amount of cash. function nexus.player.GiveCash(player, amount, reason, noMessage) if ( nexus.config.Get("cash_enabled"):Get() ) then local positiveHintColor = nexus.schema.GetColor("positive_hint"); local negativeHintColor = nexus.schema.GetColor("negative_hint"); local roundedAmount = math.Round(amount); local cash = math.Round( math.max(nexus.player.GetCash(player) + roundedAmount, 0) ); player:SetCharacterData("cash", cash, true); player:SetSharedVar("sh_Cash", cash); if (roundedAmount < 0) then roundedAmount = math.abs(roundedAmount); if (!noMessage) then if (reason) then nexus.hint.Send(player, "Your character has lost "..FORMAT_CASH(roundedAmount).." ("..reason..").", 4, negativeHintColor); else nexus.hint.Send(player, "Your character has lost "..FORMAT_CASH(roundedAmount)..".", 4, negativeHintColor); end; end; elseif (roundedAmount > 0) then if (!noMessage) then if (reason) then nexus.hint.Send(player, "Your character has gained "..FORMAT_CASH(roundedAmount).." ("..reason..").", 4, positiveHintColor); else nexus.hint.Send(player, "Your character has gained "..FORMAT_CASH(roundedAmount)..".", 4, positiveHintColor); end; end; end; nexus.mount.Call("PlayerCashUpdated", player, roundedAmount, reason, noMessage); end; end; -- A function to show cinematic text to a player. function nexus.player.CinematicText(player, text, color, hangTime) NEXUS:StartDataStream( player, "CinematicText", {text = text, color = color, hangTime = hangTime} ); end; -- A function to show cinematic text to each player. function nexus.player.CinematicTextAll(text, color, hangTime) for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then nexus.player.CinematicText(v, text, color, hangTime); end; end; end; -- A function to get a player by a part of their name. function nexus.player.Get(name) for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if ( string.find(string.lower( v:Name() ), string.lower(name), 1, true) ) then return v; end; end; end; return false; end; -- A function to notify each player in a radius. function nexus.player.NotifyInRadius(text, class, position, radius) local listeners = {}; for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then if (position:Distance( v:GetPos() ) <= radius) then listeners[#listeners + 1] = v; end; end; end; nexus.player.Notify(listeners, text, class); end; -- A function to notify each player. function nexus.player.NotifyAll(text, class) nexus.player.Notify(nil, text, true); end; -- A function to notify a player. function nexus.player.Notify(player, text, class) if (type(player) == "table") then for k, v in ipairs(player) do nexus.player.Notify(v, text, class); end; elseif (class == true) then nexus.chatBox.Add(player, nil, "notify_all", text); elseif (!class) then nexus.chatBox.Add(player, nil, "notify", text); else umsg.Start("nx_Notification", player); umsg.String(text); umsg.Short(class); umsg.End(); end; end; -- A function to set a player's weapons list from a table. function nexus.player.SetWeapons(player, weapons, forceReturn) for k, v in pairs(weapons) do if ( player:HasWeapon( v.weaponData["class"] ) ) then if (v.canHolster) then local itemTable = nexus.item.GetWeapon( v.weaponData["class"], v.weaponData["uniqueID"] ); if (itemTable) then player:UpdateInventory(itemTable.uniqueID, 1, true); nexus.mount.Call("PlayerHolsterWeapon", player, itemTable, true); end; end; elseif (!v.teamIndex or player:Team() == v.teamIndex) then player:Give(v.weaponData["class"], v.weaponData["uniqueID"] , forceReturn); if ( !player:HasWeapon( v.weaponData["class"] ) ) then if (v.canHolster) then local itemTable = nexus.item.GetWeapon( v.weaponData["class"], v.weaponData["uniqueID"] ); if (itemTable) then player:UpdateInventory(itemTable.uniqueID, 1, true); nexus.mount.Call("PlayerHolsterWeapon", player, itemTable, true); end; end; end; end; end; end; -- A function to give ammo to a player from a table. function nexus.player.GiveAmmo(player, ammo) for k, v in pairs(ammo) do player:GiveAmmo(v, k); end; end; -- A function to set a player's ammo list from a table. function nexus.player.SetAmmo(player, ammo) for k, v in pairs(ammo) do player:SetAmmo(v, k); end; end; -- A function to get a player's ammo list as a table. function nexus.player.GetAmmo(player, strip) local spawnAmmo = nexus.player.GetSpawnAmmo(player); local ammo = { ["sniperpenetratedround"] = player:GetAmmoCount("sniperpenetratedround"), ["striderminigun"] = player:GetAmmoCount("striderminigun"), ["helicoptergun"] = player:GetAmmoCount("helicoptergun"), ["combinecannon"] = player:GetAmmoCount("combinecannon"), ["smg1_grenade"] = player:GetAmmoCount("smg1_grenade"), ["gaussenergy"] = player:GetAmmoCount("gaussenergy"), ["sniperround"] = player:GetAmmoCount("sniperround"), ["airboatgun"] = player:GetAmmoCount("airboatgun"), ["ar2altfire"] = player:GetAmmoCount("ar2altfire"), ["rpg_round"] = player:GetAmmoCount("rpg_round"), ["xbowbolt"] = player:GetAmmoCount("xbowbolt"), ["buckshot"] = player:GetAmmoCount("buckshot"), ["alyxgun"] = player:GetAmmoCount("alyxgun"), ["grenade"] = player:GetAmmoCount("grenade"), ["thumper"] = player:GetAmmoCount("thumper"), ["gravity"] = player:GetAmmoCount("gravity"), ["battery"] = player:GetAmmoCount("battery"), ["pistol"] = player:GetAmmoCount("pistol"), ["slam"] = player:GetAmmoCount("slam"), ["smg1"] = player:GetAmmoCount("smg1"), ["357"] = player:GetAmmoCount("357"), ["ar2"] = player:GetAmmoCount("ar2") }; if (spawnAmmo) then for k, v in pairs(spawnAmmo) do if ( ammo[k] ) then ammo[k] = math.max(ammo[k] - v, 0); end; end; end; if (strip) then player:RemoveAllAmmo(); end; return ammo; end; -- A function to get a player's weapons list as a table. function nexus.player.GetWeapons(player, keep) local weapons = {}; for k, v in pairs( player:GetWeapons() ) do local team = player:Team(); local class = v:GetClass(); local uniqueID = v:GetNetworkedString("sh_UniqueID"); local itemTable = nexus.item.GetWeapon(v); if ( !nexus.player.GetSpawnWeapon(player, class) ) then team = nil; end; if ( itemTable and nexus.mount.Call("PlayerCanHolsterWeapon", player, itemTable, true, true) ) then weapons[#weapons + 1] = { weaponData = {class = class, uniqueID = uniqueID}, canHolster = true, teamIndex = team }; else weapons[#weapons + 1] = { weaponData = {class = class, uniqueID = uniqueID}, canHolster = false, teamIndex = team }; end; if (!keep) then player:StripWeapon(class); end; end; return weapons; end; -- A function to get the total weight of a player's equipped weapons. function nexus.player.GetEquippedWeight(player) local weight = 0; for k, v in pairs( player:GetWeapons() ) do local itemTable = nexus.item.GetWeapon(v); if (itemTable) then weight = weight + itemTable.weight; end; end; return weight; end; -- A function to get a player's holstered weapon. function nexus.player.GetHolsteredWeapon(player) for k, v in pairs( player:GetWeapons() ) do local class = v:GetClass(); local itemTable = nexus.item.GetWeapon(v); if (itemTable) then if (nexus.player.GetWeaponClass(player) != class) then return class; end; end; end; end; -- A function to check whether a player is ragdolled. function nexus.player.IsRagdolled(player, exception, entityless) if (player:GetRagdollEntity() or entityless) then local ragdolled = player:GetSharedVar("sh_Ragdolled"); if (ragdolled == exception) then return false; else return (ragdolled != RAGDOLL_NONE); end; end; end; -- A function to set a player's unragdoll time. function nexus.player.SetUnragdollTime(player, delay) player.unragdollPaused = nil; if (delay) then nexus.player.SetAction(player, "unragdoll", delay, 2, function() if ( IsValid(player) and player:Alive() ) then nexus.player.SetRagdollState(player, RAGDOLL_NONE); end; end); else nexus.player.SetAction(player, "unragdoll", false); end; end; -- A function to pause a player's unragdoll time. function nexus.player.PauseUnragdollTime(player) if (!player.unragdollPaused) then local unragdollTime = nexus.player.GetUnragdollTime(player); local curTime = CurTime(); if ( player:IsRagdolled() ) then if (unragdollTime > 0) then player.unragdollPaused = unragdollTime - curTime; nexus.player.SetAction(player, "unragdoll", false); end; end; end; end; -- A function to start a player's unragdoll time. function nexus.player.StartUnragdollTime(player) if (player.unragdollPaused) then if ( player:IsRagdolled() ) then nexus.player.SetUnragdollTime(player, player.unragdollPaused); player.unragdollPaused = nil; end; end; end; -- A function to get a player's unragdoll time. function nexus.player.GetUnragdollTime(player) local action, actionDuration, startActionTime = nexus.player.GetAction(player); if (action == "unragdoll") then return startActionTime + actionDuration; else return 0; end; end; -- A function to get a player's ragdoll state. function nexus.player.GetRagdollState(player) return player:GetSharedVar("sh_Ragdolled"); end; -- A function to get a player's ragdoll entity. function nexus.player.GetRagdollEntity(player) if (player.ragdollTable) then if ( IsValid(player.ragdollTable.entity) ) then return player.ragdollTable.entity; end; end; end; -- A function to get a player's ragdoll table. function nexus.player.GetRagdollTable(player) return player.ragdollTable; end; -- A function to do a player's ragdoll decay check. function nexus.player.DoRagdollDecayCheck(player, ragdoll) local index = ragdoll:EntIndex(); NEXUS:CreateTimer("Decay Check: "..index, 60, 0, function() local ragdollIsValid = IsValid(ragdoll); local playerIsValid = IsValid(player); if (!playerIsValid and ragdollIsValid) then if ( !nexus.entity.IsDecaying(ragdoll) ) then local decayTime = nexus.config.Get("body_decay_time"):Get(); if ( decayTime > 0 and nexus.mount.Call("PlayerCanRagdollDecay", player, ragdoll, decayTime) ) then nexus.entity.Decay(ragdoll, decayTime); end; else NEXUS:DestroyTimer("Decay Check: "..index); end; elseif (!ragdollIsValid) then NEXUS:DestroyTimer("Decay Check: "..index); end; end); end; -- A function to set a player's ragdoll immunity. function nexus.player.SetRagdollImmunity(player, delay) if (delay) then player:GetRagdollTable().immunity = CurTime() + delay; else player:GetRagdollTable().immunity = 0; end; end; -- A function to set a player's ragdoll state. function nexus.player.SetRagdollState(player, state, delay, decay, force, multiplier, velocityCallback) if (state == RAGDOLL_KNOCKEDOUT or state == RAGDOLL_FALLENOVER) then if ( player:IsRagdolled() ) then if ( nexus.mount.Call("PlayerCanRagdoll", player, state, delay, decay, player.ragdollTable) ) then nexus.player.SetUnragdollTime(player, delay); player:SetSharedVar("sh_Ragdolled", state); player.ragdollTable.delay = delay; player.ragdollTable.decay = decay; nexus.mount.Call("PlayerRagdolled", player, state, player.ragdollTable); end; elseif ( nexus.mount.Call("PlayerCanRagdoll", player, state, delay, decay) ) then local velocity = player:GetVelocity() + (player:GetAimVector() * 128); local ragdoll = ents.Create("prop_ragdoll"); ragdoll:SetMaterial( player:GetMaterial() ); ragdoll:SetAngles( player:GetAngles() ); ragdoll:SetColor( player:GetColor() ); ragdoll:SetModel( player:GetModel() ); ragdoll:SetSkin( player:GetSkin() ); ragdoll:SetPos( player:GetPos() ); ragdoll:Spawn(); player.ragdollTable = {}; player.ragdollTable.eyeAngles = player:EyeAngles(); player.ragdollTable.immunity = CurTime() + nexus.config.Get("ragdoll_immunity_time"):Get(); player.ragdollTable.moveType = MOVETYPE_WALK; player.ragdollTable.entity = ragdoll; player.ragdollTable.health = player:Health(); player.ragdollTable.armor = player:Armor(); player.ragdollTable.delay = delay; player.ragdollTable.decay = decay; if ( !player:IsOnGround() ) then player.ragdollTable.immunity = 0; end; if ( IsValid(ragdoll) ) then local headIndex = ragdoll:LookupBone("ValveBiped.Bip01_Head1"); ragdoll:SetCollisionGroup(COLLISION_GROUP_WEAPON); for i = 1, ragdoll:GetPhysicsObjectCount() do local physicsObject = ragdoll:GetPhysicsObjectNum(i); local boneIndex = ragdoll:TranslatePhysBoneToBone(i); local position, angle = player:GetBonePosition(boneIndex); if ( IsValid(physicsObject) ) then physicsObject:SetPos(position); physicsObject:SetAngle(angle); if (!velocityCallback) then if (boneIndex == headIndex) then physicsObject:SetVelocity(velocity * 1.5); else physicsObject:SetVelocity(velocity); end; if (force) then if (boneIndex == headIndex) then physicsObject:ApplyForceCenter(force * 1.5); else physicsObject:ApplyForceCenter(force); end; end; else velocityCallback(physicsObject, boneIndex, ragdoll, velocity, force); end; end; end; end; if ( player:Alive() ) then if ( IsValid( player:GetActiveWeapon() ) ) then player.ragdollTable.weapon = nexus.player.GetWeaponClass(player); end; player.ragdollTable.weapons = nexus.player.GetWeapons(player, true); if (delay) then nexus.player.SetUnragdollTime(player, delay); end; end; if ( player:InVehicle() ) then player:ExitVehicle(); player.ragdollTable.eyeAngles = Angle(0, 0, 0); end; if ( player:IsOnFire() ) then ragdoll:Ignite(8, 0); end; player:Spectate(OBS_MODE_CHASE); player:RunCommand("-duck"); player:RunCommand("-voicerecord"); player:SetMoveType(MOVETYPE_OBSERVER); player:StripWeapons(true); player:SpectateEntity(ragdoll); player:CrosshairDisable(); if ( player:FlashlightIsOn() ) then player:Flashlight(false); end; player.unragdollPaused = nil; player:SetSharedVar("sh_Ragdolled", state); player:SetSharedVar("sh_Ragdoll", ragdoll); if (state != RAGDOLL_FALLENOVER) then nexus.player.GiveDeathCode(player); end; nexus.entity.SetPlayer(ragdoll, player); nexus.player.DoRagdollDecayCheck(player, ragdoll); nexus.mount.Call("PlayerRagdolled", player, state, player.ragdollTable); end; elseif (state == RAGDOLL_NONE or state == RAGDOLL_RESET) then if ( player:IsRagdolled(nil, true) ) then local ragdollTable = player:GetRagdollTable(); if ( nexus.mount.Call("PlayerCanUnragdoll", player, state, ragdollTable) ) then player:UnSpectate(); player:CrosshairEnable(); if (state != RAGDOLL_RESET) then nexus.player.LightSpawn(player, nil, nil, true); end; if (state != RAGDOLL_RESET) then if ( IsValid(ragdollTable.entity) ) then local position = nexus.entity.GetPelvisPosition(ragdollTable.entity); if (position) then nexus.player.SetSafePosition(player, position, ragdollTable.entity); end; player:SetSkin( ragdollTable.entity:GetSkin() ); player:SetColor( ragdollTable.entity:GetColor() ); player:SetModel( ragdollTable.entity:GetModel() ); player:SetMaterial( ragdollTable.entity:GetMaterial() ); end; player:SetArmor(ragdollTable.armor); player:SetHealth(ragdollTable.health); player:SetMoveType(ragdollTable.moveType); player:SetEyeAngles(ragdollTable.eyeAngles); end; if ( IsValid(ragdollTable.entity) ) then NEXUS:DestroyTimer( "Decay Check: "..ragdollTable.entity:EntIndex() ); if (ragdollTable.decay) then if ( nexus.mount.Call("PlayerCanRagdollDecay", player, ragdollTable.entity, ragdollTable.decay) ) then nexus.entity.Decay(ragdollTable.entity, ragdollTable.decay); end; else ragdollTable.entity:Remove(); end; end; if (state != RAGDOLL_RESET) then nexus.player.SetWeapons(player, ragdollTable.weapons, true); if (ragdollTable.weapon) then player:SelectWeapon(ragdollTable.weapon); end; end; nexus.player.SetUnragdollTime(player, false); player:SetSharedVar("sh_Ragdolled", RAGDOLL_NONE); player:SetSharedVar("sh_Ragdoll", NULL); nexus.mount.Call("PlayerUnragdolled", player, state, ragdollTable); player.unragdollPaused = nil; player.ragdollTable = {}; end; end; end; end; -- A function to make a player drop their weapons. function nexus.player.DropWeapons(player, attacker) local ragdollEntity = player:GetRagdollEntity(); if ( player:IsRagdolled() ) then local ragdollWeapons = player:GetRagdollWeapons(); for k, v in pairs(ragdollWeapons) do if (v.canHolster) then local itemTable = nexus.item.GetWeapon( v.weaponData["class"], v.weaponData["uniqueID"] ); if (itemTable) then if ( nexus.mount.Call("PlayerCanDropWeapon", player, attacker, itemTable, true) ) then local info = { itemTable = itemTable, position = ragdollEntity:GetPos() + Vector( 0, 0, math.random(1, 48) ), angles = Angle(0, 0, 0) }; if ( nexus.mount.Call("PlayerAdjustDropWeaponInfo", player, info) ) then local entity = nexus.entity.CreateItem(player, info.itemTable.uniqueID, info.position, info.angles); if ( IsValid(entity) ) then entity.data.sClip = nexus.player.TakeSecondaryAmmo( player, v.weaponData["class"] ); entity.data.pClip = nexus.player.TakePrimaryAmmo( player, v.weaponData["class"] ); end; end; ragdollWeapons[k] = nil; end; end; end; end; else for k, v in pairs( player:GetWeapons() ) do local itemTable = nexus.item.GetWeapon(v); local class = v:GetClass(); if (itemTable) then if ( nexus.mount.Call("PlayerCanDropWeapon", player, attacker, itemTable, true) ) then local info = { itemTable = itemTable, position = player:GetPos() + Vector( 0, 0, math.random(1, 48) ), angles = Angle(0, 0, 0) }; if ( nexus.mount.Call("PlayerAdjustDropWeaponInfo", player, info) ) then local entity = nexus.entity.CreateItem(player, info.itemTable.uniqueID, info.position, info.angles); if ( IsValid(entity) ) then entity.data.sClip = nexus.player.TakeSecondaryAmmo(player, class); entity.data.pClip = nexus.player.TakePrimaryAmmo(player, class); end; end; player:StripWeapon( v:GetClass() ); end; end; end; end; end; -- A function to lightly spawn a player. function nexus.player.LightSpawn(player, weapons, ammo, forceReturn) if (player:IsRagdolled() and !forceReturn) then nexus.player.SetRagdollState(player, RAGDOLL_NONE); end; player.lightSpawn = true; local moveType = player:GetMoveType(); local material = player:GetMaterial(); local position = player:GetPos(); local angles = player:EyeAngles(); local weapon = player:GetActiveWeapon(); local health = player:Health(); local armor = player:Armor(); local model = player:GetModel(); local color = player:GetColor(); local skin = player:GetSkin(); if (ammo) then if (type(ammo) != "table") then ammo = nexus.player.GetAmmo(player, true); end; end; if (weapons) then if (type(weapons) != "table") then weapons = nexus.player.GetWeapons(player); end; if ( IsValid(weapon) ) then weapon = weapon:GetClass(); end; end; player.lightSpawnCallback = function(player, gamemodeHook) if (weapons) then NEXUS:PlayerLoadout(player); nexus.player.SetWeapons(player, weapons, forceReturn); if (type(weapon) == "string") then player:SelectWeapon(weapon); end; end; if (ammo) then nexus.player.GiveAmmo(player, ammo); end; player:SetPos(position); player:SetSkin(skin); player:SetModel(model); player:SetColor(color); player:SetArmor(armor); player:SetHealth(health); player:SetMaterial(material); player:SetMoveType(moveType); player:SetEyeAngles(angles); if (gamemodeHook) then special = special or false; nexus.mount.Call("PostPlayerLightSpawn", player, weapons, ammo, special); end; player:ResetSequence( player:GetSequence() ); end; player:Spawn(); end; -- A function to convert a table to camel case. function nexus.player.ConvertToCamelCase(base) local newTable = {}; for k, v in pairs(base) do local key = NEXUS:SetCamelCase(string.gsub(k, "_", ""), true); if (key and key != "") then newTable[key] = v; end; end; return newTable; end; -- A function to get a player's characters. function nexus.player.GetCharacters(player, Callback) if ( IsValid(player) ) then local charactersTable = nexus.config.Get("mysql_characters_table"):Get(); local schemaFolder = NEXUS:GetSchemaFolder(); local characters = {}; tmysql.query("SELECT * FROM "..charactersTable.." WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..player:SteamID().."\"", function(result) if ( IsValid(player) ) then if (result and type(result) == "table" and #result > 0) then for k, v in pairs(result) do characters[k] = nexus.player.ConvertToCamelCase(v); end; Callback(characters); else Callback(); end; end; end, 1); end end; -- A function to add a character to the character screen. function nexus.player.CharacterScreenAdd(player, character) local info = { name = character.name, model = character.model, banned = character.data["banned"], faction = character.faction, characterID = character.characterID }; if ( character.data["physdesc"] ) then if (string.len( character.data["physdesc"] ) > 64) then info.details = string.sub(character.data["physdesc"], 1, 64).."..."; else info.details = character.data["physdesc"]; end; end; if ( character.data["banned"] ) then info.details = "This character is banned."; end; nexus.mount.Call("PlayerAdjustCharacterScreenInfo", player, character, info); NEXUS:StartDataStream(player, "CharacterAdd", info); end; -- A function to convert a character's MySQL variables to Lua variables. function nexus.player.ConvertCharacterMySQL(base) base.recognisedNames = nexus.player.ConvertCharacterRecognisedNamesString(base.recognisedNames); base.characterID = tonumber(base.characterID); base.attributes = nexus.player.ConvertCharacterDataString(base.attributes); base.inventory = nexus.player.ConvertCharacterDataString(base.inventory); base.cash = tonumber(base.cash); base.ammo = nexus.player.ConvertCharacterDataString(base.ammo); base.data = nexus.player.ConvertCharacterDataString(base.data); base.key = tonumber(base.key); end; -- A function to get a player's character ID. function nexus.player.GetCharacterID(player) local character = player:GetCharacter(); if (character) then for k, v in pairs( player:GetCharacters() ) do if (v == character) then return k; end; end; end; end; -- A function to load a player's character. function nexus.player.LoadCharacter(player, characterID, mergeCreate, Callback, force) local character = {}; local unixTime = os.time(); if (mergeCreate) then character = {}; character.name = name; character.data = {}; character.ammo = {}; character.cash = nexus.config.Get("default_cash"):Get(); character.model = "models/police.mdl"; character.flags = "b"; character.schema = NEXUS:GetSchemaFolder(); character.gender = GENDER_MALE; character.faction = FACTION_CITIZEN; character.steamID = player:SteamID(); character.steamName = player:SteamName(); character.inventory = {}; character.attributes = {}; character.onNextLoad = ""; character.lastPlayed = unixTime; character.timeCreated = unixTime; character.characterID = characterID; character.recognisedNames = {}; if ( !player.characters[characterID] ) then table.Merge(character, mergeCreate); if (character and type(character) == "table") then character.inventory = nexus.inventory.GetDefault(player, character); if (!force) then local fault = nexus.mount.Call("PlayerCanCreateCharacter", player, character, characterID); if (fault == false or type(fault) == "string") then return nexus.player.CreationError(player, fault or "You cannot create this character!"); end; end; nexus.player.SaveCharacter(player, true, character, function(key) player.characters[characterID] = character; player.characters[characterID].key = key; nexus.mount.Call("PlayerCharacterCreated", player, character); nexus.player.CharacterScreenAdd(player, character); if (Callback) then Callback(); end; end); end; end; else character = player.characters[characterID]; if (character) then if ( player:GetCharacter() ) then nexus.player.SaveCharacter(player); nexus.player.UpdateCharacter(player); nexus.mount.Call("PlayerCharacterUnloaded", player); end; player.character = character; if ( player:Alive() ) then player:KillSilent(); end; if ( nexus.player.SetBasicSharedVars(player) ) then nexus.mount.Call("PlayerCharacterLoaded", player); player:SaveCharacter(); end; end; end; end; -- A function to set a player's basic shared variables. function nexus.player.SetBasicSharedVars(player) local gender = nexus.player.GetGender(player); local faction = player:QueryCharacter("faction"); player:SetSharedVar( "sh_Flags", player:QueryCharacter("flags") ); player:SetSharedVar( "sh_Model", nexus.player.GetDefaultModel(player) ); player:SetSharedVar( "sh_Name", player:QueryCharacter("name") ); player:SetSharedVar( "sh_Key", player:QueryCharacter("key") ); if ( nexus.faction.stored[faction] ) then player:SetSharedVar("sh_Faction", nexus.faction.stored[faction].index); end; if (gender == GENDER_MALE) then player:SetSharedVar("sh_Gender", 2); else player:SetSharedVar("sh_Gender", 1); end; return true; end; -- A function to unescape a string. function nexus.player.Unescape(text) return string.Replace(string.Replace(string.Replace(text, "\\\\", "\\"), '\\"', '"'), "\\'", "'"); end; -- A function to get the character's ammo as a string. function nexus.player.GetCharacterAmmoString(player, character, rawTable) local ammo = table.Copy(character.ammo); for k, v in pairs( nexus.player.GetAmmo(player) ) do if (v > 0) then ammo[k] = v; end; end; if (!rawTable) then return Json.Encode(ammo); else return ammo; end; end; -- A function to get the character's data as a string. function nexus.player.GetCharacterDataString(player, character, rawTable) local data = table.Copy(character.data); nexus.mount.Call("PlayerSaveCharacterData", player, data); if (!rawTable) then return Json.Encode(data); else return data; end; end; -- A function to get the character's recognised names as a string. function nexus.player.GetCharacterRecognisedNamesString(player, character) local recognisedNames = {}; for k, v in pairs(character.recognisedNames) do if (v == RECOGNISE_SAVE) then recognisedNames[#recognisedNames + 1] = k; end; end; return Json.Encode(recognisedNames); end; -- A function to get the character's inventory as a string. function nexus.player.GetCharacterInventoryString(player, character, rawTable) local inventory = table.Copy(character.inventory); nexus.mount.Call("PlayerGetInventoryString", player, character, inventory); for k, v in pairs(inventory) do local itemTable = nexus.item.Get(k); if (itemTable) then local amount = v; if (itemTable.GetInventoryStringAmount) then amount = itemTable:GetInventoryStringAmount(player); end; if (amount > 0) then inventory[k] = amount; else inventory[k] = nil; end; end; end; if (!rawTable) then return Json.Encode(inventory); else return inventory; end; end; -- A function to convert a character's recognised names string to a table. function nexus.player.ConvertCharacterRecognisedNamesString(data) local success, value = pcall( Json.Decode, nexus.player.Unescape(data) ); if (success) then local recognisedNames = {}; for k, v in pairs(value) do recognisedNames[v] = RECOGNISE_SAVE; end; return recognisedNames; else return {}; end; end; -- A function to convert a character's data string to a table. function nexus.player.ConvertCharacterDataString(data) local success, value = pcall( Json.Decode, nexus.player.Unescape(data) ); if (success) then return value; else return {}; end; end; -- A function to load a player's data. function nexus.player.LoadData(player, Callback) local playersTable = nexus.config.Get("mysql_players_table"):Get(); local schemaFolder = NEXUS:GetSchemaFolder(); local steamID = player:SteamID(); tmysql.query("SELECT * FROM "..playersTable.." WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..steamID.."\"", function(result) if (IsValid(player) and !player.data) then local onNextPlay = ""; if (result and type(result) == "table" and #result > 0) then player.data = nexus.player.ConvertDataString(player, result[1]._Data); onNextPlay = result[1]._OnNextPlay; else player.data = nexus.player.SaveData(player, true); end; nexus.mount.Call("PlayerRestoreData", player, player.data); if ( Callback and IsValid(player) ) then Callback(player); end; if (onNextPlay != "") then tmysql.query("UPDATE "..playersTable.." SET _OnNextPlay = \"\" WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..steamID.."\""); PLAYER = player; RunString(onNextPlay); PLAYER = nil; end; end; end, 1); timer.Simple(2, function() if (IsValid(player) and !player.data) then nexus.player.LoadData(player, Callback); end; end); end; -- A function to save a players's data. function nexus.player.SaveData(player, create, delay, simple) if (create) then local query = nexus.player.GetDataCreateQuery(player); if (delay) then timer.Simple(delay, function() tmysql.query(query); end); elseif (simple) then return query; else tmysql.query(query); end; return {}; else local query = nexus.player.GetDataUpdateQuery(player); if (delay) then timer.Simple(delay, function() tmysql.query(query); end); elseif (!simple) then tmysql.query(query); else return query; end; end; end; -- A function to convert a player's data string. function nexus.player.ConvertDataString(player, data) local success, value = pcall( Json.Decode, nexus.player.Unescape(data) ); if (success) then return value; else return {}; end; end; -- A function to get the create query of a player's data. function nexus.player.GetDataCreateQuery(player) local playersTable = nexus.config.Get("mysql_players_table"):Get(); local schemaFolder = NEXUS:GetSchemaFolder(); local steamName = tmysql.escape( player:SteamName() ); local ipAddress = player:IPAddress(); local unixTime = os.time(); local steamID = player:SteamID(); local query = "INSERT INTO "..playersTable.." (_Data, _Schema, _SteamID, _IPAddress, _SteamName, _OnNextPlay, _LastPlayed, _TimeJoined) "; query = query.."VALUES (\"\", \""..schemaFolder.."\", \""..steamID.."\", \""..ipAddress.."\", \""..steamName.."\","; query = query.." \"\", \""..unixTime.."\", \""..unixTime.."\")"; return query; end; -- A function to get the update query of player's data. function nexus.player.GetDataUpdateQuery(player) local schemaFolder = NEXUS:GetSchemaFolder(); local steamName = tmysql.escape( player:SteamName() ); local ipAddress = player:IPAddress(); local steamID = player:SteamID(); local data = table.Copy(player.data); nexus.mount.Call("PlayerSaveData", player, data); local playersTable = nexus.config.Get("mysql_players_table"):Get(); local unixTime = os.time(); local query = "UPDATE "..playersTable.." SET _Data = \""..tmysql.escape( Json.Encode(data) ).."\","; query = query.." _SteamName = \""..steamName.."\", _IPAddress = \""..ipAddress.."\", _LastPlayed = \""..unixTime.."\""; query = query.." WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..steamID.."\""; return query; end; -- A function to get the create query of a character. function nexus.player.GetCharacterCreateQuery(player, character) local charactersTable = nexus.config.Get("mysql_characters_table"):Get(); local values = ""; local amount = 1; local keys = ""; if (!character) then character = player:GetCharacter(); end; local characterKeys = table.Count(character); for k, v in pairs(character) do if (characterKeys != amount) then keys = keys.."_"..NEXUS:SetCamelCase(k, false)..", "; else keys = keys.."_"..NEXUS:SetCamelCase(k, false); end; if (type(v) == "table") then if (k == "recognisedNames") then v = Json.Encode(character.recognisedNames); elseif (k == "attributes") then v = Json.Encode(character.attributes); elseif (k == "inventory") then v = Json.Encode(character.inventory); elseif (k == "ammo") then v = Json.Encode(character.ammo); elseif (k == "data") then v = Json.Encode(v); end; end; local value = tmysql.escape( tostring(v) ); if (characterKeys != amount) then values = values.."\""..value.."\", "; else values = values.."\""..value.."\""; end; amount = amount + 1; end; return "INSERT INTO "..charactersTable.." ("..keys..") VALUES ("..values..")"; end; -- A function to get the update query of a character. function nexus.player.GetCharacterUpdateQuery(player, character) local currentCharacter = player:GetCharacter(); local charactersTable = nexus.config.Get("mysql_characters_table"):Get(); local schemaFolder = NEXUS:GetSchemaFolder(); local unixTime = os.time(); local steamID = player:SteamID(); local query = ""; if (!character) then character = currentCharacter; end; for k, v in pairs(character) do if (k != "key" and k != "onNextLoad") then if (type(v) == "table") then if (k == "recognisedNames") then v = nexus.player.GetCharacterRecognisedNamesString(player, character); elseif (k == "attributes") then v = Json.Encode(character.attributes); elseif (k == "inventory") then if (currentCharacter == character) then v = nexus.player.GetCharacterInventoryString(player, character); else v = Json.Encode(character.inventory); end; elseif (k == "ammo") then if (currentCharacter == character) then v = nexus.player.GetCharacterAmmoString(player, character); else v = Json.Encode(character.ammo); end; elseif (k == "data") then if (currentCharacter == character) then v = nexus.player.GetCharacterDataString(player, character); else v = Json.Encode(character.data); end; end; elseif (k == "lastPlayed") then v = unixTime; elseif (k == "steamName") then v = player:SteamName(); end; local value = tmysql.escape( tostring(v) ); if (query == "") then query = "UPDATE "..charactersTable.." SET _"..NEXUS:SetCamelCase(k, false).." = \""..value.."\""; else query = query..", _"..NEXUS:SetCamelCase(k, false).." = \""..value.."\""; end; end; end; return query.." WHERE _Schema = \""..schemaFolder.."\" AND _SteamID = \""..steamID.."\" AND _CharacterID = "..character.characterID; end; -- A function to update a player's character. function nexus.player.UpdateCharacter(player) player.character.inventory = nexus.player.GetCharacterInventoryString(player, player.character, true); player.character.ammo = nexus.player.GetCharacterAmmoString(player, player.character, true); player.character.data = nexus.player.GetCharacterDataString(player, player.character, true); end; -- A function to save a player's character. function nexus.player.SaveCharacter(player, create, character, Callback) if (create) then local query = nexus.player.GetCharacterCreateQuery(player, character); tmysql.query(query, function(result, status, lastID) if ( Callback and tonumber(lastID) ) then Callback( tonumber(lastID) ); end; end, 2); elseif ( player:HasInitialized() ) then local characterQuery = nexus.player.GetCharacterUpdateQuery(player, character); local dataQuery = nexus.player.SaveData(player, nil, nil, true); tmysql.query(characterQuery); tmysql.query(dataQuery); end; end; -- A function to get the class of a player's active weapon. function nexus.player.GetWeaponClass(player, safe) if ( IsValid( player:GetActiveWeapon() ) ) then return player:GetActiveWeapon():GetClass(); else return safe; end; end; -- A function to call a player's think hook. function nexus.player.CallThinkHook(player, setSharedVars, infoTable, curTime) infoTable.inventoryWeight = nexus.config.Get("default_inv_weight"):Get(); infoTable.crouchedSpeed = player.crouchedSpeed; infoTable.jumpPower = player.jumpPower; infoTable.walkSpeed = player.walkSpeed; infoTable.runSpeed = player.runSpeed; infoTable.running = player:IsRunning(); infoTable.jogging = player:IsJogging(); infoTable.wages = nexus.class.Query(player:Team(), "wages", 0); if ( !player:IsJogging(true) ) then infoTable.jogging = nil; player:SetSharedVar("sh_Jogging", false); end; if (setSharedVars) then nexus.mount.Call("PlayerSetSharedVars", player, curTime); player.nextSetSharedVars = nil; end; nexus.mount.Call("PlayerThink", player, curTime, infoTable); player.nextThink = nil; end; -- A function to preserve a player's ammo. function nexus.player.PreserveAmmo(player) local weapon = player:GetActiveWeapon(); for k, v in ipairs( player:GetWeapons() ) do local itemTable = nexus.item.GetWeapon(v); if (itemTable) then nexus.player.SavePrimaryAmmo(player, v); nexus.player.SaveSecondaryAmmo(player, v); end; end; end; -- A function to get a player's wages. function nexus.player.GetWages(player) return player:GetSharedVar("sh_Wages"); end;
Events:Subscribe('Extension:Loaded', function() WebUI:Init() end) NetEvents:Subscribe('hit', function(damage, isHeadshot) if damage <= 0 then return end WebUI:ExecuteJS(string.format('addHit(%d, %s)', math.floor(damage), tostring(isHeadshot))) end)
require 'nn' require 'sys' require '../SparseLinearX.lua' local sparseLinearX_test = {} function wrapUT(fuUT, strName) fuUT() print("PASS " .. strName) end function getTestInputCSparse() return { nBatchSize = 10, --rowid, startId, length teOnes = torch.LongTensor({{1, 3, 5}, {2, 1, 3}, {2, 7, 3}, {8, 8, 2}} )} end function getTestInput() local teRes = torch.zeros(10, 10) teRes:narrow(1, 1, 1):narrow(2, 3, 5):fill(1) teRes:narrow(1, 2, 1):narrow(2, 1, 3):fill(1) teRes:narrow(1, 2, 1):narrow(2, 7, 3):fill(1) teRes:narrow(1, 8, 1):narrow(2, 8, 2):fill(1) return teRes end function sparseLinearX_test.updateOutput() local nInputWidth = 10 -- sparse local taInputCSparse = getTestInputCSparse() torch.manualSeed(1) local mSparseLinearX = nn.SparseLinearX(nInputWidth, 1) sys.tic() local teOutput = mSparseLinearX:forward(taInputCSparse) print("elapsed:" .. sys.toc()) -- non-sparse local teInput = getTestInput() torch.manualSeed(1) local mLinear = nn.Linear(nInputWidth, 1) sys.tic() local teOutput2 = mLinear:forward(teInput) print("elapsed:" .. sys.toc()) -- compare local dDiff = (teOutput2-teOutput):sum() assert(dDiff == 0, "not matching!") end function sparseLinearX_test.updateGradInput() local nInputWidth = 10 local nOutputWidth = 1 local gradOutput = torch.Tensor({{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}}) -- sparse local taInputCSparse = getTestInputCSparse() torch.manualSeed(1) local mSparseLinearX = nn.SparseLinearX(nInputWidth, nOutputWidth) local teGradInput = mSparseLinearX:updateGradInput(taInputCSparse, gradOutput) -- non-sparse local teInput = getTestInput() torch.manualSeed(1) local mLinear = nn.Linear(nInputWidth, 1) local teGradInput2 = mLinear:updateGradInput(teInput, gradOutput) -- compare local dDiff = (teGradInput2-teGradInput):sum() assert(dDiff == 0, "not matching!") end function sparseLinearX_test.accGradParameters() local nInputWidth = 10 local nOutputWidth = 1 local gradOutput = torch.Tensor({{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}}) -- sparse local taInputCSparse = getTestInputCSparse() torch.manualSeed(1) local mSparseLinearX = nn.SparseLinearX(nInputWidth, nOutputWidth) local teOutput = mSparseLinearX:forward(taInputCSparse) mSparseLinearX:accGradParameters(taInputCSparse, gradOutput) -- non sparse local teInput = getTestInput() torch.manualSeed(1) local mLinear = nn.Linear(nInputWidth, 1) local teOutput2 = mLinear:forward(teInput) mLinear:accGradParameters(teInput, gradOutput) -- compare local dDiff = (mLinear.gradWeight - mSparseLinearX.gradWeight):sum() assert(dDiff == 0, "gradWeight not matching!") dDiff = (mLinear.gradBias - mSparseLinearX.gradBias):sum() assert(dDiff == 0, "gradBias not matching!") end wrapUT(sparseLinearX_test.updateOutput, "updateOutput") wrapUT(sparseLinearX_test.updateGradInput, "updateGradInput") wrapUT(sparseLinearX_test.accGradParameters, "accGradParameters")
panel_color_number_to_upper = {"A", "B", "C", "D", "E", "F", "G", "H",[0]="0"} panel_color_number_to_lower = {"a", "b", "c", "d", "e", "f", "g", "h",[0]="0"} panel_color_to_number = { ["A"]=1, ["B"]=2, ["C"]=3, ["D"]=4, ["E"]=5, ["F"]=6, ["G"]=7, ["H"]=8, ["a"]=1, ["b"]=2, ["c"]=3, ["d"]=4, ["e"]=5, ["f"]=6, ["g"]=7, ["h"]=8, ["1"]=1, ["2"]=2, ["3"]=3, ["4"]=4, ["5"]=5, ["6"]=6, ["7"]=7, ["8"]=8, ["0"]=0} leagues = { {league="Newcomer", min_rating = -1000}, {league="Bronze", min_rating = 1}, {league="Silver", min_rating = 1300}, {league="Gold", min_rating = 1450}, {league="Platinum", min_rating = 1650}, {league="Diamond", min_rating = 1900}, {league="Master", min_rating = 2250}, {league="Grandmaster", min_rating = 2350} } --[[leagues = { {league="Newcomer", min_rating = -1000}, {league="Bronze", min_rating = 1}, {league="Silver", min_rating = 1225}, {league="Gold", min_rating = 1475}, {league="Platinum", min_rating = 1725}, {league="Diamond", min_rating = 1975}, {league="Master", min_rating = 2225}, {league="Grandmaster", min_rating = 2475} }]] PLACEMENT_MATCH_COUNT_REQUIREMENT = 50
-- Creator: -- AltiV - August 17th, 2019 LinkLuaModifier("modifier_item_imba_aether_specs", "components/items/item_aether_specs", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_item_imba_aether_specs_ward", "components/items/item_aether_specs", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_item_imba_aether_specs_aura_bonus", "components/items/item_aether_specs", LUA_MODIFIER_MOTION_NONE) item_imba_aether_specs = class({}) modifier_item_imba_aether_specs_ward = class({}) modifier_item_imba_aether_specs = class({}) modifier_item_imba_aether_specs_aura_bonus = class({}) ----------------------- -- AETHER SPECS BASE -- ----------------------- function item_imba_aether_specs:GetIntrinsicModifierName() Timers:CreateTimer(FrameTime(), function() if not self:IsNull() then for _, modifier in pairs(self:GetParent():FindAllModifiersByName("modifier_item_imba_aether_specs")) do modifier:SetStackCount(_) end end end) return "modifier_item_imba_aether_specs" end function item_imba_aether_specs:GetAOERadius() return self:GetSpecialValueFor("radius") end function item_imba_aether_specs:OnSpellStart() local ward = CreateUnitByName("npc_dota_aether_spec_ward", self:GetCursorPosition(), false, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber()) ward:AddNewModifier(self:GetCaster(), self, "modifier_item_buff_ward", {duration = self:GetSpecialValueFor("ward_duration")}) -- I have no idea what this modifier does ward:AddNewModifier(self:GetCaster(), self, "modifier_truesight", {duration = self:GetSpecialValueFor("ward_duration")}) -- This doesn't actually give truesight but it gives a random sentry ward buff so w/e ward:AddNewModifier(self:GetCaster(), self, "modifier_item_ward_true_sight", {duration = self:GetSpecialValueFor("ward_duration")}) ward:AddNewModifier(self:GetCaster(), self, "modifier_item_gem_of_true_sight", {duration = self:GetSpecialValueFor("ward_duration")}) -- The radius was designated with the "radius" KV for the item in npc_items_custom.txt (guess that's just how it works) ward:AddNewModifier(self:GetCaster(), self, "modifier_item_imba_aether_specs_ward", {duration = self:GetSpecialValueFor("ward_duration")}) ward:SetBaseMaxHealth(self:GetSpecialValueFor("hits_to_kill") * 4) ward:SetMaxHealth(self:GetSpecialValueFor("hits_to_kill") * 4) ward:SetHealth(self:GetSpecialValueFor("hits_to_kill") * 4) EmitSoundOnLocationForAllies(self:GetParent():GetAbsOrigin(), "DOTA_Item.ObserverWard.Activate", self:GetCaster()) end ----------------------------------- -- AETHER OF SPECS WARD MODIFIER -- ----------------------------------- function modifier_item_imba_aether_specs_ward:IsHidden() return true end function modifier_item_imba_aether_specs_ward:IsPurgable() return false end function modifier_item_imba_aether_specs_ward:OnCreated() if IsServer() then if not self:GetAbility() then self:Destroy() end end if not IsServer() then return end self.radius = self:GetAbility():GetSpecialValueFor("radius") -- self.interval = 0.5 local aura_particle = ParticleManager:CreateParticle("particles/items_fx/aether_specs_ward_aura.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetParent()) ParticleManager:SetParticleControl(aura_particle, 1, Vector(self.radius, 0, 0)) self:AddParticle(aura_particle, false, false, -1, false, false) -- self:StartIntervalThink(self.interval) end -- function modifier_item_imba_aether_specs_ward:OnIntervalThink() -- AddFOWViewer(self:GetCaster():GetTeamNumber(), self:GetParent():GetAbsOrigin(), self.radius, self.interval, false) -- end -- function modifier_item_imba_aether_specs_ward:CheckState() -- return {[MODIFIER_STATE_FLYING] = true} -- end ------------------------------ -- AETHER OF SPECS MODIFIER -- ------------------------------ function modifier_item_imba_aether_specs:IsHidden() return true end function modifier_item_imba_aether_specs:IsPurgable() return false end function modifier_item_imba_aether_specs:RemoveOnDeath() return false end function modifier_item_imba_aether_specs:GetAttributes() return MODIFIER_ATTRIBUTE_MULTIPLE end function modifier_item_imba_aether_specs:OnCreated() if IsServer() then if not self:GetAbility() then self:Destroy() end end if self:GetAbility() then -- AbilitySpecials self.bonus_mana = self:GetAbility():GetSpecialValueFor("bonus_mana") self.bonus_mana_regen = self:GetAbility():GetSpecialValueFor("bonus_mana_regen") self.cast_range_bonus = self:GetAbility():GetSpecialValueFor("cast_range_bonus") self.spell_power = self:GetAbility():GetSpecialValueFor("spell_power") self.bonus_damage = self:GetAbility():GetSpecialValueFor("bonus_damage") self.bonus_strength = self:GetAbility():GetSpecialValueFor("bonus_strength") self.bonus_agility = self:GetAbility():GetSpecialValueFor("bonus_agility") self.bonus_intellect = self:GetAbility():GetSpecialValueFor("bonus_intellect") self.bonus_aspd = self:GetAbility():GetSpecialValueFor("bonus_aspd") else self.bonus_mana = 0 self.bonus_mana_regen = 0 self.cast_range_bonus = 0 self.spell_power = 0 self.bonus_damage = 0 self.bonus_strength = 0 self.bonus_agility = 0 self.bonus_intellect = 0 self.bonus_aspd = 0 end if not IsServer() then return end -- Use Secondary Charges system to make mana loss reduction and CDR not stack with multiples for _, mod in pairs(self:GetParent():FindAllModifiersByName(self:GetName())) do mod:GetAbility():SetSecondaryCharges(_) end end function modifier_item_imba_aether_specs:OnDestroy() if not IsServer() then return end for _, modifier in pairs(self:GetParent():FindAllModifiersByName(self:GetName())) do modifier:SetStackCount(_) modifier:GetAbility():SetSecondaryCharges(_) end end function modifier_item_imba_aether_specs:DeclareFunctions() return { MODIFIER_PROPERTY_MANA_BONUS, MODIFIER_PROPERTY_MANA_REGEN_CONSTANT, MODIFIER_PROPERTY_CAST_RANGE_BONUS_STACKING, MODIFIER_PROPERTY_SPELL_AMPLIFY_PERCENTAGE, MODIFIER_PROPERTY_PREATTACK_BONUS_DAMAGE, MODIFIER_PROPERTY_STATS_STRENGTH_BONUS, MODIFIER_PROPERTY_STATS_AGILITY_BONUS, MODIFIER_PROPERTY_STATS_INTELLECT_BONUS, MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT } end function modifier_item_imba_aether_specs:GetModifierManaBonus() return self.bonus_mana end function modifier_item_imba_aether_specs:GetModifierConstantManaRegen() return self.bonus_mana_regen end function modifier_item_imba_aether_specs:GetModifierCastRangeBonusStacking() if self:GetStackCount() ~= 1 then return 0 else return self.cast_range_bonus end end -- As of 7.23, the items that Nether Wand's tree contains are as follows: -- - Nether Wand -- - Aether Lens -- - Aether Specs -- - Eul's Scepter of Divinity EX -- - Armlet of Dementor -- - Arcane Nexus function modifier_item_imba_aether_specs:GetModifierSpellAmplify_Percentage() if self:GetAbility():GetSecondaryCharges() == 1 and not self:GetParent():HasModifier("modifier_item_imba_cyclone_2") and not self:GetParent():HasModifier("modifier_item_imba_armlet_of_dementor") and not self:GetParent():HasModifier("modifier_item_imba_arcane_nexus_passive") then return self.spell_power end end function modifier_item_imba_aether_specs:GetModifierPreAttack_BonusDamage() return self.bonus_damage end function modifier_item_imba_aether_specs:GetModifierBonusStats_Strength() return self.bonus_strength end function modifier_item_imba_aether_specs:GetModifierBonusStats_Agility() return self.bonus_agility end function modifier_item_imba_aether_specs:GetModifierBonusStats_Intellect() return self.bonus_intellect end function modifier_item_imba_aether_specs:GetModifierAttackSpeedBonus_Constant() return self.bonus_aspd end function modifier_item_imba_aether_specs:IsAura() return true end function modifier_item_imba_aether_specs:IsAuraActiveOnDeath() return false end function modifier_item_imba_aether_specs:GetAuraRadius() return self:GetAbility():GetSpecialValueFor("aura_radius") end function modifier_item_imba_aether_specs:GetAuraSearchFlags() return DOTA_UNIT_TARGET_FLAG_INVULNERABLE + DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD end function modifier_item_imba_aether_specs:GetAuraSearchTeam() return DOTA_UNIT_TARGET_TEAM_FRIENDLY end function modifier_item_imba_aether_specs:GetAuraSearchType() return DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC end function modifier_item_imba_aether_specs:GetModifierAura() return "modifier_item_imba_aether_specs_aura_bonus" end -------------------------------- -- AETHER SPECS AURA MODIFIER -- -------------------------------- function modifier_item_imba_aether_specs_aura_bonus:OnCreated() if not self:GetAbility() then self:Destroy() return end -- AbilitySpecials self.aura_mana_regen = self:GetAbility():GetSpecialValueFor("aura_mana_regen") self.aura_bonus_armor = self:GetAbility():GetSpecialValueFor("aura_bonus_armor") self.aura_bonus_vision = self:GetAbility():GetSpecialValueFor("aura_bonus_vision") self.aura_bonus_cast_range = self:GetAbility():GetSpecialValueFor("aura_bonus_cast_range") end function modifier_item_imba_aether_specs_aura_bonus:DeclareFunctions() return { MODIFIER_PROPERTY_MANA_REGEN_CONSTANT_UNIQUE, MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS_UNIQUE, MODIFIER_PROPERTY_BONUS_DAY_VISION, MODIFIER_PROPERTY_BONUS_NIGHT_VISION, MODIFIER_PROPERTY_CAST_RANGE_BONUS_STACKING } end function modifier_item_imba_aether_specs_aura_bonus:GetModifierConstantManaRegenUnique() return self.aura_mana_regen end function modifier_item_imba_aether_specs_aura_bonus:GetModifierPhysicalArmorBonusUnique() if not self:GetParent():IsIllusion() then return self.aura_bonus_armor end end function modifier_item_imba_aether_specs_aura_bonus:GetBonusDayVision() if not self:GetParent():IsIllusion() then return self.aura_bonus_vision end end function modifier_item_imba_aether_specs_aura_bonus:GetBonusNightVision() if not self:GetParent():IsIllusion() then return self.aura_bonus_vision end end function modifier_item_imba_aether_specs_aura_bonus:GetModifierCastRangeBonusStacking() return self.aura_bonus_cast_range end
local bind = require "binder.skill".skill local root = GRoot.inst local M = {} function M:start(view) view:MakeFullScreen() root:AddChild(view) bind(M, view) end function M:stop() end return M
local ADDON = ... local L = Wheel("LibLocale"):NewLocale(ADDON, "frFR")
package.path = './data/lua/?.lua;' .. package.path require("io/jbio/defs") require("iop/input-state") require("screen/attract/defs") local function __init() -- stub end local function __activate() -- stub end local function __deactivate() -- stub end local function __process(src, src_prev) local dest = { digital = {}, analog = {}, } local out = { digital = {}, analog = {}, analog_u8 = {}, text = {} } dest.digital[SCREEN_ATTRACT_DI_SELECT_NEXT] = iop_input_state_is_pushed(IO_JBIO_DI_PANEL1, src, src_prev) dest.digital[SCREEN_ATTRACT_DI_SELECT_PREV] = iop_input_state_is_pushed(IO_JBIO_DI_PANEL2, src, src_prev) dest.digital[SCREEN_ATTRACT_DI_SELECTION_CONFIRMED] = iop_input_state_is_pushed(IO_JBIO_DI_PANEL3, src, src_prev) dest.digital[SCREEN_ATTRACT_DI_OPERATOR_SCREEN] = iop_input_state_is_pushed(IO_JBIO_DI_TEST, src, src_prev) return dest, out end return { device = IO_JBIO_IDENTIFIER, screen = SCREEN_ATTRACT_IDENTIFIER, f_init = __init, f_activate = __activate, f_deactivate = __deactivate, f_process = __process, }
function shuffle(tbl) for i = #tbl, 2, -1 do local j = math.random(i) tbl[i], tbl[j] = tbl[j], tbl[i] end return tbl end function playOptimal() local secrets = {} for i=1,100 do secrets[i] = i end shuffle(secrets) for p=1,100 do local success = false local choice = p for i=1,50 do if secrets[choice] == p then success = true break end choice = secrets[choice] end if not success then return false end end return true end function playRandom() local secrets = {} for i=1,100 do secrets[i] = i end shuffle(secrets) for p=1,100 do local choices = {} for i=1,100 do choices[i] = i end shuffle(choices) local success = false for i=1,50 do if choices[i] == p then success = true break end end if not success then return false end end return true end function exec(n,play) local success = 0 for i=1,n do if play() then success = success + 1 end end return 100.0 * success / n end function main() local N = 1000000 print("# of executions: "..N) print(string.format("Optimal play success rate: %f", exec(N, playOptimal))) print(string.format("Random play success rate: %f", exec(N, playRandom))) end main()
local K, C, L = unpack(select(2, ...)) if C.ActionBar.Enable ~= true then return end -- Lua API local _G = _G -- Wow API local hooksecurefunc = _G.hooksecurefunc local PetActionBar_HideGrid = _G.PetActionBar_HideGrid local PetActionBar_ShowGrid = _G.PetActionBar_ShowGrid local PetActionBar_UpdateCooldowns = _G.PetActionBar_UpdateCooldowns local RegisterStateDriver = _G.RegisterStateDriver -- Global variables that we don't cache, list them here for mikk's FindGlobals script -- GLOBALS: PetActionBarFrame, PetHolder, RightBarMouseOver, HoverBind, PetBarMouseOver if C.ActionBar.PetBarHide then PetActionBarAnchor:Hide() return end -- Create bar local bar = CreateFrame("Frame", "PetHolder", UIParent, "SecureHandlerStateTemplate") bar:SetAllPoints(PetActionBarAnchor) bar:RegisterEvent("PLAYER_LOGIN") bar:RegisterEvent("PLAYER_CONTROL_LOST") bar:RegisterEvent("PLAYER_CONTROL_GAINED") bar:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED") bar:RegisterEvent("PET_BAR_UPDATE") bar:RegisterEvent("PET_BAR_UPDATE_USABLE") bar:RegisterEvent("PET_BAR_UPDATE_COOLDOWN") bar:RegisterEvent("PET_BAR_HIDE") bar:RegisterEvent("UNIT_PET") bar:RegisterEvent("UNIT_FLAGS") bar:RegisterEvent("UNIT_AURA") bar:SetScript("OnEvent", function(self, event, arg1) if event == "PLAYER_LOGIN" then K.StylePet() PetActionBar_ShowGrid = K.Noop PetActionBar_HideGrid = K.Noop PetActionBarFrame.showgrid = nil for i = 1, 10 do local button = _G["PetActionButton"..i] button:ClearAllPoints() button:SetParent(PetHolder) button:SetSize(C.ActionBar.ButtonSize, C.ActionBar.ButtonSize) if i == 1 then if C.ActionBar.PetBarHorizontal == true then button:SetPoint("BOTTOMLEFT", 0, 0) else button:SetPoint("TOPLEFT", 0, 0) end else if C.ActionBar.PetBarHorizontal == true then button:SetPoint("LEFT", _G["PetActionButton"..i-1], "RIGHT", C.ActionBar.ButtonSpace, 0) else button:SetPoint("TOP", _G["PetActionButton"..i-1], "BOTTOM", 0, -C.ActionBar.ButtonSpace) end end button:Show() self:SetAttribute("addchild", button) end RegisterStateDriver(self, "visibility", "[pet,novehicleui,nopossessbar,nopetbattle] show; hide") hooksecurefunc("PetActionBar_Update", K.PetBarUpdate) elseif event == "PET_BAR_UPDATE" or event == "PLAYER_CONTROL_LOST" or event == "PLAYER_CONTROL_GAINED" or event == "PLAYER_FARSIGHT_FOCUS_CHANGED" or event == "UNIT_FLAGS" or (event == "UNIT_PET" and arg1 == "player") or (arg1 == "pet" and event == "UNIT_AURA") then K.PetBarUpdate() elseif event == "PET_BAR_UPDATE_COOLDOWN" then PetActionBar_UpdateCooldowns() end end) -- Mouseover bar if C.ActionBar.RightBarsMouseover == true and C.ActionBar.PetBarHorizontal == false then for i = 1, NUM_PET_ACTION_SLOTS do local b = _G["PetActionButton"..i] b:SetAlpha(0) b:HookScript("OnEnter", function() RightBarMouseOver(1) end) b:HookScript("OnLeave", function() if not HoverBind.enabled then RightBarMouseOver(0) end end) end end if C.ActionBar.PetBarMouseover == true and C.ActionBar.PetBarHorizontal == true then for i = 1, NUM_PET_ACTION_SLOTS do local b = _G["PetActionButton"..i] b:SetAlpha(0) b:HookScript("OnEnter", function() PetBarMouseOver(1) end) b:HookScript("OnLeave", function() if not HoverBind.enabled then PetBarMouseOver(0) end end) end end
local currencies = {} table.insert(currencies, { name = "Деньги", image = "money.pic", id = "customnpcs:npcMoney", dmg = 0 }) --table.insert(currencies, { -- name = "Светопыль", -- image = "glowstone_dust.pic", -- id = "minecraft:glowstone_dust", -- dmg = 0, -- max = 100 --}) --table.insert(currencies, { -- name = "Железный слиток", -- image = "iron_ingot.pic", -- id = "minecraft:iron_ingot", -- dmg = 0, -- max = 200 --}) return currencies
object_building_general_station_starport = object_building_general_shared_station_starport:new { gameObjectType = 521, planetMapCategory = "starport", childObjects = { {templateFile = "object/tangible/terminal/terminal_travel.iff", x = -10, z = 0, y = 0, ox = 0, oy = 0, oz = 0, ow = 0, cellid = 8, containmentType = -1}, {templateFile = "object/tangible/travel/ticket_collector/ticket_collector.iff", x = -5, z = 0, y = 0, ox = 0, oy = 0.707107, oz = 0, ow = 0.707107, cellid = 8, containmentType = -1}, {templateFile = "object/creature/npc/theme_park/player_transport_theed_hangar.iff", x = 0, z = 0, y = 0, ox = 0, oy = 0.70711, oz = 0, ow = 0.70711, cellid = 8, containmentType = -1} } } ObjectTemplates:addTemplate(object_building_general_station_starport, "object/building/general/station_starport.iff")
local old_DLCSOC_init = CrimeSpreeTweakData.init function CrimeSpreeTweakData:init(tweak_data) old_DLCSOC_init(self, tweak_data) self.crash_causes_loss = false end
return Polygon.new({ }).points
function onCreate() --background boi makeLuaSprite('stage', 'back1', 0, 0) setLuaSpriteScrollFactor('stage', 0.6, 0.6) addLuaSprite('stage', false) makeLuaSprite('stage2', 'back11', 0, 0) setLuaSpriteScrollFactor('stage', 0.6, 0.6) addLuaSprite('stage2', false) makeLuaSprite( 'stage3', 'back2', 0, 0) setLuaSpriteScrollFactor('stage2', 0.6, 0.6) addLuaSprite('stage3', false) makeLuaSprite( 'stage4', 'back3', 0, 0) setLuaSpriteScrollFactor('stage3', 0.6, 0.6) addLuaSprite('stage4', false) makeLuaSprite( 'stage5', 'back33', 0, 0) setLuaSpriteScrollFactor('stage3', 0.6, 0.6) addLuaSprite('stage5', false) makeLuaSprite( 'stage6', 'back4', 0, 0) setLuaSpriteScrollFactor('stage4', 0.6, 0.6) addLuaSprite('stage6', false) setProperty('stage2.visible', false) setProperty('stage3.visible', false) setProperty('stage4.visible', false) setProperty('stage5.visible', false) setProperty('stage6.visible', false) end function onEvent(name,value1,value2) if name == 'Play Animation' then if value1 == '2' then setProperty('stage.visible', false); setProperty('stage2.visible', true); setProperty('stage3.visible', false); setProperty('stage4.visible', false); setProperty('stage6.visible', false); setProperty('stage5.visible', false); end if value1 == '6' then setProperty('stage.visible', false); setProperty('stage2.visible', false); setProperty('stage3.visible', false); setProperty('stage4.visible', false); setProperty('stage6.visible', true); setProperty('stage5.visible', false); end if value1 == '3' then setProperty('stage3.visible', true); setProperty('stage.visible', false); setProperty('stage2.visible', false); setProperty('stage4.visible', false); setProperty('stage6.visible', false); setProperty('stage5.visible', false); end if value1 == '4' then setProperty('stage2.visible', false); setProperty('stage.visible', false); setProperty('stage3.visible', false); setProperty('stage4.visible', true); setProperty('stage6.visible', false); setProperty('stage5.visible', false); end if value1 == '1' then setProperty('stage2.visible', false); setProperty('stage.visible', true); setProperty('stage3.visible', false); setProperty('stage4.visible', false); setProperty('stage6.visible', false); setProperty('stage5.visible', false); end if value1 == '5' then setProperty('stage2.visible', false); setProperty('stage.visible', false); setProperty('stage3.visible', false); setProperty('stage4.visible', false); setProperty('stage5.visible', true); setProperty('stage6.visible', false); end end end
game.ReplicatedStorage.NetworkRemoteEvent:FireServer("SellBubble", "Sell") _G.samsbubbleloop = true while _G.samsbubbleloop == true do for i=1,25 do game.ReplicatedStorage.NetworkRemoteEvent:FireServer("BlowBubble") wait(1.5) if i == 25 then game.ReplicatedStorage.NetworkRemoteEvent:FireServer("SellBubble", "Sell") end end end
--- Creates a new class with a constructor function. -- @return Class table. local function Class() local class = {} local class_mt = {} setmetatable(class, class_mt) class.__index = class --- Implements call function to create an instance. function class_mt.__call(_, ...) local instance = {} setmetatable(instance, class) instance:constructor(...) return instance end --- Checks if object is an instance of this class. -- @param object The object to check. -- @return True if same class. function class.instanceOf(object) return getmetatable(object) == class end return class end return Class
--[[ This module was modified to handle results of the 'typeof' function, to be more lightweight. The original source of this module can be found in the link below, as well as the license: https://github.com/rojo-rbx/rojo/blob/master/plugin/rbx_dom_lua/EncodedValue.lua https://github.com/rojo-rbx/rojo/blob/master/plugin/rbx_dom_lua/base64.lua https://github.com/rojo-rbx/rojo/blob/master/LICENSE.txt --]] local base64 do -- Thanks to Tiffany352 for this base64 implementation! local floor = math.floor local char = string.char local function encodeBase64(str) local out = {} local nOut = 0 local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" local strLen = #str -- 3 octets become 4 hextets for i = 1, strLen - 2, 3 do local b1, b2, b3 = str:byte(i, i + 3) local word = b3 + b2 * 256 + b1 * 256 * 256 local h4 = word % 64 + 1 word = floor(word / 64) local h3 = word % 64 + 1 word = floor(word / 64) local h2 = word % 64 + 1 word = floor(word / 64) local h1 = word % 64 + 1 out[nOut + 1] = alphabet:sub(h1, h1) out[nOut + 2] = alphabet:sub(h2, h2) out[nOut + 3] = alphabet:sub(h3, h3) out[nOut + 4] = alphabet:sub(h4, h4) nOut = nOut + 4 end local remainder = strLen % 3 if remainder == 2 then -- 16 input bits -> 3 hextets (2 full, 1 partial) local b1, b2 = str:byte(-2, -1) -- partial is 4 bits long, leaving 2 bits of zero padding -> -- offset = 4 local word = b2 * 4 + b1 * 4 * 256 local h3 = word % 64 + 1 word = floor(word / 64) local h2 = word % 64 + 1 word = floor(word / 64) local h1 = word % 64 + 1 out[nOut + 1] = alphabet:sub(h1, h1) out[nOut + 2] = alphabet:sub(h2, h2) out[nOut + 3] = alphabet:sub(h3, h3) out[nOut + 4] = "=" elseif remainder == 1 then -- 8 input bits -> 2 hextets (2 full, 1 partial) local b1 = str:byte(-1, -1) -- partial is 2 bits long, leaving 4 bits of zero padding -> -- offset = 16 local word = b1 * 16 local h2 = word % 64 + 1 word = floor(word / 64) local h1 = word % 64 + 1 out[nOut + 1] = alphabet:sub(h1, h1) out[nOut + 2] = alphabet:sub(h2, h2) out[nOut + 3] = "=" out[nOut + 4] = "=" end -- if the remainder is 0, then no work is needed return table.concat(out, "") end local function decodeBase64(str) local out = {} local nOut = 0 local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" local strLen = #str local acc = 0 local nAcc = 0 local alphabetLut = {} for i = 1, #alphabet do alphabetLut[alphabet:sub(i, i)] = i - 1 end -- 4 hextets become 3 octets for i = 1, strLen do local ch = str:sub(i, i) local byte = alphabetLut[ch] if byte then acc = acc * 64 + byte nAcc = nAcc + 1 end if nAcc == 4 then local b3 = acc % 256 acc = floor(acc / 256) local b2 = acc % 256 acc = floor(acc / 256) local b1 = acc % 256 out[nOut + 1] = char(b1) out[nOut + 2] = char(b2) out[nOut + 3] = char(b3) nOut = nOut + 3 nAcc = 0 acc = 0 end end if nAcc == 3 then -- 3 hextets -> 16 bit output acc = acc * 64 acc = floor(acc / 256) local b2 = acc % 256 acc = floor(acc / 256) local b1 = acc % 256 out[nOut + 1] = char(b1) out[nOut + 2] = char(b2) elseif nAcc == 2 then -- 2 hextets -> 8 bit output acc = acc * 64 acc = floor(acc / 256) acc = acc * 64 acc = floor(acc / 256) local b1 = acc % 256 out[nOut + 1] = char(b1) elseif nAcc == 1 then error("Base64 has invalid length") end return table.concat(out, "") end base64 = { decode = decodeBase64, encode = encodeBase64, } end local function identity(...) return ... end local function unpackDecoder(f) return function(value) return f(unpack(value)) end end local function serializeFloat(value) -- TODO: Figure out a better way to serialize infinity and NaN, neither of -- which fit into JSON. if value == math.huge or value == -math.huge then return 999999999 * math.sign(value) end return value end local ALL_AXES = {"X", "Y", "Z"} local ALL_FACES = {"Right", "Top", "Back", "Left", "Bottom", "Front"} local types types = { boolean = { fromPod = identity, toPod = identity, }, number = { fromPod = identity, toPod = identity, }, string = { fromPod = identity, toPod = identity, }, EnumItem = { fromPod = identity, toPod = function(roblox) -- FIXME: More robust handling of enums if typeof(roblox) == "number" then return roblox else return roblox.Value end end, }, Axes = { fromPod = function(pod) local axes = {} for index, axisName in ipairs(pod) do axes[index] = Enum.Axis[axisName] end return Axes.new(unpack(axes)) end, toPod = function(roblox) local json = {} for _, axis in ipairs(ALL_AXES) do if roblox[axis] then table.insert(json, axis) end end return json end, }, BinaryString = { fromPod = base64.decode, toPod = base64.encode, }, Bool = { fromPod = identity, toPod = identity, }, BrickColor = { fromPod = function(pod) return BrickColor.new(pod) end, toPod = function(roblox) return roblox.Number end, }, CFrame = { fromPod = function(pod) local pos = pod.Position local orient = pod.Orientation return CFrame.new( pos[1], pos[2], pos[3], orient[1][1], orient[1][2], orient[1][3], orient[2][1], orient[2][2], orient[2][3], orient[3][1], orient[3][2], orient[3][3] ) end, toPod = function(roblox) local x, y, z, r00, r01, r02, r10, r11, r12, r20, r21, r22 = roblox:GetComponents() return { Position = {x, y, z}, Orientation = { {r00, r01, r02}, {r10, r11, r12}, {r20, r21, r22}, }, } end, }, Color3 = { fromPod = unpackDecoder(Color3.new), toPod = function(roblox) return {roblox.r, roblox.g, roblox.b} end, }, Color3uint8 = { fromPod = unpackDecoder(Color3.fromRGB), toPod = function(roblox) return { math.round(roblox.R * 255), math.round(roblox.G * 255), math.round(roblox.B * 255), } end, }, ColorSequence = { fromPod = function(pod) local keypoints = {} for index, keypoint in ipairs(pod.Keypoints) do keypoints[index] = ColorSequenceKeypoint.new( keypoint.Time, types.Color3.fromPod(keypoint.Color) ) end return ColorSequence.new(keypoints) end, toPod = function(roblox) local keypoints = {} for index, keypoint in ipairs(roblox.Keypoints) do keypoints[index] = { Time = keypoint.Time, Color = types.Color3.toPod(keypoint.Value), } end return { Keypoints = keypoints, } end, }, Content = { fromPod = identity, toPod = identity, }, Faces = { fromPod = function(pod) local faces = {} for index, faceName in ipairs(pod) do faces[index] = Enum.NormalId[faceName] end return Faces.new(unpack(faces)) end, toPod = function(roblox) local pod = {} for _, face in ipairs(ALL_FACES) do if roblox[face] then table.insert(pod, face) end end return pod end, }, Float32 = { fromPod = identity, toPod = serializeFloat, }, Float64 = { fromPod = identity, toPod = serializeFloat, }, Int32 = { fromPod = identity, toPod = identity, }, Int64 = { fromPod = identity, toPod = identity, }, NumberRange = { fromPod = unpackDecoder(NumberRange.new), toPod = function(roblox) return {roblox.Min, roblox.Max} end, }, NumberSequence = { fromPod = function(pod) local keypoints = {} for index, keypoint in ipairs(pod.Keypoints) do keypoints[index] = NumberSequenceKeypoint.new( keypoint.Time, keypoint.Value, keypoint.Envelope ) end return NumberSequence.new(keypoints) end, toPod = function(roblox) local keypoints = {} for index, keypoint in ipairs(roblox.Keypoints) do keypoints[index] = { Time = keypoint.Time, Value = keypoint.Value, Envelope = keypoint.Envelope, } end return { Keypoints = keypoints, } end, }, PhysicalProperties = { fromPod = function(pod) if pod == "Default" then return nil else return PhysicalProperties.new( pod.Density, pod.Friction, pod.Elasticity, pod.FrictionWeight, pod.ElasticityWeight ) end end, toPod = function(roblox) if roblox == nil then return "Default" else return { Density = roblox.Density, Friction = roblox.Friction, Elasticity = roblox.Elasticity, FrictionWeight = roblox.FrictionWeight, ElasticityWeight = roblox.ElasticityWeight, } end end, }, Ray = { fromPod = function(pod) return Ray.new( types.Vector3.fromPod(pod.Origin), types.Vector3.fromPod(pod.Direction) ) end, toPod = function(roblox) return { Origin = types.Vector3.toPod(roblox.Origin), Direction = types.Vector3.toPod(roblox.Direction), } end, }, Rect = { fromPod = function(pod) return Rect.new( types.Vector2.fromPod(pod[1]), types.Vector2.fromPod(pod[2]) ) end, toPod = function(roblox) return { types.Vector2.toPod(roblox.Min), types.Vector2.toPod(roblox.Max), } end, }, Instance = { fromPod = function(_pod) error("Ref cannot be decoded on its own") end, toPod = function(_roblox) error("Ref can not be encoded on its own") end, }, Ref = { fromPod = function(_pod) error("Ref cannot be decoded on its own") end, toPod = function(_roblox) error("Ref can not be encoded on its own") end, }, Region3 = { fromPod = function(pod) error("Region3 is not implemented") end, toPod = function(roblox) error("Region3 is not implemented") end, }, Region3int16 = { fromPod = function(pod) return Region3int16.new( types.Vector3int16.fromPod(pod[1]), types.Vector3int16.fromPod(pod[2]) ) end, toPod = function(roblox) return { types.Vector3int16.toPod(roblox.Min), types.Vector3int16.toPod(roblox.Max), } end, }, SharedString = { fromPod = function(pod) error("SharedString is not supported") end, toPod = function(roblox) error("SharedString is not supported") end, }, String = { fromPod = identity, toPod = identity, }, UDim = { fromPod = unpackDecoder(UDim.new), toPod = function(roblox) return {roblox.Scale, roblox.Offset} end, }, UDim2 = { fromPod = function(pod) return UDim2.new( types.UDim.fromPod(pod[1]), types.UDim.fromPod(pod[2]) ) end, toPod = function(roblox) return { types.UDim.toPod(roblox.X), types.UDim.toPod(roblox.Y), } end, }, Vector2 = { fromPod = unpackDecoder(Vector2.new), toPod = function(roblox) return { serializeFloat(roblox.X), serializeFloat(roblox.Y), } end, }, Vector2int16 = { fromPod = unpackDecoder(Vector2int16.new), toPod = function(roblox) return {roblox.X, roblox.Y} end, }, Vector3 = { fromPod = unpackDecoder(Vector3.new), toPod = function(roblox) return { serializeFloat(roblox.X), serializeFloat(roblox.Y), serializeFloat(roblox.Z), } end, }, Vector3int16 = { fromPod = unpackDecoder(Vector3int16.new), toPod = function(roblox) return {roblox.X, roblox.Y, roblox.Z} end, }, } local EncodedValue = {} function EncodedValue.decode(dataType, encodedValue) local typeImpl = types[dataType] if typeImpl == nil then return false, "Couldn't decode value " .. tostring(dataType) end return true, typeImpl.fromPod(encodedValue) end function EncodedValue.setProperty(obj, property, encodedValue, dataType) dataType = dataType or typeof(obj[property]) local success, result = EncodedValue.decode(dataType, encodedValue) if success then obj[property] = result else warn("Could not set property " .. property .. " of " .. obj.GetFullName() .. "; " .. result) end end function EncodedValue.setProperties(obj, properties) for property, encodedValue in pairs(properties) do EncodedValue.setProperty(obj, property, encodedValue) end end function EncodedValue.setModelProperties(obj, properties) for property, encodedValue in pairs(properties) do EncodedValue.setProperty(obj, property, encodedValue.Value, encodedValue.Type) end end return EncodedValue
local DataLayer = require(script.Parent.DataLayer) local MigrationLayer = {} function MigrationLayer._unpack(value, migrations) value = value or { generation = #migrations; data = nil; } local data = value.data local generation = value.generation if generation < #migrations then for i = generation + 1, #migrations do data.data = migrations[i](data.data) end end return data end function MigrationLayer._pack(value, migrations) return { data = value; generation = #migrations; } end -- Todo: Prevent unpacking twice function MigrationLayer.update(collection, key, callback, migrations) return MigrationLayer._unpack(DataLayer.update(collection, key, function(value) return MigrationLayer._pack(callback(MigrationLayer._unpack(value, migrations)), migrations) end), migrations) end function MigrationLayer.read(collection, key, migrations) return MigrationLayer._unpack(DataLayer.read(collection, key), migrations) end return MigrationLayer
--[[ Keywords.lua --]] local Keywords, dbg, dbgf = Object:newClass{ className = 'Keywords' } --- Constructor for extending class. -- function Keywords:newClass( t ) return Object.newClass( self, t ) end local kwFromPath --- Constructor for new instance. -- function Keywords:new( t ) local o = Object.new( self, t ) return o end --- Init keyword cache. -- function Keywords:initCache() kwFromPath = {} local function initKeywords( path, keywords ) for i, v in ipairs( keywords ) do local name = v:getName() kwFromPath[path .. name] = v initKeywords( path .. name .. "/", v:getChildren() ) end end initKeywords( "/", catalog:getKeywords() ) end --- Refresh display of recently changed photo (externally changed). -- function Keywords:getKeywordFromPath( path, permitReinit ) if not kwFromPath or ( permitReinit and not kwFromPath[path] ) then -- will be reinitialized upon first use, or if keyword expected but not found in cache. self:initCache() end --Debug.lognpp( kwFromPath ) --Debug.showLogFile() return kwFromPath[ path ] end return Keywords
-- dash1090 -- -- Copyright (C) 2015 John C Kha -- -- This file listens for messages and colates them into statistics local _d = require "tek.lib.debug" local exec = require "tek.lib.exec" local Stat = {} -- Class implementation in Lua function Stat:new(period) obj = { last = 0, first = 1, subscribers = {} } -- Create a table object obj.period = period or "none" -- Set up default parameters setmetatable(obj, self) -- Unknown operations will look in Stat for metamethods self.__index = self -- obj[key] will return Stat[key] return obj end function Stat:subscribe(key, field, value) value = value or "Text" _d.info(key .. " subscribed to " .. self.name) self.subscribers[key] = {field = field, value = value} return 0 end function Stat:unsubscribe(key) _d.info(key .. " unsubscribed from " .. self.name) self.subscribers[key] = nil end function Stat:add() _df = self.name .. " %s %q" self.last = self.last + 1 if self.period ~= "none" then self[self.last] = os.time() + self.period _d.info(_df:format("time", self[self.last])) if not(self.msg_next_task) then _d.info(_df:format("executing for", self.last .. " @ " .. self[self.last])) task = { func = self.msg_next, taskname = self.name .. self[self.last], abort = false } self.msg_next_task = exec.run(task, self.name, self[self.last], _d.level) end end _d.info(_df:format("index range", self.first .. ":" .. self.last)) return self:update() end function Stat:subtract() _df = self.name .. " %s %q" if self.period ~= "none" then _d.info(_df:format("time", self[self.first])) while (self.last >= self.first) and (self[self.first] <= os.time()) do _d.trace(_df:format("removing", self.first)) self[self.first] = nil self.first = self.first + 1 end if self.msg_next_task:terminate() then self.msg_next_task = nil if self.last >= self.first then _d.info(_df:format("rexecuting for", self.first .. " @ " .. self[self.first])) task = { func = self.msg_next, taskname = self.name .. self[self.last], abort = false } self.msg_next_task = exec.run(task, self.name, self[self.first], _d.level) end else _d.error("Child task failed to end successfully.") end else self.first = self.first + 1 end _d.info(_df:format("index range", self.first .. ":" .. self.last)) return self:update() end function Stat:update() for k, subscriber in pairs(self.subscribers) do local newval = tostring(self.last - self.first + 1) _d.info(self.name .. " updating " .. k .. " to " .. newval) subscriber.field:setValue(subscriber.value, newval) end return self.last - self.first + 1 end function Stat.msg_next() local exec = require "tek.lib.exec" local _d = require "tek.lib.debug" _d.level = tonumber(arg[3]) _d.info("Timer task: " .. exec.getname()) dumpfunc = function(...) if _d.INFO >= _d.level then _d.wrout(...) end end _d.dump(arg, dumpfunc) _d.trace("Timer task signals: " .. (exec.getsignals() or "no signals")) local name = arg[1] local time = arg[2] if exec.waittime((time-os.time())*1000, "t") then _d.warn("Timer task terminated with " .. time - os.time() .. "s remaining.") return "Timer task terminated with " .. time - os.time() .. "s remaining." else local res = exec.sendport("*p","ui","TALLY,-,"..name) exec.wait("t") _d.trace("Terminating " .. name) return res end end local StatContainer = {} function StatContainer:new() obj = {} setmetatable(obj, self) self.__index = self return obj end function StatContainer.__newindex(table, index, value) _d.trace("Creating Stat index " .. index) value.name = index rawset(table, index, value) end local Tally = {} function Tally:load(tallyfile) -- put all statistics in a table for easy storage self.stats = StatContainer:new() self.session_stats = StatContainer:new() -- if someone wants to use a statistic, allow tally.statistic instead of -- tally.stats.statistic or tally.session_stats.statistic setmetatable(self, { __index = function(_, key) return self.stats[key] or self.session_stats[key] end}) if tallyfile then end stats = self.stats session_stats = self.session_stats -- if tally file does not contain any statistics that we need, define them. stats.day_aircraft = stats.day_aircraft or Stat:new(24*60*60) stats.wk_aircraft = stats.wk_aircraft or Stat:new(7*24*60*60) stats.mo_aircraft = stats.mo_aircraft or Stat:new(30*24*60*60) stats.all_aircraft = stats.all_aircraft or Stat:new() session_stats.session_msgs = Stat:new() session_stats.min_msgs = Stat:new(60) return self end function Tally:unload(tallyfile) --TODO Save stats to file for stat in stats do _d.trace("Cleaning up " ..stat.name) if stat.msg_next_task then stat.msg_next_task:terminate() end end for stat in session_stats do if stat.msg_next_task then stat.msg_next_task:terminate() end end end function Tally:process(msg) m = {} i = 1 for k, v in string.gmatch(msg[-1] .. ",","([^,]*)(,)") do _d.trace(i .. string.rep(" ", 3 - string.len(i)) .. k) m[i] = k i = i+1 end if string.find(msg[-1],"TALLY,-") then self[m[3]]:subtract() end self.session_msgs:add() self.min_msgs:add() return msg end return Tally
workspace "Erin" architecture "x64" startproject "Sandbox" configurations { "Debug", "Release" } -- Get cur dir helper for windows? -- print("Working Dir: " .. io.popen"cd":read'*l') outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" -- Include directories relative to root folder (solution directory) IncludeDir = {} IncludeDir["GLFW"] = "Erin/3rdparty/glfw/include" IncludeDir["Glad"] = "Erin/3rdparty/glad/include" IncludeDir["ImGui"] = "Erin/3rdparty/imgui" include "Erin/3rdparty/glfw/glfw-premake-config.lua" include "Erin/3rdparty/glad/glad-premake-config.lua" include "Erin/3rdparty/imgui/imgui-premake-config.lua" -- Config for the Erin Engine project "Erin" location "Erin" kind "SharedLib" language "c++" targetdir ("Build/bin/" .. outputdir .. "/%{prj.name}") objdir ("Build/bintermediate/" .. outputdir .. "/%{prj.name}") pchheader "ErinPCH.h" pchsource "%{prj.name}/src/ErinPCH.cpp" files { "%{prj.name}/src/**.h", "%{prj.name}/src/**.cpp", } includedirs { "%{prj.name}/src", "%{prj.name}/3rdparty/spdlog/include", "%{IncludeDir.GLFW}", "%{IncludeDir.Glad}", "%{IncludeDir.ImGui}" } links { "GLFW", "Glad", "ImGui" } filter "system:windows" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_WINDOWS", "ERIN_BUILD_DLL", "GLFW_INCLUDE_NONE" } links { "opengl32", "gdi32" } filter "system:linux" pic "On" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_LINUX", "ERIN_BUILD_DLL" } links { "Xrandr", "Xi", "GLEW", "GLU", "GL", "X11", "pthread" } filter "system:macosx" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_MAC", "ERIN_BUILD_DLL" } links { "OpenGL.framework", "Cocoa.framework", "IOKit.framework", "CoreFoundation.framework" } filter "configurations:Debug" defines "ERIN_DEBUG" runtime "Debug" symbols "On" filter { "system:windows", "configurations:Debug", "action:vs*" } buildoptions "-MDd" filter "configurations:Release" defines "ERIN_RELEASE" runtime "Release" optimize "On" filter { "system:windows", "configurations:Release", "action:vs*" } buildoptions "/MD" -- Config for the Sandbox project "Sandbox" location "Sandbox" kind "ConsoleApp" language "c++" targetdir ("Build/bin/" .. outputdir .. "/%{prj.name}") objdir ("Build/bintermediate/" .. outputdir .. "/%{prj.name}") files { "%{prj.name}/src/**.h", "%{prj.name}/src/**.cpp", } includedirs { "Erin/3rdparty/spdlog/include", "Erin/src" } links { "Erin" } filter "system:windows" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_WINDOWS" } postbuildcommands { "{COPY} ../Build/bin/" .. outputdir .. "/Erin/ ../Build/bin/" .. outputdir .. "/Sandbox/" } filter "system:linux" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_LINUX" } postbuildcommands { "{COPY} ../Build/bin/" .. outputdir .. "/Erin/* ../Build/bin/" .. outputdir .. "/Sandbox" } filter "system:macosx" cppdialect "C++17" staticruntime "On" systemversion "latest" defines { "ERIN_PLATFORM_MAC" } postbuildcommands { "{COPY} ../Build/bin/" .. outputdir .. "/Erin/* ../Build/bin/" .. outputdir .. "/Sandbox" } filter "configurations:Debug" defines "ERIN_DEBUG" runtime "Debug" symbols "On" filter { "system:windows", "configurations:Debug", "action:vs*" } buildoptions "-MDd" filter "configurations:Release" defines "ERIN_RELEASE" runtime "Release" optimize "On" filter { "system:windows", "configurations:Release", "action:vs*" } buildoptions "/MD"
function Schema:OnCharacterCreated(client, character) local inventory = character:GetInventory() if (inventory) then local items = {} if (character:GetFaction() == FACTION_LONERS) then items = { --"kit_newchar", --"knife_1", } end local i = 1 for k, v in pairs(items) do timer.Simple(i + k, function() inventory:Add(v) end) end end end function Schema:PlayerSpray(client) return true end function Schema:PlayerShouldTaunt() return false end local deathSounds = { Sound("stalkersound/die1.wav"), Sound("stalkersound/die2.wav"), Sound("stalkersound/die3.wav"), Sound("stalkersound/die4.wav"), } function Schema:GetPlayerDeathSound(client) return table.Random(deathSounds) end local painSounds = { Sound("stalkersound/pain1.wav"), Sound("stalkersound/pain2.wav"), Sound("stalkersound/pain3.wav"), Sound("stalkersound/pain4.wav"), Sound("stalkersound/pain5.wav"), Sound("stalkersound/pain6.wav"), Sound("stalkersound/pain7.wav"), Sound("stalkersound/pain8.wav"), Sound("stalkersound/pain9.wav"), Sound("stalkersound/pain10.wav"), Sound("stalkersound/pain11.wav"), Sound("stalkersound/pain12.wav"), Sound("stalkersound/pain13.wav"), Sound("stalkersound/pain14.wav"), } function Schema:GetPlayerPainSound(client) return table.Random(painSounds) end function Schema:PlayerSpawnEffect(client, weapon, info) return client:IsAdmin() or client:GetCharacter():HasFlags("N") end function Schema:PostPlayerLoadout(client) client:SetCanZoom(false) if client:IsAdmin() then client:SetCanZoom(true) end end function Schema:Initialize() game.ConsoleCommand("net_maxfilesize 64"); game.ConsoleCommand("sv_kickerrornum 0"); game.ConsoleCommand("sv_allowupload 0"); game.ConsoleCommand("sv_allowdownload 0"); game.ConsoleCommand("sv_allowcslua 0"); end
-- holostorage Network -- Some code borrowed from Technic (https://github.com/minetest-mods/technic/blob/master/technic/machines/switching_station.lua) holostorage.network = {} holostorage.network.networks = {} holostorage.network.devices = {} holostorage.network.redundant_warn = {} function holostorage.get_or_load_node(pos) local node = minetest.get_node_or_nil(pos) if node then return node end local vm = VoxelManip() local MinEdge, MaxEdge = vm:read_from_map(pos, pos) return nil end local function get_item_group(name, grp) return minetest.get_item_group(name, grp) > 0 end function holostorage.network.is_network_conductor(name) return get_item_group(name, "holostorage_distributor") end function holostorage.network.is_network_device(name) return get_item_group(name, "holostorage_device") end ----------------------- -- Network traversal -- ----------------------- local function flatten(map) local list = {} for key, value in pairs(map) do list[#list + 1] = value end return list end -- Add a node to the network local function add_network_node(nodes, pos, network_id) local node_id = minetest.hash_node_position(pos) holostorage.network.devices[node_id] = network_id if nodes[node_id] then return false end nodes[node_id] = pos return true end local function add_cable_node(nodes, pos, network_id, queue) if add_network_node(nodes, pos, network_id) then queue[#queue + 1] = pos end end local check_node_subp = function(dv_nodes, st_nodes, controllers, all_nodes, pos, devices, c_pos, network_id, queue) holostorage.get_or_load_node(pos) local meta = minetest.get_meta(pos) local name = minetest.get_node(pos).name if holostorage.network.is_network_conductor(name) then add_cable_node(all_nodes, pos, network_id, queue) end if devices[name] then meta:set_string("st_network", minetest.pos_to_string(c_pos)) if get_item_group(name, "holostorage_controller") then -- Another controller, disable it add_network_node(controllers, pos, network_id) meta:set_int("active", 0) elseif get_item_group(name, "holostorage_storage") then add_network_node(st_nodes, pos, network_id) elseif holostorage.network.is_network_device(name) then add_network_node(dv_nodes, pos, network_id) end meta:set_int("nw_timeout", 2) end end -- Traverse a network given a list of machines and a cable type name local traverse_network = function(dv_nodes, st_nodes, controllers, all_nodes, pos, devices, c_pos, network_id, queue) local positions = { {x=pos.x+1, y=pos.y, z=pos.z}, {x=pos.x-1, y=pos.y, z=pos.z}, {x=pos.x, y=pos.y+1, z=pos.z}, {x=pos.x, y=pos.y-1, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z+1}, {x=pos.x, y=pos.y, z=pos.z-1}} for _, cur_pos in pairs(positions) do check_node_subp(dv_nodes, st_nodes, controllers, all_nodes, cur_pos, devices, c_pos, network_id, queue) end end local touch_nodes = function(list) for _, pos in ipairs(list) do local meta = minetest.get_meta(pos) meta:set_int("nw_timeout", 2) -- Touch node end end local function get_network(c_pos, positions) local network_id = minetest.hash_node_position(c_pos) local cached = holostorage.network.networks[network_id] if cached then touch_nodes(cached.dv_nodes) touch_nodes(cached.st_nodes) for _, pos in ipairs(cached.controllers) do local meta = minetest.get_meta(pos) meta:set_int("active", 0) meta:set_string("active_pos", minetest.serialize(c_pos)) end return cached.dv_nodes, cached.st_nodes end local dv_nodes = {} local st_nodes = {} local controllers = {} local all_nodes = {} local queue = {} for pos in pairs(positions) do queue = {} local node = minetest.get_node(pos) if node and holostorage.network.is_network_conductor(node.name) and not holostorage.network.is_network_device(node.name) then add_cable_node(all_nodes, pos, network_id, queue) elseif node and holostorage.network.is_network_device(node.name) then queue = {c_pos} end while next(queue) do local to_visit = {} for _, posi in ipairs(queue) do traverse_network(dv_nodes, st_nodes, controllers, all_nodes, posi, holostorage.devices, c_pos, network_id, to_visit) end queue = to_visit end end dv_nodes = flatten(dv_nodes) st_nodes = flatten(st_nodes) controllers = flatten(controllers) all_nodes = flatten(all_nodes) holostorage.network.networks[network_id] = {all_nodes = all_nodes, dv_nodes = dv_nodes, st_nodes = st_nodes, controllers = controllers} return dv_nodes, st_nodes end -------------------- -- Controller ABM -- -------------------- holostorage.network.active_state = true minetest.register_chatcommand("storagectl", { params = "state", description = "Enables or disables holostorage's storage controller ABM", privs = { basic_privs = true }, func = function(name, state) if state == "on" then holostorage.network.active_state = true else holostorage.network.active_state = false end end }) function holostorage.network.register_abm_controller(name) minetest.register_abm({ nodenames = {name}, label = "Storage Controller", -- allows the mtt profiler to profile this abm individually interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) if not holostorage.network.active_state then return end local meta = minetest.get_meta(pos) local meta1 = nil local dv_nodes = {} local st_nodes = {} local device_name = "Storage Controller" local positions = { {x=pos.x, y=pos.y-1, z=pos.z}, {x=pos.x, y=pos.y+1, z=pos.z}, {x=pos.x-1, y=pos.y, z=pos.z}, {x=pos.x+1, y=pos.y, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z-1}, {x=pos.x, y=pos.y, z=pos.z+1} } local ntwks = {} local errored = false local nw_branches = 0 for _,pos1 in pairs(positions) do --Disable if necessary if meta:get_int("active") ~= 1 then minetest.forceload_free_block(pos) minetest.forceload_free_block(pos1) meta:set_string("infotext",("%s Already Present"):format(device_name)) local poshash = minetest.hash_node_position(pos) if not holostorage.network.redundant_warn[poshash] then holostorage.network.redundant_warn[poshash] = true print("[holostorage] Warning: redundant controller found near "..minetest.pos_to_string(pos)) end errored = true return end local name = minetest.get_node(pos1).name local networked = holostorage.network.is_network_conductor(name) if networked then ntwks[pos1] = true nw_branches = nw_branches + 1 end end if errored then return end if nw_branches == 0 then minetest.forceload_free_block(pos) meta:set_string("infotext", ("%s Has No Network"):format(device_name)) return else minetest.forceload_block(pos) end dv_nodes, st_nodes = get_network(pos, ntwks) -- Run all the nodes local function run_nodes(list) for _, pos2 in ipairs(list) do holostorage.get_or_load_node(pos2) local node2 = minetest.get_node(pos2) local nodedef if node2 and node2.name then nodedef = minetest.registered_nodes[node2.name] end if nodedef and nodedef.holostorage_run then nodedef.holostorage_run(pos2, node2, pos) elseif nodedef then local imeta = minetest.get_meta(pos2) imeta:set_string("infotext", ("%s Active"):format(nodedef.description)) end end end run_nodes(dv_nodes) run_nodes(st_nodes) meta:set_string("infotext", ("%s Active"):format(device_name)) end, }) end ------------------------------------- -- Update networks on block change -- ------------------------------------- local function check_connections(pos) local machines = {} for name in pairs(holostorage.devices) do machines[name] = true end local connections = {} local positions = { {x=pos.x+1, y=pos.y, z=pos.z}, {x=pos.x-1, y=pos.y, z=pos.z}, {x=pos.x, y=pos.y+1, z=pos.z}, {x=pos.x, y=pos.y-1, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z+1}, {x=pos.x, y=pos.y, z=pos.z-1}} for _,connected_pos in pairs(positions) do local name = minetest.get_node(connected_pos).name if machines[name] or holostorage.network.is_network_conductor(name) or get_item_group(name, "holostorage_controller") then table.insert(connections,connected_pos) end end return connections end function holostorage.network.clear_networks(pos) local node = minetest.get_node(pos) local meta = minetest.get_meta(pos) local name = node.name local placed = name ~= "air" local positions = check_connections(pos) if #positions < 1 then return end local dead_end = #positions == 1 for _,connected_pos in pairs(positions) do local net = holostorage.network.devices[minetest.hash_node_position(connected_pos)] or minetest.hash_node_position(connected_pos) if net and holostorage.network.networks[net] then if dead_end and placed then -- Dead end placed, add it to the network -- Get the network local node_at = minetest.get_node(positions[1]) local network_id = holostorage.network.devices[minetest.hash_node_position(positions[1])] or minetest.hash_node_position(positions[1]) if not network_id or not holostorage.network.networks[network_id] then -- We're evidently not on a network, nothing to add ourselves to return end local c_pos = minetest.get_position_from_hash(network_id) local network = holostorage.network.networks[network_id] -- Actually add it to the (cached) network -- This is similar to check_node_subp holostorage.network.devices[minetest.hash_node_position(pos)] = network_id pos.visited = 1 if holostorage.network.is_network_conductor(name) then table.insert(network.all_nodes, pos) end if holostorage.devices[name] then meta:set_string("st_network", minetest.pos_to_string(c_pos)) if get_item_group(name, "holostorage_controller") then table.insert(network.controllers, pos) elseif get_item_group(name, "holostorage_storage") then table.insert(network.st_nodes, pos) elseif holostorage.network.is_network_device(name) then table.insert(network.dv_nodes, pos) end end elseif dead_end and not placed then -- Dead end removed, remove it from the network -- Get the network local network_id = holostorage.network.devices[minetest.hash_node_position(positions[1])] or minetest.hash_node_position(positions[1]) if not network_id or not holostorage.network.networks[network_id] then -- We're evidently not on a network, nothing to remove ourselves from return end local network = holostorage.network.networks[network_id] -- Search for and remove device holostorage.network.devices[minetest.hash_node_position(pos)] = nil for tblname,table in pairs(network) do for devicenum,device in pairs(table) do if device.x == pos.x and device.y == pos.y and device.z == pos.z then table[devicenum] = nil end end end else -- Not a dead end, so the whole network needs to be recalculated for _,v in pairs(holostorage.network.networks[net].all_nodes) do local pos1 = minetest.hash_node_position(v) holostorage.network.devices[pos1] = nil end holostorage.network.networks[net] = nil end end end end -- Timeout ABM -- Timeout for a node in case it was disconnected from the network -- A node must be touched by the station continuously in order to function local function controller_timeout_count(pos, tier) local meta = minetest.get_meta(pos) local timeout = meta:get_int("nw_timeout") if timeout <= 0 then return true else meta:set_int("nw_timeout", timeout - 1) return false end end function holostorage.network.register_abm_nodes() minetest.register_abm({ label = "Devices: timeout check", nodenames = {"group:holostorage_device"}, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) local meta = minetest.get_meta(pos) if holostorage.devices[node.name] and controller_timeout_count(pos) then local nodedef = minetest.registered_nodes[node.name] if nodedef and nodedef.holostorage_disabled_name then node.name = nodedef.holostorage_disabled_name minetest.swap_node(pos, node) elseif nodedef and nodedef.holostorage_on_disable then nodedef.holostorage_on_disable(pos, node) end if nodedef then local meta = minetest.get_meta(pos) meta:set_string("infotext", ("%s Has No Network"):format(nodedef.description)) end end end, }) end ----------------------- -- Network Functions -- ----------------------- function holostorage.network.get_storage_devices(network_id) local network = holostorage.network.networks[network_id] if not network or not network.st_nodes then return {} end return network.st_nodes end function concat(t1,t2) for i=1,#t2 do t1[#t1+1] = t2[i] end return t1 end function holostorage.network.get_storage_inventories(network_id) local storage_nodes = holostorage.network.get_storage_devices(network_id) local items = {} for _,pos in pairs(storage_nodes) do local stacks = holostorage.stack_list(pos) items = concat(items, stacks) end return items end function holostorage.network.insert_item(network_id, stack) local storage_nodes = holostorage.network.get_storage_devices(network_id) for _,pos in pairs(storage_nodes) do local success, leftover = holostorage.insert_stack(pos, stack) if success then return success, leftover end end return nil end function holostorage.network.take_item(network_id, stack) local storage_nodes = holostorage.network.get_storage_devices(network_id) for _,pos in pairs(storage_nodes) do local success, stacki = holostorage.take_stack(pos, stack) if success and stacki then if stacki:get_count() == stack:get_count() then return success, stacki else stack:set_count(stack:get_count() - stacki:get_count()) return holostorage.network.take_item(network_id, stack) end end end return nil end
--vim: filetype=lua ts=2 sw=2 sts=2 et : return { synopsis = [[ ,-_|\ keys / \ (c) Tim Menzies, 2021, unlicense.org \_,-._* Cluster, then report just the v deltas between nearby clusters. ]], usage = "./keys", author = "Tim Menzies", copyright= "(c) Tim Menzies, 2021, unlicense.org", options = { bins= { .5 ,'Bins are of size n**BINS'}, bootstrap={512,'number of bootstrap samples'}, cols= {'x' ,'Columns to use for inference'}, conf= {0.05, "confidence for bootstraps"}, cliffs={ .147 ,"small effect "}, data= {'../data/auto2.csv' ,'Where to read data'}, eg= {"" ,"'-x ls' lists all, '-x all' runs all"}, far= { .9 ,'Where to look for far things'}, goaL= {'best' ,'Learning goals: best|rest|other'}, iota= { .3 ,'Small = sd**iota'}, k= {2 ,'Bayes low class frequency hack'}, knn= {2 ,'Number of neighbors for knn'}, kadd= {"mode", "combination rule of knn"}, loud= {false ,'Set verbose'}, m= {1 ,'Bayes low range frequency hack'}, p= {2 ,'Distance calculation exponent'}, sames={256 ,"max size of nonparametric samples"}, some= {20 ,'Number of samples to find far things'}, seed= {10013 ,'Seed for random numbers'}, top= {10 ,'Focus on this many'}, wild= {false ,'Run egs, no protection (wild mode)'}, wait= {10 ,'Pause before thinking'}}}
local tasks = {} local threads = {} local watch = {} function async(func) return function(...) coroutine.resume(coroutine.create(func), ...) end end local function asyncTaskSetDispose( task, dispose, ... ) task.dispose = dispose task.param = {...} end local function asyncTaskSetLink( thread, taskid, task ) tasks[taskid] = task if task then if not threads[thread] then threads[thread] = { [taskid] = task } else threads[thread][taskid] = task end else if threads[thread] then threads[thread][taskid] = nil if not next( threads[thread] ) then threads[thread] = nil end end end end local function asyncTaskSetResult( task, ... ) if select( "#", ... ) > 0 then if task.repeatable then if not task.result then task.result = { {...} } else task.result[ #task.result + 1 ] = { ... } end else task.result = {...} end end end function asyncTask( repeatable, dispose, ...) local thread = coroutine.running() local task = { thread = thread, repeatable = repeatable } local taskid = tostring(task) asyncTaskSetDispose( task, dispose, ... ) asyncTaskSetLink( thread, taskid, task ) return taskid, task end function asyncDispose( task ) if task then local taskid = tostring(task) asyncTaskSetLink( task.thread, taskid, nil ) if task.dispose then task.dispose(unpack(task.param)) task.dispose = nil task.param = nil end end end function asyncDisposeAll() local thread = coroutine.running() while threads[thread] do local taskid, task = next(threads[thread]) if taskid then asyncDispose( task ) end end end function asyncContinue( task ) if task.repeatable then task.result = nil task.complete = false end end function asyncComplete( taskid, ... ) local task = tasks[taskid] task.complete = true asyncTaskSetResult( task, ... ) local thread = watch[task] if not task.repeatable then asyncDispose( task ) end if thread then coroutine.resume( thread ) end end function asyncResult( task ) asyncWaitAny( task ) if task.result then local result = task.result if task.repeatable then asyncContinue( task ) return result else return unpack(result) end end end function asyncIsComplete(task) return task.complete end local function watchTask( thread, ... ) for i = 1, select("#",...) do local task = select(i,...) watch[task] = thread end end local function checkTask( condition, ...) for i = 1, select("#",...) do local task = select(i,...) if task.complete == condition then return task end end end function asyncWaitAny(...) local task = checkTask(true, ...) if not task then watchTask(coroutine.running(), ...) repeat coroutine.yield() task = checkTask(true, ...) until task watchTask(nil, ...) end return task end function asyncWaitAll(...) local task = checkTask(false, ...) if task then watchTask(coroutine.running(), ...) repeat coroutine.yield() task = checkTask(false, ...) until not task watchTask(nil, ...) end end function asyncSleep( time, repeatable ) local taskid, task = asyncTask( repeatable ) local timer = setTimer( asyncComplete, time, repeatable and 0 or 1, taskid ) asyncTaskSetDispose( task, killTimer, timer ) return task end function asyncDbQueryComplete( handle, taskid ) asyncComplete( taskid, dbPoll( handle, 0 ) ) end function asyncDbQuery( connection, sql ) local taskid, task = asyncTask() dbQuery( asyncDbQueryComplete, { taskid }, connection, sql ) return task end function asyncWaitEvent( event, element, propagated, repeatable ) local handler, taskid, task handler = function(...) asyncComplete( taskid, client, source, ... ) end taskid, task = asyncTask( repeatable, removeEventHandler, event, element, handler ) addEventHandler( event, element, handler, propagated ) return task end -- server side demo if triggerServerEvent == nil then addEventHandler("onResourceStart", resourceRoot, async(function(...) outputDebugString("async start") local connection = dbConnect("sqlite", "testdb.sqlite") local task0 = asyncDbQuery(connection, "SELECT 1") local task1 = asyncSleep(10000) local task2 = asyncSleep(10000) local task3 = asyncWaitEvent("onResourceStop", resourceRoot) local task4 = asyncWaitEvent("onPlayerJoin", root, nil, true) local task5 = asyncSleep(10000, true) outputDebugString("query result "..tostring(asyncResult(task0)[1]["1"])) asyncResult(task1) outputDebugString("sleep 1 end ") asyncResult(task2) outputDebugString("sleep 2 end ") while not asyncIsComplete( task3 ) do local task = asyncWaitAny( task3, task4, task5 ) if task == task4 then for _,result in ipairs(asyncResult( task )) do local client, source = unpack(result) outputChatBox( "hello "..tostring(source), source ) end elseif task == task5 then outputDebugString("tick") end asyncContinue( task ) end asyncDisposeAll() outputDebugString("async end") end)) else -- client side demo addCommandHandler( "t", async(function() showCursor( true ) local window = guiCreateWindow( 0.75, 0.75, 0.25, 0.25, "test", true ) local buttons = { { 0, 0.1, 0.25, 0.25, "1" }, { 0.75, 0.1, 0.25, 0.25, "2" }, { 0, 0.75, 0.25, 0.25, "3" }, { 0.75, 0.75, 0.25, 0.25, "4" } } -- create four buttons and watcher tasks local controls = {} local events = {} for i,button in ipairs(buttons) do local x,y,w,h,text = unpack(button) controls[i] = guiCreateButton( x, y, w, h, text, true, window ) events[i] = asyncWaitEvent( "onClientGUIClick", controls[i], false, true ) end local clicked repeat -- wait any button click clicked = asyncWaitAny( unpack(events) ) -- commonly one event returned but in generic case may be several for _,result in ipairs( asyncResult(clicked) ) do -- get click event arguments local client, source, button, state, absoluteX, absoluteY = unpack( result ) local text = guiGetText( source ) outputChatBox( "pressed "..button.." button on:"..text ) end -- exit if button 4 clicked until clicked == events[#events] -- release watcher tasks asyncDisposeAll() destroyElement(window) showCursor( false ) end)) end
---@class WorldMarkers : zombie.iso.WorldMarkers ---@field private CIRCLE_TEXTURE_SCALE float ---@field public instance WorldMarkers ---@field private NextGridSquareMarkerID int ---@field private NextHomingPointID int ---@field private gridSquareMarkers List|Unknown ---@field private homingPoints WorldMarkers.PlayerHomingPointList[] ---@field private directionArrows WorldMarkers.DirectionArrowList[] ---@field private stCol ColorInfo ---@field private playerScreen WorldMarkers.PlayerScreen ---@field private intersectPoint WorldMarkers.Point ---@field private arrowStart WorldMarkers.Point ---@field private arrowEnd WorldMarkers.Point ---@field private arrowLine WorldMarkers.Line WorldMarkers = {} ---@private ---@param arg0 float ---@return float function WorldMarkers:angleDegrees(arg0) end ---@public ---@param arg0 int ---@return boolean ---@overload fun(arg0:WorldMarkers.GridSquareMarker) function WorldMarkers:removeGridSquareMarker(arg0) end ---@public ---@param arg0 WorldMarkers.GridSquareMarker ---@return boolean function WorldMarkers:removeGridSquareMarker(arg0) end ---@public ---@param arg0 int ---@return WorldMarkers.GridSquareMarker function WorldMarkers:getGridSquareMarker(arg0) end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@param arg2 int ---@return WorldMarkers.PlayerHomingPoint ---@overload fun(arg0:IsoPlayer, arg1:int, arg2:int, arg3:float, arg4:float, arg5:float, arg6:float) ---@overload fun(arg0:IsoPlayer, arg1:int, arg2:int, arg3:String, arg4:float, arg5:float, arg6:float, arg7:float, arg8:boolean, arg9:int) function WorldMarkers:addPlayerHomingPoint(arg0, arg1, arg2) end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@param arg2 int ---@param arg3 float ---@param arg4 float ---@param arg5 float ---@param arg6 float ---@return WorldMarkers.PlayerHomingPoint function WorldMarkers:addPlayerHomingPoint(arg0, arg1, arg2, arg3, arg4, arg5, arg6) end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@param arg2 int ---@param arg3 String ---@param arg4 float ---@param arg5 float ---@param arg6 float ---@param arg7 float ---@param arg8 boolean ---@param arg9 int ---@return WorldMarkers.PlayerHomingPoint function WorldMarkers:addPlayerHomingPoint(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@return boolean ---@overload fun(arg0:IsoPlayer, arg1:WorldMarkers.PlayerHomingPoint) function WorldMarkers:removePlayerHomingPoint(arg0, arg1) end ---@public ---@param arg0 IsoPlayer ---@param arg1 WorldMarkers.PlayerHomingPoint ---@return boolean function WorldMarkers:removePlayerHomingPoint(arg0, arg1) end ---@public ---@param arg0 WorldMarkers.Line ---@param arg1 WorldMarkers.Line ---@param arg2 WorldMarkers.Point ---@return boolean function WorldMarkers:intersectLineSegments(arg0, arg1, arg2) end ---@public ---@param arg0 IsoGridSquare ---@param arg1 float ---@param arg2 float ---@param arg3 float ---@param arg4 boolean ---@param arg5 float ---@return WorldMarkers.GridSquareMarker ---@overload fun(arg0:String, arg1:String, arg2:IsoGridSquare, arg3:float, arg4:float, arg5:float, arg6:boolean, arg7:float) ---@overload fun(arg0:String, arg1:String, arg2:IsoGridSquare, arg3:float, arg4:float, arg5:float, arg6:boolean, arg7:float, arg8:float, arg9:float, arg10:float) function WorldMarkers:addGridSquareMarker(arg0, arg1, arg2, arg3, arg4, arg5) end ---@public ---@param arg0 String ---@param arg1 String ---@param arg2 IsoGridSquare ---@param arg3 float ---@param arg4 float ---@param arg5 float ---@param arg6 boolean ---@param arg7 float ---@return WorldMarkers.GridSquareMarker function WorldMarkers:addGridSquareMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) end ---@public ---@param arg0 String ---@param arg1 String ---@param arg2 IsoGridSquare ---@param arg3 float ---@param arg4 float ---@param arg5 float ---@param arg6 boolean ---@param arg7 float ---@param arg8 float ---@param arg9 float ---@param arg10 float ---@return WorldMarkers.GridSquareMarker function WorldMarkers:addGridSquareMarker(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) end ---@public ---@return void function WorldMarkers:init() end ---@private ---@param arg0 int ---@param arg1 int ---@param arg2 int ---@param arg3 int ---@return int function WorldMarkers:GetDistance(arg0, arg1, arg2, arg3) end ---@public ---@param arg0 int ---@return WorldMarkers.DirectionArrow function WorldMarkers:getDirectionArrow(arg0) end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@return boolean ---@overload fun(arg0:IsoPlayer, arg1:WorldMarkers.DirectionArrow) function WorldMarkers:removePlayerDirectionArrow(arg0, arg1) end ---@public ---@param arg0 IsoPlayer ---@param arg1 WorldMarkers.DirectionArrow ---@return boolean function WorldMarkers:removePlayerDirectionArrow(arg0, arg1) end ---@public ---@param arg0 WorldMarkers.DirectionArrow ---@return boolean ---@overload fun(arg0:int) function WorldMarkers:removeDirectionArrow(arg0) end ---@public ---@param arg0 int ---@return boolean function WorldMarkers:removeDirectionArrow(arg0) end ---@private ---@return void function WorldMarkers:updateGridSquareMarkers() end ---@public ---@return void function WorldMarkers:render() end ---@public ---@param arg0 IsoCell.PerPlayerRender ---@param arg1 int ---@param arg2 int ---@return void function WorldMarkers:renderGridSquareMarkers(arg0, arg1, arg2) end ---@private ---@param arg0 Texture ---@param arg1 float ---@param arg2 float ---@param arg3 double ---@param arg4 double ---@param arg5 double ---@param arg6 float ---@param arg7 float ---@param arg8 float ---@param arg9 float ---@param arg10 float ---@return void function WorldMarkers:DrawTextureAngle(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) end ---@public ---@return void function WorldMarkers:debugRender() end ---@public ---@return void function WorldMarkers:renderHomingPoint() end ---@public ---@param arg0 IsoPlayer ---@return void function WorldMarkers:removeAllDirectionArrows(arg0) end ---@private ---@param arg0 int ---@param arg1 int ---@param arg2 int ---@param arg3 int ---@return float function WorldMarkers:getAngle(arg0, arg1, arg2, arg3) end ---@public ---@param arg0 IsoPlayer ---@return void function WorldMarkers:removeAllHomingPoints(arg0) end ---@public ---@return void function WorldMarkers:reset() end ---@public ---@param arg0 int ---@return WorldMarkers.PlayerHomingPoint function WorldMarkers:getHomingPoint(arg0) end ---@public ---@param arg0 boolean ---@return void function WorldMarkers:renderDirectionArrow(arg0) end ---@private ---@return void function WorldMarkers:updateDirectionArrows() end ---@public ---@param arg0 IsoPlayer ---@param arg1 int ---@param arg2 int ---@param arg3 int ---@param arg4 String ---@param arg5 float ---@param arg6 float ---@param arg7 float ---@param arg8 float ---@return WorldMarkers.DirectionArrow function WorldMarkers:addDirectionArrow(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) end ---@public ---@return void function WorldMarkers:update() end ---@private ---@return void function WorldMarkers:updateHomingPoints() end ---@public ---@param arg0 int ---@return boolean ---@overload fun(arg0:WorldMarkers.PlayerHomingPoint) function WorldMarkers:removeHomingPoint(arg0) end ---@public ---@param arg0 WorldMarkers.PlayerHomingPoint ---@return boolean function WorldMarkers:removeHomingPoint(arg0) end
local class = require("pl.class") local AccountManager = require("core.AccountManager") local BehaviorManager = require("core.BehaviorManager") local AreaFactory = require("core.AreaFactory") local AreaManager = require("core.AreaManager") local AttributeFactory = require("core.AttributeFactory") local ChannelManager = require("core.ChannelManager") local CommandManager = require("core.CommandManager") local EffectFactory = require("core.EffectFactory") local HelpManager = require("core.HelpManager") local EventManager = require("core.EventManager") local ItemFactory = require("core.ItemFactory") local ItemManager = require("core.ItemManager") local MobFactory = require("core.MobFactory") local MobManager = require("core.MobManager") local PartyManager = require("core.PartyManager") local PlayerManager = require("core.PlayerManager") local QuestFactory = require("core.QuestFactory") local QuestGoalManager = require("core.QuestGoalManager") local QuestRewardManager = require("core.QuestRewardManager") local RoomFactory = require("core.RoomFactory") local RoomManager = require("core.RoomManager") local SkillManager = require("core.SkillManager") local GameServer = require("core.GameServer") local EntityLoaderRegistry = require("core.EntityLoaderRegistry") local DataSourceRegistry = require("core.DataSourceRegistry") local Config = require("core.Config") local Data = require("core.Data") local Logger = require("core.Logger") local BundleManager = require("core.BundleManager") ---@class GameState : Class ---@field AccountManager AccountManager ---@field AreaBehaviorManager BehaviorManager ---@field AreaFactory AreaFactory ---@field AreaManager AreaManager ---@field AttributeFactory AttributeFactory ---@field ChannelManager ChannelManager ---@field CommandManager CommandManager ---@field Config Config ---@field EffectFactory EffectFactory ---@field HelpManager HelpManager ---@field InputEventManager EventManager ---@field ItemBehaviorManager BehaviorManager ---@field ItemFactory ItemFactory ---@field ItemManager ItemManager ---@field MobBehaviorManager BehaviorManager ---@field MobFactory MobFactory ---@field MobManager MobManager ---@field PartyManager PartyManager ---@field PlayerManager PlayerManager ---@field QuestFactory QuestFactory ---@field QuestGoalManager QuestGoalManager ---@field QuestRewardManager QuestRewardManager ---@field RoomBehaviorManager BehaviorManager ---@field RoomFactory RoomFactory ---@field RoomManager RoomManager ---@field SkillManager SkillManager ---@field SpellManager SkillManager ---@field ServerEventManager EventManager ---@field GameServer GameServer ---@field DataLoader Data ---@field EntityLoaderRegistry EntityLoaderRegistry ---@field DataSourceRegistry DataSourceRegistry ---@field BundleManager BundleManager local M = class() ---@param config string|table #config module or file ---@param dirname? string work dir default . function M:_init(config, dirname) assert(config, "Need config module") if type(config) == "string" then config = loadfile(config)() else assert(type(config) == "table", "config must a string or a table") end Logger.verbose("INIT - GameState") dirname = dirname or "." Config.load(config) Data.setDataPath(dirname .. "/data/") restartServer = restartServer or true self.dirname = dirname or "." self.AccountManager = AccountManager() self.AreaBehaviorManager = BehaviorManager() self.AreaFactory = AreaFactory() self.AreaManager = AreaManager() self.AttributeFactory = AttributeFactory() self.ChannelManager = ChannelManager() self.CommandManager = CommandManager() self.Config = Config self.EffectFactory = EffectFactory() self.HelpManager = HelpManager() self.InputEventManager = EventManager() self.ItemBehaviorManager = BehaviorManager() self.ItemFactory = ItemFactory() self.ItemManager = ItemManager() self.MobBehaviorManager = BehaviorManager() self.MobFactory = MobFactory() self.MobManager = MobManager() self.PartyManager = PartyManager() self.PlayerManager = PlayerManager() self.QuestFactory = QuestFactory() self.QuestGoalManager = QuestGoalManager() self.QuestRewardManager = QuestRewardManager() self.RoomBehaviorManager = BehaviorManager() self.RoomFactory = RoomFactory() self.RoomManager = RoomManager() self.SkillManager = SkillManager() self.SpellManager = SkillManager() self.ServerEventManager = EventManager() self.GameServer = GameServer() self.DataLoader = Data self.EntityLoaderRegistry = EntityLoaderRegistry() self.DataSourceRegistry = DataSourceRegistry() self.BundleManager = BundleManager(self.dirname .. "/bundles/", self); end ---now only need is { port = 8000} ---@param config table function M:start(config) Logger.verbose("START - Starting server"); self.GameServer:startup(config); end function M:updateTick() self.AreaManager:tickAll(self); self.ItemManager:tickAll(); self.PlayerManager:emit("updateTick"); end function M:load(distribute) Logger.verbose("LOAD") self.DataSourceRegistry:load(require, self.dirname, Config.get("dataSources")) self.EntityLoaderRegistry:load(self.DataSourceRegistry, Config.get("entityLoaders")) self.AccountManager:setLoader(self.EntityLoaderRegistry:get("accounts")); self.PlayerManager:setLoader(self.EntityLoaderRegistry:get("players")); self.BundleManager:loadBundles(distribute); self.ServerEventManager:attach(self.GameServer); end return M
--all enemy stuff --foe layout, {tileLocation, type, hp, bool flag} require("constants") require("astar") types = {BASIC = 1, ALT_BASIC = 2, ADVANCED = 3, FAST = 4, ALT_FAST = 5, ADVANCED_FAST = 6} -- TODO, then file -> maps, then UI polish stuff function doFoeStuff(foes, p1, p2, tiles, walls) for i, foe in ipairs(foes) do --should be a cleaner way to do this but whatever if foe.type == types.BASIC then basicFoe(foe, foes, i, p1, p2, tiles, walls) elseif foe.type == types.ALT_BASIC then --go for p2 instead of p1 basicFoe(foe, foes, i, p2, p1, tiles, walls) elseif foe.type == types.ADVANCED then advancedFoe(foe, foes, i, p1, p2, tiles, walls) elseif foe.type == types.FAST then basicFoe(foe, foes, i, p1, p2, tiles, walls) basicFoe(foe, foes, i, p1, p2, tiles, walls) elseif foe.type == types.ALT_FAST then --go for p2 instead of p1 basicFoe(foe, foes, i, p2, p1, tiles, walls) basicFoe(foe, foes, i, p2, p1, tiles, walls) else --advanced fast advancedFoe(foe, foes, i, p1, p2, tiles, walls) advancedFoe(foe, foes, i, p1, p2, tiles, walls) end end end function advancedFoe(foe, foes, i, p1, p2, tiles, walls) local one = heuristic(foe.tileLocation, p1) local two = heuristic(foe.tileLocation, p2) -- go to the closer of the two if one < two then basicFoe(foe, foes, i, p1, p2, tiles, walls) else basicFoe(foe, foes, i, p2, p1, tiles, walls) end end function basicFoe(foe, foes, i, p1, p2, tiles, walls) if tiles[foe.tileLocation].clicked > 0 and not foe.flag then foe.hp = foe.hp - 1 if foe.hp == 0 then table.remove(foes, i) return end foe.flag = true end local new = astar(foe.tileLocation, walls, p1, tiles) if new ~= null then foe.tileLocation = new end end function drawFoes(foes, tiles) for i, foe in ipairs(foes) do setFoeColor(foe) love.graphics.rectangle("fill", tiles[foe.tileLocation].x * TILE_SCALE, tiles[foe.tileLocation].y * TILE_SCALE, SQUARE_SIDE_LENGTH, SQUARE_SIDE_LENGTH) drawHealth(foe, tiles) end end function drawHealth(foe, tiles) for i = 1, foe.hp + 1, 1 do love.graphics.setColor(0, 0, 0) local j = 2 * i love.graphics.rectangle("line", tiles[foe.tileLocation].x * TILE_SCALE + j, tiles[foe.tileLocation].y * TILE_SCALE + j, SQUARE_SIDE_LENGTH - 2 * j, SQUARE_SIDE_LENGTH - 2 * j) end end function setFoeColor(foe) if foe.type == types.BASIC then love.graphics.setColor(1, 0, 0) elseif foe.type == types.ALT_BASIC then love.graphics.setColor(1, .5, 0) elseif foe.type == types.ADVANCED then love.graphics.setColor(.75, .75, 0) elseif foe.type == types.FAST then love.graphics.setColor(.75, .75, .25) elseif foe.type == types.ALT_FAST then love.graphics.setColor(.75, 1, 0) elseif foe.type == types.ADVANCED_FAST then love.graphics.setColor(.5, 1, 0) end end --oh and walls for giggles function drawWalls(walls, tiles) for i, wall in ipairs(walls) do love.graphics.setColor(0, 0, 0) love.graphics.rectangle("fill", tiles[wall].x * TILE_SCALE, tiles[wall].y * TILE_SCALE, SQUARE_SIDE_LENGTH, SQUARE_SIDE_LENGTH) end end --and tiles function drawTiles(tiles) love.graphics.setColor(.5, .5, .5) for i, elem in ipairs(tiles) do love.graphics.rectangle("fill", elem.x * TILE_SCALE, elem.y * TILE_SCALE, SQUARE_SIDE_LENGTH, SQUARE_SIDE_LENGTH) if elem.clicked > 0 then love.graphics.setColor(0, 1, 1) elem.clicked = elem.clicked - 1 --outline the affected tiles love.graphics.rectangle("line", elem.x * TILE_SCALE - 1, elem.y * TILE_SCALE - 1, SQUARE_SIDE_LENGTH + 1, SQUARE_SIDE_LENGTH + 1) love.graphics.setColor(.5, .5, .5) end end end function drawEnd(first, second, tiles) love.graphics.setColor(0, 0, 1) love.graphics.rectangle("line", tiles[first].x * TILE_SCALE - 1, tiles[first].y * TILE_SCALE - 1, SQUARE_SIDE_LENGTH + 1, SQUARE_SIDE_LENGTH + 1) love.graphics.setColor(0, 1, 0) love.graphics.rectangle("line", tiles[second].x * TILE_SCALE - 1, tiles[second].y * TILE_SCALE - 1, SQUARE_SIDE_LENGTH + 1, SQUARE_SIDE_LENGTH + 1) end function makeFoe(tile, kind) local new = {tileLocation = tile, type = kind, hp = 1, flag = false} if kind == types.ADVANCED then new.hp = 3 elseif kind == types.ADVANCED_FAST then new.hp = 2 end return new end
return function(button_list, stepstype, skin_parameters) local ret= {} local rots= { Left= 90, Down= 0, Up= 180, Right= 270, UpLeft= 90, UpRight= 180, DownLeft= 0, DownRight= 270, Center= 0 } local tap_redir= { Left= "down", Right= "down", Down= "down", Up= "down", UpLeft= "DownLeft", UpRight= "DownLeft", -- shared for dance and pump DownLeft= "DownLeft", DownRight= "DownLeft", Center= "Center" } for i, button in ipairs(button_list) do ret[i]= Def.Sprite{ Texture= tap_redir[button].." receptor (doubleres).png", InitCommand= function(self) self:rotationz(rots[button] or 0):SetAllStateDelays(1) :effectclock("beat"):diffuseramp() :effectcolor1(1,1,1,1):effectcolor2(.8,.8,.8,1) :effectperiod(0.5):effecttiming(0.25,0.50,0,0.25):effectoffset(-0.25) end, ColumnJudgmentCommand= function(self) self.none = false end, BeatUpdateCommand= function(self, param) if param.pressed then self:zoom(.9):diffusealpha(0.7) elseif param.lifted then self:stoptweening():zoom(.9):linear(.09):zoom(1):diffusealpha(1) end end, } end return ret end
local mysql_connector = require("melon.mysql.mysql_connector") local logger_factory = require("melon.utils.logger") local logger = logger_factory:get_logger("base_dao.lua",context) local table_utils = require("melon.utils.table_utils") local json = require("cjson") local _M = {} local mt = { __index = _M } function _M:new() return setmetatable(self,mt) end local function execute(sql) local status,connector,err = pcall(function () local connector, err = mysql_connector:get_connector(context) if not connector then error(err) end return connector,err end) if not status then return nil,"Failed to connect to mysql.the reason is: " .. connector end logger:debug("Preparing to execute sql. sql: %s", sql) local res, err, errno, sqlstate = connector:query(sql) if res then logger:debug("The SQL executed done. the r.lua: %s", json.encode(res)) elseif not res or err then logger:warn("Failed to execute the sql.err: %s, errno: %s, sqlstate: %s",err, errno, sqlstate) end mysql_connector:close() return res, err, errno, sqlstate end function _M:query(sql, params) sql = self:parse_sql(sql, params) return execute(sql) end function _M:select(sql, params) return self:query(sql, params) end function _M:insert(sql, params) local res, err, errno, sqlstate = self:query(sql, params) if res and not err then return res.insert_id, err else return res, err end end function _M:update(sql, params) return self:query(sql, params) end function _M:delete(sql, params) local res, err, errno, sqlstate = self:query(sql, params) if res and not err then return res.affected_rows, err else return res, err end end local function split(str, delimiter) if str == nil or str == '' or delimiter == nil then return nil end local result = {} for match in (str .. delimiter):gmatch("(.-)" .. delimiter) do table.insert(result, match) end return result end local function compose(t, params) if t == nil or params == nil or type(t) ~= "table" or type(params) ~= "table" or #t ~= #params + 1 or #t == 0 then return nil else local result = t[1] for i = 1, #params do result = result .. params[i] .. t[i + 1] end return result end end function _M:parse_sql(sql, params) if not params or not table_utils.table_is_array(params) or #params == 0 then return sql end local new_params = {} for i, v in ipairs(params) do if v and type(v) == "string" then v = ngx.quote_sql_str(v) end table.insert(new_params, v) end local t = split(sql, "?") local sql = compose(t, new_params) return sql end return _M
--------------------------------------------------------------------------------------------------- -- User story: Smoke -- Use case: DeleteCommand -- Item: Happy path -- -- Requirement summary: -- [DeleteCommand] SUCCESS: getting SUCCESS from VR.DeleteCommand() and UI.DeleteCommand() -- -- Description: -- Mobile application sends DeleteCommand request for a command created with both "vrCommands" -- and "menuParams", and SDL gets VR and UI.DeleteCommand "SUCCESS" response from HMI -- Pre-conditions: -- a. HMI and SDL are started -- b. appID is registered and activated on SDL -- c. appID is currently in Background, Full or Limited HMI level -- d. Command with both vrCommands and menuParams was created -- Steps: -- appID requests DeleteCommand with the both vrCommands and menuParams -- Expected: -- SDL validates parameters of the request -- SDL checks if UI interface is available on HMI -- SDL checks if VR interface is available on HMI -- SDL checks if DeleteCommand is allowed by Policies -- SDL checks if all parameters are allowed by Policies -- SDL transfers the UI part of request with allowed parameters to HMI -- SDL transfers the VR part of request with allowed parameters to HMI -- SDL receives UI and VR part of response from HMI with "SUCCESS" result code -- SDL responds with (resultCode: SUCCESS, success:true) to mobile application --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/Smoke/commonSmoke') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { requestParams = { syncFileName = 'icon.png', fileType = "GRAPHIC_PNG", persistentFile = false, systemFile = false }, filePath = "files/icon.png" } local addCommandRequestParams = { cmdID = 11, menuParams = { position = 0, menuName ="Commandpositive" }, vrCommands = { "VRCommandonepositive", "VRCommandonepositivedouble" }, cmdIcon = { value ="icon.png", imageType ="DYNAMIC" } } local addCommandGrammarID = 0 local addCommandResponseUiParams = { cmdID = addCommandRequestParams.cmdID, cmdIcon = addCommandRequestParams.cmdIcon, menuParams = addCommandRequestParams.menuParams } local addCommandResponseVrParams = { cmdID = addCommandRequestParams.cmdID, type = "Command", vrCommands = addCommandRequestParams.vrCommands } local addCommandAllParams = { requestParams = addCommandRequestParams, responseUiParams = addCommandResponseUiParams, responseVrParams = addCommandResponseVrParams } local deleteCommandRequestParams = { cmdID = addCommandRequestParams.cmdID } --[[ Local Functions ]] local function addCommand(pParams) local cid = common.getMobileSession():SendRPC("AddCommand", pParams.requestParams) pParams.responseUiParams.appID = common.getHMIAppId() pParams.responseUiParams.cmdIcon.value = common.getPathToFileInAppStorage("icon.png") common.getHMIConnection():ExpectRequest("UI.AddCommand", pParams.responseUiParams) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) pParams.responseVrParams.appID = common.getHMIAppId() common.getHMIConnection():ExpectRequest("VR.AddCommand", pParams.responseVrParams) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) :ValidIf(function(_, data) if data.params.grammarID == nil then return false, "grammarID should not be empty" end addCommandGrammarID = data.params.grammarID return true end) common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) common.getMobileSession():ExpectNotification("OnHashChange") end local function deleteCommand(pParams) local cid = common.getMobileSession():SendRPC("DeleteCommand", pParams) pParams.appID = common.getHMIAppId() common.getHMIConnection():ExpectRequest("UI.DeleteCommand", pParams) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) local responseVrParams = { cmdID = pParams.cmdID, grammarID = addCommandGrammarID } common.getHMIConnection():ExpectRequest("VR.DeleteCommand", responseVrParams) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) runner.Step("Update Preloaded PT", common.updatePreloadedPT) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerApp) runner.Step("Activate App", common.activateApp) runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Step("AddCommand", addCommand, { addCommandAllParams }) runner.Title("Test") runner.Step("DeleteCommand Positive Case", deleteCommand, { deleteCommandRequestParams }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions)
local _, ns = ... local B, C, L, DB, P = unpack(ns) local S = P:GetModule("Skins") local _G = getfenv(0) local tinsert, ipairs = table.insert, ipairs -- Compatible with MerInspect, alaGearMan, CharacterStatsTBC. local addonFrames = {} local lastTime = 0 function S:UpdatePanelsPosition(force) if (not force and GetTime() - lastTime < .1) then return end local offset = 0 for _, panels in ipairs(addonFrames) do local frame = panels.frame if frame:IsShown() then if panels.order == 3 then frame:SetPoint("TOPLEFT", _G.PaperDollFrame, "TOPRIGHT", -33 + offset, -15) else frame:SetPoint("TOPLEFT", _G.PaperDollFrame, "TOPRIGHT", -32 + offset, -15-C.mult) end offset = offset + frame:GetWidth() + 3 end end lastTime = GetTime() end -- MerInspect function S:CharacterPanel_MerInspect() local LibItemInfo = _G.LibStub("LibItemInfo.1000", true) if LibItemInfo and _G.ShowInspectItemListFrame then local ilevel, _, maxLevel = LibItemInfo:GetUnitItemLevel("player") local inspectFrame = _G.ShowInspectItemListFrame("player", _G.PaperDollFrame, ilevel, maxLevel) tinsert(addonFrames, {frame = inspectFrame, order = 3}) hooksecurefunc("ShowInspectItemListFrame", function(unit, parent, ...) if unit and unit == "player" and parent and parent:GetName() == "PaperDollFrame" then S:UpdatePanelsPosition(true) end end) end end -- CharacterStatsTBC function S:CharacterPanel_CharacterStatsTBC() local sideStatsFrame = _G.CSC_SideStatsFrame if sideStatsFrame then sideStatsFrame:SetHeight(422) sideStatsFrame:ClearAllPoints() sideStatsFrame:SetPoint("TOPLEFT", PaperDollFrame, "TOPRIGHT", -32, -15-C.mult) tinsert(addonFrames, {frame = sideStatsFrame, order = 2}) end end -- alaGearMan function S:CharacterPanel_alaGearMan() local AGM_FUNC = _G.AGM_FUNC if not AGM_FUNC or not AGM_FUNC.initUI then return end hooksecurefunc(AGM_FUNC, "initUI", function() local ALA = _G.__ala_meta__ if not ALA then return end local gearWin = ALA.gear and ALA.gear.ui.gearWin if gearWin then tinsert(addonFrames, {frame = gearWin, order = 1}) end end) end function S:CharacterPanel() local done _G.PaperDollFrame:HookScript("OnShow", function() if not done then table.sort(addonFrames, function(a, b) return a.order < b.order end) for _, panels in ipairs(addonFrames) do panels.frame:HookScript("OnShow", S.UpdatePanelsPosition) panels.frame:HookScript("OnHide", S.UpdatePanelsPosition) end done = true end S:UpdatePanelsPosition() end) end S:RegisterSkin("MerInspect", S.CharacterPanel_MerInspect) S:RegisterSkin("alaGearMan", S.CharacterPanel_alaGearMan) S:RegisterSkin("CharacterStatsTBC", S.CharacterPanel_CharacterStatsTBC) S:RegisterSkin("CharacterPanel")
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by qiurunze. --- DateTime: 2018/12/22 18:20 --- --- 释放锁 if redis.call('get',KEY[1] == ARGV[1]) then return redis.call('del',KEY[1]) else return 0 end --- 加锁 local key = KEY[1] local content = KEY[2] local ttl = AVG[1] local lockSet = redis.call('setnx',key,content) if lockSet==1 then redis.call('pexpire',key,ttl) else local value = redis.call('get',key) if value==content then lockSet=1 redis.call('pexpire',key,ttl) end end return lockSet
-- strings a = 'one string' b = string.gsub(a, 'one', 'another') print(a,'--', b) print('len of a:', #a) -- long strings, heredoc page = [[ line 1 line 2 line 3 ]] print(page) print(10 .. 20) print('10' + 11) -- tables (dicts) d = {} print(d) k = 'x' d[k] = 10 print(d[k], d['x']) for i = 1, 1000 do d[i] = i * 2 end -- 2.1 print('Value should be false, lhs string, rhs nil type.') print(type(nil) == nil) -- 2.2 print('Correct numbers:\n' .. .0e12, 0x12, 0xA, 0xFFFFFFFF, 0.1e1) -- 2.3 function expo(base, exp) if exp < 0 then return 'positive exp only' elseif exp == 1 then return base else return base * expo(base, exp - 1) end end print('12.7 == 127/10 == x/2') print('5.5 == 55/10 == 11/2') -- 2.4 str = '<![CDATA[\ Hello world\ ]]>' str2 = "<![CDATA[\nHello world\n]]>" str3 = [==[ <![CDATA[ Hello world ]]> ]==] print(str) print(str2) print(str3) -- 2.6 a = {} a.a = a print(a) print(a.a) print('Any series of indexing a will just access the dictionary first created.') a.a.a.a = 3 print(a.a) print('By setting a.a = 3, the recursive nesting void. Doing a.a.a.a would be an error.')