content
stringlengths
5
1.05M
object_mobile_space_comm_gotal_bandit_06 = object_mobile_shared_space_comm_gotal_bandit_06:new { } ObjectTemplates:addTemplate(object_mobile_space_comm_gotal_bandit_06, "object/mobile/space_comm_gotal_bandit_06.iff")
local m = require 'pegparser.parser' local coder = require 'pegparser.coder' local util = require'pegparser.util' --[[ Removed: - Err_024 (DotDot in rule subrangeType) - Err_066 (Assign in rule assignStmt) - Err_101 (params in rule funcCall) ]] g = [[ program <- SKIP head decs block^Err_001 Dot^Err_002 !. head <- PROGRAM Id^Err_003 (LPar ids^Err_004 RPar^Err_005)? Semi^Err_006 decs <- labelDecs constDefs typeDefs varDecs procAndFuncDecs ids <- Id (Comma Id^Err_007)* labelDecs <- (LABEL labels^Err_008 Semi^Err_009)? labels <- label (Comma label^Err_010)* label <- UInt constDefs <- (CONST constDef^Err_011 Semi^Err_012 (constDef Semi^Err_013)*)? constDef <- Id Eq^Err_014 const^Err_015 const <- Sign? (UNumber / Id) / String typeDefs <- (TYPE typeDef^Err_016 Semi^Err_017 (typeDef Semi^Err_018)*)? typeDef <- Id Eq^Err_019 type^Err_020 type <- newType / Id newType <- newOrdinalType / newStructuredType / newPointerType newOrdinalType <- enumType / subrangeType newStructuredType <- PACKED? unpackedStructuredType newPointerType <- Pointer Id^Err_021 enumType <- LPar ids^Err_022 RPar^Err_023 subrangeType <- const DotDot const^Err_025 unpackedStructuredType <- arrayType / recordType / setType / fileType arrayType <- ARRAY LBrack^Err_026 ordinalType^Err_027 (Comma ordinalType^Err_028)* RBrack^Err_029 OF^Err_030 type^Err_031 recordType <- RECORD fieldList END^Err_032 setType <- SET OF^Err_033 ordinalType^Err_034 fileType <- FILE OF^Err_035 type^Err_036 ordinalType <- newOrdinalType / Id fieldList <- ((fixedPart (Semi variantPart)? / variantPart) Semi?)? fixedPart <- varDec (Semi varDec)* variantPart <- CASE Id^Err_037 (Colon Id^Err_038)? OF^Err_039 variant^Err_040 (Semi variant)* variant <- consts Colon^Err_041 LPar^Err_042 fieldList RPar^Err_043 consts <- const (Comma const^Err_044)* varDecs <- (VAR varDec^Err_045 Semi^Err_046 (varDec Semi^Err_047)*)? varDec <- ids Colon^Err_048 type^Err_049 procAndFuncDecs <- ((procDec / funcDec) Semi^Err_050)* procDec <- procHeading Semi^Err_051 (decs block / Id)^Err_052 procHeading <- PROCEDURE Id^Err_053 formalParams? funcDec <- funcHeading Semi^Err_054 (decs block / Id)^Err_055 funcHeading <- FUNCTION Id^Err_056 formalParams? Colon^Err_057 type^Err_058 formalParams <- LPar formalParamsSection^Err_059 (Semi formalParamsSection^Err_060)* RPar^Err_061 formalParamsSection <- VAR? ids Colon^Err_062 Id^Err_063 / procHeading / funcHeading block <- BEGIN stmts END^Err_064 stmts <- stmt (Semi stmt)* stmt <- (label Colon^Err_065)? (simpleStmt / structuredStmt)? simpleStmt <- assignStmt / procStmt / gotoStmt assignStmt <- var Assign expr^Err_067 var <- Id (LBrack expr^Err_068 (Comma expr^Err_069)* RBrack^Err_070 / Dot Id^Err_071 / Pointer)* procStmt <- Id params? params <- LPar (param (Comma param^Err_072)*)? RPar^Err_073 param <- expr (Colon expr)? (Colon expr^Err_074)? gotoStmt <- GOTO label^Err_075 structuredStmt <- block / conditionalStmt / repetitiveStmt / withStmt conditionalStmt <- ifStmt / caseStmt ifStmt <- IF expr^Err_076 THEN^Err_077 stmt (ELSE stmt)? caseStmt <- CASE expr^Err_078 OF^Err_079 caseListElement^Err_080 (Semi caseListElement)* Semi? END^Err_081 caseListElement <- consts Colon^Err_082 stmt repetitiveStmt <- repeatStmt / whileStmt / forStmt repeatStmt <- REPEAT stmts UNTIL^Err_083 expr^Err_084 whileStmt <- WHILE expr^Err_085 DO^Err_086 stmt forStmt <- FOR Id^Err_087 Assign^Err_088 expr^Err_089 (TO / DOWNTO)^Err_090 expr^Err_091 DO^Err_092 stmt withStmt <- WITH var^Err_093 (Comma var^Err_094)* DO^Err_095 stmt expr <- simpleExpr (RelOp simpleExpr^Err_096)? simpleExpr <- Sign? term (AddOp term^Err_097)* term <- factor (MultOp factor^Err_098)* factor <- NOT* (funcCall / var / unsignedConst / setConstructor / LPar expr^Err_099 RPar^Err_100) unsignedConst <- UNumber / String / Id / NIL funcCall <- Id params setConstructor <- LBrack (memberDesignator (Comma memberDesignator^Err_102)*)? RBrack^Err_103 memberDesignator <- expr (DotDot expr^Err_104)? AddOp <- '+' / '-' / OR Assign <- ':=' Dot <- '.' DotDot <- '..' CloseComment <- '*)' / '}' Colon <- ':' Comma <- ',' COMMENT <- OpenComment (!CloseComment .)* CloseComment Eq <- '=' BodyId <- [a-zA-Z0-9] Id <- !Reserved [a-zA-Z] [a-zA-Z0-9]* LBrack <- '[' LPar <- '(' MultOp <- '*' / '/' / DIV / MOD / AND OpenComment <- '(*' / '{' Pointer <- '^' RBrack <- ']' RelOp <- '<=' / '=' / '<>' / '>=' / '>' / '<' / IN RPar <- ')' Semi <- ';' Sign <- '+' / '-' String <- "'" (!"'" .)* "'" UInt <- [0-9]+ UNumber <- UReal / UInt UReal <- [0-9]+ ('.' [0-9]+ ([Ee] ('+' / '-') [0-9]+)? / [Ee] ('+' / '-') [0-9]+) Reserved <- AND / ARRAY / BEGIN / CONST / CASE / DIV / DO / DOWNTO / ELSE / END / FILE / FOR / FUNCTION / GOTO / IF / IN / LABEL / MOD / NIL / NOT / OF / OR / PACKED / PROCEDURE / PROGRAM / RECORD / REPEAT / SET / THEN / TO / TYPE / UNTIL / VAR / WHILE / WITH AND <- [Aa] [Nn] [Dd] !BodyId ARRAY <- [Aa] [Rr] [Rr] [Aa] [Yy] !BodyId BEGIN <- [Bb] [Ee] [Gg] [Ii] [Nn] !BodyId CASE <- [Cc] [Aa] [Ss] [Ee] !BodyId CONST <- [Cc] [Oo] [Nn] [Ss] [Tt] !BodyId DIV <- [Dd] [Ii] [Vv] !BodyId DO <- [Dd] [Oo] !BodyId DOWNTO <- [Dd] [Oo] [Ww] [Nn] [Tt] [Oo] !BodyId ELSE <- [Ee] [Ll] [Ss] [Ee] !BodyId END <- [Ee] [Nn] [Dd] !BodyId FILE <- [Ff] [Ii] [Ll] [Ee] !BodyId FOR <- [Ff] [Oo] [Rr] !BodyId FUNCTION <- [Ff] [Uu] [Nn] [Cc] [Tt] [Ii] [Oo] [Nn] !BodyId GOTO <- [Gg] [Oo] [Tt] [Oo] !BodyId IF <- [Ii] [Ff] !BodyId IN <- [Ii] [Nn] !BodyId LABEL <- [Ll] [Aa] [Bb] [Ee] [Ll] !BodyId MOD <- [Mm] [Oo] [Dd] !BodyId NIL <- [Nn] [Ii] [Ll] !BodyId NOT <- [Nn] [Oo] [Tt] !BodyId OF <- [Oo] [Ff] !BodyId OR <- [Oo] [Rr] !BodyId PACKED <- [Pp] [Aa] [Cc] [Kk] [Ee] [Dd] !BodyId PROCEDURE <- [Pp] [Rr] [Oo] [Cc] [Ee] [Dd] [Uu] [Rr] [Ee] !BodyId PROGRAM <- [Pp] [Rr] [Oo] [Gg] [Rr] [Aa] [Mm] !BodyId RECORD <- [Rr] [Ee] [Cc] [Oo] [Rr] [Dd] !BodyId REPEAT <- [Rr] [Ee] [Pp] [Ee] [Aa] [Tt] !BodyId SET <- [Ss] [Ee] [Tt] !BodyId THEN <- [Tt] [Hh] [Ee] [Nn] !BodyId TO <- [Tt] [Oo] !BodyId TYPE <- [Tt] [Yy] [Pp] [Ee] !BodyId UNTIL <- [Uu] [Nn] [Tt] [Ii] [Ll] !BodyId VAR <- [Vv] [Aa] [Rr] !BodyId WHILE <- [Ww] [Hh] [Ii] [Ll] [Ee] !BodyId WITH <- [Ww] [Ii] [Tt] [Hh] !BodyId ]] local g = m.match(g) local p = coder.makeg(g, 'ast') local dir = util.getPath(arg[0]) util.testYes(dir .. '/test/yes/', 'pas', p) util.testNo(dir .. '/test/no/', 'pas', p)
resource.AddFile( "materials/sprites/flareglow.vmt" ) resource.AddFile( "resource/fonts/Graffiare.ttf" ) resource.AddFile( "resource/fonts/typenoksidi_upd.ttf" ) resource.AddFile( "models/Zed/male_shared.mdl" ) resource.AddFile( "sound/nuke/redead/lastminute.mp3" ) for i=1,4 do for e=1,5 do resource.AddFile( "materials/models/Zed/Male/g" .. i .. "_0" .. e .. "_sheet.vmt" ) end end local include_sound = { "heartbeat", "geiger_1", "geiger_2", "geiger_3", "geiger_4", "geiger_5", "geiger_6", "geiger_7", "geiger_8", "gore/blood01", "gore/blood02", "gore/blood03", "gore/flesh01", "gore/flesh02", "gore/flesh03", "gore/flesh04", "redead/attack_1", "redead/attack_2", "redead/attack_3", "redead/attack_4", "redead/attack_5", "redead/attack_6", "redead/attack_7", "redead/attack_8", "redead/attack_9", "redead/attack_10", "redead/death_1", "redead/death_2", "redead/death_3", "redead/death_4", "redead/death_5", "redead/death_6", "redead/death_7", "redead/death_8", "redead/death_9", "redead/death_10", "redead/pain_1", "redead/pain_2", "redead/pain_3", "redead/pain_4", "redead/pain_5", "redead/pain_6", "redead/pain_7", "redead/pain_8", "redead/pain_9", "redead/pain_10", "redead/idle_1", "redead/idle_2", "redead/idle_3", "redead/idle_4", "redead/idle_5", "redead/idle_6", "redead/idle_7", "redead/idle_8", "redead/idle_9", "redead/idle_10" } for k,v in pairs( include_sound ) do resource.AddFile( "sound/nuke/" .. v .. ".wav" ) end local include_mat = { "models/weapons/v_models/shot_m3super91/shot_m3super91_norm", "models/weapons/v_models/shot_m3super91/shot_m3super91_2_norm", "models/weapons/v_models/shot_m3super91/shot_m3super91", "models/weapons/v_models/shot_m3super91/shot_m3super91_2", "models/weapons/temptexture/handsmesh1", "models/weapons/axe", "models/weapons/hammer", "models/weapons/hammer2", "models/ammoboxes/smg", "models/Zed/Male/pupil_l", "models/Zed/Male/pupil_r", "models/Zed/Male/eyeball_r", "models/Zed/Male/eyeball_l", "models/Zed/Male/dark_eyeball_l", "models/Zed/Male/dark_eyeball_r", "models/Zed/Male/mouth", "models/Zed/Male/glint", "models/Zed/Male/citizen_sheet", "models/Zed/Male/blood_sheet", "models/Zed/Male/grey_sheet", "models/Zed/Male/service_sheet", "models/Zed/Male/plaid_sheet", "models/Zed/Male/jackson_sheet", "models/Zed/Male/sandro_facemap", "models/Zed/Male/joe_facemap", "models/Zed/Male/eric_facemap", "models/Zed/Male/vance_facemap", "effects/rain_cloud", "effects/rain_warp", "effects/rain_warp_normal", "nuke/redead/noise01", "nuke/redead/noise02", "nuke/redead/noise03", "nuke/redead/commando", "nuke/redead/engineer", "nuke/redead/scout", "nuke/redead/specialist", "nuke/redead/zomb_zombie", "nuke/redead/zomb_corpse", "nuke/redead/zomb_banshee", "nuke/redead/zomb_leaper", "nuke/redead/allyvision", "nuke/gore1", "nuke/gore2", "nuke/blood/Blood1", "nuke/blood/Blood2", "nuke/blood/Blood3", "nuke/blood/Blood4", "nuke/blood/Blood5", "nuke/blood/Blood6", "nuke/blood/Blood7", "radbox/img_radiation", "radbox/img_blood", "radbox/img_health", "radbox/img_stamina", "radbox/img_infect", "radbox/healthpack", "radbox/healthpack2", "radbox/bandage" } for k,v in pairs( include_mat ) do resource.AddFile( "materials/" .. v .. ".vmt" ) end local include_model = { "weapons/v_shot_m3super91", "weapons/w_hammer", "weapons/w_axe", "weapons/v_hammer/v_hammer", "weapons/v_axe/v_axe", "items/boxqrounds", "radbox/bandage", "radbox/geiger", "radbox/healthpack", "radbox/healthpack2", "Zed/malezed_04", "Zed/malezed_06", "Zed/malezed_08", "Zed/weapons/v_undead", "Zed/weapons/v_ghoul", "Zed/weapons/v_wretch", "Zed/weapons/v_banshee" } for k,v in pairs( include_model ) do resource.AddFile( "models/" .. v .. ".mdl" ) end
local util = require("mooncrafts.util") local httpc = require("mooncrafts.http") local url = require("mooncrafts.url") local trim, path_sanitize trim, path_sanitize = util.trim, util.path_sanitize local url_parse, Remotefs url_parse = url.parse do local _class_0 local _base_0 = { readRaw = function(self, location) url = location if location:find(":") == nil then url = self.conf.base .. "/" .. trim(path_sanitize(location), "%/*") end local req = { url = url, method = "GET", capture_url = self.conf.ngx_path, headers = { } } return httpc.request(req) end, read = function(self, location, default) if default == nil then default = "" end local rst = self:readRaw(location) if (rst.err or rst.code < 200 or rst.code > 299) then return default end return rst.body end } _base_0.__index = _base_0 _class_0 = setmetatable({ __init = function(self, conf) if conf == nil then conf = { } end assert(conf, "conf object is required") local myConf = { } myConf.base = trim(conf.base or "https://raw.githubusercontent.com/", "%/*") myConf.ngx_path = conf.ngx_path or "/__mooncrafts" self.conf = myConf end, __base = _base_0, __name = "Remotefs" }, { __index = _base_0, __call = function(cls, ...) local _self_0 = setmetatable({}, _base_0) cls.__init(_self_0, ...) return _self_0 end }) _base_0.__class = _class_0 Remotefs = _class_0 end return Remotefs
include("shared.lua") function ENT:Draw() self:DrawModel() local min, max = self:GetCollisionBounds() local angles = self:GetAngles() local text = "meme" if self.drug then text = self.drug.name end local function DrawTextCrap() surface.SetFont("Default") local w, h = surface.GetTextSize(text) surface.SetDrawColor(Color(0, 0, 0, 125)) surface.DrawRect((w / 2) * -1, (h / 2) * -1, w, h) draw.SimpleText(text, "Default", 0, 0, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) end cam.Start3D2D(self:GetPos() + Vector(0, 0, max.z + 5 + math.sin(CurTime() * 1.5)), Angle(0, math.NormalizeAngle(CurTime() * 60), 90), 0.5) DrawTextCrap() cam.End3D2D() cam.Start3D2D(self:GetPos() + Vector(0, 0, max.z + 5 + math.sin(CurTime() * 1.5)), Angle(0, math.NormalizeAngle(CurTime() * 60) + 180, 90), 0.5) DrawTextCrap() cam.End3D2D() end
require("config") --Changes require("prototypes.changes") --Pumpjack require("prototypes.pump-2") require("prototypes.pump-3") --Mining require("prototypes.mining-range-1") require("prototypes.mining-range-2") require("prototypes.mining-range-3") require("prototypes.mining-speed-1") require("prototypes.mining-speed-2") require("prototypes.mining-speed-3") --Technology require("prototypes.tech")
-- dap-install configurations local dap_install = require("dap-install") dap_install.setup { installation_path = vim.fn.stdpath("data") .. "/dapinstall/", } local dap_install = require("dap-install") local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers() for _, debugger in ipairs(dbg_list) do dap_install.config(debugger) end -- dap-ui configurations require("dapui").setup({ icons = { expanded = "▾", collapsed = "▸" }, mappings = { -- Use a table to apply multiple mappings expand = { "<CR>", "<2-LeftMouse>" }, open = "o", remove = "d", edit = "e", repl = "r", }, sidebar = { -- You can change the order of elements in the sidebar elements = { -- Provide as ID strings or tables with "id" and "size" keys { id = "scopes", size = 0.25, -- Can be float or integer > 1 }, { id = "breakpoints", size = 0.25 }, { id = "stacks", size = 0.25 }, { id = "watches", size = 00.25 }, }, size = 40, position = "left", -- Can be "left", "right", "top", "bottom" }, tray = { elements = { "repl" }, size = 10, position = "bottom", -- Can be "left", "right", "top", "bottom" }, floating = { max_height = nil, -- These can be integers or a float between 0 and 1. max_width = nil, -- Floats will be treated as percentage of your screen. border = "single", -- Border style. Can be "single", "double" or "rounded" mappings = { close = { "q", "<Esc>" }, }, }, windows = { indent = 1 }, }) vim.fn.sign_define('DapBreakpoint', {text='●', texthl='', linehl='', numhl=''}) local dap = require('dap') dap.defaults.fallback.terminal_win_cmd = 'ToggleTerm'
-- Returns true if the subsystem is 'usb' -- and the devtype is 'usb_device' -- local function isUsbDevice(dev) if dev.IsInitialized and dev:getProperty("subsystem") == "usb" and dev:getProperty("devtype") == "usb_device" then return true; end return false; end return isUsbDevice
local NsRange = require 'Foundation.NSRange' local SpearmanController = class.extendClass(objc.SpearmanController) local codeChangeMessage = "SpearmanCtrl updated" function SpearmanController:init() self[objc.WKInterfaceController]:init() self:addMessageHandler(codeChangeMessage, "configure") end function SpearmanController:awakeWithContext(context) self:configure() end function SpearmanController:configure() self.speed = self.speed or 1 end local WKInterfaceImage = objc.WKInterfaceImage function SpearmanController:walk() local imagesRange = NsRange.NSMakeRange(0, 10); self.walkerImage:startAnimatingWithImagesInRange_duration_repeatCount(imagesRange, 1/self.speed, 0) end function SpearmanController:pause() self.walkerImage:stopAnimating() end function SpearmanController:increaseSpeed() self.speed = self.speed * 1.5 self:walk() end function SpearmanController:decreaseSpeed() self.speed = self.speed / 1.5 self:walk() end message.post(codeChangeMessage) return SpearmanController
cpu = manager:machine().devices[":maincpu"] mem = cpu.spaces["program"] gui = manager:machine().screens[":screen"] function main() mem:write_u8(0x7E1F8C,3) --mem:write_u8(0x7E0082,0x0C) --Stage Select player(0xE80,0x1AA0, 0,0,0x980,0x14C0) player(0xF60,0x1AF0,300,0,0xC00,0x15C0) end function player(addr,addr2,x,y,addr3,addr4) chx = mem:read_i16(addr+0x8)*2 chy = mem:read_i16(addr+0xC) flip = mem:read_u8(addr+0x2C) hurt = mem:read_u16(addr + 0x36)--f96 hstimer = mem:read_u16(addr + 0x38) life = mem:read_u8(addr + 0x64) meter = addr2 + 0x20 colorid = addr2 + 0x50 if flip ~= 0 then flpx=-1 else flpx=1 end drawaxis(chx,chy,16) --leostanding hurtboxes 0C 14 00 34 14 10 00 10 location 0x12540 membox(180,chx,chy,addr4-0x40,0x88FFFF00,flpx) membox(180,chx,chy,addr4,0x88FFFF00,flpx) membox(180,chx,chy,addr4+0x40,0x88FFFF00,flpx) membox(180,chx,chy,addr3,0x88FF0000,flpx) membox(180,chx,chy,addr3+0x40,0x88FF00FF,flpx) --Display -- gui:draw_box(x,y,x+200,y+32,0xff600000,0xffffffff) -- gui:draw_text(x+2,y+2,string.format("BoxTest: %d,%d,%d,%d",box1,box2,box3,box4)) -- gui:draw_text(x+2,y+10,string.format("RealTest: %d,%d,%d,%d",0x00+chx,0x34+chy,0x0C,0x14)) end function membox(screenh,plx,ply,addr,color,flip) local xoff = mem:read_i16(addr+0x08)*2 local yoff = mem:read_i16(addr+0x10) local xrad = (mem:read_u16(addr+0x16)*2)*flip local yrad = mem:read_u16(addr+0x18) local yoff = screenh + yoff local left = xoff - xrad local right = xoff + xrad local top = yoff - yrad local bottom = yoff + yrad gui:draw_box(left,top,right,bottom,color,0xffffffff) end function colbox(screenh,plx,ply,addr,color,flip) local xoff = mem:read_i8(addr+2)*2 local yoff = mem:read_i8(addr+3) local xrad = mem:read_u8(addr)*2 local yrad = mem:read_u8(addr+1) local xoff = plx + xoff * flip local yoff = ply - yoff local left = xoff - xrad local right = xoff + xrad local top = yoff - yrad local bottom = yoff + yrad gui:draw_box(left,top,right,bottom,color,0xffffffff) end function drawaxis(x,y,axis) gui:draw_line(x+(axis),y,x-(axis),y,0xFF00FF00) gui:draw_line(x,y-axis,x,y+axis,0xFF00FFFF) end emu.register_frame_done(main,"frame") --[[ Device :rspeaker :maincpu :st_list :spc700 :soundcpu :snsslot :snsslot:lorom :cart_list :ctrl2 :ctrl1:joypad :bsx_list :screen :ppu :lspeaker :ctrl1 :ctrl2:joypad ----------------------- Screen :screen ]]
-- -- tek.ui.class.image -- Written by Timm S. Mueller <tmueller at schulze-mueller.de> -- See copyright notice in COPYRIGHT -- -- OVERVIEW:: -- Implements bitmap and vector images -- local Class = require "tek.class" local ui = require "tek.ui" local Display = ui.require("display", 21) local assert = assert local type = type module("tek.ui.class.image", tek.class) _VERSION = "Image 2.2" local Image = _M Class:newClass(Image) function Image.new(class, image) if type(image) == "string" then image = { Display.createPixmap(image) } end assert(image[1]) image[2] = image[2] or false -- width (false: stretchable) image[3] = image[3] or false -- height (false: stretchable) image[4] = image[4] or false -- transparent? (false: opaque) image[5] = image[5] or false -- vector primitives (false: is a pixmap) return Class.new(class, image) end function Image:draw(d, r1, r2, r3, r4, pen) if self[5] then d:drawImage(self, r1, r2, r3, r4, pen) else d:drawPixmap(self[1], r1, r2, r3, r4) end end function Image:askWidthHeight(w, h) return self[2] or w, self[3] or h end
local mod = get_mod("rwaon_talents") PassiveAbilitySettings.rwaon_dr_1 = { description = "career_passive_desc_dr_1a", display_name = "career_passive_name_dr_1", icon = "bardin_ironbreaker_gromril_armour", buffs = { "bardin_ironbreaker_gromril_armour", "bardin_ironbreaker_gromril_antistun", "bardin_ironbreaker_passive_increased_defence", "bardin_ironbreaker_passive_increased_stamina", "bardin_ironbreaker_passive_reduced_stun_duration", "bardin_ironbreaker_refresh_gromril_armour", --"bardin_ironbreaker_ability_cooldown_on_hit", --"bardin_ironbreaker_ability_cooldown_on_damage_taken" }, perks = { { display_name = "career_passive_name_dr_1b", description = "career_passive_desc_dr_1b_2" }, { display_name = "career_passive_name_dr_1c", description = "career_passive_desc_dr_1c_2" }, { display_name = "career_passive_name_dr_1d", description = "career_passive_desc_dr_1d_2" } } } CareerSettings.dr_ironbreaker.passive_ability = PassiveAbilitySettings.rwaon_dr_1
return function (connection, req, args) dofile("httpserver-header.lc")(connection, 200, 'html') connection:send([===[ <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Arguments by GET</title></head><body><h1>Arguments by GET</h1> ]===]) if args.submit == nil then connection:send([===[ <form method="GET"> First name:<br><input type="text" name="firstName"><br> Last name:<br><input type="text" name="lastName"><br> <input type="radio" name="sex" value="male" checked>Male<input type="radio" name="sex" value="female">Female<br> <input type="submit" name="submit" value="Submit"> </form> ]===]) else connection:send("<h2>Received the following values:</h2><ul>") for name, value in pairs(args) do connection:send('<li><b>' .. name .. ':</b> ' .. tostring(value) .. "<br></li>\n") end connection:send("</ul>\n") end connection:send("</body></html>") end
-- =========================================================================== -- Diplomacy Trade View Manager -- =========================================================================== include( "InstanceManager" ); include( "SupportFunctions" ); include( "Civ6Common" ); include( "LeaderSupport" ); include( "DiplomacyRibbonSupport" ); include( "DiplomacyStatementSupport" ); include( "TeamSupport" ); include( "GameCapabilities" ); include( "LeaderIcon" ); include( "PopupDialog" ); -- =========================================================================== -- CONSTANTS -- =========================================================================== local LEADERTEXT_PADDING_X :number = 40; local LEADERTEXT_PADDING_Y :number = 40; local SELECTION_PADDING_Y :number = 20; local OVERVIEW_MODE = 0; local CONVERSATION_MODE = 1; local CINEMA_MODE = 2; local DEAL_MODE = 3; local SIZE_BUILDING_ICON :number = 32; local SIZE_UNIT_ICON :number = 32; local INTEL_NO_SUB_PANEL = -1; local INTEL_ACCESS_LEVEL_PANEL = 0; local INTEL_RELATIONSHIP_PANEL = 1; local INTEL_GOSSIP_HISTORY_PANEL = 2; local INTEL_AGENDA_PANEL = 3; local COLOR_BLUE_GRAY = 0xFF9c8772; local COLOR_BUTTONTEXT_SELECTED = 0xFF291F10; local COLOR_BUTTONTEXT_SELECTED_SHADOW = 0xAAD8B489; local COLOR_BUTTONTEXT_NORMAL = 0xFFC9DAE7; local COLOR_BUTTONTEXT_NORMAL_SHADOW = 0xA291F10; local COLOR_BUTTONTEXT_DISABLED = 0xFF90999F; local DIPLOMACY_RIBBON_OFFSET = 64; local MAX_BEFORE_TRUNC_BUTTON_INST = 280; local TEAM_RIBBON_SIZE :number = 53; local TEAM_RIBBON_SMALL_SIZE :number = 30; local TEAM_RIBBON_PREFIX :string = "ICON_TEAM_RIBBON_"; local VOICEOVER_SUPPORT: table = {"KUDOS", "WARNING", "DECLARE_WAR_FROM_HUMAN", "DECLARE_WAR_FROM_AI", "FIRST_MEET", "DEFEAT","ENRAGED"}; --This is the multiplier for the portion of the screen which the conversation control should cover. local CONVO_X_MULTIPLIER = .328; -- =========================================================================== -- VARIABLES -- =========================================================================== local ms_PlayerPanelIM :table = InstanceManager:new( "PlayerPanel", "Root" ); local ms_DiplomacyRibbonIM :table = InstanceManager:new( "DiplomacyRibbonVert", "Root" ); local ms_DiplomacyRibbonLeaderIM :table = InstanceManager:new( "DiplomacyRibbonLeader", "Root" ); local ms_IconOnlyIM :table = InstanceManager:new( "IconOnly", "Icon"); local ms_TextOnlyIM :table = InstanceManager:new( "TextOnly", "Text", Controls.TextContainer ); local ms_IconAndTextIM :table = InstanceManager:new( "IconAndText", "SelectButton", Controls.IconAndTextContainer ); local ms_LeftRightListIM :table = InstanceManager:new( "LeftRightList", "List", Controls.LeftRightListContainer ); local ms_TopDownListIM :table = InstanceManager:new( "TopDownList", "List", Controls.TopDownListContainer ); local ms_ActionListIM :table = InstanceManager:new( "ActionButton", "Button" ); local ms_SubActionListIM :table = InstanceManager:new( "ActionButton", "Button" ); local ms_IntelPanelIM :table = InstanceManager:new( "IntelPanel", "Panel" ); local ms_IntelAccessLevelPanelIM :table = InstanceManager:new( "IntelAccessLevelPanel", "Background" ); local ms_IntelRelationshipPanelIM :table = InstanceManager:new( "IntelRelationshipPanel", "Background" ); local ms_IntelRelationshipReasonIM :table = InstanceManager:new( "IntelRelationshipReasonEntry", "Background" ); local ms_RelationshipIconsIM :table = InstanceManager:new( "RelationshipIcon", "Background" ); local ms_IntelGossipHistoryPanelEntryIM :table = InstanceManager:new( "IntelGossipHistoryPanelEntry", "Background" ); local ms_IntelGossipHistoryPanelIM :table = InstanceManager:new( "IntelGossipHistoryPanel", "Background" ); local ms_IntelAgendaPanelEntryIM :table = InstanceManager:new( "IntelAgendaPanelEntry", "Background" ); local ms_IntelAgendaPanelIM :table = InstanceManager:new( "IntelAgendaPanel", "Background" ); local ms_ConversationSelectionIM :table = InstanceManager:new( "ConversationSelectionInstance", "SelectionButton", Controls.ConversationSelectionStack ); local ms_uniqueIconIM :table = InstanceManager:new("IconInfoInstance", "Top", Controls.FeaturesStack ); local ms_uniqueTextIM :table = InstanceManager:new("TextInfoInstance", "Top", Controls.FeaturesStack ); local ms_ValueEditDealItemID = -1; -- The ID of the deal item that is being value edited. local ms_ValueEditDealItemControlTable = nil; -- The control table of the deal item that is being edited. local OTHER_PLAYER = 0; local LOCAL_PLAYER = 1; local ms_PlayerPanel = nil; local ms_DiplomacyRibbon = nil; local ms_LocalPlayer = nil; local ms_LocalPlayerID = -1; local ms_LocalPlayerLeaderID = -1; -- The 'other' player who may have contacted local player, which brought us to this view. Can be nil. local ms_OtherPlayer = nil; local ms_OtherPlayerID = -1; -- The selected player. This can be any player, including the local player local ms_SelectedPlayer = nil; local ms_SelectedPlayerID = -1; local ms_SelectedPlayerLeaderTypeName = nil; local ms_showingLeaderName = ""; local ms_bLeaderShowRequested = false; -- A list of all the ribbon entries indexed by the leader ID local ms_LeaderIDToRibbonEntry = {}; local ms_InitiatedByPlayerID = -1; local ms_bIsViewInitialized = false; local ms_ActiveSessionID = nil; local ms_currentViewMode = -1; local ms_bShowingDeal = false; local m_isInHotload = false; local m_bCloseSessionOnFadeComplete = false; local m_bottomPanelHeight = 0; local PADDING_FOR_SCROLLPANEL = 220; local m_GossipThisTurnCount = 0; local m_firstOpened = true; local m_LeaderCoordinates :table = {}; local m_lastLeaderPlayedMusicFor = -1; local ms_LastDealResponseAnimation = nil; -- VOICEOVER SUPPORT local m_voiceoverText :string = ""; local m_cinemaMode :boolean = false; local m_currentLeaderAnim :string = ""; local m_currentSceneEffect :string = ""; local ms_OtherID; local m_PopupDialog :table = PopupDialog:new("ConfirmDenounce"); -- =========================================================================== function GetOtherPlayer(player : table) if (player ~= nil and player:GetID() == ms_OtherPlayer:GetID()) then return ms_LocalPlayer; end return ms_OtherPlayer; end -- =========================================================================== function GetStatementMood( fromPlayer : number, inputMood : number ) local pPlayer = Players[fromPlayer]; local otherPlayerID = GetOtherPlayer(pPlayer):GetID(); local eFromPlayerMood = inputMood; if (inputMood == DiplomacyMoodTypes.UNDEFINED) then -- If the mood was not defined in the statement, get the current mood. This is most often the case because when the statement has been sent, the -- diplomacy action that it is in reaction to has usually not taken effect, so the mood is not correct at that time. return DiplomacySupport_GetPlayerMood(pPlayer, otherPlayerID); else return inputMood; end end local DiplomaticStateIndexToVisState = {}; DiplomaticStateIndexToVisState[DiplomaticStates.ALLIED] = 0; DiplomaticStateIndexToVisState[DiplomaticStates.DECLARED_FRIEND] = 1; DiplomaticStateIndexToVisState[DiplomaticStates.FRIENDLY] = 2; DiplomaticStateIndexToVisState[DiplomaticStates.NEUTRAL] = 3; DiplomaticStateIndexToVisState[DiplomaticStates.UNFRIENDLY] = 4; DiplomaticStateIndexToVisState[DiplomaticStates.DENOUNCED] = 5; DiplomaticStateIndexToVisState[DiplomaticStates.WAR] = 6; -- =========================================================================== -- Take the diplomatic state index and convert it to a vis state index for our icons -- Yes, *currently* the index state is the same, but it is NOT good practice -- to assume starting position or order of a database item, ever. function GetVisStateFromDiplomaticState(iState) local eStateHash = GameInfo.DiplomaticStates[iState].Hash; local iVisState = DiplomaticStateIndexToVisState[eStateHash]; if (iVisState ~= nil) then return iVisState; end return 0; end -- =========================================================================== function UpdateSelectedPlayer(allowDeadPlayer) if (allowDeadPlayer == nil) then allowDeadPlayer = false; end -- Have we met them and are they in the ribbon (alive) or allowing dead players (for defeat messages) if (ms_LocalPlayer:GetDiplomacy():HasMet(ms_SelectedPlayerID) and (allowDeadPlayer == true or ms_LeaderIDToRibbonEntry[ms_SelectedPlayerID] ~= nil)) then ms_SelectedPlayer = Players[ms_SelectedPlayerID]; else ms_SelectedPlayer = ms_LocalPlayer; ms_SelectedPlayerID = ms_LocalPlayerID; end if (ms_SelectedPlayer ~= nil) then local playerConfig = PlayerConfigurations[ms_SelectedPlayer:GetID()]; if (playerConfig ~= nil) then ms_SelectedPlayerLeaderTypeName = playerConfig:GetLeaderTypeName(); ms_OtherCivilizationID = playerConfig:GetCivilizationTypeID(); ms_OtherLeaderID = playerConfig:GetLeaderTypeID(); ms_OtherID = ms_SelectedPlayer:GetID(); end end end -- =========================================================================== function CreateHorizontalGroup(rootStack : table, title : string) local iconList = ms_LeftRightListIM:GetInstance(rootStack); if (title == nil or title == "") then iconList.Title:SetHide(true); -- No title else iconList.TitleText:LocalizeAndSetText(title); end iconList.List:ReprocessAnchoring(); return iconList; end -- =========================================================================== function CreateVerticalGroup(rootStack : table, title : string) local iconList = ms_TopDownListIM:GetInstance(rootStack); if (title == nil or title == "") then iconList.Title:SetHide(true); -- No title else iconList.TitleText:LocalizeAndSetText(title); end iconList.List:ReprocessAnchoring(); return iconList; end -- =========================================================================== function CreatePlayerPanel(rootControl : table) local playerPanel = ms_PlayerPanelIM:GetInstance(rootControl); playerPanel.ContentStack:CalculateSize(); playerPanel.SubOptionsStack:CalculateSize(); playerPanel.RootStack:ReprocessAnchoring(); playerPanel.RootStack:CalculateSize(); playerPanel.RootStack:ReprocessAnchoring(); rootControl:ReprocessAnchoring(); return playerPanel; end -- =========================================================================== function CreateDiplomacyRibbon(rootControl : table) local diplomacyRibbon = ms_DiplomacyRibbonIM:GetInstance(rootControl); return diplomacyRibbon; end -- =========================================================================== function CreateValueEditOverlay() Controls.ValueEditLeft:RegisterCallback( Mouse.eLClick, function() OnValueEditDelta(-1); end ); Controls.ValueEditLeft:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); Controls.ValueEditRight:RegisterCallback( Mouse.eLClick, function() OnValueEditDelta(1); end ); Controls.ValueEditRight:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); Controls.ValueEdit:RegisterCommitCallback( OnValueEditCommit ); end -- =========================================================================== function CreatePanels() CreateValueEditOverlay(); -- Create the Player Panel ms_PlayerPanel = CreatePlayerPanel(Controls.PlayerContainer); -- Create the Diplomacy Ribbon ms_DiplomacyRibbon = CreateDiplomacyRibbon(Controls.DiplomacyRibbonContainer); end -- =========================================================================== -- Show or hide the "amount text" sub-control of the supplied control instance function SetHideAmountText(controlTable : table, bHide : boolean) if (controlTable ~= nil) then if (controlTable.AmountText ~= nil) then controlTable.AmountText:SetHide(bHide); end end end -- =========================================================================== -- Detach the value edit overlay from anything it is attached to. function ClearValueEdit() SetHideAmountText(ms_ValueEditDealItemControlTable, false); ms_ValueEditDealItemControlTable = nil ms_ValueEditDealItemID = -1; Controls.ValueEditOverlay:SetHide(true); end -- =========================================================================== -- Clamp the input value to the max the value can have for the type of item -- Do we want to have this as a function on the item? function ClampValueAmount(playerID : number, eDealItemType : number, eValueType : number, iAmount : number) return iAmount; end -- =========================================================================== -- Change the value edit by a delta function OnValueEditDelta(delta : number) end -- =========================================================================== -- Commit the value in the edit control to the deal item function OnValueEditCommit() end -- =========================================================================== -- Detach the value edit if it is attached to the control function DetachValueEdit(itemID: number) if (itemID == ms_ValueEditDealItemID) then ClearValueEdit(); end end -- =========================================================================== -- Reattach the value edit overlay to the control set it is editing. function ReAttachValueEdit() if (ms_ValueEditDealItemControlTable ~= nil) then local rootControl = ms_ValueEditDealItemControlTable.SelectButton; -- Position over the deal item. We do this, rather than attaching to the item as a child, because we want to always be on top over everything. local x, y = rootControl:GetScreenOffset(); local w, h = rootControl:GetSizeVal(); Controls.ValueEditOverlay:SetOffsetVal(x + (w/2), y + h); Controls.ValueEditOverlay:SetHide(false); SetHideAmountText(ms_ValueEditDealItemControlTable, true); rootControl:ReprocessAnchoring(); end end -- =========================================================================== -- Make sure the active session is still there. function ValidateActiveSession() if (ms_ActiveSessionID ~= nil) then if (not DiplomacyManager.IsSessionIDOpen(ms_ActiveSessionID)) then ms_ActiveSessionID = nil; return false; end end return true; end -- =========================================================================== -- Exit the conversation mode. function ExitConversationMode() if (ms_currentViewMode == CONVERSATION_MODE) then ValidateActiveSession(); if (ms_ActiveSessionID ~= nil) then -- Close the session, this will handle exiting back to OVERVIEW_MODE or exiting, if the other leader contacted us. if (HasNextQueuedSession(ms_ActiveSessionID)) then -- There is another session right after this one, so we want to delay sending the CloseSession until the screen goes to black. m_bCloseSessionOnFadeComplete = true; StartFadeOut(); else -- Close the session now. DiplomacyManager.CloseSession( ms_ActiveSessionID ); end else -- No session for some reason, just go directly back. SelectPlayer(ms_OtherPlayerID, OVERVIEW_MODE); end ResetPlayerPanel(); end end -- =========================================================================== function StartFadeOut() Controls.BlackFade:SetHide(false); Controls.BlackFadeAnim:SetToBeginning(); Controls.BlackFadeAnim:Play(); Controls.FadeTimerAnim:SetToBeginning(); Controls.FadeTimerAnim:Play(); end -- =========================================================================== function StartFadeIn() Controls.BlackFade:SetHide(false); -- Only do the BlackFadeAnim Controls.BlackFadeAnim:SetToBeginning(); -- This forces a clear of the reverse flag. Controls.BlackFadeAnim:SetToEnd(); Controls.BlackFadeAnim:Reverse(); end -- =========================================================================== function IsWarChoice(key) local isWar :boolean = key == "CHOICE_DECLARE_SURPRISE_WAR" or key == "CHOICE_DECLARE_FORMAL_WAR" or key == "CHOICE_DECLARE_HOLY_WAR" or key == "CHOICE_DECLARE_LIBERATION_WAR" or key == "CHOICE_DECLARE_RECONQUEST_WAR" or key == "CHOICE_DECLARE_PROTECTORATE_WAR" or key == "CHOICE_DECLARE_COLONIAL_WAR" or key == "CHOICE_DECLARE_TERRITORIAL_WAR"; return isWar; end function GetWarType(key) if (key == "CHOICE_DECLARE_FORMAL_WAR") then return WarTypes.FORMAL_WAR; end; if (key == "CHOICE_DECLARE_HOLY_WAR") then return WarTypes.HOLY_WAR; end; if (key == "CHOICE_DECLARE_LIBERATION_WAR") then return WarTypes.LIBERATION_WAR; end; if (key == "CHOICE_DECLARE_RECONQUEST_WAR") then return WarTypes.RECONQUEST_WAR; end; if (key == "CHOICE_DECLARE_PROTECTORATE_WAR") then return WarTypes.PROTECTORATE_WAR; end; if (key == "CHOICE_DECLARE_COLONIAL_WAR") then return WarTypes.COLONIAL_WAR; end; if (key == "CHOICE_DECLARE_TERRITORIAL_WAR") then return WarTypes.TERRITORIAL_WAR; end; return WarTypes.SURPRISE_WAR; end function GetGoldCost(key) local szActionString = ""; if (key == "CHOICE_DIPLOMATIC_DELEGATION") then szActionString = "DIPLOACTION_DIPLOMATIC_DELEGATION"; end; if (key == "CHOICE_RESIDENT_EMBASSY") then szActionString = "DIPLOACTION_RESIDENT_EMBASSY"; end; if (key == "CHOICE_OPEN_BORDERS") then szActionString = "DIPLOACTION_OPEN_BORDERS"; end; if (szActionString == "") then return 0; end; return ms_LocalPlayer:GetDiplomacy():GetDiplomaticActionCost(szActionString); end -- =========================================================================== function IsPeaceChoice(key) local isPeace :boolean = (key == "CHOICE_MAKE_PEACE"); return isPeace; end -- =========================================================================== -- Handle a statement selection from the OVERVIEW_MODE. We are not -- in a session with the other player yet, this will start one. function OnSelectInitialDiplomacyStatement(key) if (ms_LocalPlayerID ~= ms_SelectedPlayerID and ms_SelectedPlayerID >= 0 and not GameConfiguration.IsPaused()) then if (key == "CHOICE_DECLARE_SURPRISE_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_SURPRISE_WAR"); elseif (key == "CHOICE_DECLARE_FORMAL_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_FORMAL_WAR"); elseif (key == "CHOICE_DECLARE_HOLY_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_HOLY_WAR"); elseif (key == "CHOICE_DECLARE_LIBERATION_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_LIBERATION_WAR"); elseif (key == "CHOICE_DECLARE_RECONQUEST_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_RECONQUEST_WAR"); elseif (key == "CHOICE_DECLARE_PROTECTORATE_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_PROTECTORATE_WAR"); elseif (key == "CHOICE_DECLARE_COLONIAL_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_COLONIAL_WAR"); elseif (key == "CHOICE_DECLARE_TERRITORIAL_WAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_TERRITORIAL_WAR"); elseif (key == "CHOICE_MAKE_PEACE") then -- DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "MAKE_PEACE"); -- Clear the outgoing deal, if we have nothing pending, so the user starts out with an empty deal. if (not DealManager.HasPendingDeal(ms_LocalPlayerID, ms_SelectedPlayerID)) then DealManager.ClearWorkingDeal(DealDirection.OUTGOING, ms_LocalPlayerID, ms_SelectedPlayerID); local pDeal = DealManager.GetWorkingDeal(DealDirection.OUTGOING, ms_LocalPlayer:GetID(), ms_SelectedPlayerID); if (pDeal ~= nil) then pDealItem = pDeal:AddItemOfType(DealItemTypes.AGREEMENTS, ms_LocalPlayer:GetID()); if (pDealItem ~= nil) then pDealItem:SetSubType(DealAgreementTypes.MAKE_PEACE); pDealItem:SetLocked(true); end -- Validate the deal, this will make sure peace is on both sides of the deal. pDeal:Validate(); end end DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "MAKE_DEAL"); elseif (key == "CHOICE_MAKE_DEAL") then -- Clear the outgoing deal, if we have nothing pending, so the user starts out with an empty deal. if (not DealManager.HasPendingDeal(ms_LocalPlayerID, ms_SelectedPlayerID)) then DealManager.ClearWorkingDeal(DealDirection.OUTGOING, ms_LocalPlayerID, ms_SelectedPlayerID); end DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "MAKE_DEAL"); elseif (key == "CHOICE_VIEW_DEAL") then DealManager.ViewPendingDeal(ms_LocalPlayerID, ms_SelectedPlayerID); elseif (key == "CHOICE_MAKE_DEMAND") then -- Clear the outgoing deal, if we have nothing pending, so the user starts out with an empty deal. if (not DealManager.HasPendingDeal(ms_LocalPlayerID, ms_SelectedPlayerID)) then DealManager.ClearWorkingDeal(DealDirection.OUTGOING, ms_LocalPlayerID, ms_SelectedPlayerID); end DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "MAKE_DEMAND"); elseif (key == "CHOICE_VIEW_DEMAND") then DealManager.ViewPendingDeal(ms_LocalPlayerID, ms_SelectedPlayerID); elseif (key == "CHOICE_DENOUNCE") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DENOUNCE"); elseif (key == "CHOICE_DIPLOMATIC_DELEGATION") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DIPLOMATIC_DELEGATION"); elseif (key == "CHOICE_DECLARE_FRIENDSHIP") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "DECLARE_FRIEND"); elseif (key == "CHOICE_RESIDENT_EMBASSY") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "RESIDENT_EMBASSY"); elseif (key == "CHOICE_OPEN_BORDERS") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "OPEN_BORDERS"); elseif (key == "CHOICE_DEMAND_PROMISE_DONT_SPY") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "WARNING_STOP_SPYING_ON_ME"); elseif (key == "CHOICE_DEMAND_PROMISE_DONT_SETTLE_TOO_NEAR") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "WARNING_DONT_SETTLE_NEAR_ME"); elseif (key == "CHOICE_DEMAND_PROMISE_DONT_CONVERT_CITY") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "WARNING_STOP_CONVERTING_MY_CITIES"); elseif (key == "CHOICE_DEMAND_PROMISE_DONT_DIG_ARTIFACTS") then DiplomacyManager.RequestSession(ms_LocalPlayerID, ms_SelectedPlayerID, "WARNING_STOP_DIGGING_UP_ARTIFACTS"); end end end -- =========================================================================== -- Handle a statment selection when in CONVERSATION_MODE. We will already be -- in a session with the other player. function OnSelectConversationDiplomacyStatement(key) if (key == "CHOICE_EXIT") then ExitConversationMode(); else if (key == "CHOICE_DECLARE_SURPRISE_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_SURPRISE_WAR"); elseif (key == "CHOICE_DECLARE_FORMAL_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_FORMAL_WAR"); elseif (key == "CHOICE_DECLARE_HOLY_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_HOLY_WAR"); elseif (key == "CHOICE_DECLARE_LIBERATION_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_LIBERATION_WAR"); elseif (key == "CHOICE_DECLARE_RECONQUEST_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_RECONQUEST_WAR"); elseif (key == "CHOICE_DECLARE_PROTECTORATE_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_PROTECTORATE_WAR"); elseif (key == "CHOICE_DECLARE_COLONIAL_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_COLONIAL_WAR"); elseif (key == "CHOICE_DECLARE_TERRITORIAL_WAR") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "DECLARE_TERRITORIAL_WAR"); elseif (key == "CHOICE_MAKE_PEACE") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "MAKE_PEACE"); elseif (key == "CHOICE_MAKE_DEAL") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "MAKE_DEAL"); elseif (key == "CHOICE_MAKE_DEMAND") then DiplomacyManager.AddStatement(ms_ActiveSessionID, Game.GetLocalPlayer(), "MAKE_DEMAND"); else if (key == "CHOICE_POSITIVE") then DiplomacyManager.AddResponse(ms_ActiveSessionID, Game.GetLocalPlayer(), "POSITIVE"); else if (key == "CHOICE_NEGATIVE") then DiplomacyManager.AddResponse(ms_ActiveSessionID, Game.GetLocalPlayer(), "NEGATIVE"); else if (key == "CHOICE_IGNORE") then DiplomacyManager.AddResponse(ms_ActiveSessionID, Game.GetLocalPlayer(), "RESPONSE_IGNORE"); else -- Just pass the choice key through as a response string. DiplomacyManager.AddResponse(ms_ActiveSessionID, Game.GetLocalPlayer(), key); end end end end end end -- =========================================================================== -- This applies the current statement to the CONVERSATION_MODE controls function ApplyStatement(handler : table, statementTypeName : string, statementSubTypeName : string, toPlayer : number, kStatement : table) local eFromPlayerMood = GetStatementMood( kStatement.FromPlayer, kStatement.FromPlayerMood); local kParsedStatement = handler.ExtractStatement(handler, statementTypeName, statementSubTypeName, kStatement.FromPlayer, eFromPlayerMood, kStatement.Initiator); handler.RemoveInvalidSelections(kParsedStatement, ms_LocalPlayerID, ms_OtherPlayerID); local leaderstr :string = ""; local reasonStr :string = ""; if (kParsedStatement.StatementText ~= nil) then leaderstr = Locale.Lookup( DiplomacyManager.FindTextKey( kParsedStatement.StatementText, kStatement.FromPlayer, kStatement.FromMood, toPlayer)); local reasonStrKey : string = DiplomacyManager.FindReasonTextKey( kParsedStatement.ReasonText, kStatement.FromPlayer, kStatement.AiReason, kStatement.AiModifier); if ( reasonStrKey ~= nil ) then reasonStr = Locale.Lookup( reasonStrKey ); end Controls.LeaderResponseText:SetText( leaderstr ); Controls.LeaderResponseText:ReprocessAnchoring(); m_voiceoverText = leaderstr; end ms_ConversationSelectionIM:ResetInstances(); if (kParsedStatement.Selections ~= nil) then for _, selection in ipairs(kParsedStatement.Selections) do local instance :table = ms_ConversationSelectionIM:GetInstance(); instance.SelectionText:SetText( Locale.Lookup(selection.Text) ); local texth :number = math.max( instance.SelectionText:GetSizeY() + SELECTION_PADDING_Y, 45 ); instance.SelectionButton:SetSizeY( texth ); instance.SelectionText:ReprocessAnchoring(); if (selection.IsDisabled == nil or selection.IsDisabled == false) then instance.SelectionButton:SetDisabled( false ); instance.SelectionButton:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); instance.SelectionButton:RegisterCallback( Mouse.eLClick, function() handler.OnSelectionButtonClicked(selection.Key); end ); else -- It is disabled instance.SelectionButton:SetDisabled( true ); if (selection.FailureReasons ~= nil) then instance.SelectionButton:SetToolTipString(Locale.Lookup(selection.FailureReasons[1])); end end end end Controls.ConversationSelectionStack:CalculateSize(); Controls.ConversationSelectionStack:ReprocessAnchoring(); Controls.ConversationSelectionGrid:ReprocessAnchoring(); -- Update leader response Controls.LeaderResponseText:SetText( leaderstr ); Controls.LeaderResponseText:ReprocessAnchoring(); -- Update leader reason Controls.LeaderReasonText:SetText( reasonStr ); Controls.LeaderReasonText:ReprocessAnchoring(); m_currentLeaderAnim = kParsedStatement.LeaderAnimation; m_currentSceneEffect = kParsedStatement.SceneEffect; local ePlayerMood = DiplomacySupport_GetPlayerMood(ms_SelectedPlayer, ms_LocalPlayerID); if (ms_currentViewMode == CONVERSATION_MODE) then LeaderSupport_QueueAnimationSequence( ms_OtherLeaderName, kParsedStatement.LeaderAnimation, ePlayerMood ); LeaderSupport_QueueSceneEffect( kParsedStatement.SceneEffect ); elseif (ms_currentViewMode == DEAL_MODE) then if (ePlayerMood == DiplomacyMoodTypes.HAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "HAPPY_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.NEUTRAL) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "NEUTRAL_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.UNHAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "UNHAPPY_IDLE" ); end end end -- =========================================================================== function PopulateStatementList( options: table, rootControl: table, isSubList: boolean ) local buttonIM:table; local stackControl:table; local selectionText :string = "[SIZE_16]"; -- Resetting the string size for the new button instance if (isSubList) then buttonIM = ms_ActionListIM; stackControl = rootControl.SubOptionsStack; else buttonIM = ms_SubActionListIM; stackControl = rootControl.ContentStack; end buttonIM:ResetInstances(); for _, selection in ipairs(options) do local instance :table = buttonIM:GetInstance(stackControl); local selectionText :string = selectionText.. Locale.Lookup(selection.Text); local callback :ifunction; local tooltipString :string = nil; if( selection.Key ~= nil) then callback = function() OnSelectInitialDiplomacyStatement( selection.Key ) end; local pActionDef = GameInfo.DiplomaticActions[selection.DiplomaticActionType]; if (pActionDef ~= nil and pActionDef.Description ~= nil) then -- Make sure everything is there, Description is optional! local toolTip = pActionDef.Description; tooltipString = Locale.Lookup(toolTip); instance.Button:SetToolTipString(tooltipString); else instance.Button:SetToolTipString(nil); -- Clear any existing end -- If costs gold add text local iCost = GetGoldCost(selection.Key); if iCost > 0 then local szGoldString = Locale.Lookup("LOC_DIPLO_CHOICE_GOLD_INFO", iCost); selectionText = selectionText .. szGoldString; end -- If war statement add warmongering info if (IsWarChoice(selection.Key))then local eWarType = GetWarType(selection.Key); local iWarmongerPoints = ms_LocalPlayer:GetDiplomacy():ComputeDOWWarmongerPoints(ms_SelectedPlayerID, eWarType); local szWarmongerLevel = ms_LocalPlayer:GetDiplomacy():GetWarmongerLevel(-iWarmongerPoints); local szWarmongerString = Locale.Lookup("LOC_DIPLO_CHOICE_WARMONGER_INFO", szWarmongerLevel); selectionText = selectionText .. szWarmongerString; -- Change callback to prompt first. callback = function() LuaEvents.DiplomacyActionView_ConfirmWarDialog(ms_LocalPlayerID, ms_SelectedPlayerID, eWarType); end; end --If denounce statement change callback to prompt first. if (selection.Key == "CHOICE_DENOUNCE")then local denounceFn = function() OnSelectInitialDiplomacyStatement( selection.Key ); end; callback = function() local playerConfig = PlayerConfigurations[ms_SelectedPlayer:GetID()]; if (playerConfig ~= nil) then selectedCivName = Locale.Lookup(playerConfig:GetCivilizationShortDescription()); m_PopupDialog:AddText(Locale.Lookup("LOC_DENOUNCE_POPUP_BODY", selectedCivName)); m_PopupDialog:AddButton(Locale.Lookup("LOC_CANCEL"), nil); m_PopupDialog:AddButton(Locale.Lookup("LOC_DIPLO_CHOICE_DENOUNCE"), denounceFn, nil, nil, "PopupButtonInstanceRed"); m_PopupDialog:Open(); end end; end instance.ButtonText:SetText( selectionText ); if (selection.IsDisabled == nil or selection.IsDisabled == false) then instance.Button:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); instance.Button:RegisterCallback( Mouse.eLClick, callback ); instance.ButtonText:SetColor( COLOR_BUTTONTEXT_NORMAL ); instance.Button:SetDisabled( false ); else instance.ButtonText:SetColor( COLOR_BUTTONTEXT_DISABLED ); instance.Button:SetDisabled( true ); if (selection.FailureReasons ~= nil) then instance.Button:SetToolTipString(Locale.Lookup(selection.FailureReasons[1])); end end else callback = selection.Callback; instance.ButtonText:SetColor( COLOR_BUTTONTEXT_NORMAL ); instance.Button:SetDisabled( false ); if ( selection.ToolTip ~= nil) then tooltipString = Locale.Lookup(selection.ToolTip); instance.Button:SetToolTipString(tooltipString); else instance.Button:SetToolTipString(nil); -- Clear any existing end end local wasTruncated :boolean = TruncateString(instance.ButtonText, MAX_BEFORE_TRUNC_BUTTON_INST, selectionText); if wasTruncated then local finalTooltipString :string = selectionText; if tooltipString ~= nil then finalTooltipString = finalTooltipString .. "[NEWLINE]" .. tooltipString; end instance.Button:SetToolTipString( finalTooltipString ); end -- Append tooltip string to the end of the tooltip if it exists in this selection if selection.Tooltip then local currentTooltipString = instance.Button:GetToolTipString(); instance.Button:SetToolTipString(currentTooltipString .. Locale.Lookup(selection.Tooltip)); end instance.Button:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); instance.Button:RegisterCallback( Mouse.eLClick, callback ); end if (isSubList) then local instance :table = buttonIM:GetInstance(stackControl); selectionText = selectionText.. Locale.Lookup("LOC_CANCEL_BUTTON"); instance.ButtonText:SetText( selectionText ); instance.Button:SetToolTipString(nil); instance.Button:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); instance.Button:RegisterCallback( Mouse.eLClick, function() rootControl.ContentStack:CalculateSize(); rootControl.ContentStack:ReprocessAnchoring(); rootControl.ContentStack:SetHide(false); rootControl.SubOptionsStack:SetHide(true); end ); end stackControl:CalculateSize(); stackControl:ReprocessAnchoring(); end -- =========================================================================== function AddStatmentOptions(rootControl : table) if (ms_LocalPlayerID ~= -1 and ms_SelectedPlayerID ~= -1) then local useStatementType = ""; if (ms_LocalPlayerID ~= ms_SelectedPlayerID) then useStatementType = "GREETING"; else useStatementType = "NO_TARGET"; end -- Get the handler for the specific statement we will be using to fill in the initial statements -- The normal statement that the initial selections are taken from is the GREETING statement -- This usually contains all the possible selections, then they are filtered out if that are not applicable -- for the current diplomacy state. local handler = GetStatementHandler(useStatementType); -- Get the statement options local kParsedStatement = handler.ExtractStatement(handler, useStatementType, "NONE", ms_LocalPlayerID, DiplomacyMoodTypes.ANY, DiplomacyInitiatorTypes.HUMAN); handler.RemoveInvalidSelections(kParsedStatement, ms_LocalPlayerID, ms_SelectedPlayerID); -- Don't need the exit choice at this time DiplomacySupport_RemoveSelectionByKey(kParsedStatement, "CHOICE_EXIT"); ms_ActionListIM:ResetInstances(); ms_SubActionListIM:ResetInstances(); local discussOptions: table = {}; local warOptions: table = {}; local topOptions: table = {}; if (kParsedStatement.Selections ~= nil) then for _, selection in ipairs(kParsedStatement.Selections) do local uiGroup = nil; local pActionDef = GameInfo.DiplomaticActions[selection.DiplomaticActionType]; if (pActionDef ~= nil and pActionDef.UIGroup ~= nil) then -- Make sure everything is there before accessing! uiGroup = pActionDef.UIGroup; end if ( uiGroup == "DISCUSS") then table.insert(discussOptions, selection); elseif (uiGroup == "FORMALWAR") then table.insert(warOptions, selection); else table.insert(topOptions, selection) end end if(table.count(discussOptions) > 0) then table.insert(topOptions, { Text = Locale.Lookup("LOC_DIPLOMACY_DISCUSS").. " [ICON_List]", Callback = function() rootControl.ContentStack:SetHide(true); rootControl.SubOptionsStack:SetHide(false); PopulateStatementList( discussOptions, rootControl, true ); end, }); end if(table.count(warOptions) > 0) then table.insert(topOptions, { Text = Locale.Lookup("LOC_DIPLOMACY_CASUS_BELLI").. " [ICON_List]", Callback = function() rootControl.ContentStack:SetHide(true); rootControl.SubOptionsStack:SetHide(false); PopulateStatementList( warOptions, rootControl, true ); end, ToolTip = "LOC_DIPLOMACY_CASUS_BELLI_TT" }); end PopulateStatementList(topOptions, rootControl, false); end rootControl.ContentStack:CalculateSize(); rootControl.ContentStack:ReprocessAnchoring(); rootControl.SubOptionsStack:CalculateSize(); rootControl.SubOptionsStack:ReprocessAnchoring(); else ms_ActionListIM:ResetInstances(); ms_SubActionListIM:ResetInstances(); end end -- =========================================================================== function SetSelectedIntelSubPanelButton(ePanelType, selectedState) local intelPanel = ms_IntelPanelIM:GetAllocatedInstance(); if (intelPanel ~= nil) then if (ePanelType == INTEL_ACCESS_LEVEL_PANEL and selectedState == true) then SetButtonSelected(intelPanel.AccessLevelButton,true); else SetButtonSelected(intelPanel.AccessLevelButton,false); ms_IntelAccessLevelPanelIM:ResetInstances(); end if (ePanelType == INTEL_RELATIONSHIP_PANEL and selectedState == true) then SetButtonSelected(intelPanel.RelationshipButton,true); else SetButtonSelected(intelPanel.RelationshipButton,false); ms_IntelRelationshipPanelIM:ResetInstances(); end if (ePanelType == INTEL_GOSSIP_HISTORY_PANEL and selectedState == true) then SetButtonSelected(intelPanel.GossipButton,true); else SetButtonSelected(intelPanel.GossipButton,false); ms_IntelGossipHistoryPanelIM:ResetInstances(); end if (ePanelType == INTEL_AGENDAY_PANEL and selectedState == true) then else ms_IntelAgendaPanelIM:ResetInstances(); end end end -- =========================================================================== function OnCloseIntelAccessLevelPanel(rootControl) OnActivateIntelGossipHistoryPanel(rootControl); end -- =========================================================================== function OnCloseIntelRelationshipPanel(rootControl) OnActivateIntelGossipHistoryPanel(rootControl); end -- =========================================================================== function OnCloseIntelAgendaPanel(rootControl) OnActivateIntelGossipHistoryPanel(rootControl); end -- =========================================================================== function OnCloseIntelGossipPanel() SetSelectedIntelSubPanelButton(INTEL_GOSSIP_HISTORY_PANEL, false); end -- =========================================================================== function OnActivateIntelRelationshipPanel(rootControl : table) SetSelectedIntelSubPanelButton(INTEL_RELATIONSHIP_PANEL, true); ms_IntelRelationshipPanelIM:ResetInstances(); local intelSubPanel = ms_IntelRelationshipPanelIM:GetInstance(rootControl); -- Get the selected player's Diplomactic AI local selectedPlayerDiplomaticAI = ms_SelectedPlayer:GetDiplomaticAI(); -- What do they think of us? local iState = selectedPlayerDiplomaticAI:GetDiplomaticStateIndex(ms_LocalPlayerID); local kStateEntry = GameInfo.DiplomaticStates[iState]; local eState = kStateEntry.Hash; intelSubPanel.RelationshipText:LocalizeAndSetText( Locale.ToUpper(kStateEntry.Name) ); -- Fill the relationship bar to reflect the current status local relationshipPercent = 1.0; -- If we are at war, show the special flashing red bar if (eState == DiplomaticStates.WAR) then intelSubPanel.FlashingBar:SetHide(false); intelSubPanel.AllyBar:SetHide(true); intelSubPanel.WarBar:SetHide(false); relationshipPercent = .02; elseif (eState == DiplomaticStates.ALLIED) then intelSubPanel.FlashingBar:SetHide(false); intelSubPanel.AllyBar:SetHide(false); intelSubPanel.WarBar:SetHide(true); relationshipPercent = .92; else relationshipPercent = kStateEntry.RelationshipLevel / 100; intelSubPanel.FlashingBar:SetHide(true); end intelSubPanel.RelationshipBar:SetPercent(relationshipPercent); intelSubPanel.RelationshipIcon:SetOffsetX(relationshipPercent*intelSubPanel.RelationshipBar:GetSizeX()); intelSubPanel.RelationshipIcon:SetVisState( GetVisStateFromDiplomaticState(iState) ); local toolTips = selectedPlayerDiplomaticAI:GetDiplomaticModifiers(ms_LocalPlayerID); ms_IntelRelationshipReasonIM:ResetInstances(); if(toolTips) then for i, tip in ipairs(toolTips) do local score = tip.Score; local text = tip.Text; if(score ~= 0) then local relationshipReason = ms_IntelRelationshipReasonIM:GetInstance(intelSubPanel.RelationshipReasonStack); local scoreText = Locale.Lookup("{1_Score : number +#,###.##;-#,###.##}", score); if(score > 0) then relationshipReason.Score:SetText("[COLOR_Civ6Green]" .. scoreText .. "[ENDCOLOR]"); else relationshipReason.Score:SetText("[COLOR_Civ6Red]" .. scoreText .. "[ENDCOLOR]"); end if(text == "LOC_TOOLTIP_DIPLOMACY_UNKNOWN_REASON") then relationshipReason.Text:SetText("[COLOR_Grey]" .. Locale.Lookup(text) .. "[ENDCOLOR]"); else relationshipReason.Text:SetText(Locale.Lookup(text)); end end end end intelSubPanel.RelationshipReasonStack:CalculateSize(); intelSubPanel.RelationshipReasonStack:ReprocessAnchoring(); if(intelSubPanel.RelationshipReasonStack:GetSizeY()==0) then intelSubPanel.NoReasons:SetHide(false); else intelSubPanel.NoReasons:SetHide(true); end -- Set the advisor icon intelSubPanel.AdvisorIcon:SetTexture(IconManager:FindIconAtlas("ADVISOR_GENERIC", 32)); -- Get the advisor text local advisorText = ""; local selectedCivName = ""; -- HACK: This is completely faked in for now... Ultimately this list will need to be much smarter local playerConfig = PlayerConfigurations[ms_SelectedPlayer:GetID()]; if (playerConfig ~= nil) then selectedCivName = Locale.ToUpper( Locale.Lookup(playerConfig:GetCivilizationDescription())); end local advisorTextlower = "[COLOR_Grey]"; advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_OFFER"); advisorTextlower = advisorTextlower .. "[NEWLINE]"; -- advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_DENOUNCE", selectedCivName); -- advisorTextlower = advisorTextlower .. "[NEWLINE]"; advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_TRADE_ROUTE", selectedCivName); advisorTextlower = advisorTextlower .. "[NEWLINE]"; if (not ms_SelectedPlayer:GetDiplomacy():HasOpenBordersFrom(ms_LocalPlayer:GetID())) then advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_OPEN_BORDERS", selectedCivName); advisorTextlower = advisorTextlower .. "[NEWLINE]"; end if (not ms_LocalPlayer:GetDiplomacy():HasDelegationAt(ms_SelectedPlayer:GetID()) and not ms_LocalPlayer:GetDiplomacy():HasEmbassyAt(ms_SelectedPlayer:GetID())) then advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_DELEGATION_EMBASSY"); advisorTextlower = advisorTextlower .. "[NEWLINE]"; end advisorTextlower = advisorTextlower .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_POSITIVE_AGENDA", selectedCivName); advisorTextlower = advisorTextlower .. "[NEWLINE]"; advisorTextlower = advisorTextlower .. "[ENDCOLOR]"; local advisorTextRaise = "[COLOR_Grey]"; -- advisorTextRaise = advisorTextRaise .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_DENOUNCE_FRIEND", selectedCivName); -- advisorTextRaise = advisorTextRaise .. "[NEWLINE]"; -- advisorTextRaise = advisorTextRaise .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_DECLARE_FRIENDSHIP", selectedCivName); -- advisorTextRaise = advisorTextRaise .. "[NEWLINE]"; advisorTextRaise = advisorTextRaise .. Locale.Lookup("LOC_DIPLOMACY_ADVISOR_NEGATIVE_AGENDA", selectedCivName); advisorTextRaise = advisorTextRaise .. "[NEWLINE]"; advisorTextRaise = advisorTextRaise .. "[ENDCOLOR]"; intelSubPanel.AdvisorTextRaise:SetText(advisorTextlower); intelSubPanel.AdvisorTextLower:SetText(advisorTextRaise); intelSubPanel.Advisor:SetHide(false); intelSubPanel.Background:SetSizeY(m_bottomPanelHeight); intelSubPanel.RelationshipScrollPanel:SetSizeY(m_bottomPanelHeight); rootControl:CalculateSize(); rootControl:ReprocessAnchoring(); intelSubPanel.RelationshipScrollPanel:CalculateSize(); end -- =========================================================================== function OnActivateIntelAccessLevelPanel(rootControl : table) SetSelectedIntelSubPanelButton(INTEL_ACCESS_LEVEL_PANEL, true); ms_IntelAccessLevelPanelIM:ResetInstances(); local intelSubPanel = ms_IntelAccessLevelPanelIM:GetInstance(rootControl); --intelSubPanel.Close:RegisterCallback( Mouse.eLClick, function() OnCloseIntelAccessLevelPanel(rootControl); end ); -- Get the selected player's Diplomactic AI local selectedPlayerDiplomaticAI = ms_SelectedPlayer:GetDiplomaticAI(); local localPlayerDiplomacy = ms_LocalPlayer:GetDiplomacy(); local iAccessLevel = localPlayerDiplomacy:GetVisibilityOn(ms_SelectedPlayerID); -- Get the items that contribute to our access level. local accessContributionText = ""; for row in GameInfo.DiplomaticVisibilitySources () do if (localPlayerDiplomacy:IsVisibilitySourceActive(ms_SelectedPlayerID, row.Index)) then if (row.Description ~= nil) then if (#accessContributionText > 0) then accessContributionText = accessContributionText .. "[NEWLINE]"; end accessContributionText = accessContributionText .. Locale.Lookup(row.Description); end end end if (#accessContributionText > 0) then intelSubPanel.AccessContributionText:SetText(accessContributionText); intelSubPanel.AccessContribution:SetHide(false); else intelSubPanel.AccessContribution:SetHide(true); end -- Access Level button and icon intelSubPanel.AccessLevelText:LocalizeAndSetText(Locale.ToUpper(GameInfo.Visibilities[iAccessLevel].Name)); -- Shift to the correct place in the icon strip, using the vis states. intelSubPanel.AccessLevelIcon:SetVisState( iAccessLevel-1 ); -- Set the information shared string local szInfoSharedText = ""; local iNumAdded = 0; for row in GameInfo.Gossips () do if (row.VisibilityLevel == iAccessLevel) then if (row.Description ~= nil) then if (iNumAdded > 0) then szInfoSharedText = szInfoSharedText .. "[NEWLINE]"; end szInfoSharedText = szInfoSharedText .. " " .. Locale.Lookup(row.Description); iNumAdded = iNumAdded + 1; end end end intelSubPanel.InformationSharedText:SetText(szInfoSharedText); -- Set what we will gain at the next access level local szNextAccessLevelText = ""; iNumAdded = 0; for row in GameInfo.Gossips () do if (row.VisibilityLevel == iAccessLevel + 1) then if (row.Description ~= nil) then if (iNumAdded > 0) then szNextAccessLevelText = szNextAccessLevelText .. "[NEWLINE]"; end szNextAccessLevelText = szNextAccessLevelText .. " " .. Locale.Lookup(row.Description); iNumAdded = iNumAdded + 1; end end end intelSubPanel.NextAccessLevelText:SetText(szNextAccessLevelText); -- Set the advisor icon intelSubPanel.AdvisorIcon:SetTexture(IconManager:FindIconAtlas("ADVISOR_GENERIC", 32)); -- Get the advisor text local advisorText = ""; for row in GameInfo.DiplomaticVisibilitySources () do if (not localPlayerDiplomacy:IsVisibilitySourceActive(ms_SelectedPlayerID, row.Index)) then if (row.ActionDescription ~= nil) then advisorText = advisorText .. Locale.Lookup(row.ActionDescription).."[NEWLINE]"; end end end if (#advisorText > 0) then intelSubPanel.AdvisorText:SetText(advisorText); intelSubPanel.Advisor:SetHide(false); else intelSubPanel.Advisor:SetHide(true); end intelSubPanel.Background:SetSizeY(m_bottomPanelHeight); intelSubPanel.AccessLevelScrollPanel:SetSizeY(m_bottomPanelHeight); rootControl:CalculateSize(); rootControl:ReprocessAnchoring(); intelSubPanel.AccessLevelScrollPanel:CalculateSize(); end -- =========================================================================== function OnActivateIntelGossipHistoryPanel(rootControl : table) SetSelectedIntelSubPanelButton(INTEL_GOSSIP_HISTORY_PANEL, true); m_GossipThisTurnCount = 0; ms_IntelGossipHistoryPanelIM:ResetInstances(); local intelSubPanel = ms_IntelGossipHistoryPanelIM:GetInstance(rootControl); -- Get the selected player's Diplomactic AI local selectedPlayerDiplomaticAI = ms_SelectedPlayer:GetDiplomaticAI(); local localPlayerDiplomacy = ms_LocalPlayer:GetDiplomacy(); ms_IntelGossipHistoryPanelEntryIM:ResetInstances(); local bAddedLastTenTurnsItem = false; local bAddedOlderItem = false; local gossipManager = Game.GetGossipManager(); local iCurrentTurn = Game.GetCurrentGameTurn(); --Only show the gossip generated in the last 100 turns. Otherwise we can end up with a TON of gossip, and everything bogs down. local earliestTurn = iCurrentTurn - 100; local gossipStringTable = gossipManager:GetRecentVisibleGossipStrings(earliestTurn, ms_LocalPlayerID, ms_SelectedPlayerID); for i, currTable:table in pairs(gossipStringTable) do local gossipString = currTable[1]; local gossipTurn = currTable[2]; if (gossipString ~= nil) then local item; if ((iCurrentTurn - gossipTurn) <= 10) then item = ms_IntelGossipHistoryPanelEntryIM:GetInstance(intelSubPanel.LastTenTurnsStack); bAddedLastTenTurnsItem = true; if(iCurrentTurn == gossipTurn) then item.NewIndicator:SetHide(false); m_GossipThisTurnCount = m_GossipThisTurnCount + 1; else item.NewIndicator:SetHide(true); end else item = ms_IntelGossipHistoryPanelEntryIM:GetInstance(intelSubPanel.OlderStack); bAddedOlderItem = true; end if (item ~= nil) then item.GossipText:SetText(gossipString); -- It has already been localized AutoSizeGrid(item:GetTopControl(), item.GossipText,25,37); end else break; end end if (not bAddedLastTenTurnsItem) then local item = ms_IntelGossipHistoryPanelEntryIM:GetInstance(intelSubPanel.LastTenTurnsStack); item.GossipText:LocalizeAndSetText("LOC_DIPLOMACY_GOSSIP_ITEM_NO_RECENT"); item.NewIndicator:SetHide(true); AutoSizeGrid(item:GetTopControl(), item.GossipText,25,37); end if (not bAddedOlderItem) then intelSubPanel.OlderHeader:SetHide(true); else intelSubPanel.OlderHeader:SetHide(false); end intelSubPanel.Background:SetSizeY(m_bottomPanelHeight); intelSubPanel.GossipScrollPanel:SetSizeY(m_bottomPanelHeight); rootControl:CalculateSize(); rootControl:ReprocessAnchoring(); intelSubPanel.GossipScrollPanel:CalculateSize(); end -- =========================================================================== function AutoSizeGrid(gridControl: table, labelControl: table, padding:number, minSize:number) local sizeY: number = labelControl:GetSizeY() + padding; if (sizeY < minSize) then sizeY = minSize; end gridControl:SetSizeY(sizeY); end -- =========================================================================== function AddIntelPanel(rootControl : table) SetSelectedIntelSubPanelButton(INTEL_NO_SUB_PANEL, false); ms_IntelPanelIM:ResetInstances(); if (ms_LocalPlayerID ~= -1 and ms_SelectedPlayerID ~= -1 and ms_LocalPlayerID ~= ms_SelectedPlayerID) then local intelPanel = ms_IntelPanelIM:GetInstance(rootControl); local localPlayerDiplomacy = ms_LocalPlayer:GetDiplomacy(); local iAccessLevel = localPlayerDiplomacy:GetVisibilityOn(ms_SelectedPlayerID); -- Gossip button intelPanel.GossipButton:RegisterCallback( Mouse.eLClick, function() OnActivateIntelGossipHistoryPanel(rootControl); end ); intelPanel.GossipButton:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); SetButtonSelected( intelPanel.GossipButton, true); -- Access Level button and icon intelPanel.AccessLevelText:LocalizeAndSetText(GameInfo.Visibilities[iAccessLevel].Name); -- Shift to the correct place in the icon strip, using the vis states. if( iAccessLevel == 0) then intelPanel.AccessLevelIcon:SetHide(true); else intelPanel.AccessLevelIcon:SetHide(false); intelPanel.AccessLevelIcon:SetVisState( iAccessLevel-1 ); end intelPanel.AccessLevelButton:RegisterCallback( Mouse.eLClick, function() OnActivateIntelAccessLevelPanel(rootControl); end ); intelPanel.AccessLevelButton:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); SetButtonSelected(intelPanel.AccessLevelButton, false); -- Relationship Panel Button if (PlayerConfigurations[ms_SelectedPlayerID]:IsHuman()) then -- Don't show any calculated relationship with a human intelPanel.RelationshipStack:SetHide(true); else intelPanel.RelationshipStack:SetHide(false); intelPanel.RelationshipButton:RegisterCallback( Mouse.eLClick, function() OnActivateIntelRelationshipPanel(rootControl); end ); intelPanel.RelationshipButton:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); SetButtonSelected(intelPanel.RelationshipButton, false); -- Get the selected player's Diplomactic AI local selectedPlayerDiplomaticAI = ms_SelectedPlayer:GetDiplomaticAI(); -- What do they think of us? local iState :number = selectedPlayerDiplomaticAI:GetDiplomaticStateIndex(ms_LocalPlayerID); local relationshipString:string = Locale.Lookup(GameInfo.DiplomaticStates[iState].Name); -- Add team name to relationship text for our own teams if Players[ms_LocalPlayerID]:GetTeam() == Players[ms_SelectedPlayerID]:GetTeam() then relationshipString = "(" .. Locale.Lookup("LOC_WORLD_RANKINGS_TEAM", Players[ms_LocalPlayerID]:GetTeam()) .. ") " .. relationshipString; end intelPanel.RelationshipText:SetText( relationshipString ); if (GameInfo.DiplomaticStates[iState].StateType == "DIPLO_STATE_DENOUNCED") then local szDenounceTooltip; local iRemainingTurns; local iOurDenounceTurn = localPlayerDiplomacy:GetDenounceTurn(ms_SelectedPlayerID); local iTheirDenounceTurn = Players[ms_SelectedPlayerID]:GetDiplomacy():GetDenounceTurn(ms_LocalPlayerID); -- *** REPLACE GOSSIP STRING WHEN POSSIBLE -- SHOULD BE STORED WITH DIPLO STRINGS *** if (iOurDenounceTurn >= iTheirDenounceTurn) then iRemainingTurns = iOurDenounceTurn + GlobalParameters.DIPLOMACY_DENOUNCE_TIME_LIMIT - Game.GetCurrentGameTurn(); szDenounceTooltip = Locale.Lookup("LOC_GOSSIP_DENOUNCED", PlayerConfigurations[ms_LocalPlayerID]:GetCivilizationShortDescription(), PlayerConfigurations[ms_SelectedPlayerID]:GetCivilizationShortDescription()); else iRemainingTurns = iTheirDenounceTurn + GlobalParameters.DIPLOMACY_DENOUNCE_TIME_LIMIT - Game.GetCurrentGameTurn(); szDenounceTooltip = Locale.Lookup("LOC_GOSSIP_DENOUNCED", PlayerConfigurations[ms_SelectedPlayerID]:GetCivilizationShortDescription(), PlayerConfigurations[ms_LocalPlayerID]:GetCivilizationShortDescription()); end szDenounceTooltip = szDenounceTooltip .. " [" .. Locale.Lookup("LOC_ESPIONAGEPOPUP_TURNS_REMAINING", iRemainingTurns) .. "]"; intelPanel.RelationshipText:SetToolTipString(szDenounceTooltip); else intelPanel.RelationshipText:SetToolTipString(nil); end intelPanel.RelationshipIcon:SetVisState(GetVisStateFromDiplomaticState(iState)); -- IF the Diplomacy State is Neutral, hide the icon, otherwise, display. if (GameInfo.DiplomaticStates[iState].Hash == DiplomaticStates.NEUTRAL ) then intelPanel.RelationshipIcon:SetHide(true); else intelPanel.RelationshipIcon:SetHide(false); end intelPanel.RelationshipStack:CalculateSize(); intelPanel.RelationshipStack:ReprocessAnchoring(); end ms_IconOnlyIM:ResetInstances(); intelPanel.AgreementsOuterStack:SetHide(false); intelPanel.AgreementStack:SetHide(false); local AGREEMENT_TYPES: table = {DIPLO_DELEGATION = "DIPLOACTION_DIPLOMATIC_DELEGATION", RESIDENT_EMBASSY = "DIPLOACTION_RESIDENT_EMBASSY", DEFENSIVE_PACT = "DIPLOACTION_DEFENSIVE_PACT", OPEN_BORDERS = "DIPLOACTION_OPEN_BORDERS", RESEARCH_AGREEMENT = "DIPLOACTION_RESEARCH_AGREEMENT", JOINT_WAR = "DIPLOACTION_JOINT_WAR"}; if (localPlayerDiplomacy:HasDelegationAt(ms_SelectedPlayer:GetID())) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.DIPLO_DELEGATION; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLO_MODIFIER_DELEGATION")); end if(localPlayerDiplomacy:HasEmbassyAt(ms_SelectedPlayer:GetID())) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.RESIDENT_EMBASSY; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLO_MODIFIER_RESIDENT_EMBASSY")); end if(localPlayerDiplomacy:HasDefensivePact(ms_SelectedPlayer:GetID())) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.DEFENSIVE_PACT; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLO_MODIFIER_DEFENSIVE_PACT")); end if(localPlayerDiplomacy:HasOpenBordersFrom(ms_SelectedPlayer:GetID())) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.OPEN_BORDERS; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLO_MODIFIER_OPEN_BORDERS")); end if(localPlayerDiplomacy:GetResearchAgreementTech(ms_SelectedPlayer:GetID()) ~= -1) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.RESEARCH_AGREEMENT; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLOACTION_RESEARCH_AGREEMENT_NAME")); print(agreement.Icon:GetSizeX()); print(agreement.Icon:GetSizeY()); end if(localPlayerDiplomacy:IsFightingAnyJointWarWith(ms_SelectedPlayer:GetID())) then local agreement = ms_IconOnlyIM:GetInstance(intelPanel.AgreementStack); local type = AGREEMENT_TYPES.JOINT_WAR; agreement.Icon:SetIcon("ICON_"..type); agreement.Icon:SetToolTipString(Locale.Lookup("LOC_DIPLOACTION_JOINT_WAR_NAME")); end intelPanel.AgreementStack:CalculateSize(); intelPanel.AgreementStack:ReprocessAnchoring(); if(intelPanel.AgreementStack:GetSizeX() == 0) then intelPanel.AgreementsOuterStack:SetHide(true); else intelPanel.AgreementsOuterStack:SetHide(false); end ms_TextOnlyIM:ResetInstances(); if (PlayerConfigurations[ms_SelectedPlayerID]:IsHuman()) then -- Humans don't have agendas, at least ones we can show intelPanel.AgendaOuterStack:SetHide(true); else intelPanel.AgendaOuterStack:SetHide(false); -- What Historical Agenda does the selected player have? local leader:string = PlayerConfigurations[ms_SelectedPlayerID]:GetLeaderTypeName(); local hasHistoricalAgenda = true; if GameInfo.HistoricalAgendas[leader] ~= nil then local agendaType = GameInfo.HistoricalAgendas[leader].AgendaType; local historicalAgenda = ms_TextOnlyIM:GetInstance(intelPanel.AgendaStack); historicalAgenda.Text:LocalizeAndSetText( GameInfo.Agendas[agendaType].Name ); historicalAgenda.Text:LocalizeAndSetToolTip( GameInfo.Agendas[agendaType].Description ); else hasHistoricalAgenda = false; end -- What randomly assigned agendas does the selected player have? -- Determine whether our Diplomatic Visibility allows us to see random agendas local bRevealRandom = false; for row in GameInfo.Visibilities() do if (row.Index <= iAccessLevel and row.RevealAgendas == true) then bRevealRandom = true; end end local kAgendaTypes = {}; kAgendaTypes = ms_SelectedPlayer:GetAgendaTypes(); --GetAgendaTypes() returns ALL of my agendas, including the historical agenda. --To retrieve only the randomly assigned agendas, delete the first entry from the table. table.remove(kAgendaTypes,1); local numRandomAgendas = table.count(kAgendaTypes); if (numRandomAgendas > 0) then if(bRevealRandom) then -- If our visibility allows, display the agendas -- At present, we are displaying ALL random agendas, if we have reached the SECRET level. local bFirst = true; for i, agendaType in ipairs(kAgendaTypes) do local randomAgenda = ms_TextOnlyIM:GetInstance(intelPanel.AgendaStack); randomAgenda.Text:LocalizeAndSetText( GameInfo.Agendas[agendaType].Name ); randomAgenda.Text:LocalizeAndSetToolTip( GameInfo.Agendas[agendaType].Description ); end else --Otherwise, display that how many hidden agendas there are, and incentivize player to gain visibility to see them! local hiddenAgenda = ms_TextOnlyIM:GetInstance(intelPanel.AgendaStack); hiddenAgenda.Text:LocalizeAndSetText("LOC_DIPLOMACY_HIDDEN_AGENDAS",numRandomAgendas, numRandomAgendas>1); hiddenAgenda.Text:LocalizeAndSetToolTip("LOC_DIPLOMACY_HIDDEN_AGENDAS_TT"); end elseif (numRandomAgendas == 0) then local noRandomAgendas = ms_TextOnlyIM:GetInstance(intelPanel.AgendaStack); noRandomAgendas.Text:LocalizeAndSetText("LOC_DIPLOMACY_RANDOM_AGENDA_NONE"); end end -- What Government does the selected player have? local eSelectePlayerGovernment :number = ms_SelectedPlayer:GetCulture():GetCurrentGovernment(); if eSelectePlayerGovernment ~= -1 then intelPanel.GovernmentText:LocalizeAndSetText( GameInfo.Governments[eSelectePlayerGovernment].Name ); else intelPanel.GovernmentText:LocalizeAndSetText( "LOC_GOVERNMENT_ANARCHY_NAME" ); end --Set data for relationship area local selectedPlayerConfig = PlayerConfigurations[ms_SelectedPlayer:GetID()]; local leaderDesc = selectedPlayerConfig:GetLeaderName(); --intelPanel.TheirRelationships:SetText(Locale.Lookup(leaderDesc).."'s Relationships"); ms_RelationshipIconsIM:ResetInstances(); -- Get who the selected player has met local selectedPlayerDiplomacy = ms_SelectedPlayer:GetDiplomacy(); --Does GetPlayersMet necessarily give me the correct thing?... --local aPlayers = selectedPlayerDiplomacy:GetPlayersMet(); local aPlayers = PlayerManager.GetAliveMajors(); for _, pPlayer in ipairs(aPlayers) do if (pPlayer:IsMajor() and pPlayer:GetID() ~= ms_LocalPlayerID and pPlayer:GetID() ~= ms_SelectedPlayer:GetID() and selectedPlayerDiplomacy:HasMet(pPlayer:GetID())) then local playerConfig = PlayerConfigurations[pPlayer:GetID()]; local leaderTypeName = playerConfig:GetLeaderTypeName(); if (leaderTypeName ~= nil) then local relationshipIcon = ms_RelationshipIconsIM:GetInstance(intelPanel.RelationshipsStack); local iPlayerDiploState = pPlayer:GetDiplomaticAI():GetDiplomaticStateIndex(ms_SelectedPlayer:GetID()); relationshipIcon.Status:SetVisState( iPlayerDiploState ); local relationshipState = GameInfo.DiplomaticStates[iPlayerDiploState]; -- No diplo state icon if both players are human, except for the war state if ( ((ms_SelectedPlayer:IsAI() or pPlayer:IsAI()) and relationshipState.Hash ~= DiplomaticStates.NEUTRAL) or IsValidRelationship(relationshipState.StateType)) then relationshipIcon.Status:SetToolTipString(Locale.Lookup(GameInfo.DiplomaticStates[iPlayerDiploState].Name)); end if(localPlayerDiplomacy:HasMet(pPlayer:GetID())) then relationshipIcon.Icon:SetTexture(IconManager:FindIconAtlas("ICON_" .. playerConfig:GetLeaderTypeName(), 32)); -- Tool tip local leaderDesc = playerConfig:GetLeaderName(); relationshipIcon.Background:LocalizeAndSetToolTip("LOC_DIPLOMACY_DEAL_PLAYER_PANEL_TITLE", leaderDesc, playerConfig:GetCivilizationDescription()); -- Show team ribbon for ourselves and civs we've met local teamID:number = playerConfig:GetTeam(); if #Teams[teamID] > 1 then local teamRibbonName:string = TEAM_RIBBON_PREFIX .. tostring(teamID); relationshipIcon.TeamRibbon:SetIcon(teamRibbonName, TEAM_RIBBON_SMALL_SIZE); relationshipIcon.TeamRibbon:SetHide(false); relationshipIcon.TeamRibbon:SetColor(GetTeamColor(teamID)); else -- Hide team ribbon if team only contains one player relationshipIcon.TeamRibbon:SetHide(true); end else -- IF the local player has not met the civ that this civ has a relationship, do not reveal that information through this icon. Instead, set to generic leader and "Unmet Civ" relationshipIcon.Icon:SetTexture(IconManager:FindIconAtlas("ICON_LEADER_DEFAULT", 32)); relationshipIcon.Background:LocalizeAndSetToolTip("LOC_DIPLOPANEL_UNMET_PLAYER"); relationshipIcon.TeamRibbon:SetHide(true); end end end end intelPanel.RelationshipsStack:CalculateSize(); intelPanel.RelationshipsStack:ReprocessAnchoring(); --IF this civ hasn't met anyone but you, hide the relationship stack if ( intelPanel.RelationshipsStack:GetSizeY() == 0) then intelPanel.RelationshipSectionStack:SetHide(true); else intelPanel.RelationshipSectionStack:SetHide(false); end -- Calculate the size of the scrollpanel rootControl:CalculateSize(); rootControl:ReprocessAnchoring(); local _, screenY:number = UIManager:GetScreenSizeVal(); m_bottomPanelHeight = screenY - rootControl:GetSizeY() - PADDING_FOR_SCROLLPANEL; -- Default to showing the Gossip History OnActivateIntelGossipHistoryPanel(rootControl); if (m_GossipThisTurnCount > 0) then intelPanel.GossipText:SetText(Locale.Lookup("LOC_DIPLOMACY_GOSSIP_ITEM_COUNT", m_GossipThisTurnCount)); else intelPanel.GossipText:SetText(Locale.Lookup("LOC_DIPLOMACY_GOSSIP_ITEM_NONE_THIS_TURN")); end end end -- =========================================================================== function PopulatePlayerPanel(rootControl : table, player : table) if (player ~= nil) then AddStatmentOptions(rootControl); AddIntelPanel(rootControl.ContentStack); rootControl.RootStack:CalculateSize(); rootControl.RootStack:ReprocessAnchoring(); end end -- =========================================================================== function PopulatePlayerPanelHeader(rootControl : table, player : table) if (player ~= nil) then local playerConfig = PlayerConfigurations[player:GetID()]; if (playerConfig ~= nil) then -- Set the icon rootControl.LeaderIcon:SetIcon("ICON_" .. playerConfig:GetLeaderTypeName()); -- Set the leader name local leaderDesc = playerConfig:GetLeaderName(); rootControl.PlayerNameText:LocalizeAndSetText( Locale.ToUpper( Locale.Lookup(leaderDesc))); rootControl.CivNameText:LocalizeAndSetText( Locale.ToUpper( Locale.Lookup(playerConfig:GetCivilizationDescription()))); end end end -- =========================================================================== function PopulateLeader(leaderIcon : table, player : table, isUniqueLeader : boolean) if (player ~= nil and player:IsMajor()) then local playerID = player:GetID(); local playerConfig = PlayerConfigurations[playerID]; if (playerConfig ~= nil) then local leaderTypeName = playerConfig:GetLeaderTypeName(); if (leaderTypeName ~= nil) then local iconName = "ICON_" .. leaderTypeName; leaderIcon:UpdateIcon(iconName, playerID, isUniqueLeader); -- Configure button leaderIcon.Controls.SelectButton:SetVoid1(playerID); leaderIcon:RegisterCallback(Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); leaderIcon:RegisterCallback(Mouse.eLClick, OnPlayerSelected); -- Set the score. leaderIcon.Controls.Score:SetText( tostring( player:GetScore() ) ); -- Set the gold per turn local goldYield = player:GetTreasury():GetGoldYield(); if (goldYield > 0) then leaderIcon.Controls.GoldPerTurn:SetText( "(+" .. string.format("%.1f", goldYield) .. " [ICON_Gold])" ); else leaderIcon.Controls.GoldPerTurn:SetText( "(" .. string.format("%.1f", goldYield) .. " [ICON_Gold])" ); end -- The selection background leaderIcon.Controls.SelectedBackground:SetHide(playerID ~= ms_SelectedPlayerID); end end end end -- =========================================================================== function SetConversationMode(player : table) Controls.ConversationContainer:SetHide(false); Controls.LeaderResponse_Alpha:Play(); Controls.ConversationSelection_Alpha:Play(); Controls.LeaderResponse_Slide:Play(); Controls.ConversationSelection_Slide:Play(); Controls.OverviewContainer:SetHide(true); ms_currentViewMode = CONVERSATION_MODE; end -- =========================================================================== -- Centers scroll panel (if possible) on a specfic type. -- =========================================================================== function ScrollToNode( playerID:number ) local percent:number = 0; local scrollHeight = ms_DiplomacyRibbon.LeaderRibbonScroll:GetSizeY(); if (m_LeaderCoordinates ~= nil) and (m_LeaderCoordinates[playerID] ~= nil) then local y = m_LeaderCoordinates[playerID] - ( scrollHeight * 0.4); local size = (scrollHeight / ms_DiplomacyRibbon.LeaderRibbonScroll:GetRatio()) - scrollHeight; percent = math.clamp( y / size, 0, 1); end ms_DiplomacyRibbon.LeaderRibbonScroll:SetScrollValue(percent); end -- =========================================================================== function SelectPlayer(playerID, mode, refresh, allowDeadPlayer) if (mode == nil) then mode = ms_currentViewMode; end if (refresh == nil) then refresh = false; end if (allowDeadPlayer == nil) then allowDeadPlayer = false; end local isDifferentPlayer = false; if (ms_SelectedPlayerID ~= playerID or mode ~= ms_currentViewMode or refresh == true) then isDifferentPlayer = true; -- Deselect them in the ribbon if (ms_SelectedPlayerID ~= -1) then local ribbonEntry = ms_LeaderIDToRibbonEntry[ms_SelectedPlayerID]; if (ribbonEntry ~= nil) then ribbonEntry.SelectedBackground:SetHide( true ); end end if (m_firstOpened == false) then if (ms_SelectedPlayerID == playerID) then isDifferentPlayer = false; end end ms_SelectedPlayerID = playerID; UpdateSelectedPlayer(allowDeadPlayer); -- Make sure it is valid if (ms_SelectedPlayerID ~= -1) then local ribbonEntry = ms_LeaderIDToRibbonEntry[ms_SelectedPlayerID]; if (ribbonEntry ~= nil) then -- can select a dead player, so check for nil ribbonEntry.SelectedBackground:SetHide( false ); end if(ms_SelectedPlayerID ~= ms_LocalPlayerID) then PopulatePlayerPanelHeader(ms_PlayerPanel, ms_SelectedPlayer); PopulatePlayerPanel(ms_PlayerPanel, ms_SelectedPlayer); end Controls.LeaderAnchor:SetHide(false); -- If we are switching from one mode into another, show and hide the appropriate controls/ set the appropriate data if (ms_currentViewMode ~= mode or refresh) then if (mode == CONVERSATION_MODE) then SetConversationMode(ms_SelectedPlayer); elseif (mode == CINEMA_MODE) then -- If we are switching into CINEMA_MODE.. we have to wait to update our displays until AFTER the fade-down. -- FadeTimeAnim has an end callback registered to function "ToggleCinemaMode" if (ContextPtr:IsHidden()) then -- Unless the context is hidden, in which case we will go directly into cinema mode when the context is showm m_cinemaMode = true; else StartFadeOut(); end elseif (mode == OVERVIEW_MODE) then Controls.ConversationContainer:SetHide(true); Controls.OverviewContainer:SetHide(false); Controls.VoiceoverTextContainer:SetHide(true); if (not m_firstOpened) then Controls.AlphaIn:SetSpeed(3); Controls.SlideIn:SetSpeed(3); Controls.AlphaIn:SetPauseTime(0); Controls.SlideIn:SetPauseTime(0); Controls.SlideIn:SetBeginVal(-20,0); end Controls.AlphaIn:SetToBeginning(); Controls.SlideIn:SetToBeginning(); Controls.AlphaIn:Play(); Controls.SlideIn:Play(); UI.PlaySound("UI_Diplomacy_Open_Long"); end ms_currentViewMode = mode; end ShowLeader(ms_SelectedPlayer); end end if (isDifferentPlayer and ms_SelectedPlayerID ~= ms_LocalPlayerID) then LuaEvents.DiploScene_LeaderSelect(playerID); end m_firstOpened = false; local w,h = UIManager:GetScreenSizeVal(); -- Set up special display if the player is YOU if(ms_SelectedPlayerID == ms_LocalPlayerID) then Controls.NameFade:SetHide(false); local playerConfig = PlayerConfigurations[ms_LocalPlayerID]; if (playerConfig ~= nil) then -- Set the leader name Controls.NameFade:SetToBeginning(); Controls.NameFade:Play(); Controls.NameSlide:SetToBeginning(); Controls.NameSlide:Play(); local leaderDesc = playerConfig:GetLeaderName(); Controls.PlayerNameText:LocalizeAndSetText( Locale.ToUpper( Locale.Lookup(leaderDesc))); Controls.CivNameText:LocalizeAndSetText( Locale.ToUpper( Locale.Lookup(playerConfig:GetCivilizationDescription()))); SetUniqueCivLeaderData(); end Controls.PlayerContainer:SetHide(true); --Controls.LeaderAnchor:SetOffsetX(w - (w/2.5)); UI.SetLeaderPosition(Controls.LeaderAnchor:GetScreenOffset()); LuaEvents.DiploScene_CinemaSequence(ms_SelectedPlayerID); else Controls.NameFade:SetHide(true); Controls.PlayerContainer:SetHide(false); Controls.LeaderAnchor:SetOffsetX(w - (w/3.5)); UI.SetLeaderPosition(Controls.LeaderAnchor:GetScreenOffset()); end end function SetUniqueCivLeaderData() -- Obtain "uniques" from Civilization and for the chosen leader ms_uniqueIconIM:ResetInstances(); ms_uniqueTextIM:ResetInstances(); local playerConfig :table = PlayerConfigurations[ms_LocalPlayerID]; local civType :string = playerConfig:GetCivilizationTypeName(); local leaderType :string = playerConfig:GetLeaderTypeName(); local uniqueAbilities; local uniqueUnits; local uniqueBuildings; uniqueAbilities, uniqueUnits, uniqueBuildings = GetLeaderUniqueTraits( leaderType ); local CivUniqueAbilities, CivUniqueUnits, CivUniqueBuildings = GetCivilizationUniqueTraits( civType ); -- Merge tables for i,v in ipairs(CivUniqueAbilities) do table.insert(uniqueAbilities, v) end for i,v in ipairs(CivUniqueUnits) do table.insert(uniqueUnits, v) end for i,v in ipairs(CivUniqueBuildings) do table.insert(uniqueBuildings, v) end -- Generate content for _, item in ipairs(uniqueAbilities) do local instance:table = {}; instance = ms_uniqueTextIM:GetInstance(); local headerText:string = Locale.ToUpper(Locale.Lookup( item.Name )); instance.Header:SetText( headerText ); instance.Description:SetText( Locale.Lookup( item.Description ) ); end local size:number = SIZE_BUILDING_ICON; for _, item in ipairs(uniqueUnits) do local instance:table = {}; instance = ms_uniqueIconIM:GetInstance(); iconAtlas = "ICON_"..item.Type; instance.Icon:SetIcon(iconAtlas); instance.TextStack:SetOffsetX( size + 4 ); local headerText:string = Locale.ToUpper(Locale.Lookup( item.Name )); instance.Header:SetText( headerText ); instance.Description:SetText(Locale.Lookup(item.Description)); end for _, item in ipairs(uniqueBuildings) do local instance:table = {}; instance = ms_uniqueIconIM:GetInstance(); instance.Icon:SetSizeVal(38,38); iconAtlas = "ICON_"..item.Type; instance.Icon:SetIcon(iconAtlas); instance.TextStack:SetOffsetX( size + 4 ); local headerText:string = Locale.ToUpper(Locale.Lookup( item.Name )); instance.Header:SetText( headerText ); instance.Description:SetText(Locale.Lookup(item.Description)); end Controls.UniqueInfoStack:CalculateSize(); Controls.UniqueInfoStack:ReprocessAnchoring(); end -- =========================================================================== function OnPlayerSelected(playerID) if (HasCapability("CAPABILITY_DIPLOMACY") or (playerID == Game.GetLocalPlayer() and HasCapability("CAPABILITY_DIPLOMACY_VIEW_SELF"))) then ResetPlayerPanel(); SelectPlayer(playerID); end end -- =========================================================================== function PopulateDiplomacyRibbon(diplomacyRibbon : table) if (ms_LocalPlayer ~= nil) then local pLocalPlayerDiplomacy = ms_LocalPlayer:GetDiplomacy(); ms_DiplomacyRibbonLeaderIM:ResetInstances(); ms_LeaderIDToRibbonEntry = {}; local currentCoordinateY = 32; local coordinateOffsetIncrement = 64; -- Set the advisor icon -- diplomacyRibbon.Advisor:SetTexture(IconManager:FindIconAtlas("ADVISOR_GENERIC", 48)); -- Add an entry for the local player at the top local leaderIcon, leaderInstance = LeaderIcon:GetInstance(ms_DiplomacyRibbonLeaderIM, diplomacyRibbon.Leaders); ms_LeaderIDToRibbonEntry[ms_LocalPlayerID] = leaderInstance; PopulateLeader(leaderIcon, ms_LocalPlayer); --Then, let's do a check to see if any of these players are duplicate leaders and track it. -- Must go through entire list to detect duplicates (would be lovely if we had an IsUnique from PlayerConfigurations) local isUniqueLeader: table = {}; local aPlayers = PlayerManager.GetAliveMajors(); for _, pPlayer in ipairs(aPlayers) do local playerID:number = pPlayer:GetID(); if(playerID ~= ms_LocalPlayer) then local leaderName:string = PlayerConfigurations[playerID]:GetLeaderTypeName(); if (isUniqueLeader[leaderName] == nil) then isUniqueLeader[leaderName] = true; else isUniqueLeader[leaderName] = false; end end end -- Add entries for everyone we know (Majors only) local aPlayers = PlayerManager.GetAliveMajors(); for _, pPlayer in ipairs(aPlayers) do if (pPlayer:GetID() ~= ms_LocalPlayerID and pLocalPlayerDiplomacy:HasMet(pPlayer:GetID())) then local leaderIcon, leaderInstance = LeaderIcon:GetInstance(ms_DiplomacyRibbonLeaderIM, diplomacyRibbon.Leaders); ms_LeaderIDToRibbonEntry[pPlayer:GetID()] = leaderInstance; -- Save the current coordinate in the scrollpanel so that we can autoscroll to this point later m_LeaderCoordinates[pPlayer:GetID()] = currentCoordinateY; currentCoordinateY = currentCoordinateY + coordinateOffsetIncrement; local leaderName:string = PlayerConfigurations[pPlayer:GetID()]:GetLeaderTypeName(); if(isUniqueLeader[leaderName] ~= nil) then PopulateLeader(leaderIcon, pPlayer, isUniqueLeader[leaderName]); else PopulateLeader(leaderIcon, pPlayer); end end end -- Rebuild the stack diplomacyRibbon.Leaders:CalculateSize(); diplomacyRibbon.Leaders:ReprocessAnchoring(); diplomacyRibbon.LeaderRibbonScroll:CalculateSize(); diplomacyRibbon.Root:ReprocessAnchoring(); -- Offset the diplomacy ribbon to accomodate the scrollbar if not all the leaders fit if(diplomacyRibbon.Leaders:GetSizeY() > diplomacyRibbon.LeaderRibbonScroll:GetSizeY()) then diplomacyRibbon.Root:SetOffsetX(15); end local offsetX = DIPLOMACY_RIBBON_OFFSET + diplomacyRibbon.Root:GetOffsetX(); Controls.PlayerContainer:SetOffsetX(offsetX); Controls.NameFade:SetOffsetX(offsetX); --Controls.OverviewContainer:SetOffsetX(offsetX); end end -- =========================================================================== -- Setup the players involved in the view. -- =========================================================================== function SetupPlayers() -- Set up some globals for easy access -- Store the local player. Note, we do this every time we are shown, the local player can change, so don't do it in the one time constructor. ms_LocalPlayerID = Game.GetLocalPlayer(); if (ms_LocalPlayerID == -1) then ms_LocalPlayerID = Game.GetLocalObserver(); if (ms_LocalPlayerID == -1) then ms_LocalPlayer = nil return false; end if (ms_LocalPlayerID == PlayerTypes.OBSERVER) then ms_LocalPlayerID = 0; ms_LocalPlayerLeaderID = -1; end else ms_LocalPlayerLeaderID = PlayerConfigurations[ms_LocalPlayerID]:GetLeaderTypeID(); end ms_LocalPlayer = Players[ms_LocalPlayerID]; if (ms_OtherPlayerID ~= -1) then ms_OtherPlayer = Players[ms_OtherPlayerID]; local sessionID = DiplomacyManager.FindOpenSessionID(ms_LocalPlayerID, ms_OtherPlayer:GetID()); if (sessionID ~= nil) then local sessionInfo = DiplomacyManager.GetSessionInfo(sessionID); ms_InitiatedByPlayerID = sessionInfo.FromPlayer; end else ms_OtherPlayer = nil; ms_InitiatedByPlayerID = ms_LocalPlayerID; end -- Did the AI start this or the human? if (ms_InitiatedByPlayerID == ms_OtherPlayerID) then -- Controls.RefuseDeal:LocalizeAndSetText("LOC_DIPLOMACY_DEAL_REFUSE_DEAL"); ms_LastIncomingDealProposalAction = DealProposalAction.PROPOSED; else -- Controls.RefuseDeal:LocalizeAndSetText("LOC_DIPLOMACY_DEAL_EXIT_DEAL"); ms_LastIncomingDealProposalAction = DealProposalAction.PENDING; end return true; end -- =========================================================================== -- Show a specific leader. -- This is asynchronous, and event will be sent when the leader has finished loading -- =========================================================================== function ShowLeader(player : table ) local leaderName = PlayerConfigurations[ player:GetID() ]:GetLeaderTypeName(); if (leaderName ~= ms_showingLeaderName) then ms_showingLeaderName = leaderName; ms_LastDealResponseAnimation = nil; ms_bLeaderShowRequested = true; Events.ShowLeaderScreen(leaderName); -- TODO: unhide after we know there is a valid image -KS Controls.FallbackLeaderImage:SetHide(true); -- Hide until we are loaded Controls.LeaderAlpha:SetToBeginning(); Controls.LeaderAlpha:Play(); else if (not ms_bLeaderShowRequested) then -- Already showing the leader, just call the completion callback directly. -- We need to do this because we may want to change the animation for -- cases where we have two different civs using the same leader. LeaderSupport_ClearInitialAnimationState(); OnLeaderLoaded(); end end end -- =========================================================================== function InitializeView() if (not ms_bIsViewInitialized) then Events.LeaderScreenFinishedLoading.Add( OnLeaderLoaded ); Events.LeaderAnimationComplete.Add( OnLeaderAnimationComplete ); LeaderSupport_Initialize(); -- Attach the control that will show the leader. UI.SetLeaderImageControl( Controls.FallbackLeaderImage ); local w,h = UIManager:GetScreenSizeVal(); Controls.LeaderAnchor:SetOffsetX(w - (w/4)); Controls.LeaderAnchor:SetOffsetY(h/2); --make sure this stays screen_height/2 so film gate matches camera from animators UI.SetLeaderPosition(Controls.LeaderAnchor:GetScreenOffset()); LuaEvents.DiplomacyActionView_HideIngameUI(); ms_bIsViewInitialized = true; end end -- =========================================================================== function UninitializeView() if (ms_bIsViewInitialized) then ContextPtr:SetHide(true); LuaEvents.DiplomacyActionView_ShowIngameUI(); if (LeaderSupport_IsLeaderVisible() or ms_bLeaderShowRequested) then Events.HideLeaderScreen(); end ms_LastDealResponseAnimation = nil; ms_bLeaderShowRequested = false; ms_bIsViewInitialized = false; ms_bShowingDeal = false; ms_ActiveSessionID = nil; ms_currentViewMode = -1; m_cinemaMode = false; ms_OtherPlayer = nil; ms_OtherPlayerID = -1; ms_SelectedPlayer = nil; ms_SelectedPlayerID = -1; ms_SelectedPlayerLeaderTypeName = nil; ms_showingLeaderName = ""; ms_bLeaderShowRequested = false; Controls.LeaderResponse_Alpha:SetToBeginning(); Controls.ConversationSelection_Alpha:SetToBeginning(); Controls.LeaderResponse_Slide:SetToBeginning(); Controls.ConversationSelection_Slide:SetToBeginning(); Controls.AlphaIn:SetSpeed(2); Controls.SlideIn:SetSpeed(2); Controls.AlphaIn:SetPauseTime(.4); Controls.SlideIn:SetPauseTime(.4); Controls.SlideIn:SetBeginVal(-200,0); end end -- =========================================================================== -- Handle a request to be shown, this should only be called by -- the diplomacy statement handler. -- =========================================================================== function OnOpenDiplomacyActionView(otherPlayerID) if (HasCapability("CAPABILITY_DIPLOMACY") or (otherPlayerID == Game.GetLocalPlayer() and HasCapability("CAPABILITY_DIPLOMACY_VIEW_SELF"))) then if (otherPlayerID ~= nil) then ms_OtherPlayerID = otherPlayerID; ms_SelectedPlayerID = otherPlayerID; else ms_OtherPlayerID = -1; ms_SelectedPlayerID = -1; end InitializeView(); m_firstOpened = true; if (SetupPlayers()) then PopulateDiplomacyRibbon(ms_DiplomacyRibbon); if (ms_OtherPlayer ~= nil) then SelectPlayer(ms_OtherPlayer:GetID(), OVERVIEW_MODE); else SelectPlayer(ms_LocalPlayer:GetID(), OVERVIEW_MODE); end if(ms_OtherPlayerID ~= 0) then ScrollToNode(ms_OtherPlayerID); else ms_DiplomacyRibbon.LeaderRibbonScroll:SetScrollValue(0); end end end end -- =========================================================================== function OnLeaderAnimationComplete(animationName : string) -- Getting this a little late? if (not ms_bIsViewInitialized) then return; end LeaderSupport_UpdateAnimationQueue(); for _, voiceoverAnimationName in ipairs(VOICEOVER_SUPPORT) do if (voiceoverAnimationName == animationName) then StartFadeOut(); break; end end end -- =========================================================================== function OnSetDealAnimation(animationName : string, useMood : boolean) if (ms_currentViewMode == DEAL_MODE) then if (useMood ~= nil and useMood == true) then local ePlayerMood = DiplomacySupport_GetPlayerMood(ms_SelectedPlayer, ms_LocalPlayerID); if (ePlayerMood == DiplomacyMoodTypes.HAPPY) then animationName = "HAPPY_" .. animationName; elseif (ePlayerMood == DiplomacyMoodTypes.NEUTRAL) then animationName = "NEUTRAL_" .. animationName; elseif (ePlayerMood == DiplomacyMoodTypes.UNHAPPY) then animationName = "UNHAPPY_" .. animationName; end end LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, animationName ); end end -- =========================================================================== function ShowCinemaMode() local w,h = UIManager:GetScreenSizeVal(); Controls.ConversationContainer:SetHide(m_cinemaMode); if (not Controls.BlackFadeAnim:IsReversing()) then -- If we faded to black, then we can 'pop' the next animation. LeaderSupport_ClearInitialAnimationState(); end -- Set the special display of the LeaderScene. Controls.LeaderAnchor:SetOffsetX(w - (w/2.5)); UI.SetLeaderPosition(Controls.LeaderAnchor:GetScreenOffset()); local ePlayerMood = DiplomacySupport_GetPlayerMood(ms_SelectedPlayer, ms_LocalPlayerID); LeaderSupport_QueueAnimationSequence( ms_OtherLeaderName, m_currentLeaderAnim, ePlayerMood ); LeaderSupport_QueueSceneEffect( m_currentSceneEffect ); LuaEvents.DiploScene_CinemaSequence(ms_SelectedPlayerID); Controls.OverviewContainer:SetHide(true); Controls.VoiceoverTextContainer:SetHide(false); Controls.VoiceoverText:SetText(m_voiceoverText); Controls.VoiceoverText:ReprocessAnchoring(); Controls.VoiceoverGrid:ReprocessAnchoring(); Controls.VoiceoverText_Alpha:SetToBeginning(); Controls.VoiceoverText_Alpha:Play(); Controls.VoiceoverText_Slide:SetToBeginning(); Controls.VoiceoverText_Slide:Play(); end -- =========================================================================== function ToggleCinemaMode() if (m_bCloseSessionOnFadeComplete == true) then -- We are fading to close m_bCloseSessionOnFadeComplete = false; m_cinemaMode = false; DiplomacyManager.CloseSession( ms_ActiveSessionID ); else m_cinemaMode = not m_cinemaMode; local w,h = UIManager:GetScreenSizeVal(); Controls.ConversationContainer:SetHide(m_cinemaMode); if (not Controls.BlackFadeAnim:IsReversing()) then -- If we faded to black, then we can 'pop' the next animation. LeaderSupport_ClearInitialAnimationState(); end -- If we are switching INTO Cinema Mode, send up the appropriate event for the Parallax movement and show the subtitles if (m_cinemaMode) then ShowCinemaMode(); -- If we are OUT OF CinemaMode to normal mode, set the idle animations appropriately else Controls.LeaderAnchor:SetOffsetX(w - (w/3)); UI.SetLeaderPosition(Controls.LeaderAnchor:GetScreenOffset()); SelectPlayer(ms_OtherPlayerID, CONVERSATION_MODE, false, true); Controls.VoiceoverTextContainer:SetHide(true); local ePlayerMood = DiplomacySupport_GetPlayerMood(ms_SelectedPlayer, ms_LocalPlayerID); -- What do they think of us? if (ePlayerMood == DiplomacyMoodTypes.HAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "HAPPY_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.NEUTRAL) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "NEUTRAL_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.UNHAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "UNHAPPY_IDLE" ); end end Controls.BlackFadeAnim:Reverse(); end end Controls.FadeTimerAnim:RegisterEndCallback(ToggleCinemaMode); -- =========================================================================== function OnBlackFadeEnd() if (Controls.BlackFadeAnim:GetAlpha() == 0) then -- If the alpha is 0 at the end of the fade, hide the control! Controls.BlackFade:SetHide(true); end end Controls.BlackFadeAnim:RegisterEndCallback(OnBlackFadeEnd); -- =========================================================================== function OnLeaderLoaded() ms_bLeaderShowRequested = false; -- Getting this a little late? if (not ms_bIsViewInitialized) then return; end LeaderSupport_OnLeaderLoaded(); local bDoAudio = false; -- The leader has loaded, show the screen if (ContextPtr:IsHidden()) then ContextPtr:SetHide(false); bDoAudio = true; m_lastLeaderPlayedMusicFor = -1; end Controls.FallbackLeaderImage:SetHide(false); if (ms_ActiveSessionID == nil) then bDoAudio = true; local ePlayerMood = DiplomacySupport_GetPlayerMood(ms_SelectedPlayer, ms_LocalPlayerID); -- What do they think of us? if (ePlayerMood == DiplomacyMoodTypes.HAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "HAPPY_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.NEUTRAL) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "NEUTRAL_IDLE" ); elseif (ePlayerMood == DiplomacyMoodTypes.UNHAPPY) then LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, "UNHAPPY_IDLE" ); end end if (bDoAudio == true) then -- if current civ is unknown, give mods a chance to handle it if (UI.GetCivilizationSoundSwitchValueByLeader(ms_LocalPlayerLeaderID) == -1) then UI.PauseModCivMusic(); end -- if leader IDs don't match if (m_lastLeaderPlayedMusicFor ~= ms_OtherLeaderID) then -- stop modder civ's leader music if necessary if (m_lastLeaderPlayedMusicFor ~= -1) then UI.StopModCivLeaderMusic(m_lastLeaderPlayedMusicFor); end -- and Wwise IDs don't match if (UI.GetCivilizationSoundSwitchValueByLeader(m_lastLeaderPlayedMusicFor) ~= UI.GetCivilizationSoundSwitchValueByLeader(ms_OtherLeaderID)) then -- if new leader is also a modder civ, take care of that UI.SetSoundSwitchValue("LEADER_SCREEN_CIVILIZATION", UI.GetCivilizationSoundSwitchValueByLeader(ms_OtherLeaderID)); UI.SetSoundSwitchValue("Game_Location", UI.GetNormalEraSoundSwitchValue(ms_OtherID)); UI.SetSoundStateValue("Game_Views", "Leader_Screen"); UI.PlaySound("Play_Leader_Music"); m_lastLeaderPlayedMusicFor = ms_OtherLeaderID; end -- always restart modder music if the leader IDs don't match if (UI.GetCivilizationSoundSwitchValueByLeader(ms_OtherLeaderID) == -1) then UI.PlayModCivLeaderMusic(ms_OtherID); m_lastLeaderPlayedMusicFor = ms_OtherID; end end end end -- =========================================================================== function GetStatementHandler(statementTypeName : string) local handler = StatementHandlers[statementTypeName]; if (handler == nil) then handler = DefaultHandlers; end return handler; end -- =========================================================================== function OnDiplomacyMakePeace(eActingPlayer :number, eReactingPlayer :number) local localPlayer = Game.GetLocalPlayer(); if(ms_SelectedPlayerID ~= -1 and (localPlayer == eActingPlayer or localPlayer == eReactingPlayer) and (ms_SelectedPlayerID == eActingPlayer or ms_SelectedPlayerID == eReactingPlayer)) then -- The local player just made peace with the selected player, refresh the player panel so the options are updated. PopulatePlayerPanelHeader(ms_PlayerPanel, ms_SelectedPlayer); PopulatePlayerPanel(ms_PlayerPanel, ms_SelectedPlayer); end end ------------------------------------------------------------------------------ function HasNextQueuedSession(sessionID) if (ms_ActiveSessionID ~= nil and ms_ActiveSessionID == sessionID and not m_isInHotload) then if (ms_InitiatedByPlayerID == ms_OtherPlayerID) then -- The other player initiated contact, just exit if (DiplomacyManager.HasQueuedSession(ms_LocalPlayerID)) then return true; end end end return false; end ------------------------------------------------------------------------------ function OnDiplomacySessionClosed(sessionID) -- Getting this a little late? if (not ms_bIsViewInitialized) then ms_ActiveSessionID = nil; return; end if (ms_ActiveSessionID ~= nil) then if ( ms_ActiveSessionID == sessionID and not m_isInHotload) then ms_ActiveSessionID = nil; if (ms_currentViewMode == DEAL_MODE) then LuaEvents.DiploPopup_HideDeal(); ms_bShowingDeal = false; end if (ms_InitiatedByPlayerID == ms_OtherPlayerID) then -- The other player initiated contact, just exit Close(); else -- The local player started the diplo, go back to the overview. SelectPlayer(ms_OtherPlayerID, OVERVIEW_MODE); PopulateDiplomacyRibbon(ms_DiplomacyRibbon); end end else -- Got a session closed, but we are not in a session. We may want to refresh the overview screen, the closed session could have been the human sending a diplo request to another human if (ms_currentViewMode == OVERVIEW_MODE) then local sessionInfo = DiplomacyManager.GetSessionInfo(sessionID); if (sessionInfo ~= nil) then if (sessionInfo.FromPlayer == Game.GetLocalPlayer() or sessionInfo.ToPlayer == Game.GetLocalPlayer()) then SelectPlayer(ms_SelectedPlayerID, OVERVIEW_MODE, true); end end PopulateDiplomacyRibbon(ms_DiplomacyRibbon); end end -- Hotload hack if m_isInHotload then if ms_OtherPlayerID then -- OnTalkToLeader( ms_OtherPlayerID ); end m_isInHotload = false; end end ------------------------------------------------------------------------------- StatementHandlers = {} function SetDefaultHandlers(forStatement) StatementHandlers[forStatement] = {}; StatementHandlers[forStatement].ExtractStatement = DiplomacySupport_ExtractStatement; StatementHandlers[forStatement].ParseStatement = DiplomacySupport_ParseStatement; StatementHandlers[forStatement].ParseStatementSelection = DiplomacySupport_ParseStatementSelection; StatementHandlers[forStatement].RemoveInvalidSelections = DiplomacySupport_RemoveInvalidSelections; StatementHandlers[forStatement].ApplyStatement = ApplyStatement; StatementHandlers[forStatement].OnSelectionButtonClicked = OnSelectConversationDiplomacyStatement; end SetDefaultHandlers("DEFAULT"); DefaultHandlers = StatementHandlers["DEFAULT"]; ------------------------------------------------------------------------------- function MakeDeal_ApplyStatement(handler : table, statementTypeName : string, statementSubTypeName : string, toPlayer : number, kStatement : table) -- Initial statement or the ackknowledgement of the initial statement? if ((kStatement.DealAction == DealProposalAction.ADJUSTED and not ms_bShowingDeal) or (statementSubTypeName == "NONE" and (kStatement.ResponseType == DiplomacyResponseTypes.INITIAL or kStatement.ResponseType == DiplomacyResponseTypes.ACKNOWLEDGE or not ms_bShowingDeal))) then ApplyStatement(handler, statementTypeName, statementSubTypeName, toPlayer, kStatement); -- Need to hide anything on this screen, except the background Controls.ConversationContainer:SetHide(true); Controls.OverviewContainer:SetHide(true); LuaEvents.DiploPopup_ShowMakeDeal(ms_OtherPlayerID); ms_bShowingDeal = true; UI.PlaySound("UI_Diplomacy_Menu_Change"); elseif (kStatement.RespondingToDealAction ~= DealProposalAction.EQUALIZE and kStatement.RespondingToDealAction ~= DealProposalAction.INSPECT and (statementSubTypeName == "HUMAN_ACCEPT_DEAL" or statementSubTypeName == "HUMAN_REFUSE_DEAL" or statementSubTypeName == "AI_ACCEPT_DEAL" or statementSubTypeName == "AI_REFUSE_DEAL")) then -- Coming back from the deal screen LuaEvents.DiploPopup_HideDeal(); ms_bShowingDeal = false; if (ms_ActiveSessionID ~= nil) then if (ms_OtherPlayerID ~= -1 and Players[ms_OtherPlayerID]:IsHuman()) then -- Close the session, this will handle exiting back to OVERVIEW_MODE DiplomacyManager.CloseSession( ms_ActiveSessionID ); else Controls.ConversationContainer:SetHide(false); if (ms_currentViewMode ~= CONVERSATION_MODE) then SetConversationMode(ms_SelectedPlayer); end ApplyStatement(handler, statementTypeName, statementSubTypeName, toPlayer, kStatement); end else -- No session for some reason, just go directly back. Controls.OverviewContainer:SetHide(false); SelectPlayer(ms_OtherPlayerID, OVERVIEW_MODE); end else -- Other actions just update the deal action. This is especially true from the AI. The AI will send, ACCEPT, REJECT, etc. -- as the automatic evaluation of the deal occurs. local eFromPlayerMood = GetStatementMood( kStatement.FromPlayer, kStatement.FromPlayerMood); local kParsedStatement = handler.ExtractStatement(handler, statementTypeName, statementSubTypeName, kStatement.FromPlayer, eFromPlayerMood, kStatement.Initiator); if (kParsedStatement.LeaderAnimation ~= nil) then local bPlay = true; -- Was the a response for an EQUALIZE/INSPECT? if (kStatement.RespondingToDealAction == DealProposalAction.EQUALIZE or kStatement.RespondingToDealAction == DealProposalAction.INSPECT) then -- We don't want to repeat the last animation if (ms_LastDealResponseAnimation ~= nil and kParsedStatement.LeaderAnimation == ms_LastDealResponseAnimation) then bPlay = false; end end if (bPlay == true) then ms_LastDealResponseAnimation = kParsedStatement.LeaderAnimation; LeaderSupport_QueueAnimationSequence( ms_SelectedPlayerLeaderTypeName, kParsedStatement.LeaderAnimation ); end end local leaderstr = Locale.Lookup( DiplomacyManager.FindTextKey( kParsedStatement.StatementText, kStatement.FromPlayer, kStatement.FromMood, toPlayer)); LuaEvents.DiploPopup_DealUpdated(ms_OtherPlayerID, kStatement.DealAction, leaderstr); end end ------------------------------------------------------------------------------- function MakeDeal_TestValid(sessionID, otherPlayer) if (sessionID ~= nil) then local sessionInfo = DiplomacyManager.GetSessionInfo(sessionID); if (sessionInfo.FromPlayer == otherPlayer) then local pDeal = DealManager.GetWorkingDeal(DealDirection.INCOMING, Game.GetLocalPlayer(), otherPlayer); if (pDeal == nil or pDeal:GetItemCount() == 0 or not pDeal:IsValid()) then -- Invalid session return false; end end end return true; end SetDefaultHandlers("MAKE_DEAL"); StatementHandlers["MAKE_DEAL"].ApplyStatement = MakeDeal_ApplyStatement; StatementHandlers["MAKE_DEAL"].TestValid = MakeDeal_TestValid; ------------------------------------------------------------------------------- function MakeDemand_ApplyStatement(handler : table, statementTypeName : string, statementSubTypeName : string, toPlayer : number, kStatement : table) ms_currentViewMode = DEAL_MODE; if (statementSubTypeName == "NONE" and (kStatement.ResponseType == DiplomacyResponseTypes.INITIAL or kStatement.ResponseType == DiplomacyResponseTypes.ACKNOWLEDGE or not ms_bShowingDeal)) then ApplyStatement(handler, statementTypeName, statementSubTypeName, toPlayer, kStatement); -- Need to hide anything on this screen, except the background Controls.ConversationContainer:SetHide(true); Controls.OverviewContainer:SetHide(true); LuaEvents.DiploPopup_ShowMakeDemand(ms_OtherPlayerID); ms_bShowingDeal = true; UI.PlaySound("UI_Diplomacy_Menu_Change"); elseif (statementSubTypeName == "HUMAN_ACCEPT_DEAL" or statementSubTypeName == "HUMAN_REFUSE_DEAL" or statementSubTypeName == "AI_ACCEPT_DEAL" or statementSubTypeName == "AI_REFUSE_DEAL") then LuaEvents.DiploPopup_HideDeal(); ms_bShowingDeal = false; if (ms_ActiveSessionID ~= nil) then if (ms_OtherPlayerID ~= -1 and Players[ms_OtherPlayerID]:IsHuman()) then -- Close the session, this will handle exiting back to OVERVIEW_MODE DiplomacyManager.CloseSession( ms_ActiveSessionID ); else Controls.ConversationContainer:SetHide(false); if (ms_currentViewMode ~= CONVERSATION_MODE) then SetConversationMode(ms_SelectedPlayer); end ApplyStatement(handler, statementTypeName, statementSubTypeName, toPlayer, kStatement); end else -- No session for some reason, just go directly back. Controls.OverviewContainer:SetHide(false); SelectPlayer(ms_OtherPlayerID, OVERVIEW_MODE); end end end SetDefaultHandlers("MAKE_DEMAND"); StatementHandlers["MAKE_DEMAND"].ApplyStatement = MakeDemand_ApplyStatement; -- =========================================================================== function OnTalkToLeader( playerID : number ) OnOpenDiplomacyActionView( playerID ); end -- =========================================================================== function HandleESC() if (ms_currentViewMode == CONVERSATION_MODE) then if (ms_ActiveSessionID ~= nil) then if (Controls.BlackFadeAnim:IsStopped()) then ExitConversationMode(); end else Close(); end elseif (ms_currentViewMode == CINEMA_MODE) then UI.PlaySound("Stop_Leader_Speech"); if (Controls.BlackFadeAnim:IsStopped()) then StartFadeOut(); end elseif (ms_currentViewMode == DEAL_MODE) then -- No handling ESC while transitioning to/from deal mode. The deal screen will handle it if it is up. else if(m_PopupDialog:IsOpen())then m_PopupDialog:Close() else Close(); end end end -- =========================================================================== -- INPUT Handling -- If this context is visible, it will get a crack at the input. -- =========================================================================== function KeyHandler( key:number ) if (key == Keys.VK_ESCAPE) then HandleESC(); return true; end return false; end -- =========================================================================== function OnInputHandler( pInputStruct:table ) local uiMsg = pInputStruct:GetMessageType(); if uiMsg == KeyEvents.KeyUp then return KeyHandler( pInputStruct:GetKey() ); end if (uiMsg == MouseEvents.LButtonUp or uiMsg == MouseEvents.RButtonUp or uiMsg == MouseEvents.MButtonUp or uiMsg == MouseEvents.PointerUp) then ClearValueEdit(); end -- #PC: Added event capture to close on right-click if (uiMsg == MouseEvents.RButtonUp) then HandleESC(); end -- #PC: End of added code return false; end -- =========================================================================== function OnDiplomacyStatement(fromPlayer : number, toPlayer : number, kVariants : table) local localPlayer = Game.GetLocalPlayer(); if (toPlayer == localPlayer or fromPlayer == localPlayer) then -- No diplomacy active? We shouldn't be getting statements if so, but if we do, ignore it. if (not HasCapability("CAPABILITY_DIPLOMACY")) then DiplomacyManager.CloseSession( kVariants.SessionID ); return; end local statementTypeName = DiplomacyManager.GetKeyName( kVariants.StatementType ); if (statementTypeName ~= nil) then local statementSubTypeName = DiplomacyManager.GetKeyName( kVariants.StatementSubType ); local handler = GetStatementHandler(statementTypeName); if (ms_ActiveSessionID == nil) then ms_ActiveSessionID = kVariants.SessionID; if (toPlayer == localPlayer) then ms_OtherPlayerID = fromPlayer; else ms_OtherPlayerID = toPlayer; end local pOtherPlayerConfig = PlayerConfigurations[ ms_OtherPlayerID ]; ms_OtherLeaderName = pOtherPlayerConfig:GetLeaderTypeName(); ms_OtherCivilizationID = pOtherPlayerConfig:GetCivilizationTypeID(); ms_OtherLeaderID = pOtherPlayerConfig:GetLeaderTypeID(); -- Check to see if the session is valid. if (handler.TestValid == nil or handler.TestValid(ms_ActiveSessionID, ms_OtherPlayerID)) then InitializeView(); SetupPlayers(); PopulateDiplomacyRibbon(ms_DiplomacyRibbon); else -- Clear the session ID, and close it. local sessionID = ms_ActiveSessionID; ms_ActiveSessionID = nil; DiplomacyManager.CloseSession( sessionID ); return; end end if (statementTypeName == "MAKE_DEAL") then -- Select (or reselect) the player. This will do nothing if the player is already selected in the desired mode. SelectPlayer(ms_OtherPlayerID, DEAL_MODE); else local viewMode = CONVERSATION_MODE; if UI.IsPlayersLeaderAnimated(ms_OtherPlayerID) then --If this is a voiced-over animation, then set the voiceover text and SWITCH TO CINEMA MODE local eFromPlayerMood = GetStatementMood(kVariants.FromPlayer, kVariants.FromPlayerMood); local kParsedStatement = handler.ExtractStatement(handler, statementTypeName, statementSubTypeName, kVariants.FromPlayer, eFromPlayerMood, kVariants.Initiator); for _, voiceoverAnimationName in ipairs(VOICEOVER_SUPPORT) do if (voiceoverAnimationName == kParsedStatement.LeaderAnimation ) then viewMode = CINEMA_MODE; break; end end end -- Select (or reselect) the player. This will do nothing if the player is already selected in the desired mode. -- Also, we are allowing selecting dead players so that defeat sessions will work. SelectPlayer(ms_OtherPlayerID, viewMode, false, true); end if (handler.ApplyStatement ~= nil) then handler.ApplyStatement(handler, statementTypeName, statementSubTypeName, toPlayer, kVariants); m_isInHotload = false; -- If this far (and was hotloading) nothing left to hotload. end end end end -- =========================================================================== function ResetPlayerPanel() -- Reset the state of the nested menus if (ms_PlayerPanel ~= nil) then ms_PlayerPanel.ContentStack:CalculateSize(); ms_PlayerPanel.ContentStack:ReprocessAnchoring(); ms_PlayerPanel.ContentStack:SetHide(false); ms_PlayerPanel.SubOptionsStack:SetHide(true); end end -- =========================================================================== function Close() UninitializeView(); LuaEvents.DiploScene_SceneClosed(); ResetPlayerPanel(); local localPlayer = Game.GetLocalPlayer(); UI.SetSoundSwitchValue("Game_Location", UI.GetNormalEraSoundSwitchValue(ms_LocalPlayer:GetID())); -- always Stop_Leader_Music to resume the game music properly... UI.PlaySound("Stop_Leader_Music"); -- check if we need to also stop modder civ music if (UI.GetCivilizationSoundSwitchValueByLeader(m_lastLeaderPlayedMusicFor) == -1) then UI.StopModCivLeaderMusic(m_lastLeaderPlayedMusicFor); end -- if it's not an observer game... if (ms_LocalPlayerLeaderID ~= -1) then -- and the local player is not a known Wwise leader... if (UI.GetCivilizationSoundSwitchValueByLeader(ms_LocalPlayerLeaderID) == -1) then -- resume modder music, instead of Roland's UI.ResumeModCivMusic(); end end UI.PlaySound("Exit_Leader_Screen"); UI.SetSoundStateValue("Game_Views", "Normal_View"); end -- =========================================================================== -- Close Button Handler -- Continue out of diplomacy view. -- =========================================================================== function OnClose() -- Act like they pressed ESC so we clean up correctly HandleESC(); end -- =========================================================================== function OnShow() -- NOTE: We can get here after the OnDiplomacyStatement handler has done some setup, so don't reset too much, assume that OnHide has closed things down properly. Controls.AlphaIn:SetToBeginning(); Controls.SlideIn:SetToBeginning(); Controls.AlphaIn:Play(); Controls.SlideIn:Play(); m_bCloseSessionOnFadeComplete = false; ms_IconAndTextIM:ResetInstances(); SetupPlayers(); UpdateSelectedPlayer(true); LuaEvents.DiploBasePopup_HideUI(true); LuaEvents.DiploScene_SceneOpened(ms_SelectedPlayerID); -- Signal the LeaderScene background system that the scene should be shown TTManager:ClearCurrent(); -- Clear any tool tips raised; if (m_cinemaMode) then ShowCinemaMode(); StartFadeIn(); end end ---------------------------------------------------------------- function OnHide() LuaEvents.DiploBasePopup_HideUI(false); Controls.BlackFade:SetHide(true); Controls.BlackFadeAnim:SetToBeginning(); -- Game Core Events Events.LeaderAnimationComplete.Remove( OnLeaderAnimationComplete ); Events.LeaderScreenFinishedLoading.Remove( OnLeaderLoaded ); ms_showingLeaderName = ""; end -- =========================================================================== function SetButtonSelected( buttonControl: table, isSelected : boolean ) buttonControl:SetSelected(isSelected); local textColor = COLOR_BUTTONTEXT_NORMAL; local shadowColor = COLOR_BUTTONTEXT_NORMAL_SHADOW; if (isSelected == true) then textColor = COLOR_BUTTONTEXT_SELECTED; shadowColor = COLOR_BUTTONTEXT_SELECTED_SHADOW; end buttonControl:GetTextControl():SetColor(textColor,0); buttonControl:GetTextControl():SetColor(shadowColor,1); end -- =========================================================================== function OnLocalPlayerTurnEnd() if (not ContextPtr:IsHidden()) then -- If the local player's turn ends (turn timer usually), act like they hit esc. if (ms_currentViewMode == DEAL_MODE) then -- Unless we were in the deal mode, then just close, the deal view will close too. Close(); else HandleESC(); end end end -- =========================================================================== -- Engine Event -- =========================================================================== function OnUserRequestClose() -- Is this showing; if so then it needs to raise dialog to handle close if ContextPtr:IsHidden()==false then if Controls.QuitPopupDialog:IsHidden() then Controls.QuitPopupDialog:SetHide( false ); end end end -- =========================================================================== -- UI Callback -- =========================================================================== function OnQuitYes() Events.UserConfirmedClose(); end -- =========================================================================== -- UI Callback -- =========================================================================== function OnQuitNo() Controls.QuitPopupDialog:SetHide( true ); end -- =========================================================================== -- HOTLOADING UI EVENTS -- =========================================================================== function OnInit(isHotload:boolean) CreatePanels(); if isHotload and not ContextPtr:IsHidden() then LuaEvents.GameDebug_GetValues( "DiplomacyActionView" ); InitializeView(); OnShow(); end end -- Context DESTRUCTOR - Not called when screen is dismissed, only if the whole context is removed! function OnShutdown() -- Cache values for hotloading... LuaEvents.GameDebug_AddValue("DiplomacyActionView", "isHidden", ContextPtr:IsHidden()); end -- LUA EVENT: Set cached values back after a hotload. function OnGameDebugReturn( context:string, contextTable:table ) if context == "DiplomacyActionView" and contextTable["isHidden"] ~= nil and not contextTable["isHidden"] then CreatePanels(); end end -- =========================================================================== function OnGamePauseStateChanged(bNewState) if (not ContextPtr:IsHidden()) then ResetPlayerPanel(); SelectPlayer(ms_SelectedPlayerID, OVERVIEW_MODE, true); end end -- =========================================================================== function Initialize() ContextPtr:SetInitHandler( OnInit ); ContextPtr:SetInputHandler( OnInputHandler, true ); ContextPtr:SetShutdown( OnShutdown ); ContextPtr:SetShowHandler( OnShow ); ContextPtr:SetHideHandler( OnHide ); LuaEvents.GameDebug_Return.Add(OnGameDebugReturn); -- Game Core Events Events.DiplomacySessionClosed.Add( OnDiplomacySessionClosed ); Events.DiplomacyStatement.Add( OnDiplomacyStatement ); Events.DiplomacyMakePeace.Add( OnDiplomacyMakePeace ); Events.LocalPlayerTurnEnd.Add( OnLocalPlayerTurnEnd ); Events.UserRequestClose.Add( OnUserRequestClose ); Events.GamePauseStateChanged.Add(OnGamePauseStateChanged); -- LUA Events LuaEvents.CityBannerManager_TalkToLeader.Add(OnTalkToLeader); LuaEvents.DiploPopup_TalkToLeader.Add(OnTalkToLeader); LuaEvents.DiplomacyRibbon_OpenDiplomacyActionView.Add(OnOpenDiplomacyActionView); LuaEvents.TopPanel_OpenDiplomacyActionView.Add(OnOpenDiplomacyActionView); LuaEvents.DiploScene_SetDealAnimation.Add(OnSetDealAnimation); --LuaEvents.Tutorial_ViewDiploIntel.Add(OnActivateIntelRelationshipPanel(Controls.PlayerContainer)); --LuaEvents.Tutorial_ViewDiploAccessLevel.Add(OnActivateIntelAccessLevelPanel(Controls.PlayerContainer)); --LuaEvents.Tutorial_ViewDiploRelationship.Add(OnActivateIntelGossipHistoryPanel(Controls.PlayerContainer)); --LuaEvents.Tutorial_CloseDiploActionView.Add(Close); Controls.CloseButton:RegisterCallback( Mouse.eLClick, OnClose ); Controls.CloseButton:RegisterCallback( Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end); Controls.YesButton:RegisterCallback( Mouse.eLClick, OnQuitYes ); Controls.NoButton:RegisterCallback( Mouse.eLClick, OnQuitNo ); -- Size controls for screen: local screenX, screenY:number = UIManager:GetScreenSizeVal(); local leaderResponseX = math.floor(screenX * CONVO_X_MULTIPLIER); Controls.LeaderResponseGrid:SetSizeX(leaderResponseX); Controls.LeaderResponseText:SetWrapWidth(leaderResponseX-40); end Initialize();
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) combat:setParameter(COMBAT_PARAM_USECHARGES, 1) combat:setArea(createCombatArea(AREA_CIRCLE3X3)) function onGetFormulaValues(player, skill, attack, factor) local level = player:getLevel() local min = (level / 5) + (skill + attack) * 0.5 local max = (level / 5) + (skill + attack) * 1.1 return -min * 1.28, -max * 1.28 -- TODO : Use New Real Formula instead of an % end combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") local spell = Spell("instant") function spell.onCastSpell(creature, var) return combat:execute(creature, var) end spell:group("attack") spell:id(106) spell:name("Groundshaker") spell:words("exori mas") spell:level(33) spell:mana(160) spell:isPremium(true) spell:needWeapon(true) spell:cooldown(8 * 1000) spell:groupCooldown(2 * 1000) spell:needLearn(false) spell:vocation("knight;true", "elite knight;true") spell:register()
--[[ MIT License Copyright (c) 2021 Christophe MICHEL Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] local ADDON, _ = ... local L = LibStub("AceLocale-3.0"):NewLocale(ADDON, "zhTW", false) if not L then return end -- UI elements L["TAB_TITLE"] = "靈魂幻體" L["COUNT_LABEL"] = "總數" L["UNTRACKABLE_TOOLTIP_TITLE"] = "此靈魂幻體無法經由插件自動偵測" L["UNTRACKABLE_TOOLTIP_CLICK_ME"] = "如你已經擁有,點擊圖標 %s 來手動標記為已收藏。" L["WARNING_NOT_NIGHT_FAE"] = "你現在並非暗夜妖精的成員,不能收集新的靈魂幻體。" L["Available since"] = "新增於" L["Soulshape Journal"] = "靈魂幻體手冊" -- Addon title, you may translate it but it's not necessary L["BLIZZARD_MAP_PIN_TOOLTIP"] = "<按下Ctrl + 滑鼠左鍵可新增一個指向此座標的地圖標記>" L["TOMTOM_WAYPOINT_TOOLTIP"] = "<按下Shift + 滑鼠左鍵可新增一個指向此座標的 TomTom 路徑點>" -- Labels L["Loot"] = "掉落" L["Quest"] = "任務" L["Campaign"] = "戰役" L["World Event"] = "世界事件" L["World Quest"] = "世界任務" L["NPC"] = "目標" L["Region"] = "區域" L["Cost"] = "費用" L["Faction"] = "陣營" L["Profession"] = "專業技能" L["Covenant Feature"] = "誓盟特色" L["Difficulty"] = "難度" L["Coordinates"] = "坐標" L["Renown"] = "名望" L["Spell"] = "法術" L["Vendor"] = "商人" -- Zone Names L["Shadowlands"] = "暗影之境" L["Ardenweald"] = "亞登曠野" L["Bastion"] = "昇靈堡" L["Revendreth"] = "瑞文崔斯" L["Maldraxxus"] = "瑪卓薩斯" L["Oribos"] = "奧睿博斯" L["The Maw"] = "淵喉" L["Torghast"] = "托迦司" L["The Adamant Vaults"] = "不滅寶庫" L["Korthia"] = "科西亞" L["De Other Side"] = "彼界境地" L["Mists of Tirna Scithe"] = "特那希迷霧" L["Tazavesh, the Veiled Market"] = "塔札維許,帷幕市集" L["Castle Nathria"] = "納薩亞城" L["Sanctum of Domination"] = "統御聖所" -- Quest and Campaign Names (could be translated automatically through the API?) L["Drust and Ashes"] = "佐司特的惡意" L["Mending a Broken Hart"] = "治療詛咒" L["The Power of Elune"] = "伊露恩之力" L["Night Warrior's Curse"] = "黑夜戰士的詛咒" L["The Power of Night"] = "黑夜之力" -- Item Names (could be translated automatically through the API?) L["Bounty of the Grove Wardens"] = "林地看守者的獎賞" L["Queen's Conservatory Cache"] = "女王栽培園的寶箱" L["War Chest of the Wild Hunt"] = "曠野獵者戰爭寶箱" L["Wild Hunt Supplies"] = "曠野獵者補給品" L["Synvir Lockbox"] = "鋅維爾帶鎖箱" L["Stygian Lockbox"] = "冥魄帶鎖箱" L["Riftbound Cache"] = "隙縛寶箱" L["Wildseed Root Grain"] = "野性種子根粒" L["Repaired Riftkey"] = "修復的裂隙鑰匙" L["Spectral Feed"] = "幽靈雞飼料" L["Lost Comb"] = "失落的蜂巢" -- NPC Names (could be translated automatically through the API?) L["Lost Soul"] = "失落的靈魂" L["Ma'oh"] = "茂歐" L["Sparkle"] = "火花" L["Aithlyn"] = "艾瑟琳" L["Liawyn"] = "莉亞溫" L["The Grand Menagerie"] = "大展示廳" L["Master Clerk Salorn"] = "首席營業員沙洛恩" L["Lady Sylvanas Windrunner"] = "希瓦娜斯‧風行者女士" L["Mueh'Zala"] = "繆薩拉" L["Mistcaller"] = "喚霧者" L["Cortinarius"] = "寇提納留斯" L["Sire Denathrius"] = "戴納瑟斯王" L["Skuld Vit"] = "斯寇德‧維特" L["So'leah"] = "索利亞" L["Valfir the Unrelenting"] = "『冷酷』瓦菲爾" L["Spindlenose"] = "軸鼻" L["Shopkeeper"] = "店員" L["Mystic Rainbowhorn"] = "神秘虹角" L["Olea Manu"] = "歐利亞瑪努" L["Shifting Stargorger"] = "變異吞星者" -- Others L["Burning Crusade Timewalking"] = "燃燒的遠征時光漫遊" L["Wrath of the Lich King Timewalking"] = "巫妖王之怒時光漫遊" L["Cataclysm Timewalking"] = "浩劫與重生時光漫遊" L["Mists of Pandaria Timewalking"] = "潘達利亞之謎時光漫遊" L["Warlords of Draenor Timewalking"] = "德拉諾之霸時光漫遊" L["Legion Timewalking"] = "軍臨天下時光漫遊" L["Pet Battle"] = "寵物對戰" L["Shadowlands World Bosses"] = "暗影之境世界首領" L["Queen's Conservatory"] = "女王的栽培園" L["Mythic+ dungeons"] = "傳奇鑰石地城" L["Night Fae dailies"] = "暗夜妖精每日任務" L["Mushroom Network"] = "蘑菇網路" L["Marasmius"] = "瑪拉茲莫斯" L["Paragon reward."] = "聲望巔峰獎勵" L["Soulshape"] = "靈魂幻體" L["Crittershape"] = "小動物型態" L["Pilgrim's Bounty"] = "旅人豐年祭" L["Covenant Callings reward chests"] = "誓盟使命任務獎勵寶箱" L["Normal"] = "普通" L["Heroic"] = "英雄" L["Mythic"] = "傳奇" L["Hardmode"] = "困難模式" L["Any"] = "任意" -- Database L["Alpaca Soul"] = "羊駝靈魂" L["Ardenmoth Soul"] = "亞登蛾靈魂" L["Boar Soul"] = "野豬靈魂" L["Boar Soul Guide"] = "任何德拉諾之霸時光漫遊地城的尾王掉落。" L["Bunny Soul"] = "兔子靈魂" L["Bunny Soul Guide"] = "戰寵世界任務可能出現的獎勵之一。" L["Cat Soul"] = "貓靈魂" L["Cat Soul Guide"] = "出生點在亞登曠野的參天巨木頂端(夢歌沼地、爍瀑盆地、特納瓦勒、冬日窪地、利爪之緣)。對其輸入/soothe 來獲取。" L["Cat Soul (Well Fed)"] = "貓靈魂(阿嬤餵的)" L["Cat Soul (Well Fed) Guide"] = "解鎖貓靈魂後始可取得。首先取得幽靈雞飼料,接著前往森林之心,有隻叫茂歐的靈魂貓睡在通往女王栽培園的傳送點附近的籃子裡。\n對其輸入/meow (牠會告訴你他餓了),然後餵牠靈魂雞飼料。你將立即解鎖外觀選項而無須繳回任務道具。" L["Chicken Soul"] = "雞靈魂" L["Chicken Soul Guide"] = "首先取得靈魂雞飼料,接著對靈魂雞輸入/chicken,之後餵牠靈魂雞飼料。" L["Cloud Serpent Soul"] = "雲蛟靈魂" L["Cloud Serpent Soul Guide"] = "任何潘達利亞之謎時光漫遊地城的尾王掉落。" L["Cobra Soul"] = "眼鏡蛇靈魂" L["Cobra Soul Guide"] = "競技場或積分戰場勝利時機率獲取。" L["Corgi Soul"] = "柯基犬靈魂" L["Corgi Soul Guide"] = "有隻叫火花的靈魂柯基犬在森林之心走動。對其輸入/pet,你將立刻解鎖外觀選項而無須繳回任務道具。" L["Crane Soul"] = "羽鶴靈魂" L["Cricket Soul"] = "蟋蟀靈魂" L["Direhorn Soul"] = "恐角龍靈魂" L["Eagle Soul"] = "飛鷹靈魂" L["Equine Soul"] = "駿馬靈魂" L["Frog Soul"] = "青蛙靈魂" L["Frog Soul Guide"] = "可於任何誓盟所在地圖的水域取得。" L["Goat Soul"] = "山羊靈魂" L["Goat Soul Guide"] = "從任何地區的使命任務獎勵寶箱掉落,不限於亞登曠野。" L["Gryphon Soul"] = "獅鷲獸靈魂" L["Gryphon Soul Guide"] = "亂鬥、競技場、隨機戰場、積分戰場獲勝時機率取得。" L["Gulper Soul"] = "大嘴蟾靈魂" L["Gulper Soul Guide"] = "不羈魂靈 + 一個%s" L["Hippo Soul"] = "河馬靈魂" L["Hippo Soul Guide"] = "暗夜妖精進攻戰的獎勵" L["Hippogryph Soul"] = "角鷹獸靈魂" L["Hyena Soul"] = "土狼靈魂" L["Hyena Soul Guide"] = "完成任何層數的鑰匙後機率掉落。" L["Jormungar Soul"] = "蟄猛巨蟲靈魂" L["Jormungar Soul Guide"] = "任何巫妖王之怒時光漫遊地城的尾王掉落。" L["Kodo Soul"] = "科多獸靈魂" L["Kodo Soul Guide"] = "任何浩劫與重生時光漫遊地城的尾王掉落。" L["Leonine Soul"] = "雄獅靈魂" L["Lupine Soul"] = "孤狼靈魂" L["Mammoth Soul"] = "長毛象靈魂" L["Moose Soul"] = "麋鹿靈魂" L["Moose Soul Guide"] = "你必須擊敗過星湖露天劇場七種稀有當中的五種。" L["Otter Soul"] = "水獺靈魂" L["Otter Soul Guide"] = "出生點在英雄之陵底下的湖(重生時間一小時)。對其輸入/hug 來獲得任務道具。" L["Owl Soul"] = "貓頭鷹靈魂" L["Owl Soul Guide"] = "任何軍臨天下時光漫遊地城的尾王掉落。" L["Owlcat Soul"] = "梟羽獸靈魂" L["Porcupine Soul"] = "豪豬靈魂" L["Prairie Dog Soul"] = "草原土撥鼠靈魂" L["Ram Soul"] = "大角羊靈魂" L["Raptor Soul"] = "迅猛龍靈魂" L["Rat Soul"] = "老鼠靈魂" L["Rat Soul Guide"] = "當他發送悄悄話時,以表情指令/yes或/nod回應他以獲取查看與購買商品的權利。" L["Runestag Soul"] = "符文雄鹿靈魂" L["Runestag Soul Guide"] = "出生點在亞登曠野的東北方。" L["Saurid Soul"] = "羽冠龍靈魂" L["Saurid Soul Guide"] = "洞穴裡面,點選洞穴深處的垃圾堆並輸入/bow。" L["Saurolisk Soul"] = "尖角蜥靈魂" L["Saurolisk Hatchling Soul"] = "尖角幼蜥靈魂" L["Shadowstalker Soul"] = "巡影者靈魂" L["Shoveltusk Soul"] = "鍬牙靈魂" L["Shoveltusk Soul Guide"] = "任何PvP亂鬥獲勝時機率取得。" L["Shrieker Soul"] = "尖嘯者靈魂" L["Snake Soul"] = "蛇靈魂" L["Snapper Soul"] = "鉗嘴龜靈魂" L["Spider Soul"] = "蜘蛛靈魂" L["Spider Soul Guide"] = "用%s進入裂隙傳送門,裡面每天都有四個寶箱分布於隨機地點。" L["Sporebat Soul"] = "孢子蝙蝠靈魂" L["Sporebat Soul Guide"] = "任何燃燒的遠征時光漫遊地城的尾王掉落。" L["Squirrel Soul"] = "松鼠之魂" L["Squirrel Soul Guide"] = "你的第一個小動物型態,鳴謝丘發的慷慨餽贈!" L["Stag Soul"] = "雄鹿靈魂" L["Stag Soul Guide"] = "科西亞由暗夜妖精陣營發布的每日任務可能的獎勵之一。" L["Tiger Soul"] = "猛虎靈魂" L["Turkey Soul"] = "火雞靈魂" L["Turkey Soul Guide"] = "前往陣營主城,找到旅人豐年祭餐桌。\n吃下食物直到你獲得五層食物增益,接著換位置繼續吃直到你獲得靈魂幻體為止。" L["Ursine Soul"] = "巨熊靈魂" L["Veilwing Soul"] = "幕翼靈魂" L["Vulpine Soul"] = "狐狸靈魂" L["Vulpine Soul Guide"] = "你最初獲得的靈魂!" L["Wolfhawk Soul"] = "狼鷹靈魂" L["Wolfhawk Soul Guide"] = "使用靈魂幻體來穿過屏障。" L["Wyvern Soul"] = "雙足飛龍靈魂" L["Yak Soul"] = "氂牛靈魂" -- 9.2 Soulshapes L["Armadillo Soul"] = "犰狳靈魂" L["Bat Soul"] = "蝙蝠靈魂" L["Bee Soul"] = "蜜蜂靈魂" L["Bee Soul Guide"] = "靈魂型態的小蜂巢坐落於大蜂巢的頂端。需要解鎖飛行。" L["Brutosaur Soul"] = "雷龍靈魂" L["Cervid Soul"] = "原鹿靈魂" L["Dragonhawk Soul"] = "龍鷹靈魂" L["Elekk Soul"] = "伊萊克靈魂" L["Gromit Soul"] = "哥羅米靈魂" L["Penguin Soul"] = "企鵝靈魂" L["Penguin Soul Guide"] = "金屬巨球頂端。點擊企鵝樣貌的失落靈魂以獲取之。需要解鎖飛行" L["Pig Soul"] = "豬靈魂" L["Ray Soul"] = "魟魚靈魂" L["Scorpid Soul"] = "毒蠍靈魂" L["Sheep Soul"] = "綿羊靈魂" L["Sheep Soul Guide"] = "多個重生點。點擊綿羊外貌的失落靈魂以獲取之。" L["Silithid Soul"] = "異種蠍靈魂" L["Snail Soul"] = "蝸牛靈魂" L["Tallstrider Soul"] = "陸行鳥靈魂" L["Unknown Guide"] = "獲取管道目前未知。" L["Torghast 9.2 Soulshape Guide"] = "托迦司難度 12 或更高的區域,樓層內機率出現,援救後取得。" -- Tooltips on maps L["Spectral Feed Tooltip"] = "幽靈雞飼料是地上一袋散發藍光的穀物,每一到兩小時重生。點擊後會出現在背包裡,且持續十分鐘,使用後消耗。"
local _piedPiper, _piedPiperNS = ... function _piedPiperNS.sendMoney() SetSendMailMoney(goldToSend) SendMail(PP["MAIN"], "Pied Piper", "") print("[|cFFFFFF00Pied Piper|r] Sent " .. GetCoinTextureString(goldToSend) .. " to |cFF00FF00" .. PP["MAIN"] .. "|r!") end
object_building_mustafar_structures_must_dark_jedi_lair = object_building_mustafar_structures_shared_must_dark_jedi_lair:new { } ObjectTemplates:addTemplate(object_building_mustafar_structures_must_dark_jedi_lair, "object/building/mustafar/structures/must_dark_jedi_lair.iff")
local Color = {} Color.__index = Color local fmt = string.format Color.__tostring = function(c) return c.name and fmt("<color '%s'>", c.name) or fmt("<color r=%.1f g=%.1f b=%.1f a=%.1f>", table.unpack(c)) end local function hsv2rgb(hsv) local h,s,v = hsv.h%360, hsv.s, hsv.v local r,g,b = v,v,v local i,f,p,q,t if s~=0 then h = h / 60 i = math.floor(h) f = h-i p = v*(1-s) q = v*(1-s*f) t = v*(1-s*(1-f)) if i==0 then r,g,b = v,t,p elseif i==1 then r,g,b = q,v,p elseif i==2 then r,g,b = p,v,t elseif i==3 then r,g,b = p,q,v elseif i==4 then r,g,b = t,p,v elseif i==5 then r,g,b = v,p,q end end return { r, g, b, hsv.a or 1 } end local clamp255 = function(n) return math.floor(math.min(1,n)*255 + 0.5) end -- colordata may be: -- * a hex string: '#fa3', '#ffaa33', '#ffaa3399' -- * a named string: 'darkorchid', 'limegreen' -- * a table with HSV/HSVA values: {h=120, s=1.0, v=2.8, a=0.5} -- * a table with RGB/RGBA values: {r=0.0, g=2.8, b=0.0, a=0.5} -- * an existing color object to copy (rgba in array, e.g. {0.0, 2.8, 0.0, 0.5}) -- If an alpha value is not supplied, it is assumed to be 1.0 (fully opaque) -- HSV and RGB values may be HDR; hex values are limited to the range [0.0, 1.0] function Color:new(colordata) local color local datatype = type(colordata) if 'string'==datatype then if Color[datatype] then return Color[datatype] end -- Use magenta if a color cannot be found by name if '#'~=string.sub(colordata,1,1) then colordata = '#ff00ff' end colordata = string.sub(colordata,2) if #colordata==3 then colordata=string.gsub(colordata, '(.)(.)(.)', '%1%1%2%2%3%3') end if #colordata==6 then colordata=colordata..'ff' end color = { tonumber(string.sub(colordata, 1, 2), 16)/255, tonumber(string.sub(colordata, 3, 4), 16)/255, tonumber(string.sub(colordata, 5, 6), 16)/255, tonumber(string.sub(colordata, 7, 8), 16)/255 } elseif 'table'==datatype then if colordata.h then color = hsv2rgb(colordata) elseif colordata.r then color = { colordata.r, colordata.g, colordata.b, colordata.a or 1 } elseif colordata[1] then color = { colordata[1], colordata[2], colordata[3], colordata[4] or 1 } end end return setmetatable(color, Color) end setmetatable(Color,{__call=Color.new}) function Color:tohsva() local r,g,b = table.unpack(self) local min,max = math.min(r,g,b), math.max(r,g,b) local d = max-min local v = max local s = max>0 and d/max or 0 local h = s==0 and 0 or 60*((r==max) and (g-b)/d or ((g==max) and 2+(b-r)/d or 4+(r-g)/d)) % 360 return { h=h, s=s, v=v, a=self[4] or 1 } end function Color:torgba() return { r=self[1], g=self[2], b=self[3], a=self[4] or 1 } end function Color:tohex() return string.format('#%02x%02x%02x', clamp255(self[1]), clamp255(self[2]), clamp255(self[3])) end function Color:tohexa() return self:tohex() .. string.format('%02x', clamp255(self[4])) end function Color:alpha(a) self[4] = a return self end Color.predefined = { -- https://en.wikipedia.org/wiki/X11_color_names aliceblue = '#f0f8ff', antiquewhite = '#faebd7', aqua = '#00ffff', aquamarine = '#7fffd4', azure = '#f0ffff', beige = '#f5f5dc', bisque = '#ffe4c4', black = '#000000', blanchedalmond = '#ffebcd', blue = '#0000ff', blueviolet = '#8a2be2', brown = '#a52a2a', burlywood = '#deb887', cadetblue = '#5f9ea0', chartreuse = '#7fff00', chocolate = '#d2691e', coral = '#ff7f50', cornflowerblue = '#6495ed', cornsilk = '#fff8dc', crimson = '#dc143c', cyan = '#00ffff', darkblue = '#00008b', darkcyan = '#008b8b', darkgoldenrod = '#b8860b', darkgray = '#a9a9a9', darkgreen = '#006400', darkkhaki = '#bdb76b', darkmagenta = '#8b008b', darkolivegreen = '#556b2f', darkorange = '#ff8c00', darkorchid = '#9932cc', darkred = '#8b0000', darksalmon = '#e9967a', darkseagreen = '#8fbc8f', darkslateblue = '#483d8b', darkslategray = '#2f4f4f', darkturquoise = '#00ced1', darkviolet = '#9400d3', deeppink = '#ff1493', deepskyblue = '#00bfff', dimgray = '#696969', dodgerblue = '#1e90ff', firebrick = '#b22222', floralwhite = '#fffaf0', forestgreen = '#228b22', fuchsia = '#ff00ff', gainsboro = '#dcdcdc', ghostwhite = '#f8f8ff', gold = '#ffd700', goldenrod = '#daa520', gray = '#808080', green = '#008000', greenyellow = '#adff2f', honeydew = '#f0fff0', hotpink = '#ff69b4', indianred = '#cd5c5c', indigo = '#4b0082', ivory = '#fffff0', khaki = '#f0e68c', lavender = '#e6e6fa', lavenderblush = '#fff0f5', lawngreen = '#7cfc00', lemonchiffon = '#fffacd', lightblue = '#add8e6', lightcoral = '#f08080', lightcyan = '#e0ffff', lightgoldenrodyellow = '#fafad2', lightgray = '#d3d3d3', lightgreen = '#90ee90', lightpink = '#ffb6c1', lightsalmon = '#ffa07a', lightseagreen = '#20b2aa', lightskyblue = '#87cefa', lightslategray = '#778899', lightsteelblue = '#b0c4de', lightyellow = '#ffffe0', lime = '#00ff00', limegreen = '#32cd32', linen = '#faf0e6', magenta = '#ff00ff', maroon = '#800000', mediumaquamarine = '#66cdaa', mediumblue = '#0000cd', mediumorchid = '#ba55d3', mediumpurple = '#9370db', mediumseagreen = '#3cb371', mediumslateblue = '#7b68ee', mediumspringgreen = '#00fa9a', mediumturquoise = '#48d1cc', mediumvioletred = '#c71585', midnightblue = '#191970', mintcream = '#f5fffa', mistyrose = '#ffe4e1', moccasin = '#ffe4b5', navajowhite = '#ffdead', navy = '#000080', oldlace = '#fdf5e6', olive = '#808000', olivedrab = '#6b8e23', orange = '#ffa500', orangered = '#ff4500', orchid = '#da70d6', palegoldenrod = '#eee8aa', palegreen = '#98fb98', paleturquoise = '#afeeee', palevioletred = '#db7093', papayawhip = '#ffefd5', peachpuff = '#ffdab9', peru = '#cd853f', pink = '#ffc0cb', plum = '#dda0dd', powderblue = '#b0e0e6', purple = '#800080', red = '#ff0000', rosybrown = '#bc8f8f', royalblue = '#4169e1', saddlebrown = '#8b4513', salmon = '#fa8072', sandybrown = '#f4a460', seagreen = '#2e8b57', seashell = '#fff5ee', sienna = '#a0522d', silver = '#c0c0c0', skyblue = '#87ceeb', slateblue = '#6a5acd', slategray = '#708090', snow = '#fffafa', springgreen = '#00ff7f', steelblue = '#4682b4', tan = '#d2b48c', teal = '#008080', thistle = '#d8bfd8', tomato = '#ff6347', turquoise = '#40e0d0', violet = '#ee82ee', wheat = '#f5deb3', white = '#ffffff', whitesmoke = '#f5f5f5', yellow = '#ffff00', yellowgreen = '#9acd32', -- NVIDIA color names nv = '#76B900', nvgreen = '#76B900', emerald = '#008564', amethyst = '#5d1682', lapis = '#0c34bd', rhodomine = '#bb29bb', pyrite = '#fbe122', ruby = '#ba0c2f', jade = '#0c9e82', iolite = '#8737aa', sapphire = '#00a5db', garnet = '#a2175f', fluorite = '#fac200', citrine = '#fc8817', transparent = '#00000000', } for name,hex in pairs(Color.predefined) do Color.predefined[name] = Color(hex) Color.predefined[name].name = name end return Color
for l,e in pairs({(function(e,...)local M="This file was obfuscated using PSU Obfuscator 4.0.A | https://www.psu.dev/ & discord.gg/psu";local J=e.Bwc0C6U;local q=e[((#{}+262726370))];local z=e[(253347461)];local E=e[(707193864)];local k=e[((#{70;449;754;}+929757133))];local f=e[(76986415)];local m=e[(652008551)];local T=e[((708497263-#("you dumped constants by printing the deserializer??? ladies and gentlemen stand clear we have a genius in the building.")))];local t=e[(890105671)];local p=e.jTTgHb9cW;local o=e[((#{884;(function(...)return;end)()}+438764558))];local _=e[((416567620-#("Are you using AztupBrew, clvbrew, or IB2? Congratulations! You're deobfuscated!")))];local A=e[((#{}+571858580))];local g=e[((734636899-#("I'm not ignoring you, my DMs are full. Can't DM me? Shoot me a email: mem@mem.rip (Business enquiries only)")))];local n=e.o0BRSE;local h=e[((632639160-#("psu premium chads winning (only joe biden supporters use the free version)")))];local S=e[((22738391-#("Luraph v12.6 has been released!: changed absolutely fucking nothing but donate to my patreon!")))];local L=e[((491574187-#("why the fuck would we sell a deobfuscator for a product we created.....")))];local X=e['QZMD3b0p'];local I=e[((180386840-#("I hate this codebase so fucking bad! - notnoobmaster")))];local F=e["PEwj0B6E"];local s=e[(296492577)];local i=e[(507149797)];local O=e[((789418898-#("who the fuck looked at synapse xen and said 'yeah this is good enough for release'")))];local N=e[((392354271-#("IIiIIiillIiiIIIiiii :troll:")))];local G=e[((421225922-#("this isn't krnl support you bonehead moron")))];local W=e[(470220148)];local c=e[((584989191-#("Xenvant Likes cock - Perth")))];local r=e[(204680907)];local w=e[((#{126;721;636;887;(function(...)return 701,164;end)()}+459819799))];local Q=e[(7805320)];local Y=e[((69720423-#("If you see this, congrats you're gay")))];local b=e['NY6CM'];local P=((getfenv)or(function(...)return(_ENV);end));local a,d,l=({}),(""),(P(n));local a=((l[""..e[i].."\105\116"..e[o].."\50"])or(l["\98"..e[b]..e[c]])or({}));local o=(((a)and(a["\98\120"..e["kwxXOUR"].."\114"]))or(function(e,o)local l,n=n,f;while((e>f)and(o>f))do local c,a=e%t,o%t;if c~=a then n=n+l;end;e,o,l=(e-c)/t,(o-a)/t,l*t;end;if e<o then e=o;end;while e>f do local o=e%t;if o>f then n=n+l;end;e,l=(e-o)/t,l*t;end;return(n);end));local u=(t^I);local y=(u-n);local C,B,D;local j=(d[""..e[k]..e[A].."\97"..e[w]]);local u=(d[""..e[s].."\117\98"]);local x=(d["\103"..e[s].."\117"..e[i]]);local x=(d["\98\121"..e[c]..e[r]]);local v=(l["\116"..e.kwxXOUR.."\110"..e[F].."\109\98\101\114"]);local d=((l["\117"..e[g]..e[m]..e[h].."\99"..e[E]])or(l["\116"..e[h]..e[i].."\108"..e[r]]["\117"..e[g]..e[m]..e[h].."\99\107"]));local U=((l["\109\97\116\104"][""..e[p].."\100\101"..e[L]..e[m]])or(function(l,e,...)return((l*t)^e);end));local E=(l["\109\97\116\104"][""..e[X].."\108\111"..e['kwxXOUR'].."\114"]);local F=(l[""..e[w].."\97\119\115"..e[r].."\116"]);local F=(l[""..e[s].."\101"..e[p]..e[r]..e[k]..e[c]]);local R=(l[""..e[m].."\97"..e[b]..e[w]..e[s]]);local H=(l[""..e[s]..e[r]..e[c].."\109\101\116"..e[h]..e[c].."\97"..e[i].."\108"..e[r]]);local m=(l["\116"..e.hnFH0.."\112\101"]);local m=(a["\98"..e.kwxXOUR.."\114"])or(function(e,l,...)return(y-D(y-e,y-l));end);D=(a[""..e[i].."\97"..e[g].."\100"])or(function(l,e,...)return(((l+e)-o(l,e))/t);end);C=((a[""..e[p]..e[s]..e[A].."\105\102\116"])or(function(l,e,...)if(e<f)then return(B(l,-(e)));end;return((l*t^e)%t^I);end));B=((a["\114"..e[s].."\104\105\102\116"])or(function(l,e,...)if(e<f)then return(C(l,-(e)));end;return(E(l%t^I/t^e));end));local t=(a["\98\110\111\116"])or(function(e,...)return(y-e);end);if((not(l[""..e[i].."\105\116\51"..e[_]]))and(not(l[""..e[i]..e[b]..e[c]])))then a[""..e[i]..e[g]..e['kwxXOUR'].."\116"]=t;a[""..e[i]..e[L]..e["kwxXOUR"]..e[w]]=o;a["\98\111"..e[w]]=m;a["\98\97"..e[g].."\100"]=D;a["\108"..e[s]..e[A].."\105"..e[X].."\116"]=C;a["\114\115\104\105\102"..e[c]]=B;end;local b=(((l[""..e[c]..e[h].."\98\108\101"]["\99\114"..e[r].."\97"..e[c]..e[r]]))or((function(e,...)return({d({},f,e);});end)));local t=(l["\116\97\98\108\101"]["\105\110\115\101\114"..e[c]]);local s=(l["\116"..e[h].."\98"..e[p]..e[r]]["\99"..e["kwxXOUR"].."\110"..e[k].."\97\116"]);local t=(l[""..e[c].."\97\98"..e[p].."\101"]["\114"..e[r]..e[Y].."\111"..e[J].."\101"]);l[""..e[i].."\105\116\51"..e[_]]=a;local l=((-S+(function()local t,e=f,n;(function(l,e)e(e(l,l),e(e,l))end)(function(o,l)if t>W then return l end t=t+n e=(e+Q)%G if(e%z)>=O then e=(e+q)%N return l else return l(o(l,l),l(l,o))end return o(o(o,o),l(o,o and l))end,function(l,o)if t>T then return l end t=t+n e=(e*((39-#("Perth Was here impossible ikr"))))%(23237)if(e%((477-#("Perth Was here impossible ikr"))))<=(224)then e=(e+((840-#("woooow u hooked an opcode, congratulations~ now suck my cock"))))%(30798)return l(l(l,o and l)and o(o,l),o(l,l))else return o end return o end)return e;end)()));local t=(#M+((247-#("who the fuck looked at synapse xen and said 'yeah this is good enough for release'"))));local c,w=({}),({});for e=f,t-n do local l=j(e);c[e]=l;w[e]=l;w[l]=e;end;local h,a=(function(o)local i,e,a=x(o,n,((#{849;}+2)));if((i+e+a)~=((307-#("LuraphDeobfuscator.zip (oh god DMCA incoming everyone hide)"))))then l=l+(167);t=t+((312-#("woooow u hooked an opcode, congratulations~ now suck my cock")));end;o=u(o,(5));local l,a,i=(""),(""),({});local e=n;local function r()local l=v(u(o,e,e),(36));e=e+n;local n=v(u(o,e,e+l-n),((129-#("Luraph v12.6 has been released!: changed absolutely fucking nothing but donate to my patreon!"))));e=e+l;return(n);end;l=w[r()];i[n]=l;while(e<#o)do local e=r();if c[e]then a=c[e];else a=l..u(l,n,n);end;c[t]=l..u(a,n,n);i[#i+n],l,t=a,a,t+n;end;return(s(i));end)("PSU|24717171027727810121227914142771111101S1S27827h102142141027H27n1F1F27r27s101W1w279279162831627712171527722e21j1d1P1G2211w1C27722C2121J1F1T131H1j1n1B1d1Q22324O132791W23q1D21E28126O25r23i21X27f1023b1m181t24x25h2812771D1d27G27I27k2781i1N28910217217101I1h28y29S216111i1g27C29S2151223n23s1B2771C28I1529R27N29J1027E1H1G112102131327E1i1M2991N1j1427i112AH2aE1x2102ae2892Ae27n2132132AI1423n23q29r216216102ac29L27y28029H102842851024W24w29425r23C21Z2Bl2Au29929b29D21Y28x28z23Q2141I29R28B28D1G22V1E28i1028k28m28o28q28S28U23829k27W27J27L2771i1J27I29S29u1i1i2782172A029w29Y2172A62a82aa2bG2ad2af27i2ah2aj1k152An2Ap142A22A42bx2ax2AZ152b12B5142b527i2B72B92bB2bD2Bf2BH2cN27z2bl2BM28427726H26K2C728c28E25B2622BS23z2BR29H25b2572BY29c1T2692492cd2cF28n28p28R28t1Q25822N29y27729021e2Cm27n29n2CQ2a327729t29v2cs2f52D029q2F52d42A92ab2D82bi2Db141H1L142df2aq29X2772dK27r2dm2DO2Ae102dr102dt27E2DV2772BE2d72BI2E02Bl2bN2772622eB2792951D2c22782901Y1t2bL2452402e72c923w26d2En28L2ep2ci2Es26X23o2EI29d23D2f029M2cp29v2f42cu29v2cx2F92a12f82a52A72FE2G42fV2Cn2fI2fk2FM2Ao2Aq2FB102fr2aY29K2b02b21516132FX2Fz2ba2BC2G22dx2CD27N2g629h2G81022E22a2gy1T23g2422ew27Y23q26d2gB2812BQ2bS24Q2Gm28a2e81g26d23W2GR2CG2eQ2CJ1q2cL2BI2F22H42A42F62D12h92cR2Ct2d32HD2d62BH2HG2Ag29k2Dc2De2Hl2dh2h82Ho2Av2dl2Hr2dn2HT112Dq152b62B82G02i0102G32DY2i42bK2I62e31025W25s2Ib25g2eE27829522x22i2Iu2Gt2er28u21B22B2gn28E22F29329h24W2162iF2Ey2H12cO29O2AS2F52Cv2Hb2cZ2a12HN2j92D52Ff2FW2D9102hi1J122FN2jJ2782hP2ft2Ht2HV2HX2jv2hZ2Dw2G42dz2K221H21h26B26b27725w2641827721u2191b1T21q21q2m223c1H2bO21V1521g1j1c1826o24f1a27722r28T1618121F11161O26K2Mh2772311228t1F1v1u1I1r1t22s1U192lZ2m11T21R2151t2m82212172761022x17181728I1221A29827722U1F1R1N2102212Ly1021u1Z12181r1h2o223G2c627721t2931M1h22g1Y1E27722A21j1B1a111n1x21i1h101t17191k25O2562KL1G1e23329922821d1L1S21w21529r22t1n2OR1t24M25z29y2nJ1Q21h21Z2Bo22r1C2aY121L2692mu1021Z21e1s21m21I1N141v1A1622121a2A422423E1Q2132D622621N1O1f171N1w21F1F191225R2572Oq10235141g2QT21M21C1121d2171H19191l1V1t161v22R2NY22021p1o1C2mP161d2202nG2772371m2pZ2q11626o2412EI1J1S2562672d62Oi2mN2O42Qi1J1b2PI21v2A422n1o24326327v102oi2p5151a2pp1h111y21B1R111723a142bO220219141d1o1s25E24M2cD2212131O1P141e21I2pY1428r26f2Rq27722D1H2Ss21821W29R22s2SM1n1i1c23229R22B1Z1L27r25Q24v29r22c1z2CX1b26m23n29y22121m21E26J2551j2RJ2oC29t1s1Q2PZ1521N21I1D112S21T1T1D23f132cT22G23W25t29r23728p1m1P26m23M2Q623921A1L2Q623823d2nX27721Y21b151927p1m1r23J2av2772cl2r224X2UU27721W1X16121D21M22m2NY2T02OS1l1F1d1625r24L2sA22V122M81J1m1q182fk1l1l131E191E2312Bo2nJ1T2Rl1622G2142992311c2P521W2162Pl1h2pz1L1H1e22q2n7102202131v101L1N21c2Ng2u129Y22t1m1325r2502D622r28q2n21r2rl2T81N22M2wS27722b21I141L21H21Y2Nh22821O2su1S1n1126r23v2d6234121t2o4161n21721K1I1S23i2M827721v21813131t21T24M24d2nY22u1j1R1d1n2r51125G24N2cM22I101F21G1721l21l21C1J22T2Um172242wl2772321R2qe2qG21F21U29y22423H102342Y32772361N1k141s2nU21F2292NH22E21f2yi2N321t24924T2nH22A310C131B28y2321c2og2nz21C1r181f21p21229c1O21121f2UN26t2IT27722f21i29D21E2nc2QY11151826p24e2D62rk2M82uF1b112Pp24026L29923816171g25r2z8277222211311S1Q171W2T72RN26d2GX28j21n101321s2QA2772241Z1C2vt21R21c1h1R2T326624K310q236171r21d2181M161M2QG21m21f1p1K23a1Q2Cm21v21i27628S1q21j1Y2ME2Au23S2E62Nr171d1V1M2622542nH22B2132fK2xb111f23f1g2va2VC1O2X01r2Ot1Y2171f2wH191124w262310q2W72X02PN101b2Yi2Z52N42n62oh21N1e1F1S21F21h312M24K25Y2q623f1W2Vj1021V2172R226s23T2X621T1y2bm1M27j1t1b2321S2D622E21R1r16111k1D21L310x1N2602592Pb1021y1Z27h2au1D2uh1i21N2191n2NV21H2bm1R1b2Y91H22v1J2qP22b21e1o21G214315a1i2vS21j21j31041G312Y1v2zN2X72151F1a182WJ22O2D621Z1Y1h21J217311c182rL1B23r26j2Q623c22N22P2Mi102221E172362321o21h1T1q1523627a312e23I26e2K727722621B2mE26d23P29r22U1A28Y1t24B26W2qp2SC1S2se2Sg1121J2132N31J2Vs23w311p2772Sr2dq26p2yy2mJ1b2R21728P1C26w2em27722W2762st2z12Z32Z521U2102nY239312X1N1m152Wf2662xM28J21d1t1c21331242q226d23s2nY2381R1s17163142192332NY27721S2672671m2282Bo2P32er1q26624I2NY2O02aR21h21D318L25n24T2H822B21K1A2x2313j1e2wa21G2y61l1i191t1v25u251317h2Ns2nu2WB2wi2w125I310h27722v18318V2MX1123W2682X62Y52y71n21H2pv25y24x310Q2QC2Zr2oN21i316P2mL21f22n2X622p1K11319v3142101R25N2OX2772251Y1q312X1e317g312E1Z1821g319p162622eH27721X2172zQ25j24g317h22A318J21p31cM22v317U102zW23y2592Q623j24M311g312e21L1K21E2oP2Or2oT1k24N2652X63151191j2Lb1n2X022T1g2nH22I21H2mo1B1c1m26R23X2CM2262qz131O1T1P2122181J1P1e1n21f2202x631161D1721k2Tr27R21131002CE21D2PB1j2nL26m319S312e211314O1S2os1926Q2422NH31Cr31462WI112372Yp102XO318v141r25725p1p31cb2182nL21d1u314s1221E1j31ez314p31F221K1p21513182Om25P31CA2zy2lB29K23p2692nY22c21d2R12R32R521h2zu2772341s1u260311W102391R1u2YF2YH2yJ2yl1S26h240313X2x72rB2Rd2mQ1D21I21p31c721031Aj161Y22j2cM22r27b28T21m31632P51d121626d23r2NH22P1F1q1T18181425J2TV2xx21N31c41621h2252cD22B21o1q1r1A21j31cM23611315a31fD2X02Y01h21m312v312x312Z21L31962z4315K152302NH314d2YI1B1o1W22l2D6313Q319y2OT21d2Iq2622552bo23628m1A1b1221n21x2u910312R312t31IL312y1n21m31Io2z231Iq11230152nh31Dm2ts2Sh237315f2772T01U2JT3162310U2yI26624J2X622x1Q21821O31Hf2Uj23731dt28A310c1N2N321S211314Z2Bz1T23a318V27723B1i171h1s2mE1E1h21h22931Gz31he2MX2VU31381o1n1d1531LC2x22212WY2rJ319X319Z2tN29R21Y2Mc2mE31Ja29922q29K1321M2261O2xX21m142T21d1L2z521O21F31Ld1s1621R312g2vt192182192tu2tW28l1831jU2X52772tj16312h31e82vd25r31Hy2ZY1231421Q1V22w29Y21Y191P1N2282QP31b51n161f2se310U111H311j2n31P2r831BC2W8101h141c1u25o25a2CT1a24f24B310Q2mK192QK121g2hu31lB28e1m24A26X31gz22D315p21n21331K311319O2RM2Q223W26f310q2VB171a2sj2SL173175317725q24P29Y2372YI25K31aE2uA2oq31f21k2351d2SA31Gb31Gd2R41631OF2q02q2313n2NH3102316P316R31NI31gO319d2Rf2VM266317h2vB2nU2t62PZ28r22t31352mV1C1a1e21M214152n32wG2WI21f22k317h31721H31PB2RN24X25V2NH21z21H28r2r41d21k31gH31D323H1323731qN2321B1i22O1K29y31BD1b26324z2Cd21z2122Me2T631P131DH26r23U317h314D1Q1b2XT312Y22G312d31d331Mb1d21o2Y62sv1N26Q31141023729p2MD172Vz2W1161E2to2tC2TE1422n22H23e2Qp314d1S2AY27r1b31gr31b02Xc2Rf232314Z2381T316x26j31ho2yq315231nZ11311F311H312W31JM21M31ke29k1722v2en2ty314G31cz31oG1623631fc2Vq311T1R1Q2112Ke31cB1Y1B1H1p1921I312k312m1424G31QF2YQ2181T1n1Y2PV25931DK2o91Y2z41V1N2X231492Pf2rj1A1n21U2p82772P331hR1724A31bj31kU31e71p1O28p31HL25r24R2CT21323X24X1r2Vp1X13171K31uM31752r22132161a31KX1821a31521l21d21F2S1312125o31J82iP2c91M2oW29r311Y1d21721921e22c2Q623d238227310Q31QA21C1X1m1g162Ok1531UG2112Kk31hz1D2n726X31F531NJ28q2mx1o21j31EH28J31T41b2b7316Y26y2432Bo31Iv1n12234162qp31cc31CE1m21321j27I2SL22n2362vC316x21z31ud2zy1h2o31131VM31hZ2761R2692IO1023831Q51924X2602CD2MK2W22MN2Qf31LC1V1J23631PW1022821r3120312231cm26D23Q2m9313D182au25N2u831WF2uc2ue2dq2uh2uj2Ul2Un23231ki2NI31kc21p31kx1l1W2Nq102KN191826331G431Gb31nn1u24a26a2d621U21C2PZ1a1x311Z17312121E2v9102T01Q1Y2iq2x42x622b312K2pB1b2152Pv21R22d29Y310j1O21b22H2SA23b31Q32nD31Sy31na1p1I1D31aT1M22031LH1022p31HV2w11R26s318431wF2Av25l2QO31P031sB29k2Uk31sF1V31SH1D24J2IJ27729524q31WE1022321A2pw218311l22V112zV23H1126c25u2bO31R42ME31ME21E31w931Ig31ff22G1x2Cm21u2nG1a1531472s02s226931wr2Ua31WX312s1522t310Q2RX31mV1h1Z21F31Jq2z521b2pK2Rj1G312l2T31y2Ia312e2152M222n2XW1022V31MO182622522X622E2Aw31CM31qE2NH31gb319M21i31632331v2Ny314d31dQ1T27L24n2lx27731722Sf2wD31w423F2SP31ue31RO2y826C2472aX2h227827B2781U1U29V22722L2H91131ME1p31fk27B1i24l2532f5214131i25n2612F521B2dh26225k2F521a151i25b24t2F5219161I22X23F2F5218171I25X25J2F531cj1I23Y24c2f51Y191I1W2KO2171x1A1i22821u2f51W31Qu24823U2f52131c2cx2h82172121D1I24423Q2f531EZ1i21e2bK2172101F1i26525r2f521n1G1i24123N2F521m1H1i22U2382F521L2cw24B23t2F521k1J1i22z23d2f521R1k1i23123J2f521Q31AX25H25z2f521p1M1I24h24Z2f521o2tL32582f521f1o1i22k2262f521E320923W24e2f521d1q1i181q2f5310s1i25524r2F521j1S1I22s23A2F521I1t1I21c315829s21H2n123N2412F521G1V31Kw2tS29S1b1W1I25R2652F531zC1i24y24g2f5191y1i25F25t2F5182TY24T25b2F51f2101i24223k2f51e2111i24v2592f51D2121I1e2CP217319n1I21621K2F5132C524i2EE217122151I22b21t2f5112161I21U2282f529s1i24p2572f5172181I21221g2f5162191i23S24A2F51521a1i25324l2F51421B2n22X631Cs21c1I24923v2F51Q21D1i23v2492F51p21E316l1k2f51O21F320A2Xa29S1v21G1121H21G322I311M121I22422M324c324e21y22C324i2dh23f22X324N324p22f21x324t324v24a23S324z325125a24S3255181i23u248325A325C22r2352f5325h31qv317t29S325n1i22P237325R325t22d2BV29s325X1I23722P32621E1I24N2512F532681I21821Q326D326f22E21w326J326L22622K326p2cW25T25F326u326w21L29u29s32711I24023m327631AX21Z22d327b327d1131Jh217327i1I23J231327L327n22n225327R320925124n327w327Y22y23c32821R1i1Z21d3287328926O26a328d328f22q2342F5328K1i23e22w328o328Q25i25w2f5328u2c6315t217329026125n329432961B31fk29S329B1I24623o329F329h1431if217329M1i25K2gb217329s31612152F5329y23X24F32A22c521b31H629S32a81I25Z29g29S32ae1I21921r32AJ2171I25o26632ao32Aq21421M32aU32aw24C23y32b032b225424Q32B632B825c25u2F51R32bc327f32bG32bi23g23232bm32BO25G25y32BR32BT24R2552f532BX32bz32c11I27B32c422a21s32C81I22H22332Cc1I22I22032CG1i26325l32cK1i22W23e32co1I1t2Sa217325624J24X32cx1I25m26032D1325i1K2Bo21732d62Kx29S325s1i22g2222f532Df23522r32Dj1i23H23332dO326926R26932DT1i22122J32DX1I23931D129S326Q1i1U2cD2yK326W23I2303270327223p24732eE1i23L24332ei1I24D23z327h2TL25w25i32er1i22921V32Ev1i23k24232eZ1I1p2D6217328324723p32f81i24E23w32fC1I25p26732FG2N126725P32Fl1i22322H32Fp328v25924V328Z1x1i21w22e32fx1i1a31lx32g12ty23m24032G61I25624o329L329n25824U329R329t23023i32gj2131I26025M32gn2tm323Z32gr32A922522N32AD32af1Y21C32H11i21h2b829S32ap1i31Q132Ha1i24X24j32he1I26425Q32Hi1I24S25A32hM32BC1x21F32Hq2J732hU1i21721L32Hy1I24523r32i232BY32C01G1j1332481931uw29s324D1i25724P32if28P32iJ23A22S32iN22L22732iR24Z24h32cs1i21R21932IZ2332Zx29s32d224M250325m31qu23822u32dA1i26625o32JF325Y24323L32JJ1o317H3267326922m22432Jr25u25C32jV24g24Y32E11i21J21132E51I23T24b32K81I22T23B32Kc2202ZA29s327c32bD32bF29S32en1v2cM217327m1i21021I32ks24f23X32KW2jK32L032F41l2Nh21732881I23622o32L822c21Y32LC1I25S25e32LG24U25832Lk1i2WC32lo2Di32LT21Q218329A2tY25224K32M1215312929S32Gb25Y25G32m91I23q24432Md1i25024m32Mi26q2682f532gS23B22t32Mp1I22222g32Mt23o24632H62j529S32AV29p29r21732b11i23422Q32N925E25S32nd1i21o21a32nH21P21b32Nj23223g32Nn23z24d32nR32i41g3104324821g21232C8311m131g1L1527b27n1Q32812yt1I25d25V32CC2ax1y31582ae32TA32tC29s324U23N22t26E2AB31hV25z327A29v32E32FQ32391x21531MJ21b21631hu32t032TF102r11I213316632oN325I32Dz2FQ315f1i32e72Fq1r1c1X2191c1523r23M2ac32tI32Oz321C2872761E1e313U32ux27i2Ac32uT2wb2AC2Pn31x431uW1B31qU24k25232Da2uK1a31XY31PY2ol2ok31dO1031HU23N22c32Ts21621a1426F26f2Cq32tU2jL1431Zd2dq1B1E27e32U332TG324p23r24532ck2sM1632Vj2aq32dM2fQ2Av32vY1523423927e32Vy2191H21O2aQ21S22A32W8319x27n32Wk2111421923h22832W232v62b91I25l2632FQ2C62fU22J22M2HS2aE32xa32xc1532Xe2Jp32xd32XB32Xi1525925432xF2101X32tH32X52fQ2m81x2131632Xg22m28332Xw32xy32Xa32Y132xx32Xz32Y532Y332Y01632y232XM25432y81531e72831i32cm2Fq31dt27n2cW1027523o1h24427I323W2752DQ27I1I25V25d32yl17311c1432U432u227I131A1927513312m27I1x1x29V32z032uH32uj2161b1522a22F29j1x21831LC26126432Zr32zT32wY22829j27n2Wf2L92uJ27i2152132Cc1C131k1m32ZF32zh1X21D31o122922C31Ne24k2531i27I1e22S22Y31Ne2Ak32Zf330H15330j330L24y2Y9101Z22Y22131Ne326w32yy328H2FQ31Wx311s2Ct1O1Q32C42CX2qt2e22ju31Nl2Sh27i2832ZB1F23o23V32ux10330c122Ac2t227I23O23W3148331u1m32uU31uM32yY32Yk2hO32ym2DQ32Z631G12Ds2B827532yZ32z1332932z31532Z5315832Z7312A32Za32ZC21f21d330E32zI332i31kL32zl32Zn32Zp32zX32ZU32zW1d32Zs1d32ZZ330127i3303333810330733091321821A332u330g330i330K1H24k23z2a0101e22L22B31ne215214330V333K330L23U21b27i1Z1721031ne2l129v33192hO331b142A4331e331G10331I283331K31Ne27N331O27U23O24j21227I331v2ac21C332t1023o24k1x334R332427521D2QW29V33281N332a15332C331k332G32ZJ332J32Z4335a32z8332q318x223221332u332h32zK1x32zm32Zo32ZQ333432zt1532zV3331333733052XB2ts333b333d2Ac1321w21y333I330W330y333m26F21U330p22T22Z31nE21t21s333X330x333L24k26A21Z3342331231nE21V336D3348328I31n82M8321W277334e32YO334H315k332e331L334l285334N25721Q3350331W1C220335l334w25821L337c275221220332732cN335e332b332n332D2fy332F3251335d3357332k332m32vk337t32z932zB318X22r22p335m337x32Ui335P332Z335s3335335v33333335335Y33023361335Z3363330a22k22M3368333y333m27322i330p22N22931nE22H22G336k336a24K26Y22N334226U25X31Ne22j338U336v331A2M8122993371331H313x334i3375334k331n3378331q25V22e337c2aC22O3387334W25w229337k1722p22o337o32z22jr3359337s335b337W332W32YM332l335g332p33841323f23D3388332w338A335q3330335t3332335x32wZ333B333A338l3308336423823A338Q336L330l25z31Id333Q25025631nE2352343391336m25U23B33421k21J31NE23733B3328g336W331B2Hw3370331F3372339J3374337U3376339n331p23O26j232339S1c23C33AI334W26K22x339Z23D23C33A3337Q33a6338133a8335n335e33aC33a7335h33Af24324133aJ335o33am338d335U335W33AO338I3339338k27n338m1323w23Y33aZ339221B23U330p1U322I1h23t23s33ba330L21623z334223L24i31Ne23v33D5339C334a2YP2bo339H334g33br334J331m2E233bW1323Q33c024033CM334w1423L339Z24124033ca337Y2fU316W332o2dT32zC27C332U2k1278"),(#M-(90));local function n(e,l,...)if(e==270700413)then return((o(o(l,505583),486020))-520648);elseif(e==28691247)then return(((o(((l)-602216)-496509,462096))-780581)-925217);elseif(e==233141368)then return((((o(l,738571))-134947)-824957)-95985);elseif(e==941502874)then return(o(o(o((l)-334911,742530),375965),459089));elseif(e==842037942)then return(((o(o(l,127893),500140))-583176)-411784);elseif(e==899156509)then return((o(o(l,643115),585062))-360212);elseif(e==187392311)then return(o(o(o((l)-222471,168160),158826),106419));elseif(e==55700643)then return((o((o((l)-696912,40759))-264232,246854))-811576);elseif(e==720233877)then return((o(o((l)-436142,586014),634241))-375525);elseif(e==736188145)then return((((o(l,988198))-561482)-542172)-146815);elseif(e==23624809)then return(o((((l)-937252)-832074)-565319,496451));else end;end;local s=e['lXkodwBJ'];local n=e[((#{282;}+251109056))];local i=e[((76986489-#("psu premium chads winning (only joe biden supporters use the free version)")))];local t=e.o0BRSE;local p=e[((#{53;714;98;(function(...)return;end)()}+784212253))];local m=e["ApDcJXMo"];local g=e['qH0hasxQ'];local y=e['kwNtpgAaT'];local c=e[(890105671)];local function f(n,e,l)if(l)then local e=(n/c^(e-t))%c^((l-t)-(e-t)+t);return(e-(e%t));else local e=c^(e-t);return(((n%(e+e)>=e)and(t))or(i));end;end;local function r()local e,t=x(h,a,a+c);e=o(e,l);l=e%n;t=o(t,l);l=t%n;a=a+c;return((t*n)+e);end;local function i()local e=o(x(h,a,a),l);l=e%n;a=(a+t);return(e);end;local function c()local e,t,c,i=x(h,a,a+s);e=o(e,l);l=e%n;t=o(t,l);l=t%n;c=o(c,l);l=c%n;i=o(i,l);l=i%n;a=a+m;return((i*p)+(c*y)+(t*n)+e);end;local v=""..e[g];local function S(...)return({...}),F(v,...);end;local function O(...)local q=e[((889481179-#("I'm not ignoring you, my DMs are full. Can't DM me? Shoot me a email: mem@mem.rip (Business enquiries only)")))];local D=e[(251109057)];local m=e[(157353114)];local I=e[((#{}+273530413))];local j=e[(459192672)];local X=e[(795634124)];local H=e["GGFkJ2C1ek"];local A=e.lXkodwBJ;local S=e["TCzqf6X31e"];local z=e.xr6sMn;local y=e[((#{52;811;691;293;(function(...)return 453,43,114,83;end)()}+375751578))];local C=e["ApDcJXMo"];local n=e['o0BRSE'];local M=e['vg852sm'];local d=e['N0sy8s'];local t=e[((#{615;(function(...)return 860,787;end)()}+76986412))];local T=e[((228602160-#("psu == femboy hangout")))];local P=e[(882481601)];local L=e[((#{459;891;811;711;(function(...)return 263,14;end)()}+269956180))];local J=e[((#{311;196;681;}+576980049))];local _=e[(764160175)];local F=e.RQLnc3BHv;local p=e[(890105671)];local g=e[((#{(function(...)return 404,538,795;end)()}+476547484))];local k=e[((#{977;283;621;(function(...)return 642,114,638;end)()}+180386782))];local function B(...)local s=({});local e=({});local b=({});local v=i(l);for e=t,c(l)-n,n do b[e]=B();end;local B=r(l);for r=t,c(l)-n,n do local s=i(l);if(s%d==q)then local l=i(l);e[r]=(l~=t);elseif(s%d==n)then while(true)do local l=c(l);e[r]=u(h,a,a+l-n);a=a+l;break;end;elseif(s%d==g)then while(true)do local o=c(l);local l=c(l);local c=n;local a=(f(l,n,z)*(p^k))+o;local o=f(l,d,X);local l=((-n)^f(l,k));if(o==t)then if(a==t)then e[r]=E(l*t);break;else o=n;c=t;end;elseif(o==L)then e[r]=(a==t)and(l*(n/t))or(l*(t/t));break;end;local l=U(l,o-H)*(c+(a/(p^_)));e[r]=l%n==t and E(l)or l break;end;elseif(s%d==p)then while(true)do local c=c(l);if(c==t)then e[r]=('');break;end;if(c>S)then local t,i=(''),(u(h,a,a+c-n));a=a+c;for e=n,#i,n do local e=o(x(u(i,e,e)),l);l=e%D;t=t..w[e];end;e[r]=t;else local n,t=(''),({x(h,a,a+c-n)});a=a+c;for t,e in R(t)do local e=o(e,l);l=e%D;n=n..w[e];end;e[r]=n;end;break;end;else e[r]=nil end;end;local o=c(l);for e=t,o-n,n do s[e]=({});end;for b=t,o-n,n do local o=i(l);if(o~=t)then o=o-n;local u,h,d,a,w,k=t,t,t,t,t,t;local x=f(o,n,A);if(x==y)then elseif(x==A)then d=s[(c(l))];h=(i(l));u=(r(l));a=(r(l));elseif(x==m)then d=(c(l));h=(i(l));u=(r(l));a=(r(l));w=({});for e=n,u,n do w[e]=({[t]=i(l),[n]=r(l)});end;elseif(x==t)then d=(r(l));h=(i(l));u=(r(l));a=(r(l));elseif(x==p)then d=s[(c(l))];h=(i(l));a=(r(l));elseif(x==n)then d=(c(l));h=(i(l));a=(r(l));end;if(f(o,m,m)==n)then d=e[d];end;if(f(o,y,y)==n)then u=e[u];end;if(f(o,g,g)==n)then k=s[c(l)];else k=s[b+n];end;if(f(o,C,C)==n)then a=e[a];end;if(f(o,I,I)==n)then w=({});for e=n,i(),n do w[e]=c();end;end;local e=s[b];e[-623182.9241657266]=h;e['hi1']=a;e['kWtB']=k;e["L13CIpzL"]=d;e[P]=w;e[-J]=u;end;end;return({[-540184.058621482]=B;[M]=t;[-j]=b;[-T]=e;[F]=v;["ZMHMpTG0"]=s;});end;return(B(...));end;local function w(e,g,u,...)local m=e[-43499];local l=e[-896407];local a=e[579528];local l=e["ZMHMpTG0"];local i=e[-540184.058621482];local e=0;return(function(...)local c=-829113;local s={...};local p=(F(v,...)-1);local o='L13CIpzL';local f=-(1);local x={};local r=l[e];local e=(true);local t="kWtB";local k=-623182.9241657266;local e=(98655624);local y=609355;local h=({});local n='hi1';local l={};local e=1;for e=0,p,e do if(e>=a)then x[e-a]=s[e+1];else l[e]=s[e+1];end;end;local s=p-a+1;repeat local e=r;local a=e[k];r=e[t];if(a<=22)then if(a<=10)then if(a<=4)then if(a<=1)then if(a>0)then local n=e[n];l[n]=l[n](d(l,n+1,e[o]));for e=n+1,i do l[e]=nil;end;elseif(a<1)then l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_166);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];local a=(_181);(function()l[e[n]]=e[o];e=e[t];end){};local a=(_179);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_60);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_15);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_61);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];e=e[t];end;elseif(a<=2)then if(not(l[e[n]]))then r=e[o];end;elseif(a==3)then local n=e[n];local t={l[n](l[n+1]);};local o=e[c];local e=0;for n=n,o do e=e+1;l[n]=t[e];end;for e=o+1,i do l[e]=nil;end;elseif(a<=4)then e=e[t];local o=e[n];f=o+s-1;for e=0,s do l[o+e]=x[e];end;for e=f+1,i do l[e]=nil;end;e=e[t];local n=e[n];do return d(l,n,f);end;e=e[t];e=e[t];end;elseif(a<=7)then if(a<=5)then l[e[n]]=l[e[o]][e[c]];elseif(a==6)then local a=e[n];local o={};for e=1,#h,1 do local e=h[e];for n=0,#e,1 do local n=e[n];local t=n[1];local e=n[2];if((t==l)and(e>=a))then o[e]=t[e];n[1]=o;end;end;end;elseif(a<=7)then l[e[n]]=#l[e[o]];end;elseif(a<=8)then l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];elseif(a==9)then l[e[n]]=b(e[o]);e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];elseif(a<=10)then l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];end;elseif(a<=16)then if(a<=13)then if(a<=11)then l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_106);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_18);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_118);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_138);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];local a=(_120);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];e=e[t];elseif(a==12)then local n=e[n];l[n]=0+(l[n]);l[n+1]=0+(l[n+1]);l[n+2]=0+(l[n+2]);local t=l[n];local a=l[n+2];if(a>0)then if(t>l[n+1])then r=e[o];else l[n+3]=t;end;elseif(t<l[n+1])then r=e[o];else l[n+3]=t;end;elseif(a<=13)then l[e[n]]=g[e[o]];end;elseif(a<=14)then if(l[e[n]]==e[c])then r=e[o];end;elseif(a>15)then local n=e[n];local o=e[o];local a=50*(e[c]-1);local t=l[n];local e=0;for o=n+1,o do t[a+e+1]=l[n+(o-n)];e=e+1;end;elseif(a<16)then local e=e[n];do return d(l,e,f);end;end;elseif(a<=19)then if(a<=17)then l[e[n]]=l[e[o]];e=e[t];l[e[n]]=e[o];e=e[t];local a=e[n];l[a](d(l,a+1,e[o]));for e=a+1,i do l[e]=nil;end;e=e[t];l[e[n]]=u[e[o]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];local r=e[n];local a=l[e[o]];l[r+1]=a;l[r]=a[e[c]];e=e[t];l[e[n]]=e[o];e=e[t];local a=e[n];l[a]=l[a](d(l,a+1,e[o]));for e=a+1,i do l[e]=nil;end;e=e[t];local r=e[n];local a=l[e[o]];l[r+1]=a;l[r]=a[e[c]];e=e[t];local a=e[n];l[a]=l[a](l[a+1]);for e=a+1,i do l[e]=nil;end;e=e[t];l[e[n]]=u[e[o]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=u[e[o]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];e=e[t];elseif(a>18)then local n=e[n];l[n](d(l,n+1,e[o]));for e=n+1,i do l[e]=nil;end;elseif(a<19)then local e=e[n];l[e]=l[e]();end;elseif(a<=20)then local t=e[n];local a=e[c];local n=t+2;local t=({l[t](l[t+1],l[n]);});for e=1,a do l[n+e]=t[e];end;local t=t[1];if(t)then l[n]=t;r=e[o];end;elseif(a==21)then local e=e[n];local o,n=S(l[e](l[e+1]));f=n+e-1;local n=0;for e=e,f do n=n+1;l[e]=o[n];end;elseif(a<=22)then l[e[n]]=l[e[o]][l[e[c]]];end;elseif(a<=33)then if(a<=27)then if(a<=24)then if(a==23)then l[e[n]]=u[e[o]];elseif(a<=24)then local t=m[e[o]];local a=e[y];local o={};local i=H({},{__index=function(l,e)local e=o[e];return(e[1][e[2]]);end,__newindex=function(n,e,l)local e=o[e];e[1][e[2]]=l;end;});for e=1,e[c],1 do local n=a[e];if(n[0]==0)then o[e-1]=({l,n[1]});else o[e-1]=({g,n[1]});end;h[#h+1]=o;end;l[e[n]]=w(t,i,u);end;elseif(a<=25)then l[e[n]]=b(e[o]);elseif(a>26)then local e=e[n];l[e]=l[e](l[e+1]);for e=e+1,i do l[e]=nil;end;elseif(a<27)then l[e[n]]=b(256);end;elseif(a<=30)then if(a<=28)then elseif(a>29)then l[e[n]]=w(m[e[o]],(nil),u);elseif(a<30)then l[e[n]]=l[e[o]];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=u[e[o]];e=e[t];l[e[n]]=u[e[o]];e=e[t];l[e[n]]=l[e[o]][e[c]];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=#l[e[o]];e=e[t];local a=e[n];l[a]=l[a](d(l,a+1,e[o]));for e=a+1,i do l[e]=nil;end;e=e[t];l[e[n]]=l[e[o]][l[e[c]]];e=e[t];local a=e[n];l[a]=l[a](l[a+1]);for e=a+1,i do l[e]=nil;end;e=e[t];l[e[n]]=e[o];e=e[t];local r=e[o];local a=l[r];for e=r+1,e[c]do a=a..l[e];end;l[e[n]]=a;e=e[t];local n=e[n];l[n](d(l,n+1,e[o]));for e=n+1,i do l[e]=nil;end;e=e[t];e=e[t];end;elseif(a<=31)then local t=e[o];local o=l[t];for e=t+1,e[c]do o=o..l[e];end;l[e[n]]=o;elseif(a==32)then do return;end;elseif(a<=33)then r=e[o];end;elseif(a<=39)then if(a<=36)then if(a<=34)then l[e[n]]=l[e[o]];elseif(a>35)then l[e[n]][e[o]]=l[e[c]];elseif(a<36)then if(l[e[n]]~=e[c])then r=e[o];end;end;elseif(a<=37)then l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];elseif(a==38)then local a=(_193);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_12);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_199);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_133);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];local a=(_3);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];elseif(a<=39)then local e=e[n];l[e](l[1+e]);for e=e,i do l[e]=nil;end;end;elseif(a<=42)then if(a<=40)then local e=e[n];f=e+s-1;for n=0,s do l[e+n]=x[n];end;for e=f+1,i do l[e]=nil;end;elseif(a>41)then local n=e[n];local a=l[n+2];local t=l[n]+a;l[n]=t;if(a>0)then if(t<=l[n+1])then r=e[o];l[n+3]=t;end;elseif(t>=l[n+1])then r=e[o];l[n+3]=t;end;elseif(a<42)then local n=e[n];local t={l[n](d(l,n+1,f));};local o=e[c];local e=0;for n=n,o do e=e+1;l[n]=t[e];end;for e=o+1,i do l[e]=nil;end;end;elseif(a<=43)then l[e[n]]=e[o];elseif(a>44)then local t=e[n];local n=l[e[o]];l[t+1]=n;l[t]=n[e[c]];elseif(a<45)then l[e[n]]=e[o];e=e[t];local a=(_53);(function()l[e[n]]=e[o];e=e[t];end){};local a=(_154);(function()l[e[n]]=e[o];e=e[t];end){};local a=(_26);(function()l[e[n]]=e[o];e=e[t];end){};local a=(_160);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_28);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];local a=(_146);(function()l[e[n]]=e[o];e=e[t];end){};l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];l[e[n]]=e[o];e=e[t];e=e[t];end;until false end);end;return w(O(),{},P())(...);end)(({[(392354244)]=(((#{731;236;697;377;(function(...)return...;end)(640)}+35512)));[((#{957;925;615;807;}+269956182))]=((2047));xr6sMn=(((60-#("still waiting for luci to fix the API :|"))));[((#{448;444;499;184;}+326841212))]=("\51");[(7805320)]=((176));[((#{712;488;215;80;}+947190439))]=((165));[(901642081)]=((248));[(675340463)]=((167));['W0QPDMEJDL']=((30798));jTTgHb9cW=((396898835));[(830019342)]=("\120");[(813573258)]=("\115");[(832920703)]=("\97");[((747271226-#("why the fuck would we sell a deobfuscator for a product we created.....")))]=("\116");['vg852sm']=((973003));[(470220148)]=((436));['RQLnc3BHv']=((579528));[(459819805)]=(((250048716-#("you dumped constants by printing the deserializer??? ladies and gentlemen stand clear we have a genius in the building."))));["TCzqf6X31e"]=(((5052-#("I hate this codebase so fucking bad! - notnoobmaster"))));[((708497203-#("LuraphDeobfuscator.zip (oh god DMCA incoming everyone hide)")))]=(((#{379;939;}+107)));[((#{580;117;34;(function(...)return 914;end)()}+102308577))]=("\117");[(251109057)]=(((335-#("Are you using AztupBrew, clvbrew, or IB2? Congratulations! You're deobfuscated!"))));['qH0hasxQ']=((859314111));[(859314111)]=("\35");["lXkodwBJ"]=((3));[((335091853-#("i am not wally stop asking me for wally hub support please fuck off")))]=("\112");["Bwc0C6U"]=((692779167));[(281120485)]=((224));[(707193864)]=((228061619));[(889481072)]=((11));[((652008580-#("Perth Was here impossible ikr")))]=(((#{489;}+335091785)));[((#{883;}+576980051))]=((829113));["QZMD3b0p"]=(((328760819-#("IIiIIiillIiiIIIiiii :troll:"))));[((438764633-#("psu premium chads winning (only joe biden supporters use the free version)")))]=(((#{748;509;606;873;}+326841212)));[((#{266;699;(function(...)return 45,932,283;end)()}+707746560))]=("\101");[((#{773;(function(...)return 485;end)()}+22738296))]=((4493));[((#{(function(...)return 157,499,693,...;end)(139,292,917,406)}+663229324))]=("\50");[((#{23;51;766;(function(...)return 862,50,566,...;end)(363,394,271)}+227053834))]=("\109");[((#{782;568;(function(...)return;end)()}+795634122))]=((31));[(396898835)]=("\108");[(421225880)]=((36654));[((807800170-#("PSU|161027525v21222B11273172751L275102731327523d27f22I27f21o26o24Y21J1827F1X27f1r27F23823a26w1... oh wait")))]=(((#{627;262;89;725;}+23233)));[(882481601)]=((609355));[((#{446;(function(...)return 502,759,...;end)(450,282,114)}+250048591))]=("\114");['HpZZMYj']=((90));[(963826579)]=(((#{453;976;}+250)));[(814405776)]=("\99");[((262726422-#("why does psu.dev attract so many ddosing retards wtf")))]=((615));[(929757136)]=(((814405828-#("why does psu.dev attract so many ddosing retards wtf"))));['o0BRSE']=(((96-#("uh oh everyone watch out pain exist coming in with the backspace method one dot two dot man dot"))));[((764160218-#("https://www.youtube.com/watch?v=Lrj2Hq7xqQ8")))]=(((88-#("If you see this, congrats you're gay"))));[(204680907)]=((707746565));[((#{749;129;}+136993091))]=("\98");[((#{572;666;}+76986413))]=((0));[((789418909-#("Luraph v12.6 has been released!: changed absolutely fucking nothing but donate to my patreon!")))]=(((369-#("https://www.youtube.com/watch?v=Lrj2Hq7xqQ8"))));[(463013717)]=((10));[((328760834-#("this isn't krnl support you bonehead moron")))]=("\102");[((#{599;835;553;527;(function(...)return;end)()}+890105667))]=((2));GGFkJ2C1ek=((1023));[(504159910)]=("\110");[((584989201-#("If you see this, congrats you're gay")))]=(((747271195-#("still waiting for luci to fix the API :|"))));[(157353114)]=((5));['N0sy8s']=((21));kwxXOUR=("\111");[(632639086)]=(((832920763-#("woooow u hooked an opcode, congratulations~ now suck my cock"))));hnFH0=("\121");[(888932590)]=("\105");[((236606312-#("Xenvant Likes cock - Perth")))]=("\104");[((#{699;973;892;}+296492574))]=(((#{734;412;}+813573256)));mkaTJCp=((36));[((#{620;714;(function(...)return 115,...;end)(611,894)}+571858575))]=((236606286));kwNtpgAaT=(((#{169;(function(...)return 479;end)()}+65534)));[((476547513-#("Xenvant Likes cock - Perth")))]=(((#{524;}+7)));[(180386788)]=(((114-#("who the fuck looked at synapse xen and said 'yeah this is good enough for release'"))));[((69720466-#("Are you using AztupBrew, clvbrew, or IB2? Congratulations! You're deobfuscated!")))]=(((227053936-#("Luraph v12.6 has been released!: changed absolutely fucking nothing but donate to my patreon!"))));[(784212256)]=(((16777323-#("I'm not ignoring you, my DMs are full. Can't DM me? Shoot me a email: mem@mem.rip (Business enquiries only)"))));[((#{988;376;976;}+696712703))]=(((#{173;(function(...)return 391;end)()}+446)));[((692779219-#("I hate this codebase so fucking bad! - notnoobmaster")))]=("\118");[((#{519;347;}+273530411))]=((7));['NY6CM']=(((888932605-#("concat was here"))));[(734636792)]=((504159910));[(546532441)]=(((#{175;(function(...)return 939,885,641,924,...;end)()}+775)));[(507149797)]=((136993093));[((228602210-#("why the fuck would we sell a deobfuscator for a product we created.....")))]=(((896466-#("LuraphDeobfuscator.zip (oh god DMCA incoming everyone hide)"))));['ApDcJXMo']=((4));[(253347461)]=((652));[((375751626-#("still waiting for luci to fix the API :|")))]=((6));[(459192672)]=((43499));[(491574116)]=(((#{585;824;90;}+830019339)));PEwj0B6E=(((102308608-#("IIiIIiillIiiIIIiiii :troll:"))));[((#{661;878;423;}+228061616))]=("\107");[((#{918;444;(function(...)return 919,787,914;end)()}+416567536))]=((663229331));}),...)})do return e end;
local scheduler = require(cc.PACKAGE_NAME .. ".scheduler") --[[-- “角色”类 level 是角色的等级,角色的攻击力、防御力、初始 Hp 都和 level 相关 ]] local Actor = class("Actor", cc.mvc.ModelBase) -- 常量 Actor.FIRE_COOLDOWN = 0.2 -- 开火冷却时间 -- 定义事件 Actor.CHANGE_STATE_EVENT = "CHANGE_STATE_EVENT" Actor.START_EVENT = "START_EVENT" Actor.READY_EVENT = "READY_EVENT" Actor.FIRE_EVENT = "FIRE_EVENT" Actor.FREEZE_EVENT = "FREEZE_EVENT" Actor.THAW_EVENT = "THAW_EVENT" Actor.KILL_EVENT = "KILL_EVENT" Actor.RELIVE_EVENT = "RELIVE_EVENT" Actor.HP_CHANGED_EVENT = "HP_CHANGED_EVENT" Actor.ATTACK_EVENT = "ATTACK_EVENT" Actor.UNDER_ATTACK_EVENT = "UNDER_ATTACK_EVENT" -- 定义属性 Actor.schema = clone(cc.mvc.ModelBase.schema) Actor.schema["nickname"] = {"string"} -- 字符串类型,没有默认值 Actor.schema["level"] = {"number", 1} -- 数值类型,默认值 1 Actor.schema["hp"] = {"number", 1} function Actor:ctor(properties, events, callbacks) Actor.super.ctor(self, properties) -- 因为角色存在不同状态,所以这里为 Actor 绑定了状态机组件 self:addComponent("components.behavior.StateMachine") -- 由于状态机仅供内部使用,所以不应该调用组件的 exportMethods() 方法,改为用内部属性保存状态机组件对象 self.fsm__ = self:getComponent("components.behavior.StateMachine") -- 设定状态机的默认事件 local defaultEvents = { -- 初始化后,角色处于 idle 状态 {name = "start", from = "none", to = "idle" }, -- 开火 {name = "fire", from = "idle", to = "firing"}, -- 开火冷却结束 {name = "ready", from = "firing", to = "idle"}, -- 角色被冰冻 {name = "freeze", from = "idle", to = "frozen"}, -- 从冰冻状态恢复 {name = "thaw", form = "frozen", to = "idle"}, -- 角色在正常状态和冰冻状态下都可能被杀死 {name = "kill", from = {"idle", "frozen"}, to = "dead"}, -- 复活 {name = "relive", from = "dead", to = "idle"}, } -- 如果继承类提供了其他事件,则合并 table.insertTo(defaultEvents, totable(events)) -- 设定状态机的默认回调 local defaultCallbacks = { onchangestate = handler(self, self.onChangeState_), onstart = handler(self, self.onStart_), onfire = handler(self, self.onFire_), onready = handler(self, self.onReady_), onfreeze = handler(self, self.onFreeze_), onthaw = handler(self, self.onThaw_), onkill = handler(self, self.onKill_), onrelive = handler(self, self.onRelive_), onleavefiring = handler(self, self.onLeaveFiring_), } -- 如果继承类提供了其他回调,则合并 table.merge(defaultCallbacks, totable(callbacks)) self.fsm__:setupState({ events = defaultEvents, callbacks = defaultCallbacks }) self.fsm__:doEvent("start") -- 启动状态机 end function Actor:getNickname() return self.nickname_ end function Actor:getLevel() return self.level_ end function Actor:getHp() return self.hp_ end function Actor:getMaxHp() -- 简化算法:最大 Hp = 等级 x 100 return self.level_ * 100 end function Actor:getAttack() -- 简化算法:攻击力是等级 x 5 return self.level_ * 5 end function Actor:getArmor() -- 简化算法:防御是等级 x 2 return self.level_ * 2 end function Actor:getState() return self.fsm__:getState() end function Actor:canFire() return self.fsm__:canDoEvent("fire") end function Actor:isDead() return self.fsm__:getState() == "dead" end function Actor:isFrozen() return self.fsm__:getState() == "frozen" end function Actor:setFullHp() self.hp_ = self:getMaxHp() return sef end function Actor:increaseHp(hp) assert(not self:isDead(), string.format("actor %s:%s is dead, can't change Hp", self:getId(), self:getNickname())) assert(hp > 0, "Actor:increaseHp() - invalid hp") local newhp = self.hp_ + hp if newhp > self:getMaxHp() then newhp = self:getMaxHp() end if newhp > self.hp_ then self.hp_ = newhp self:dispatchEvent({name = Actor.HP_CHANGED_EVENT}) end return self end function Actor:decreaseHp(hp) assert(not self:isDead(), string.format("actor %s:%s is dead, can't change Hp", self:getId(), self:getNickname())) assert(hp > 0, "Actor:increaseHp() - invalid hp") local newhp = self.hp_ - hp if newhp <= 0 then newhp = 0 end if newhp < self.hp_ then self.hp_ = newhp self:dispatchEvent({name = Actor.HP_CHANGED_EVENT}) if newhp == 0 then self.fsm__:doEvent("kill") end end return self end -- 开火 function Actor:fire() print("----------") self.fsm__:doEvent("fire") self.fsm__:doEvent("ready", Actor.FIRE_COOLDOWN) end -- 命中目标 function Actor:hit(enemy) assert(not self:isDead(), string.format("actor %s:%s is dead, can't change Hp", self:getId(), self:getNickname())) -- 简化算法:伤害 = 自己的攻击力 - 目标防御 local damage = 0 if math.random(1, 100) <= 80 then -- 命中率 80% local armor = 0 if not enemy:isFrozen() then -- 如果目标被冰冻,则无视防御 armor = enemy:getArmor() end damage = self:getAttack() - armor if damage <= 0 then damage = 1 end -- 只要命中,强制扣 HP end -- 触发事件,damage <= 0 可以视为 miss self:dispatchEvent({name = Actor.ATTACK_EVENT, enemy = enemy, damage = damage}) if damage > 0 then -- 扣除目标 HP,并触发事件 enemy:decreaseHp(damage) -- 扣除目标 Hp enemy:dispatchEvent({name = Actor.UNDER_ATTACK_EVENT, source = self, damage = damage}) end return damage end ---- state callbacks function Actor:onChangeState_(event) printf("actor %s:%s state change from %s to %s", self:getId(), self.nickname_, event.from, event.to) event = {name = Actor.CHANGE_STATE_EVENT, from = event.from, to = event.to} self:dispatchEvent(event) end -- 启动状态机时,设定角色默认 Hp function Actor:onStart_(event) printf("actor %s:%s start", self:getId(), self.nickname_) self:setFullHp() self:dispatchEvent({name = Actor.START_EVENT}) end function Actor:onReady_(event) printf("actor %s:%s ready", self:getId(), self.nickname_) self:dispatchEvent({name = Actor.READY_EVENT}) end function Actor:onFire_(event) printf("actor %s:%s fire", self:getId(), self.nickname_) self:dispatchEvent({name = Actor.FIRE_EVENT}) end function Actor:onFreeze_(event) printf("actor %s:%s frozen", self:getId(), self.nickname_) self:dispatchEvent({name = Actor.FREEZE_EVENT}) end function Actor:onThaw_(event) printf("actor %s:%s thawing", self:getId(), self.nickname_) self:dispatchEvent({name = Actor.THAW_EVENT}) end function Actor:onKill_(event) printf("actor %s:%s dead", self:getId(), self.nickname_) self.hp_ = 0 self:dispatchEvent({name = Actor.KILL_EVENT}) end function Actor:onRelive_(event) printf("actor %s:%s relive", self:getId(), self.nickname_) self:setFullHp() self:dispatchEvent({name = Actor.RELIVE_EVENT}) end function Actor:onLeaveFiring_(event) local cooldown = tonum(event.args[1]) if cooldown > 0 then -- 如果开火后的冷却时间大于 0,则需要等待 scheduler.performWithDelayGlobal(function() event.transition() end, cooldown) return "async" end end return Actor
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 30, height = 30, tilewidth = 32, tileheight = 32, properties = {}, tilesets = { { name = "tilesheet", firstgid = 1, tilewidth = 32, tileheight = 32, spacing = 0, margin = 0, image = "../data/images/tilesheet.png", imagewidth = 480, imageheight = 736, tileoffset = { x = 0, y = 0 }, properties = {}, tiles = {} } }, layers = { { type = "tilelayer", name = "Tile Layer 1", x = 0, y = 0, width = 30, height = 30, visible = true, opacity = 1, properties = {}, encoding = "lua", data = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 } }, { type = "tilelayer", name = "Tile Layer 2", x = 0, y = 0, width = 30, height = 30, visible = true, opacity = 1, properties = {}, encoding = "lua", data = { 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 } }, { type = "objectgroup", name = "Collision_Layer", visible = true, opacity = 1, properties = { ["collidable"] = "true" }, objects = { { name = "", type = "", shape = "rectangle", x = 0, y = 0, width = 32, height = 960, rotation = 0, visible = true, properties = {} }, { name = "", type = "", shape = "rectangle", x = 928, y = 0, width = 32, height = 960, rotation = 0, visible = true, properties = {} }, { name = "", type = "", shape = "rectangle", x = 32, y = 928, width = 896, height = 32, rotation = 0, visible = true, properties = {} }, { name = "", type = "", shape = "rectangle", x = 32, y = 0, width = 896, height = 32, rotation = 0, visible = true, properties = {} } } } } }
local ReplicatedStorage game.plugins.RoStrap:GetService("ReplicatedStorage") instance.new.("ScreenGui") game.StarterGui.ScreenGui.Name = ("RoStrap") local RoStrap = game.StarterGui.RoStrap.TextScaled = true if game.StarterGui.RoStrap.TextScaled == true then local Players = game.Players.LocalPlayer:GetService("Players"):Kick("Parent Change Detected") end
ENT.Type = "anim" ENT.Base = "base_anim" ENT.PrintName = "Bean Bag Bullet" ENT.Author = "Spy" ENT.Contact = "AIDS" ENT.Purpose = "Shoot Stuff" ENT.Instructions = "Shoot" ENT.Spawnable = false ENT.AdminSpawnable = false ENT.Category = "CW 2.0 Ammo" ENT.CaliberSpecific = true ENT.AmmoCapacity = 56 ENT.ResupplyAmount = 28 ENT.Caliber = "Bean Bag" ENT.Model = "models/Items/BoxSRounds.mdl"
-------------------------------------------------------------------------------- -- Module Declaration -- local mod, CL = BigWigs:NewBoss("Council o' Captains", 1754, 2093) if not mod then return end mod:RegisterEnableMob(126847, 126848, 126845) -- Captain Raoul, Captain Eudora, Captain Jolly mod.engageId = 2094 mod.respawnTime = 17.5 -------------------------------------------------------------------------------- -- Localization -- local L = mod:GetLocale() if L then L.crit_brew = "Crit Brew" L.haste_brew = "Haste Brew" L.bad_brew = "Bad Brew" end -------------------------------------------------------------------------------- -- Initialization -- function mod:GetOptions() return { -- Captain Raoul 258338, -- Blackout Barrel 256589, -- Barrel Smash -- Captain Eudora 258381, -- Grape Shot 256979, -- Powder Shot -- Captain Jolly 267533, -- Whirlpool of Blades 267522, -- Cutting Surge --[[ Tending Bar ]]-- 265088, -- Confidence-Boosting Brew (Crit) 264608, -- Invigorating Brew (Haste) 265168, -- Caustic Brew },{ [258338] = -17023, -- Captain Raoul [258381] = -17024, -- Captain Eudora [267533] = -17025, -- Captain Jolly [265088] = -18476, -- Rummy Mancomb } end function mod:OnBossEnable() self:Log("SPELL_CAST_START", "BlackoutBarrel", 258338) self:Log("SPELL_CAST_START", "BarrelSmash", 256589) self:Log("SPELL_CAST_SUCCESS", "GrapeShot", 258381) self:Log("SPELL_CAST_START", "PowderShot", 256979) self:Log("SPELL_CAST_START", "WhirlpoolofBlades", 267533) self:Log("SPELL_CAST_START", "CuttingSurge", 267522) self:Log("SPELL_CAST_SUCCESS", "CritBrew", 265088) self:Log("SPELL_AURA_APPLIED", "CritBrewApplied", 265085) self:Log("SPELL_CAST_SUCCESS", "HasteBrew", 264608) self:Log("SPELL_AURA_APPLIED", "HasteBrewApplied", 265056) self:Log("SPELL_CAST_SUCCESS", "CausticBrew", 265168) self:Log("SPELL_AURA_APPLIED", "CausticBrewApplied", 278467) self:Death("Deaths", 126847, 126848, 126845) end do local function startTimers() -- 0.1 sec is subtracted from the timers if UnitCanAttack("player", mod:GetBossId(126847)) then -- Captain Raoul mod:Bar(256589, 6.8) -- Barrel Smash, 6.9 sec mod:Bar(258338, 18.9) -- Blackout Barrel, 19 sec end if UnitCanAttack("player", mod:GetBossId(126848)) then -- Captain Eudora mod:Bar(258381, 8.4) -- Grape Shot, 8.5 sec end if UnitCanAttack("player", mod:GetBossId(126845)) then -- Captain Jolly mod:Bar(267533, 12.9) -- Whirlpool of Blades, 13 sec mod:Bar(267522, 5.6) -- Cutting Surge, 5.7 sec end end function mod:OnEngage() self:SimpleTimer(startTimers, 0.1) end end function mod:VerifyEnable(unit) return UnitCanAttack("player", unit) -- one of the captains should be friendly end -------------------------------------------------------------------------------- -- Event Handlers -- function mod:Deaths(args) if args.mobId == 126847 then -- Captain Raoul self:StopBar(258338) -- Blackout Barrel self:StopBar(256589) -- Barrel Smash elseif args.mobId == 126848 then -- Captain Eudora self:StopBar(258381) -- Grape Shot elseif args.mobId == 126845 then -- Captain Jolly self:StopBar(267533) -- Whirlpool of Blades self:StopBar(267522) -- Cutting Surge end end function mod:BlackoutBarrel(args) self:Message2(args.spellId, "yellow") self:PlaySound(args.spellId, "alert", "killadd") self:CDBar(args.spellId, 47) end function mod:BarrelSmash(args) self:Message2(args.spellId, "orange", CL.casting:format(args.spellName)) self:PlaySound(args.spellId, "long", "watchaoe") self:CastBar(args.spellId, 7) -- 3s Cast, 4s Channel self:CDBar(args.spellId, 23) end function mod:GrapeShot(args) self:Message2(args.spellId, "red", CL.casting:format(args.spellName)) self:PlaySound(args.spellId, "warning", "watchstep") self:CDBar(args.spellId, 30.4) end do local function printTarget(self, name, guid) if self:Me(guid) or self:Healer() then self:TargetMessage2(256979, "red", name) -- Powder Shot self:PlaySound(256979, "alert", nil, name) -- Powder Shot end end function mod:PowderShot(args) self:GetBossTarget(printTarget, 1, args.sourceGUID) end end function mod:WhirlpoolofBlades(args) self:Message2(args.spellId, "orange") self:PlaySound(args.spellId, "alert") self:CDBar(args.spellId, 20) end function mod:CuttingSurge(args) self:Message2(args.spellId, "orange") self:PlaySound(args.spellId, "alert") self:CDBar(args.spellId, 23) end function mod:CritBrew(args) self:Message2(args.spellId, "green", L.crit_brew) self:PlaySound(args.spellId, "info") end do local prev = 0 function mod:CritBrewApplied(args) local t = args.time if self:Me(args.destGUID) then self:PersonalMessage(265088, nil, L.crit_brew) self:PlaySound(265088, "info") elseif self:Tank() and t-prev > 2 then -- Announce boss crit buff to tanks local bossId = self:GetBossId(args.destGUID) if bossId and UnitCanAttack("player", bossId) then prev = t self:Message2(265088, "purple", CL.onboss:format(L.crit_brew)) self:PlaySound(265088, "alarm") end end end end function mod:HasteBrew(args) self:Message2(args.spellId, "green", L.haste_brew) self:PlaySound(args.spellId, "info") end do local prev = 0 function mod:HasteBrewApplied(args) local t = args.time if self:Me(args.destGUID) then self:PersonalMessage(264608, nil, L.haste_brew) self:PlaySound(264608, "info") elseif self:Tank() and t-prev > 2 then -- Announce boss haste buff to tanks local bossId = self:GetBossId(args.destGUID) if bossId and UnitCanAttack("player", bossId) then prev = t self:Message2(264608, "purple", CL.onboss:format(L.haste_brew)) self:PlaySound(264608, "alarm") end end end end function mod:CausticBrew(args) self:Message2(args.spellId, "red", L.bad_brew) self:PlaySound(args.spellId, "alarm") end do local prev = 0 function mod:CausticBrewApplied(args) local t = args.time if self:Me(args.destGUID) then self:PersonalMessage(265168, "underyou", L.bad_brew) self:PlaySound(265168, "alarm") elseif self:Tank() and t-prev > 2 then -- Announce DoT on boss to tanks local bossId = self:GetBossId(args.destGUID) if bossId and UnitCanAttack("player", bossId) then prev = t self:Message2(265168, "green", CL.onboss:format(L.bad_brew)) self:PlaySound(265168, "info") end end end end
stars = {} for i = 1, 0x400 do stars[i] = {} stars[i].x, stars[i].y, stars[i].n = math.random(0, love.graphics.getWidth()), math.random(0, love.graphics.getHeight()), math.random(0, 0xff) end function stars:update(dt) for k, _ in ipairs(self) do local m = math.random(-0x08, 0x08) self[k].n = self[k].n + m if self[k].n < 0x10 then self[k].n = 0x10 elseif self[k].n > 0xff then self[k].n = 0xff end end end function stars:draw() for k, _ in ipairs(self) do local c = self[k].n love.graphics.setColor(0xff, 0xff, 0xff, c) love.graphics.points(self[k].x, self[k].y) end end
local MP = minetest.get_modpath("eco_buildings") minetest.register_craftitem("eco_buildings:timber_plantation", { description = "Timber plantation", inventory_image = "default_wood.png", eco = { place_building = "eco_buildings:timber_plantation" } }) building_lib.register({ name = "eco_buildings:timber_plantation", placement = "simple", schematic = MP .. "/schematics/timber_plantation", conditions = { { not_in_water = true, on_flat_surface = true } }, timer = { interval = 2, run = function(mapblock_pos) local resources = eco_mapgen.count_resources(mapblock_pos, 1) local trees = resources.trees or 0 local inv = building_lib.get_inventory(mapblock_pos) inv.add("tree", trees) end } })
local rawget = rawget local rawset = rawset local setmetatable = setmetatable local print = print local new = require'tango.proxy'.new module('tango.ref') local rproxies = {} local root = function(proxy) local method_name = rawget(proxy,'method_name') local send_request = rawget(proxy,'send_request') local rproxy if not rproxies[send_request] then local recv_response = rawget(proxy,'recv_response') rproxy = new(send_request,recv_response) rproxies[send_request] = rproxy end return rproxies[send_request],method_name end ref = function(proxy,...) local rproxy,create_method = root(proxy) return setmetatable( { id = rproxy.tango.ref_create(create_method,...), proxy = rproxy }, { __index = function(self,method_name) return setmetatable( { }, { __call = function(_,ref,...) local proxy = rawget(ref,'proxy') return proxy.tango.ref_call(rawget(self,'id'),method_name,...) end }) end }) end unref = function(ref) local proxy = rawget(ref,'proxy') local id = rawget(ref,'id') proxy.tango.ref_release(id) end return { ref = ref, unref = unref }
----------------------------------------------------------------------------- -- Select sample: simple text line server -- LuaSocket sample files. -- Author: Diego Nehab ----------------------------------------------------------------------------- local socket = require("socket") host = host or "*" port1 = port1 or 8080 port2 = port2 or 8181 if arg then host = arg[1] or host port1 = arg[2] or port1 port2 = arg[3] or port2 end server1 = assert(socket.bind(host, port1)) server2 = assert(socket.bind(host, port2)) server1:settimeout(1) -- make sure we don't block in accept server2:settimeout(1) io.write("Servers bound\n") -- simple set implementation -- the select function doesn't care about what is passed to it as long as -- it behaves like a table -- creates a new set data structure function newset() local reverse = {} local set = {} return setmetatable(set, {__index = { insert = function(set, value) if not reverse[value] then table.insert(set, value) reverse[value] = #set end end, remove = function(set, value) local index = reverse[value] if index then reverse[value] = nil local top = table.remove(set) if top ~= value then reverse[top] = index set[index] = top end end end }}) end set = newset() io.write("Inserting servers in set\n") set:insert(server1) set:insert(server2) while 1 do local readable, _, error = socket.select(set, nil) for _, input in ipairs(readable) do -- is it a server socket? if input == server1 or input == server2 then io.write("Waiting for clients\n") local new = input:accept() if new then new:settimeout(1) io.write("Inserting client in set\n") set:insert(new) end -- it is a client socket else local line, error = input:receive() if error then input:close() io.write("Removing client from set\n") set:remove(input) else io.write("Broadcasting line '", line, "'\n") writable, error = socket.skip(1, socket.select(nil, set, 1)) if not error then for __, output in ipairs(writable) do if output ~= input then output:send(line .. "\n") end end else io.write("No client ready to receive!!!\n") end end end end end
VERSION = "1.0.1" local ABBREVS = {} ABBREVS["1/8"] = "⅛" ABBREVS["bscra"] = "𝓪" ABBREVS["guilsinglright"] = "›" ABBREVS["blacktriangleright"] = "▶" ABBREVS["bisansc"] = "𝙘" ABBREVS["^4"] = "⁴" ABBREVS["Re"] = "ℜ" ABBREVS["pitchfork"] = "⋔" ABBREVS["bisanskappa"] = "𝞳" ABBREVS["bbz"] = "𝕫" ABBREVS["blockqtrshaded"] = "░" ABBREVS["urcorner"] = "⌝" ABBREVS["frakY"] = "𝔜" ABBREVS["^2"] = "²" ABBREVS["pi"] = "π" ABBREVS["nless"] = "≮" ABBREVS["sqsubseteq"] = "⊑" ABBREVS["Updownarrow"] = "⇕" ABBREVS["leftarrowbsimilar"] = "⭋" ABBREVS["bbF"] = "𝔽" ABBREVS["nrightarrow"] = "↛" ABBREVS["bsansPi"] = "𝝥" ABBREVS["sansseven"] = "𝟩" ABBREVS["Theta"] = "Θ" ABBREVS["rightmoon"] = "☽" ABBREVS["bscrV"] = "𝓥" ABBREVS["ttc"] = "𝚌" ABBREVS["upsilon"] = "υ" ABBREVS["bfrakq"] = "𝖖" ABBREVS["copyright"] = "©" ABBREVS["npreccurlyeq"] = "⋠" ABBREVS["bfrakL"] = "𝕷" ABBREVS["fltns"] = "⏥" ABBREVS["bbN"] = "ℕ" ABBREVS["smile"] = "⌣" ABBREVS["bisansX"] = "𝙓" ABBREVS["0/3"] = "↉" ABBREVS["backsimeq"] = "⋍" ABBREVS["bitau"] = "𝝉" ABBREVS["bisansD"] = "𝘿" ABBREVS["hvlig"] = "ƕ" ABBREVS["lq"] = "‘" ABBREVS["mapsfrom"] = "↤" ABBREVS["blockrighthalf"] = "▐" ABBREVS["perp"] = "⟂" ABBREVS["biS"] = "𝑺" ABBREVS["bscrB"] = "𝓑" ABBREVS["ttn"] = "𝚗" ABBREVS["bitheta"] = "𝜽" ABBREVS["timesbar"] = "⨱" ABBREVS["bik"] = "𝒌" ABBREVS["bsanskappa"] = "𝝹" ABBREVS["llcorner"] = "⌞" ABBREVS["bigtimes"] = "⨉" ABBREVS["circleddash"] = "⊝" ABBREVS["bsansI"] = "𝗜" ABBREVS["leftharpoondown"] = "↽" ABBREVS["alpha"] = "α" ABBREVS["between"] = "≬" ABBREVS["^l"] = "ˡ" ABBREVS["frown"] = "⌢" ABBREVS["RoundImplies"] = "⥰" ABBREVS["blockthreeqtrshaded"] = "▓" ABBREVS["bsansthree"] = "𝟯" ABBREVS["precneqq"] = "⪵" ABBREVS["urblacktriangle"] = "◥" ABBREVS["succeqq"] = "⪴" ABBREVS["nsupseteq"] = "⊉" ABBREVS["bfvarkappa"] = "𝛞" ABBREVS["iota"] = "ι" ABBREVS["overbrace"] = "⏞" ABBREVS["danger"] = "☡" ABBREVS["fraki"] = "𝔦" ABBREVS["rightharpoondown"] = "⇁" ABBREVS["tilde"] = "̃" ABBREVS["upNu"] = "Ν" ABBREVS["RRightarrow"] = "⭆" ABBREVS["sansg"] = "𝗀" ABBREVS["bisansh"] = "𝙝" ABBREVS["itimath"] = "𝚤" ABBREVS["bisansMu"] = "𝞛" ABBREVS["isansZ"] = "𝘡" ABBREVS["rightleftarrows"] = "⇄" ABBREVS["impliedby"] = "⟸" ABBREVS["succapprox"] = "⪸" ABBREVS["Rsh"] = "↱" ABBREVS["sumint"] = "⨋" ABBREVS["bsansvarrho"] = "𝞎" ABBREVS["pointint"] = "⨕" ABBREVS["fdiagovnearrow"] = "⤯" ABBREVS["plussubtwo"] = "⨧" ABBREVS["original"] = "⊶" ABBREVS["nvtwoheadleftarrow"] = "⬴" ABBREVS["bfQ"] = "𝐐" ABBREVS["biw"] = "𝒘" ABBREVS["bsanspartial"] = "𝞉" ABBREVS["bfo"] = "𝐨" ABBREVS["nBumpeq"] = "≎̸" ABBREVS["bisanssigma"] = "𝞼" ABBREVS["frakD"] = "𝔇" ABBREVS["nleftrightarrow"] = "↮" ABBREVS["clockoint"] = "⨏" ABBREVS["scrs"] = "𝓈" ABBREVS["Im"] = "ℑ" ABBREVS["bsansK"] = "𝗞" ABBREVS["bisansvarrho"] = "𝟈" ABBREVS["whtvertoval"] = "⬯" ABBREVS["rarrx"] = "⥇" ABBREVS["smallin"] = "∊" ABBREVS["underleftarrow"] = "⃮" ABBREVS["itx"] = "𝑥" ABBREVS["measangledltosw"] = "⦯" ABBREVS["eqqsim"] = "⩳" ABBREVS["bij"] = "𝒋" ABBREVS["ttW"] = "𝚆" ABBREVS["leo"] = "♌" ABBREVS["bfrakV"] = "𝖁" ABBREVS["bfrakR"] = "𝕽" ABBREVS["smallblacktriangleright"] = "▸" ABBREVS["DownArrowBar"] = "⤓" ABBREVS["surd"] = "√" ABBREVS["leftwhitearrow"] = "⇦" ABBREVS["bsansChi"] = "𝝬" ABBREVS["ge"] = "≥" ABBREVS["rttrnr"] = "ɻ" ABBREVS["bbk"] = "𝕜" ABBREVS["twoheaddownarrow"] = "↡" ABBREVS["ointctrclockwise"] = "∳" ABBREVS["squareulquad"] = "◰" ABBREVS["amalg"] = "⨿" ABBREVS["bagmember"] = "⋿" ABBREVS["fraku"] = "𝔲" ABBREVS["ElOr"] = "⩖" ABBREVS["bfvarTheta"] = "𝚹" ABBREVS["biKappa"] = "𝜥" ABBREVS["turnangle"] = "⦢" ABBREVS["Otimes"] = "⨷" ABBREVS["wideutilde"] = "̰" ABBREVS["isansp"] = "𝘱" ABBREVS["trianglerightblack"] = "◮" ABBREVS["bfr"] = "𝐫" ABBREVS["frakM"] = "𝔐" ABBREVS["frakS"] = "𝔖" ABBREVS["uparrow"] = "↑" ABBREVS["nvleftarrowtail"] = "⬹" ABBREVS["frakG"] = "𝔊" ABBREVS["_4"] = "₄" ABBREVS["measangledrtose"] = "⦮" ABBREVS["biXi"] = "𝜩" ABBREVS["bisansvarpi"] = "𝟉" ABBREVS["doubleplus"] = "⧺" ABBREVS["plussim"] = "⨦" ABBREVS["rvboxline"] = "⎹" ABBREVS["bfnu"] = "𝛎" ABBREVS["Game"] = "⅁" ABBREVS["sterling"] = "£" ABBREVS["bscrs"] = "𝓼" ABBREVS["_x"] = "ₓ" ABBREVS["sanseight"] = "𝟪" ABBREVS["NestedGreaterGreater"] = "⪢" ABBREVS["pentagon"] = "⬠" ABBREVS["supmult"] = "⫂" ABBREVS["bfu"] = "𝐮" ABBREVS["sansLturned"] = "⅂" ABBREVS["frakU"] = "𝔘" ABBREVS["bumpeqq"] = "⪮" ABBREVS["nVDash"] = "⊯" ABBREVS["leftarrowtriangle"] = "⇽" ABBREVS["itgamma"] = "𝛾" ABBREVS["nvRightarrow"] = "⤃" ABBREVS["lnsim"] = "⋦" ABBREVS["downharpoonsleftright"] = "⥥" ABBREVS["yen"] = "¥" ABBREVS["bbB"] = "𝔹" ABBREVS["isanss"] = "𝘴" ABBREVS["theta"] = "θ" ABBREVS["gnapprox"] = "⪊" ABBREVS["itjmath"] = "𝚥" ABBREVS["twoheaduparrowcircle"] = "⥉" ABBREVS["bfZ"] = "𝐙" ABBREVS["smallblacktriangleleft"] = "◂" ABBREVS["bftau"] = "𝛕" ABBREVS["male"] = "♂" ABBREVS["LeftUpVectorBar"] = "⥘" ABBREVS["NotLeftTriangleBar"] = "⧏̸" ABBREVS["nRightarrow"] = "⇏" ABBREVS["1/"] = "⅟" ABBREVS["bfrakm"] = "𝖒" ABBREVS["bigslopedvee"] = "⩗" ABBREVS["blocklowhalf"] = "▄" ABBREVS["veedoublebar"] = "⩣" ABBREVS["forks"] = "⫝̸" ABBREVS["Alpha"] = "Α" ABBREVS["backepsilon"] = "϶" ABBREVS["nsucccurlyeq"] = "⋡" ABBREVS["scrc"] = "𝒸" ABBREVS["bbK"] = "𝕂" ABBREVS["psi"] = "ψ" ABBREVS["biU"] = "𝑼" ABBREVS["ng"] = "ŋ" ABBREVS["eqdef"] = "≝" ABBREVS["gesdotol"] = "⪄" ABBREVS["botsemicircle"] = "◡" ABBREVS["eqqslantless"] = "⪛" ABBREVS["fraks"] = "𝔰" ABBREVS["updownharpoonrightleft"] = "⥌" ABBREVS["bisansj"] = "𝙟" ABBREVS["Sampi"] = "Ϡ" ABBREVS["l"] = "ł" ABBREVS["bisansNu"] = "𝞜" ABBREVS["olessthan"] = "⧀" ABBREVS["star"] = "⋆" ABBREVS["overleftarrow"] = "⃖" ABBREVS["bsanseight"] = "𝟴" ABBREVS["Downarrow"] = "⇓" ABBREVS["lvertneqq"] = "≨︀" ABBREVS["bfS"] = "𝐒" ABBREVS["isansF"] = "𝘍" ABBREVS["^J"] = "ᴶ" ABBREVS["Longmapsto"] = "⟾" ABBREVS["S"] = "§" ABBREVS["gesdot"] = "⪀" ABBREVS["bsansz"] = "𝘇" ABBREVS["rtld"] = "ɖ" ABBREVS["itrho"] = "𝜌" ABBREVS["NotLessLess"] = "≪̸" ABBREVS["backppprime"] = "‷" ABBREVS["leftdotarrow"] = "⬸" ABBREVS["omega"] = "ω" ABBREVS["itNu"] = "𝛮" ABBREVS["fisheye"] = "◉" ABBREVS["NotSquareSubset"] = "⊏̸" ABBREVS["bsansseven"] = "𝟳" ABBREVS["boxcircle"] = "⧇" ABBREVS["sbbrg"] = "̪" ABBREVS["isansu"] = "𝘶" ABBREVS["sansy"] = "𝗒" ABBREVS["visiblespace"] = "␣" ABBREVS["glE"] = "⪒" ABBREVS["squarebotblack"] = "⬓" ABBREVS["Bumpeq"] = "≎" ABBREVS["gtreqless"] = "⋛" ABBREVS["daleth"] = "ℸ" ABBREVS["dottimes"] = "⨰" ABBREVS["twocaps"] = "⩋" ABBREVS["csub"] = "⫏" ABBREVS["bscrA"] = "𝓐" ABBREVS["recorder"] = "⌕" ABBREVS["cupvee"] = "⩅" ABBREVS["bsansTheta"] = "𝝝" ABBREVS["biB"] = "𝑩" ABBREVS["frakN"] = "𝔑" ABBREVS["isansc"] = "𝘤" ABBREVS["bbR"] = "ℝ" ABBREVS["bbD"] = "𝔻" ABBREVS["Elroang"] = "⦆" ABBREVS["forksnot"] = "⫝" ABBREVS["asteraccent"] = "⃰" ABBREVS["leftharpoonupdash"] = "⥪" ABBREVS["bfG"] = "𝐆" ABBREVS["bsanstheta"] = "𝝷" ABBREVS["^D"] = "ᴰ" ABBREVS["bsansupsilon"] = "𝞄" ABBREVS["Angle"] = "⦜" ABBREVS["shuffle"] = "⧢" ABBREVS["wedgemidvert"] = "⩚" ABBREVS["dicev"] = "⚄" ABBREVS["ReverseUpEquilibrium"] = "⥯" ABBREVS["2/5"] = "⅖" ABBREVS["_3"] = "₃" ABBREVS["quotedblleft"] = "“" ABBREVS["itC"] = "𝐶" ABBREVS["bisansH"] = "𝙃" ABBREVS["bisansL"] = "𝙇" ABBREVS["ttK"] = "𝙺" ABBREVS["scrk"] = "𝓀" ABBREVS["bsansW"] = "𝗪" ABBREVS["_phi"] = "ᵩ" ABBREVS["clomeg"] = "ɷ" ABBREVS["^)"] = "⁾" ABBREVS["rightleftharpoons"] = "⇌" ABBREVS["varisins"] = "⋳" ABBREVS["blacksmiley"] = "☻" ABBREVS["ddfnc"] = "⦙" ABBREVS["bfgamma"] = "𝛄" ABBREVS["bsansUpsilon"] = "𝝪" ABBREVS["isansP"] = "𝘗" ABBREVS["scrg"] = "ℊ" ABBREVS["ttB"] = "𝙱" ABBREVS["bigwhitestar"] = "☆" ABBREVS["bigblacktriangleup"] = "▲" ABBREVS["isanse"] = "𝘦" ABBREVS["circlevertfill"] = "◍" ABBREVS["rais"] = "˔" ABBREVS["frakk"] = "𝔨" ABBREVS["nVtwoheadleftarrow"] = "⬵" ABBREVS["ttI"] = "𝙸" ABBREVS["checkmark"] = "✓" ABBREVS["bbh"] = "𝕙" ABBREVS["itA"] = "𝐴" ABBREVS["bfrakn"] = "𝖓" ABBREVS["frakA"] = "𝔄" ABBREVS["rl"] = "ɼ" ABBREVS["sansone"] = "𝟣" ABBREVS["leftarrowplus"] = "⥆" ABBREVS["bisansXi"] = "𝞝" ABBREVS["bbt"] = "𝕥" ABBREVS["nsubseteqq"] = "⫅̸" ABBREVS["mars"] = "♂" ABBREVS["ngtr"] = "≯" ABBREVS["bfrho"] = "𝛒" ABBREVS["sansZ"] = "𝖹" ABBREVS["hksearow"] = "⤥" ABBREVS["acidfree"] = "♾" ABBREVS["bbiD"] = "ⅅ" ABBREVS["bisansB"] = "𝘽" ABBREVS["lesssim"] = "≲" ABBREVS["parallelogramblack"] = "▰" ABBREVS["isansl"] = "𝘭" ABBREVS["angles"] = "⦞" ABBREVS["scrn"] = "𝓃" ABBREVS["isansd"] = "𝘥" ABBREVS["boxquestion"] = "⍰" ABBREVS["Sqcap"] = "⩎" ABBREVS["obar"] = "⌽" ABBREVS["bisansg"] = "𝙜" ABBREVS["^W"] = "ᵂ" ABBREVS["bbeight"] = "𝟠" ABBREVS["Colon"] = "∷" ABBREVS["ltphi"] = "ɸ" ABBREVS["frakO"] = "𝔒" ABBREVS["3/4"] = "¾" ABBREVS["bsansomega"] = "𝞈" ABBREVS["sagittarius"] = "♐" ABBREVS["prurel"] = "⊰" ABBREVS["biN"] = "𝑵" ABBREVS["rvbull"] = "◘" ABBREVS["bsansk"] = "𝗸" ABBREVS["sansv"] = "𝗏" ABBREVS["dot"] = "̇" ABBREVS["Omega"] = "Ω" ABBREVS["ttG"] = "𝙶" ABBREVS["upoldKoppa"] = "Ϙ" ABBREVS["verts"] = "ˈ" ABBREVS["perthousand"] = "‰" ABBREVS["bfK"] = "𝐊" ABBREVS["looparrowright"] = "↬" ABBREVS["scrY"] = "𝒴" ABBREVS["scrt"] = "𝓉" ABBREVS["Vert"] = "‖" ABBREVS["isansy"] = "𝘺" ABBREVS["bisansR"] = "𝙍" ABBREVS["bsansDelta"] = "𝝙" ABBREVS["fdiagovrdiag"] = "⤬" ABBREVS["itchi"] = "𝜒" ABBREVS["ngeqslant"] = "⩾̸" ABBREVS["^1"] = "¹" ABBREVS["bivarTheta"] = "𝜭" ABBREVS["itl"] = "𝑙" ABBREVS["bfrakJ"] = "𝕵" ABBREVS["ocommatopright"] = "̕" ABBREVS["bfLambda"] = "𝚲" ABBREVS["_k"] = "ₖ" ABBREVS["biNu"] = "𝜨" ABBREVS["perspcorrespond"] = "⩞" ABBREVS["twoheadrightarrow"] = "↠" ABBREVS["plustrif"] = "⨨" ABBREVS["biV"] = "𝑽" ABBREVS["pluseqq"] = "⩲" ABBREVS["beta"] = "β" ABBREVS["blkhorzoval"] = "⬬" ABBREVS["bsanslambda"] = "𝝺" ABBREVS["bfpartial"] = "𝛛" ABBREVS["c"] = "̧" ABBREVS["blackpointerleft"] = "◄" ABBREVS["twonotes"] = "♫" ABBREVS["mdblkdiamond"] = "⬥" ABBREVS["ttnine"] = "𝟿" ABBREVS["upwhitearrow"] = "⇧" ABBREVS["bsansvarpi"] = "𝞏" ABBREVS["itOmega"] = "𝛺" ABBREVS["approxnotequal"] = "≆" ABBREVS["bft"] = "𝐭" ABBREVS["isansx"] = "𝘹" ABBREVS["sqrt"] = "√" ABBREVS["plusdot"] = "⨥" ABBREVS["bigodot"] = "⨀" ABBREVS["subsetneqq"] = "⫋" ABBREVS["bsimilarleftarrow"] = "⭁" ABBREVS["nvtwoheadrightarrowtail"] = "⤗" ABBREVS["varTheta"] = "ϴ" ABBREVS["bisansY"] = "𝙔" ABBREVS["bbQ"] = "ℚ" ABBREVS["neg"] = "¬" ABBREVS["bscrx"] = "𝔁" ABBREVS["bfxi"] = "𝛏" ABBREVS["barwedge"] = "⊼" ABBREVS["itmu"] = "𝜇" ABBREVS["^m"] = "ᵐ" ABBREVS["biLambda"] = "𝜦" ABBREVS["sansL"] = "𝖫" ABBREVS["ltcc"] = "⪦" ABBREVS["medblackstar"] = "⭑" ABBREVS["itU"] = "𝑈" ABBREVS["Rightarrow"] = "⇒" ABBREVS["bfkappa"] = "𝛋" ABBREVS["leftbkarrow"] = "⤌" ABBREVS["nvtwoheadleftarrowtail"] = "⬼" ABBREVS["bsansvarkappa"] = "𝞌" ABBREVS["scra"] = "𝒶" ABBREVS["Cap"] = "⋒" ABBREVS["itp"] = "𝑝" ABBREVS["bsanss"] = "𝘀" ABBREVS["^I"] = "ᴵ" ABBREVS["aleph"] = "ℵ" ABBREVS["bsansnabla"] = "𝝯" ABBREVS["frakb"] = "𝔟" ABBREVS["xi"] = "ξ" ABBREVS["lessapprox"] = "⪅" ABBREVS["bfz"] = "𝐳" ABBREVS["ddddot"] = "⃜" ABBREVS["bisansnu"] = "𝞶" ABBREVS["_j"] = "ⱼ" ABBREVS["longrightarrow"] = "⟶" ABBREVS["bbW"] = "𝕎" ABBREVS["to"] = "→" ABBREVS["itPsi"] = "𝛹" ABBREVS["varcarriagereturn"] = "⏎" ABBREVS["dottedsquare"] = "⬚" ABBREVS["tti"] = "𝚒" ABBREVS["^o"] = "ᵒ" ABBREVS["lmoustache"] = "⎰" ABBREVS["^h"] = "ʰ" ABBREVS["upoldkoppa"] = "ϙ" ABBREVS["Equiv"] = "≣" ABBREVS["pm"] = "±" ABBREVS["scrN"] = "𝒩" ABBREVS["ttr"] = "𝚛" ABBREVS["prec"] = "≺" ABBREVS["disjquant"] = "⨈" ABBREVS["capwedge"] = "⩄" ABBREVS["bfXi"] = "𝚵" ABBREVS["accurrent"] = "⏦" ABBREVS["draftingarrow"] = "➛" ABBREVS["bbGamma"] = "ℾ" ABBREVS["measuredangleleft"] = "⦛" ABBREVS["DH"] = "Ð" ABBREVS["circleonleftarrow"] = "⬰" ABBREVS["bfJ"] = "𝐉" ABBREVS["egsdot"] = "⪘" ABBREVS["bsansS"] = "𝗦" ABBREVS["ttU"] = "𝚄" ABBREVS["bbv"] = "𝕧" ABBREVS["bfraks"] = "𝖘" ABBREVS["bsansLambda"] = "𝝠" ABBREVS["itc"] = "𝑐" ABBREVS["openbracketright"] = "⟧" ABBREVS["vec"] = "⃗" ABBREVS["bivartheta"] = "𝝑" ABBREVS["ttC"] = "𝙲" ABBREVS["bisansmu"] = "𝞵" ABBREVS["downharpoonleft"] = "⇃" ABBREVS["phi"] = "ϕ" ABBREVS["sansw"] = "𝗐" ABBREVS["bscrn"] = "𝓷" ABBREVS["lozenge"] = "◊" ABBREVS["circledparallel"] = "⦷" ABBREVS["bfrake"] = "𝖊" ABBREVS["L"] = "Ł" ABBREVS["ni"] = "∋" ABBREVS["nvleftrightarrow"] = "⇹" ABBREVS["itF"] = "𝐹" ABBREVS["ito"] = "𝑜" ABBREVS["itvarkappa"] = "𝜘" ABBREVS["vardiamondsuit"] = "♦" ABBREVS["isansA"] = "𝘈" ABBREVS["itUpsilon"] = "𝛶" ABBREVS["itt"] = "𝑡" ABBREVS["ttH"] = "𝙷" ABBREVS["leftrightharpoonsdown"] = "⥧" ABBREVS["invv"] = "ʌ" ABBREVS["subseteqq"] = "⫅" ABBREVS["profsurf"] = "⌓" ABBREVS["_v"] = "ᵥ" ABBREVS["blockfull"] = "█" ABBREVS["bialpha"] = "𝜶" ABBREVS["widebridgeabove"] = "⃩" ABBREVS["sphericalangleup"] = "⦡" ABBREVS["bfb"] = "𝐛" ABBREVS["bisansTau"] = "𝞣" ABBREVS["bsansAlpha"] = "𝝖" ABBREVS["frakq"] = "𝔮" ABBREVS["heartsuit"] = "♡" ABBREVS["bsansvarphi"] = "𝞍" ABBREVS["bsansH"] = "𝗛" ABBREVS["circledstar"] = "✪" ABBREVS["subset"] = "⊂" ABBREVS["bsanstau"] = "𝞃" ABBREVS["venus"] = "♀" ABBREVS["supsetplus"] = "⫀" ABBREVS["bsansP"] = "𝗣" ABBREVS["thinspace"] = " " ABBREVS["fallingdotseq"] = "≒" ABBREVS["bisansr"] = "𝙧" ABBREVS["partialmeetcontraction"] = "⪣" ABBREVS["bivarepsilon"] = "𝝐" ABBREVS["bbp"] = "𝕡" ABBREVS["NotNestedLessLess"] = "⪡̸" ABBREVS["bfL"] = "𝐋" ABBREVS["sqlozenge"] = "⌑" ABBREVS["squarecrossfill"] = "▩" ABBREVS["frakC"] = "ℭ" ABBREVS["approx"] = "≈" ABBREVS["bscrO"] = "𝓞" ABBREVS["ttfour"] = "𝟺" ABBREVS["gtrless"] = "≷" ABBREVS["ntriangleleft"] = "⋪" ABBREVS["barvee"] = "⊽" ABBREVS["invwhitelowerhalfcircle"] = "◛" ABBREVS["partial"] = "∂" ABBREVS["pluto"] = "♇" ABBREVS["wedgedoublebar"] = "⩠" ABBREVS["twoheadleftdbkarrow"] = "⬷" ABBREVS["eqqslantgtr"] = "⪜" ABBREVS["turnednot"] = "⌙" ABBREVS["wedgedot"] = "⟑" ABBREVS["kappa"] = "κ" ABBREVS["similarleftarrow"] = "⭉" ABBREVS["bsansu"] = "𝘂" ABBREVS["rtlz"] = "ʐ" ABBREVS["mdsmwhtsquare"] = "◽" ABBREVS["frakx"] = "𝔵" ABBREVS["lescc"] = "⪨" ABBREVS["sanso"] = "𝗈" ABBREVS["whthorzoval"] = "⬭" ABBREVS["isansY"] = "𝘠" ABBREVS["blocklefthalf"] = "▌" ABBREVS["bisansU"] = "𝙐" ABBREVS["bisansvarepsilon"] = "𝟄" ABBREVS["sansq"] = "𝗊" ABBREVS["vardoublebarwedge"] = "⌆" ABBREVS["Vvdash"] = "⊪" ABBREVS["invwhiteupperhalfcircle"] = "◚" ABBREVS["hspace"] = " " ABBREVS["sansE"] = "𝖤" ABBREVS["rightdotarrow"] = "⤑" ABBREVS["leqslant"] = "⩽" ABBREVS["questeq"] = "≟" ABBREVS["trnr"] = "ɹ" ABBREVS["wp"] = "℘" ABBREVS["bfomicron"] = "𝛐" ABBREVS["frake"] = "𝔢" ABBREVS["bsanschi"] = "𝞆" ABBREVS["wedgeonwedge"] = "⩕" ABBREVS["bisansgamma"] = "𝞬" ABBREVS["ttO"] = "𝙾" ABBREVS["fullouterjoin"] = "⟗" ABBREVS["bscrD"] = "𝓓" ABBREVS["isansj"] = "𝘫" ABBREVS["bfrakS"] = "𝕾" ABBREVS["lmrk"] = "ː" ABBREVS["nHuparrow"] = "⇞" ABBREVS["gamma"] = "γ" ABBREVS["NotGreaterGreater"] = "≫̸" ABBREVS["simgE"] = "⪠" ABBREVS["bsansB"] = "𝗕" ABBREVS["bsansX"] = "𝗫" ABBREVS["bflambda"] = "𝛌" ABBREVS["varstar"] = "✶" ABBREVS["Doteq"] = "≑" ABBREVS["ttD"] = "𝙳" ABBREVS["LLeftarrow"] = "⭅" ABBREVS["trnmlr"] = "ɰ" ABBREVS["bbn"] = "𝕟" ABBREVS["nsubset"] = "⊄" ABBREVS["Equal"] = "⩵" ABBREVS["varhexagon"] = "⬡" ABBREVS["sansr"] = "𝗋" ABBREVS["bsansMu"] = "𝝡" ABBREVS["1/6"] = "⅙" ABBREVS["bkarow"] = "⤍" ABBREVS["bisanso"] = "𝙤" ABBREVS["ttz"] = "𝚣" ABBREVS["bfrakw"] = "𝖜" ABBREVS["bscrq"] = "𝓺" ABBREVS["intcup"] = "⨚" ABBREVS["P"] = "¶" ABBREVS["lneq"] = "⪇" ABBREVS["bfrakF"] = "𝕱" ABBREVS["^e"] = "ᵉ" ABBREVS["napprox"] = "≉" ABBREVS["sansA"] = "𝖠" ABBREVS["ttT"] = "𝚃" ABBREVS["^delta"] = "ᵟ" ABBREVS["varheartsuit"] = "♥" ABBREVS["ltquest"] = "⩻" ABBREVS["bigstar"] = "★" ABBREVS["bisansk"] = "𝙠" ABBREVS["bsansGamma"] = "𝝘" ABBREVS["lesseqgtr"] = "⋚" ABBREVS["smeparsl"] = "⧤" ABBREVS["smblkdiamond"] = "⬩" ABBREVS["tdcol"] = "⫶" ABBREVS["ngeq"] = "≱" ABBREVS["varnothing"] = "∅" ABBREVS["bisansx"] = "𝙭" ABBREVS["rppolint"] = "⨒" ABBREVS["supseteq"] = "⊇" ABBREVS["cirfr"] = "◑" ABBREVS["bisansG"] = "𝙂" ABBREVS["eta"] = "η" ABBREVS["bisansa"] = "𝙖" ABBREVS["bsansU"] = "𝗨" ABBREVS["varrho"] = "ϱ" ABBREVS["itXi"] = "𝛯" ABBREVS["neptune"] = "♆" ABBREVS["^gamma"] = "ᵞ" ABBREVS["lgblkcircle"] = "⬤" ABBREVS["Vdash"] = "⊩" ABBREVS["dots"] = "…" ABBREVS["^G"] = "ᴳ" ABBREVS["longleftrightarrow"] = "⟷" ABBREVS["scrH"] = "ℋ" ABBREVS["bipsi"] = "𝝍" ABBREVS["Join"] = "⨝" ABBREVS["gemini"] = "♊" ABBREVS["isins"] = "⋴" ABBREVS["bivarsigma"] = "𝝇" ABBREVS["bff"] = "𝐟" ABBREVS["bsansIota"] = "𝝞" ABBREVS["_1"] = "₁" ABBREVS["nsupset"] = "⊅" ABBREVS["gescc"] = "⪩" ABBREVS["supsetneqq"] = "⫌" ABBREVS["threedangle"] = "⟀" ABBREVS["sansB"] = "𝖡" ABBREVS["lesdotor"] = "⪃" ABBREVS["dotequiv"] = "⩧" ABBREVS["bfvarrho"] = "𝛠" ABBREVS["_o"] = "ₒ" ABBREVS["bfrakG"] = "𝕲" ABBREVS["biTau"] = "𝜯" ABBREVS["bigtriangleup"] = "△" ABBREVS["diagup"] = "╱" ABBREVS["underbar"] = "̲" ABBREVS["isansi"] = "𝘪" ABBREVS["ttj"] = "𝚓" ABBREVS["itL"] = "𝐿" ABBREVS["rightwavearrow"] = "↝" ABBREVS["nexists"] = "∄" ABBREVS["nVleftarrowtail"] = "⬺" ABBREVS["bimu"] = "𝝁" ABBREVS["image"] = "⊷" ABBREVS["underbrace"] = "⏟" ABBREVS["circleurquadblack"] = "◔" ABBREVS["ita"] = "𝑎" ABBREVS["biEpsilon"] = "𝜠" ABBREVS["bsansZeta"] = "𝝛" ABBREVS["supdsub"] = "⫘" ABBREVS["boxplus"] = "⊞" ABBREVS["sansfour"] = "𝟦" ABBREVS["^x"] = "ˣ" ABBREVS["smashtimes"] = "⨳" ABBREVS["Zeta"] = "Ζ" ABBREVS["nisd"] = "⋺" ABBREVS["biR"] = "𝑹" ABBREVS["DDownarrow"] = "⟱" ABBREVS["oplusrhrim"] = "⨮" ABBREVS["biChi"] = "𝜲" ABBREVS["ultriangle"] = "◸" ABBREVS["bigamma"] = "𝜸" ABBREVS["bsansG"] = "𝗚" ABBREVS["OE"] = "Œ" ABBREVS["circledcirc"] = "⊚" ABBREVS["capricornus"] = "♑" ABBREVS["diameter"] = "⌀" ABBREVS["underbracket"] = "⎵" ABBREVS["subsim"] = "⫇" ABBREVS["bfN"] = "𝐍" ABBREVS["house"] = "⌂" ABBREVS["bisansJ"] = "𝙅" ABBREVS["bsanstwo"] = "𝟮" ABBREVS["bfpsi"] = "𝛙" ABBREVS["towa"] = "⤪" ABBREVS["itM"] = "𝑀" ABBREVS["bsansv"] = "𝘃" ABBREVS["schwa"] = "ə" ABBREVS["in"] = "∈" ABBREVS["bfe"] = "𝐞" ABBREVS["bscrH"] = "𝓗" ABBREVS["bfrakk"] = "𝖐" ABBREVS["^0"] = "⁰" ABBREVS["enclosecircle"] = "⃝" ABBREVS["bscrQ"] = "𝓠" ABBREVS["modtwosum"] = "⨊" ABBREVS["chi"] = "χ" ABBREVS["biiota"] = "𝜾" ABBREVS["^alpha"] = "ᵅ" ABBREVS["measanglerutone"] = "⦨" ABBREVS["itD"] = "𝐷" ABBREVS["sansLmirrored"] = "⅃" ABBREVS["nvrightarrow"] = "⇸" ABBREVS["biD"] = "𝑫" ABBREVS["pes"] = "₧" ABBREVS["bsansR"] = "𝗥" ABBREVS["mapsdown"] = "↧" ABBREVS["bsanspsi"] = "𝞇" ABBREVS["imath"] = "ı" ABBREVS["bfa"] = "𝐚" ABBREVS["sanstwo"] = "𝟤" ABBREVS["squareurquad"] = "◳" ABBREVS["bfrakU"] = "𝖀" ABBREVS["biZeta"] = "𝜡" ABBREVS["bisanst"] = "𝙩" ABBREVS["smwhtlozenge"] = "⬫" ABBREVS["^V"] = "ⱽ" ABBREVS["frakL"] = "𝔏" ABBREVS["bbzero"] = "𝟘" ABBREVS["rightthreearrows"] = "⇶" ABBREVS["bsansxi"] = "𝝽" ABBREVS["ttzero"] = "𝟶" ABBREVS["scrU"] = "𝒰" ABBREVS["bsansb"] = "𝗯" ABBREVS["bfiota"] = "𝛊" ABBREVS["bfrakg"] = "𝖌" ABBREVS["QED"] = "∎" ABBREVS["^b"] = "ᵇ" ABBREVS["bisansl"] = "𝙡" ABBREVS["boxbar"] = "◫" ABBREVS["bbfive"] = "𝟝" ABBREVS["Ldsh"] = "↲" ABBREVS["bisansalpha"] = "𝞪" ABBREVS["angdnr"] = "⦟" ABBREVS["scrm"] = "𝓂" ABBREVS["its"] = "𝑠" ABBREVS["Xi"] = "Ξ" ABBREVS["sansH"] = "𝖧" ABBREVS["RightUpVectorBar"] = "⥔" ABBREVS["veebar"] = "⊻" ABBREVS["nsuccsim"] = "≿̸" ABBREVS["itX"] = "𝑋" ABBREVS["bsansN"] = "𝗡" ABBREVS["bisansy"] = "𝙮" ABBREVS["tto"] = "𝚘" ABBREVS["tts"] = "𝚜" ABBREVS["verymuchless"] = "⋘" ABBREVS["bsanspi"] = "𝝿" ABBREVS["frakr"] = "𝔯" ABBREVS["leftdasharrow"] = "⇠" ABBREVS["bfrakQ"] = "𝕼" ABBREVS["rrbracket"] = "⟧" ABBREVS["triangletimes"] = "⨻" ABBREVS["dicei"] = "⚀" ABBREVS["closedvarcup"] = "⩌" ABBREVS["bbH"] = "ℍ" ABBREVS["squarenwsefill"] = "▧" ABBREVS["_gamma"] = "ᵧ" ABBREVS["triangleq"] = "≜" ABBREVS["lrtriangle"] = "◿" ABBREVS["bfc"] = "𝐜" ABBREVS["ogreaterthan"] = "⧁" ABBREVS["congdot"] = "⩭" ABBREVS["Beta"] = "Β" ABBREVS["minusrdots"] = "⨬" ABBREVS["bscrf"] = "𝓯" ABBREVS["bisansSigma"] = "𝞢" ABBREVS["ast"] = "∗" ABBREVS["bigsqcup"] = "⨆" ABBREVS["bsansq"] = "𝗾" ABBREVS["bfbeta"] = "𝛃" ABBREVS["bsansF"] = "𝗙" ABBREVS["eqqplus"] = "⩱" ABBREVS["bisansp"] = "𝙥" ABBREVS["enclosesquare"] = "⃞" ABBREVS["barleftarrow"] = "⇤" ABBREVS["bscrr"] = "𝓻" ABBREVS["isansN"] = "𝘕" ABBREVS["bsansOmicron"] = "𝝤" ABBREVS["ttsix"] = "𝟼" ABBREVS["itLambda"] = "𝛬" ABBREVS["nequiv"] = "≢" ABBREVS["equivDD"] = "⩸" ABBREVS["lat"] = "⪫" ABBREVS["isansS"] = "𝘚" ABBREVS["ttb"] = "𝚋" ABBREVS["ncong"] = "≇" ABBREVS["bbthree"] = "𝟛" ABBREVS["^theta"] = "ᶿ" ABBREVS["biM"] = "𝑴" ABBREVS["Succ"] = "⪼" ABBREVS["_schwa"] = "ₔ" ABBREVS["Finv"] = "Ⅎ" ABBREVS["ttf"] = "𝚏" ABBREVS["bsansEta"] = "𝝜" ABBREVS["_0"] = "₀" ABBREVS["dddot"] = "⃛" ABBREVS["scri"] = "𝒾" ABBREVS["implies"] = "⟹" ABBREVS["bfg"] = "𝐠" ABBREVS["bfeta"] = "𝛈" ABBREVS["itw"] = "𝑤" ABBREVS["dotminus"] = "∸" ABBREVS["bscrN"] = "𝓝" ABBREVS["oint"] = "∮" ABBREVS["bsanst"] = "𝘁" ABBREVS["circlearrowleft"] = "↺" ABBREVS["bscrE"] = "𝓔" ABBREVS["blackinwhitediamond"] = "◈" ABBREVS["diamondleftblack"] = "⬖" ABBREVS["nHdownarrow"] = "⇟" ABBREVS["bbJ"] = "𝕁" ABBREVS["diamondsuit"] = "♢" ABBREVS["frakg"] = "𝔤" ABBREVS["isansO"] = "𝘖" ABBREVS["bsansL"] = "𝗟" ABBREVS["bsansnu"] = "𝝼" ABBREVS["nLeftarrow"] = "⇍" ABBREVS["bie"] = "𝒆" ABBREVS["smalltriangleleft"] = "◃" ABBREVS["rightleftharpoonsdown"] = "⥩" ABBREVS["acute"] = "́" ABBREVS["llbracket"] = "⟦" ABBREVS["UUparrow"] = "⟰" ABBREVS["Nearrow"] = "⇗" ABBREVS["biu"] = "𝒖" ABBREVS["bsansl"] = "𝗹" ABBREVS["bigtriangledown"] = "▽" ABBREVS["bfphi"] = "𝛟" ABBREVS["Longleftarrow"] = "⟸" ABBREVS["nsucc"] = "⊁" ABBREVS["square"] = "□" ABBREVS["succ"] = "≻" ABBREVS["circledrightdot"] = "⚆" ABBREVS["bfd"] = "𝐝" ABBREVS["sansh"] = "𝗁" ABBREVS["bbgamma"] = "ℽ" ABBREVS["isansv"] = "𝘷" ABBREVS["biomicron"] = "𝝄" ABBREVS["bisansIota"] = "𝞘" ABBREVS["bbT"] = "𝕋" ABBREVS["scrC"] = "𝒞" ABBREVS["pscrv"] = "ʋ" ABBREVS["bsansdelta"] = "𝝳" ABBREVS["neovnwarrow"] = "⤱" ABBREVS["isanso"] = "𝘰" ABBREVS["twoheadmapsto"] = "⤅" ABBREVS["langle"] = "⟨" ABBREVS["DownRightVectorBar"] = "⥗" ABBREVS["Longmapsfrom"] = "⟽" ABBREVS["Yup"] = "⅄" ABBREVS["scrZ"] = "𝒵" ABBREVS["itvarrho"] = "𝜚" ABBREVS["clubsuit"] = "♣" ABBREVS["elsdot"] = "⪗" ABBREVS["Stigma"] = "Ϛ" ABBREVS["biEta"] = "𝜢" ABBREVS["xor"] = "⊻" ABBREVS["rightangle"] = "∟" ABBREVS["backsim"] = "∽" ABBREVS["5/8"] = "⅝" ABBREVS["minhat"] = "⩟" ABBREVS["isansJ"] = "𝘑" ABBREVS["bfmu"] = "𝛍" ABBREVS["bsansC"] = "𝗖" ABBREVS["downdownarrows"] = "⇊" ABBREVS["measeq"] = "≞" ABBREVS["^f"] = "ᶠ" ABBREVS["lowint"] = "⨜" ABBREVS["emptyset"] = "∅" ABBREVS["sansM"] = "𝖬" ABBREVS["varphi"] = "φ" ABBREVS["bsansp"] = "𝗽" ABBREVS["blacklozenge"] = "⧫" ABBREVS["Tau"] = "Τ" ABBREVS["itAlpha"] = "𝛢" ABBREVS["itvarphi"] = "𝜙" ABBREVS["bisansn"] = "𝙣" ABBREVS["looparrowleft"] = "↫" ABBREVS["isansV"] = "𝘝" ABBREVS["nVtwoheadrightarrow"] = "⤁" ABBREVS["ttp"] = "𝚙" ABBREVS["beth"] = "ℶ" ABBREVS["isansX"] = "𝘟" ABBREVS["itj"] = "𝑗" ABBREVS["sansj"] = "𝗃" ABBREVS["nsim"] = "≁" ABBREVS["ocirc"] = "̊" ABBREVS["div"] = "÷" ABBREVS["sansJ"] = "𝖩" ABBREVS["bfrakt"] = "𝖙" ABBREVS["itpi"] = "𝜋" ABBREVS["sansG"] = "𝖦" ABBREVS["longmapsfrom"] = "⟻" ABBREVS["_-"] = "₋" ABBREVS["bfsigma"] = "𝛔" ABBREVS["squarehvfill"] = "▦" ABBREVS["bfv"] = "𝐯" ABBREVS["leftrightharpoonupdown"] = "⥊" ABBREVS["turnk"] = "ʞ" ABBREVS["bigcupdot"] = "⨃" ABBREVS["And"] = "⩓" ABBREVS["itE"] = "𝐸" ABBREVS["bisansTheta"] = "𝞗" ABBREVS["bbsum"] = "⅀" ABBREVS["iiint"] = "∭" ABBREVS["threeunderdot"] = "⃨" ABBREVS["frakF"] = "𝔉" ABBREVS["lvboxline"] = "⎸" ABBREVS["bscrC"] = "𝓒" ABBREVS["cancer"] = "♋" ABBREVS["midbarwedge"] = "⩜" ABBREVS["sqcup"] = "⊔" ABBREVS["lrblacktriangle"] = "◢" ABBREVS["Longrightarrow"] = "⟹" ABBREVS["bikappa"] = "𝜿" ABBREVS["subsetneq"] = "⊊" ABBREVS["itBeta"] = "𝛣" ABBREVS["ovhook"] = "̉" ABBREVS["equalleftarrow"] = "⭀" ABBREVS["bscrg"] = "𝓰" ABBREVS["enclosetriangle"] = "⃤" ABBREVS["dagger"] = "†" ABBREVS["supsetdot"] = "⪾" ABBREVS["frakf"] = "𝔣" ABBREVS["scrI"] = "ℐ" ABBREVS["rightouterjoin"] = "⟖" ABBREVS["bfrakZ"] = "𝖅" ABBREVS["twoheadmapsfrom"] = "⬶" ABBREVS["bbf"] = "𝕗" ABBREVS["itP"] = "𝑃" ABBREVS["bsansalpha"] = "𝝰" ABBREVS["bisansE"] = "𝙀" ABBREVS["binu"] = "𝝂" ABBREVS["itz"] = "𝑧" ABBREVS["^g"] = "ᵍ" ABBREVS["Sqcup"] = "⩏" ABBREVS["biq"] = "𝒒" ABBREVS["scrO"] = "𝒪" ABBREVS["bfrakI"] = "𝕴" ABBREVS["isansa"] = "𝘢" ABBREVS["bfOmicron"] = "𝚶" ABBREVS["leftwavearrow"] = "↜" ABBREVS["notlessgreater"] = "≸" ABBREVS["rightrightarrows"] = "⇉" ABBREVS["DownRightTeeVector"] = "⥟" ABBREVS["supsetapprox"] = "⫊" ABBREVS["ttP"] = "𝙿" ABBREVS["allequal"] = "≌" ABBREVS["bfV"] = "𝐕" ABBREVS["del"] = "∇" ABBREVS["blackpointerright"] = "►" ABBREVS["3/5"] = "⅗" ABBREVS["bbC"] = "ℂ" ABBREVS["female"] = "♀" ABBREVS["cdotp"] = "·" ABBREVS["bfvarphi"] = "𝛗" ABBREVS["bsansc"] = "𝗰" ABBREVS["bfnabla"] = "𝛁" ABBREVS["^T"] = "ᵀ" ABBREVS["itOmicron"] = "𝛰" ABBREVS["capdot"] = "⩀" ABBREVS["biY"] = "𝒀" ABBREVS["italpha"] = "𝛼" ABBREVS["ntrianglerighteq"] = "⋭" ABBREVS["notbackslash"] = "⍀" ABBREVS["nni"] = "∌" ABBREVS["blacktriangle"] = "▴" ABBREVS["mdblkcircle"] = "⚫" ABBREVS["saturn"] = "♄" ABBREVS["DownLeftRightVector"] = "⥐" ABBREVS["ordmasculine"] = "º" ABBREVS["curlyeqsucc"] = "⋟" ABBREVS["bsansBeta"] = "𝝗" ABBREVS["DownLeftTeeVector"] = "⥞" ABBREVS["rdiagovfdiag"] = "⤫" ABBREVS["mapsto"] = "↦" ABBREVS["veemidvert"] = "⩛" ABBREVS["^R"] = "ᴿ" ABBREVS["maltese"] = "✠" ABBREVS["rightarrowdiamond"] = "⤞" ABBREVS["bfsix"] = "𝟔" ABBREVS["leftouterjoin"] = "⟕" ABBREVS["hslash"] = "ℏ" ABBREVS["bisanszeta"] = "𝞯" ABBREVS["bbid"] = "ⅆ" ABBREVS["nVleftarrow"] = "⇺" ABBREVS["circleonrightarrow"] = "⇴" ABBREVS["bfraki"] = "𝖎" ABBREVS["ttY"] = "𝚈" ABBREVS["blockhalfshaded"] = "▒" ABBREVS["brokenbar"] = "¦" ABBREVS["blacksquare"] = "■" ABBREVS["mdlgblkdiamond"] = "◆" ABBREVS["circlellquad"] = "◵" ABBREVS["upuparrows"] = "⇈" ABBREVS["taurus"] = "♉" ABBREVS["planck"] = "ℎ" ABBREVS["bisansi"] = "𝙞" ABBREVS["frakW"] = "𝔚" ABBREVS["bbd"] = "𝕕" ABBREVS["bsansRho"] = "𝝦" ABBREVS["bfq"] = "𝐪" ABBREVS["vDash"] = "⊨" ABBREVS["conjquant"] = "⨇" ABBREVS["4/5"] = "⅘" ABBREVS["biPi"] = "𝜫" ABBREVS["varclubsuit"] = "♧" ABBREVS["bscrX"] = "𝓧" ABBREVS["sim"] = "∼" ABBREVS["bisanspi"] = "𝞹" ABBREVS["^8"] = "⁸" ABBREVS["RuleDelayed"] = "⧴" ABBREVS["^p"] = "ᵖ" ABBREVS["scrJ"] = "𝒥" ABBREVS["sum"] = "∑" ABBREVS["bfepsilon"] = "𝛆" ABBREVS["rightarrowbsimilar"] = "⭌" ABBREVS["aquarius"] = "♒" ABBREVS["sansS"] = "𝖲" ABBREVS["ggg"] = "⋙" ABBREVS["uranus"] = "♅" ABBREVS["biepsilon"] = "𝜺" ABBREVS["isinvb"] = "⋸" ABBREVS["rightthreetimes"] = "⋌" ABBREVS["oturnedcomma"] = "̒" ABBREVS["bscrR"] = "𝓡" ABBREVS["O"] = "Ø" ABBREVS["bfvarepsilon"] = "𝛜" ABBREVS["nbumpeq"] = "≏̸" ABBREVS["dashv"] = "⊣" ABBREVS["bbie"] = "ⅇ" ABBREVS["curlywedge"] = "⋏" ABBREVS["tth"] = "𝚑" ABBREVS["itTau"] = "𝛵" ABBREVS["mdlgwhtdiamond"] = "◇" ABBREVS["itk"] = "𝑘" ABBREVS["biZ"] = "𝒁" ABBREVS["biGamma"] = "𝜞" ABBREVS["bsansKappa"] = "𝝟" ABBREVS["underleftharpoondown"] = "⃭" ABBREVS["gg"] = "≫" ABBREVS["circleulquad"] = "◴" ABBREVS["ngtrsim"] = "≵" ABBREVS["_s"] = "ₛ" ABBREVS["smwhitestar"] = "⭒" ABBREVS["bfrakB"] = "𝕭" ABBREVS["glj"] = "⪤" ABBREVS["sqsupset"] = "⊐" ABBREVS["frakt"] = "𝔱" ABBREVS["nprec"] = "⊀" ABBREVS["_n"] = "ₙ" ABBREVS["diamond"] = "⋄" ABBREVS["Lap"] = "⧊" ABBREVS["otimesrhrim"] = "⨵" ABBREVS["leftrightarrows"] = "⇆" ABBREVS["LeftUpTeeVector"] = "⥠" ABBREVS["itphi"] = "𝜑" ABBREVS["hexagon"] = "⎔" ABBREVS["biSigma"] = "𝜮" ABBREVS["eighthnote"] = "♪" ABBREVS["risingdotseq"] = "≓" ABBREVS["RightUpTeeVector"] = "⥜" ABBREVS["bbrktbrk"] = "⎶" ABBREVS["^("] = "⁽" ABBREVS["1/2"] = "½" ABBREVS["bfEpsilon"] = "𝚬" ABBREVS["iint"] = "∬" ABBREVS["nleqslant"] = "⩽̸" ABBREVS["leftrightarrowtriangle"] = "⇿" ABBREVS["squarelrquad"] = "◲" ABBREVS["measanglerdtose"] = "⦪" ABBREVS["eparsl"] = "⧣" ABBREVS["nprecsim"] = "≾̸" ABBREVS["btimes"] = "⨲" ABBREVS["bia"] = "𝒂" ABBREVS["bisansLambda"] = "𝞚" ABBREVS["oe"] = "œ" ABBREVS["forall"] = "∀" ABBREVS["bbl"] = "𝕝" ABBREVS["ttu"] = "𝚞" ABBREVS["bisansDelta"] = "𝞓" ABBREVS["bfDigamma"] = "𝟊" ABBREVS["rightarrowtriangle"] = "⇾" ABBREVS["bbw"] = "𝕨" ABBREVS["leftarrowx"] = "⬾" ABBREVS["bba"] = "𝕒" ABBREVS["supset"] = "⊃" ABBREVS["supsim"] = "⫈" ABBREVS["bfrakP"] = "𝕻" ABBREVS["ordfeminine"] = "ª" ABBREVS["equiv"] = "≡" ABBREVS["sharp"] = "♯" ABBREVS["bsansY"] = "𝗬" ABBREVS["sbrhr"] = "˒" ABBREVS["_2"] = "₂" ABBREVS["bbo"] = "𝕠" ABBREVS["epsilon"] = "ϵ" ABBREVS["Nwarrow"] = "⇖" ABBREVS["bfMu"] = "𝚳" ABBREVS["bsansmu"] = "𝝻" ABBREVS["itlambda"] = "𝜆" ABBREVS["isansE"] = "𝘌" ABBREVS["ae"] = "æ" ABBREVS["nrleg"] = "ƞ" ABBREVS["infty"] = "∞" ABBREVS["dualmap"] = "⧟" ABBREVS["_="] = "₌" ABBREVS["eqgtr"] = "⋝" ABBREVS["bigotimes"] = "⨂" ABBREVS["bsansn"] = "𝗻" ABBREVS["nvleftarrow"] = "⇷" ABBREVS["Swarrow"] = "⇙" ABBREVS["vrecto"] = "▯" ABBREVS["isinE"] = "⋹" ABBREVS["leftharpoonaccent"] = "⃐" ABBREVS["bbb"] = "𝕓" ABBREVS["inversewhitecircle"] = "◙" ABBREVS["commaminus"] = "⨩" ABBREVS["bisansf"] = "𝙛" ABBREVS["whitearrowupfrombar"] = "⇪" ABBREVS["bisansChi"] = "𝞦" ABBREVS["btdl"] = "ɬ" ABBREVS["vrectangleblack"] = "▮" ABBREVS["bsansO"] = "𝗢" ABBREVS["scrQ"] = "𝒬" ABBREVS["eqslantgtr"] = "⪖" ABBREVS["strike"] = "̶" ABBREVS["smblksquare"] = "▪" ABBREVS["scpolint"] = "⨓" ABBREVS["sansK"] = "𝖪" ABBREVS["lrcorner"] = "⌟" ABBREVS["bsansV"] = "𝗩" ABBREVS["birho"] = "𝝆" ABBREVS["nwarrow"] = "↖" ABBREVS["bfzero"] = "𝟎" ABBREVS["^M"] = "ᴹ" ABBREVS["_p"] = "ₚ" ABBREVS["simlE"] = "⪟" ABBREVS["_8"] = "₈" ABBREVS["scry"] = "𝓎" ABBREVS["bfvartheta"] = "𝛝" ABBREVS["leqq"] = "≦" ABBREVS["lfloor"] = "⌊" ABBREVS["cirfb"] = "◒" ABBREVS["bit"] = "𝒕" ABBREVS["bscrk"] = "𝓴" ABBREVS["urtriangle"] = "◹" ABBREVS["rightsquigarrow"] = "⇝" ABBREVS["leftarrow"] = "←" ABBREVS["sphericalangle"] = "∢" ABBREVS["revemptyset"] = "⦰" ABBREVS["nVtwoheadleftarrowtail"] = "⬽" ABBREVS["biP"] = "𝑷" ABBREVS["rLarr"] = "⥄" ABBREVS["boxtimes"] = "⊠" ABBREVS["ttm"] = "𝚖" ABBREVS["_i"] = "ᵢ" ABBREVS["dottedcircle"] = "◌" ABBREVS["bisansvarsigma"] = "𝞻" ABBREVS["hkswarow"] = "⤦" ABBREVS["bfl"] = "𝐥" ABBREVS["gtquest"] = "⩼" ABBREVS["bisansq"] = "𝙦" ABBREVS["frakK"] = "𝔎" ABBREVS["^r"] = "ʳ" ABBREVS["wedgeodot"] = "⩑" ABBREVS["isansC"] = "𝘊" ABBREVS["interleave"] = "⫴" ABBREVS["^B"] = "ᴮ" ABBREVS["doublebarvee"] = "⩢" ABBREVS["circledwhitebullet"] = "⦾" ABBREVS["complement"] = "∁" ABBREVS["biL"] = "𝑳" ABBREVS["itEta"] = "𝛨" ABBREVS["ttw"] = "𝚠" ABBREVS["bfzeta"] = "𝛇" ABBREVS["isansG"] = "𝘎" ABBREVS["simless"] = "⪝" ABBREVS["biOmega"] = "𝜴" ABBREVS["sqsubsetneq"] = "⋤" ABBREVS["Ddownarrow"] = "⤋" ABBREVS["sansx"] = "𝗑" ABBREVS["bih"] = "𝒉" ABBREVS["measanglelutonw"] = "⦩" ABBREVS["_rho"] = "ᵨ" ABBREVS["neqsim"] = "≂̸" ABBREVS["smwhtsquare"] = "▫" ABBREVS["itIota"] = "𝛪" ABBREVS["leftarrowapprox"] = "⭊" ABBREVS["upMu"] = "Μ" ABBREVS["nVrightarrow"] = "⇻" ABBREVS["bscrU"] = "𝓤" ABBREVS["Koppa"] = "Ϟ" ABBREVS["itnu"] = "𝜈" ABBREVS["isansq"] = "𝘲" ABBREVS["minusfdots"] = "⨫" ABBREVS["gggnest"] = "⫸" ABBREVS["angle"] = "∠" ABBREVS["bfF"] = "𝐅" ABBREVS["diceiv"] = "⚃" ABBREVS["scrT"] = "𝒯" ABBREVS["itSigma"] = "𝛴" ABBREVS["Eta"] = "Η" ABBREVS["ll"] = "≪" ABBREVS["underrightarrow"] = "⃯" ABBREVS["vartriangle"] = "▵" ABBREVS["bfrakv"] = "𝖛" ABBREVS["Leftarrow"] = "⇐" ABBREVS["lrtriangleeq"] = "⧡" ABBREVS["asymp"] = "≍" ABBREVS["defas"] = "⧋" ABBREVS["varointclockwise"] = "∲" ABBREVS["bscrL"] = "𝓛" ABBREVS["times"] = "×" ABBREVS["wr"] = "≀" ABBREVS["twoheadrightarrowtail"] = "⤖" ABBREVS["bsansiota"] = "𝝸" ABBREVS["llblacktriangle"] = "◣" ABBREVS["_u"] = "ᵤ" ABBREVS["ddotseq"] = "⩷" ABBREVS["lltriangle"] = "◺" ABBREVS["ss"] = "ß" ABBREVS["bii"] = "𝒊" ABBREVS["upOmicron"] = "Ο" ABBREVS["boxupcaret"] = "⍓" ABBREVS["suphsub"] = "⫗" ABBREVS["approxeqq"] = "⩰" ABBREVS["intcap"] = "⨙" ABBREVS["^k"] = "ᵏ" ABBREVS["openbracketleft"] = "⟦" ABBREVS["circleurquad"] = "◷" ABBREVS["gtcc"] = "⪧" ABBREVS["droang"] = "̚" ABBREVS["simgtr"] = "⪞" ABBREVS["isansK"] = "𝘒" ABBREVS["bfGamma"] = "𝚪" ABBREVS["leftarrowbackapprox"] = "⭂" ABBREVS["barrightarrowdiamond"] = "⤠" ABBREVS["triangleleft"] = "◁" ABBREVS["nvdash"] = "⊬" ABBREVS["biv"] = "𝒗" ABBREVS["bfTheta"] = "𝚯" ABBREVS["bscrS"] = "𝓢" ABBREVS["bisansm"] = "𝙢" ABBREVS["dotsminusdots"] = "∺" ABBREVS["ttg"] = "𝚐" ABBREVS["oiiint"] = "∰" ABBREVS["scrV"] = "𝒱" ABBREVS["questiondown"] = "¿" ABBREVS["forkv"] = "⫙" ABBREVS["updownarrowbar"] = "↨" ABBREVS["upepsilon"] = "ε" ABBREVS["itN"] = "𝑁" ABBREVS["pertenthousand"] = "‱" ABBREVS["precnsim"] = "⋨" ABBREVS["profline"] = "⌒" ABBREVS["bfdigamma"] = "𝟋" ABBREVS["itupsilon"] = "𝜐" ABBREVS["reapos"] = "‛" ABBREVS["ttA"] = "𝙰" ABBREVS["sansfive"] = "𝟧" ABBREVS["succneq"] = "⪲" ABBREVS["UpEquilibrium"] = "⥮" ABBREVS["ttk"] = "𝚔" ABBREVS["biC"] = "𝑪" ABBREVS["scrE"] = "ℰ" ABBREVS["bfrakd"] = "𝖉" ABBREVS["underleftrightarrow"] = "͍" ABBREVS["ttQ"] = "𝚀" ABBREVS["aries"] = "♈" ABBREVS["intercal"] = "⊺" ABBREVS["bbs"] = "𝕤" ABBREVS["Zbar"] = "Ƶ" ABBREVS["emptysetoarrl"] = "⦴" ABBREVS["itMu"] = "𝛭" ABBREVS["ntrianglelefteq"] = "⋬" ABBREVS["bigvee"] = "⋁" ABBREVS["minus"] = "−" ABBREVS["nleftarrow"] = "↚" ABBREVS["scrL"] = "ℒ" ABBREVS["bfp"] = "𝐩" ABBREVS["itvarepsilon"] = "𝜖" ABBREVS["mho"] = "℧" ABBREVS["bigwedge"] = "⋀" ABBREVS["benzenr"] = "⏣" ABBREVS["submult"] = "⫁" ABBREVS["sanss"] = "𝗌" ABBREVS["sinewave"] = "∿" ABBREVS["bbii"] = "ⅈ" ABBREVS["leftrightarrowcircle"] = "⥈" ABBREVS["diamondbotblack"] = "⬙" ABBREVS["fourthroot"] = "∜" ABBREVS["curlyvee"] = "⋎" ABBREVS["eth"] = "ð" ABBREVS["itK"] = "𝐾" ABBREVS["bisansF"] = "𝙁" ABBREVS["bsolhsub"] = "⟈" ABBREVS["bisansQ"] = "𝙌" ABBREVS["lsime"] = "⪍" ABBREVS["lesseqqgtr"] = "⪋" ABBREVS["dshfnc"] = "┆" ABBREVS["blackcircledrightdot"] = "⚈" ABBREVS["bbu"] = "𝕦" ABBREVS["bsansXi"] = "𝝣" ABBREVS["bsansf"] = "𝗳" ABBREVS["bsansj"] = "𝗷" ABBREVS["itI"] = "𝐼" ABBREVS["scorpio"] = "♏" ABBREVS["upharpoonright"] = "↾" ABBREVS["circlelrquad"] = "◶" ABBREVS["twocups"] = "⩊" ABBREVS["ttx"] = "𝚡" ABBREVS["bisanspartial"] = "𝟃" ABBREVS["lessdot"] = "⋖" ABBREVS["subsetplus"] = "⪿" ABBREVS["bfP"] = "𝐏" ABBREVS["sansm"] = "𝗆" ABBREVS["blackcircledtwodots"] = "⚉" ABBREVS["bfk"] = "𝐤" ABBREVS["bsansvartheta"] = "𝞋" ABBREVS["rsolbar"] = "⧷" ABBREVS["sqfr"] = "◨" ABBREVS["increment"] = "∆" ABBREVS["sansa"] = "𝖺" ABBREVS["bftwo"] = "𝟐" ABBREVS["ttseven"] = "𝟽" ABBREVS["isansI"] = "𝘐" ABBREVS["leftrightharpoonsup"] = "⥦" ABBREVS["fraky"] = "𝔶" ABBREVS["nVtwoheadrightarrowtail"] = "⤘" ABBREVS["ttX"] = "𝚇" ABBREVS["bisanstau"] = "𝞽" ABBREVS["otimeshat"] = "⨶" ABBREVS["1/5"] = "⅕" ABBREVS["ularc"] = "◜" ABBREVS["bsansNu"] = "𝝢" ABBREVS["_6"] = "₆" ABBREVS["coprod"] = "∐" ABBREVS["sansF"] = "𝖥" ABBREVS["aa"] = "å" ABBREVS["1/9"] = "⅑" ABBREVS["dblarrowupdown"] = "⇅" ABBREVS["isanst"] = "𝘵" ABBREVS["^epsilon"] = "ᵋ" ABBREVS["cupdot"] = "⊍" ABBREVS["Lsh"] = "↰" ABBREVS["itnabla"] = "𝛻" ABBREVS["trianglelefteq"] = "⊴" ABBREVS["scurel"] = "⊱" ABBREVS["emptysetoarr"] = "⦳" ABBREVS["degree"] = "°" ABBREVS["xrat"] = "℞" ABBREVS["dicevi"] = "⚅" ABBREVS["triangleminus"] = "⨺" ABBREVS["ddot"] = "̈" ABBREVS["topbot"] = "⌶" ABBREVS["updownharpoonleftright"] = "⥍" ABBREVS["blacklefthalfcircle"] = "◖" ABBREVS["hexagonblack"] = "⬣" ABBREVS["fraka"] = "𝔞" ABBREVS["bbone"] = "𝟙" ABBREVS["isansR"] = "𝘙" ABBREVS["ddagger"] = "‡" ABBREVS["scrA"] = "𝒜" ABBREVS["bscrc"] = "𝓬" ABBREVS["itvarpi"] = "𝜛" ABBREVS["bigcap"] = "⋂" ABBREVS["itW"] = "𝑊" ABBREVS["bibeta"] = "𝜷" ABBREVS["gesles"] = "⪔" ABBREVS["circeq"] = "≗" ABBREVS["Phi"] = "Φ" ABBREVS["guilsinglleft"] = "‹" ABBREVS["bisansA"] = "𝘼" ABBREVS["AE"] = "Æ" ABBREVS["check"] = "̌" ABBREVS["hlmrk"] = "ˑ" ABBREVS["intx"] = "⨘" ABBREVS["bfNu"] = "𝚴" ABBREVS["parallelogram"] = "▱" ABBREVS["Upsilon"] = "Υ" ABBREVS["bsansD"] = "𝗗" ABBREVS["arceq"] = "≘" ABBREVS["LeftUpDownVector"] = "⥑" ABBREVS["Dashv"] = "⫤" ABBREVS["sansb"] = "𝖻" ABBREVS["overbracket"] = "⎴" ABBREVS["sanse"] = "𝖾" ABBREVS["bfchi"] = "𝛘" ABBREVS["ltimes"] = "⋉" ABBREVS["bbseven"] = "𝟟" ABBREVS["leftrightarrow"] = "↔" ABBREVS["biI"] = "𝑰" ABBREVS["^P"] = "ᴾ" ABBREVS["rightarrowbackapprox"] = "⭈" ABBREVS["varspadesuit"] = "♤" ABBREVS["bfSigma"] = "𝚺" ABBREVS["Mapsto"] = "⤇" ABBREVS["bbg"] = "𝕘" ABBREVS["bivarpi"] = "𝝕" ABBREVS["Prec"] = "⪻" ABBREVS["mid"] = "∣" ABBREVS["subsetapprox"] = "⫉" ABBREVS["varisinobar"] = "⋶" ABBREVS["sansT"] = "𝖳" ABBREVS["bfU"] = "𝐔" ABBREVS["bivarrho"] = "𝝔" ABBREVS["tricolon"] = "⁝" ABBREVS["hookleftarrow"] = "↩" ABBREVS["sqfnw"] = "┙" ABBREVS["LeftTriangleBar"] = "⧏" ABBREVS["isansD"] = "𝘋" ABBREVS["bisansK"] = "𝙆" ABBREVS["^="] = "⁼" ABBREVS["bfDelta"] = "𝚫" ABBREVS["swarrow"] = "↙" ABBREVS["wideangleup"] = "⦧" ABBREVS["bar"] = "̄" ABBREVS["csube"] = "⫑" ABBREVS["bfrako"] = "𝖔" ABBREVS["rtlt"] = "ʈ" ABBREVS["natural"] = "♮" ABBREVS["mp"] = "∓" ABBREVS["niobar"] = "⋾" ABBREVS["invnot"] = "⌐" ABBREVS["biK"] = "𝑲" ABBREVS["biQ"] = "𝑸" ABBREVS["subseteq"] = "⊆" ABBREVS["squareneswfill"] = "▨" ABBREVS["isansT"] = "𝘛" ABBREVS["postalmark"] = "〒" ABBREVS["NG"] = "Ŋ" ABBREVS["LeftRightVector"] = "⥎" ABBREVS["frakc"] = "𝔠" ABBREVS["biG"] = "𝑮" ABBREVS["bfrakW"] = "𝖂" ABBREVS["bfrakN"] = "𝕹" ABBREVS["ittheta"] = "𝜃" ABBREVS["gtreqqless"] = "⪌" ABBREVS["isansr"] = "𝘳" ABBREVS["bisansT"] = "𝙏" ABBREVS["Longleftrightarrow"] = "⟺" ABBREVS["tildelow"] = "˜" ABBREVS["vdots"] = "⋮" ABBREVS["dashrightharpoondown"] = "⥭" ABBREVS["^H"] = "ᴴ" ABBREVS["bigbot"] = "⟘" ABBREVS["gimel"] = "ℷ" ABBREVS["iiiint"] = "⨌" ABBREVS["bip"] = "𝒑" ABBREVS["varbarwedge"] = "⌅" ABBREVS["twoheadleftarrowtail"] = "⬻" ABBREVS["ttq"] = "𝚚" ABBREVS["smte"] = "⪬" ABBREVS["bisansRho"] = "𝞠" ABBREVS["bisansepsilon"] = "𝞮" ABBREVS["whitepointerright"] = "▻" ABBREVS["nvLeftrightarrow"] = "⤄" ABBREVS["TH"] = "Þ" ABBREVS["mapsup"] = "↥" ABBREVS["revangleubar"] = "⦥" ABBREVS["scrz"] = "𝓏" ABBREVS["clwintegral"] = "∱" ABBREVS["sansthree"] = "𝟥" ABBREVS["_9"] = "₉" ABBREVS["circledbullet"] = "⦿" ABBREVS["ttN"] = "𝙽" ABBREVS["bisansv"] = "𝙫" ABBREVS["Lleftarrow"] = "⇚" ABBREVS["bfdelta"] = "𝛅" ABBREVS["hat"] = "̂" ABBREVS["nearrow"] = "↗" ABBREVS["vartheta"] = "ϑ" ABBREVS["bscrP"] = "𝓟" ABBREVS["varnis"] = "⋻" ABBREVS["Iota"] = "Ι" ABBREVS["varlrtriangle"] = "⊿" ABBREVS["bfy"] = "𝐲" ABBREVS["backpprime"] = "‶" ABBREVS["th"] = "þ" ABBREVS["frakX"] = "𝔛" ABBREVS["itS"] = "𝑆" ABBREVS["bscrZ"] = "𝓩" ABBREVS["kernelcontraction"] = "∻" ABBREVS["ntriangleright"] = "⋫" ABBREVS["frakT"] = "𝔗" ABBREVS["Searrow"] = "⇘" ABBREVS["tte"] = "𝚎" ABBREVS["bfrakz"] = "𝖟" ABBREVS["breve"] = "̆" ABBREVS["angleubar"] = "⦤" ABBREVS["hatapprox"] = "⩯" ABBREVS["bisansEta"] = "𝞖" ABBREVS["itvartheta"] = "𝜗" ABBREVS["trnt"] = "ʇ" ABBREVS["closedvarcupsmashprod"] = "⩐" ABBREVS["succeq"] = "⪰" ABBREVS["isansU"] = "𝘜" ABBREVS["enspace"] = " " ABBREVS["itq"] = "𝑞" ABBREVS["nwovnearrow"] = "⤲" ABBREVS["isansQ"] = "𝘘" ABBREVS["bsansfive"] = "𝟱" ABBREVS["bigcirc"] = "○" ABBREVS["suphsol"] = "⟉" ABBREVS["plushat"] = "⨣" ABBREVS["bisansZ"] = "𝙕" ABBREVS["sigma"] = "σ" ABBREVS["itvarTheta"] = "𝛳" ABBREVS["leftharpoonup"] = "↼" ABBREVS["bisansOmicron"] = "𝞞" ABBREVS["^L"] = "ᴸ" ABBREVS["^w"] = "ʷ" ABBREVS["int"] = "∫" ABBREVS["curlyeqprec"] = "⋞" ABBREVS["barleftarrowrightarrowbar"] = "↹" ABBREVS["rightwhitearrow"] = "⇨" ABBREVS["rightarrowplus"] = "⥅" ABBREVS["bbA"] = "𝔸" ABBREVS["sansY"] = "𝖸" ABBREVS["bsansrho"] = "𝞀" ABBREVS["sqrtbottom"] = "⎷" ABBREVS["bscrv"] = "𝓿" ABBREVS["nVrightarrowtail"] = "⤕" ABBREVS["neovsearrow"] = "⤮" ABBREVS["bscrW"] = "𝓦" ABBREVS["Leftrightarrow"] = "⇔" ABBREVS["rightharpoonsupdown"] = "⥤" ABBREVS["lceil"] = "⌈" ABBREVS["UpArrowBar"] = "⤒" ABBREVS["bfAlpha"] = "𝚨" ABBREVS["bfi"] = "𝐢" ABBREVS["bfrakH"] = "𝕳" ABBREVS["ne"] = "≠" ABBREVS["varsubsetneqq"] = "⊊︀" ABBREVS["bfs"] = "𝐬" ABBREVS["bullet"] = "•" ABBREVS["bfrakf"] = "𝖋" ABBREVS["^+"] = "⁺" ABBREVS["itpsi"] = "𝜓" ABBREVS["lgE"] = "⪑" ABBREVS["bffive"] = "𝟓" ABBREVS["trnh"] = "ɥ" ABBREVS["boxbslash"] = "⧅" ABBREVS["equalparallel"] = "⋕" ABBREVS["cirfnint"] = "⨐" ABBREVS["biz"] = "𝒛" ABBREVS["subedot"] = "⫃" ABBREVS["bbi"] = "𝕚" ABBREVS["itRho"] = "𝛲" ABBREVS["nLeftrightarrow"] = "⇎" ABBREVS["itepsilon"] = "𝜀" ABBREVS["itomega"] = "𝜔" ABBREVS["dashleftharpoondown"] = "⥫" ABBREVS["hrectangle"] = "▭" ABBREVS["bbM"] = "𝕄" ABBREVS["ttd"] = "𝚍" ABBREVS["bsansM"] = "𝗠" ABBREVS["bfX"] = "𝐗" ABBREVS["bisansvarkappa"] = "𝟆" ABBREVS["itkappa"] = "𝜅" ABBREVS["precnapprox"] = "⪹" ABBREVS["scrj"] = "𝒿" ABBREVS["nsqsupseteq"] = "⋣" ABBREVS["precapprox"] = "⪷" ABBREVS["pentagonblack"] = "⬟" ABBREVS["curvearrowright"] = "↷" ABBREVS["bfrakA"] = "𝕬" ABBREVS["sqspne"] = "⋥" ABBREVS["bfm"] = "𝐦" ABBREVS["bisansW"] = "𝙒" ABBREVS["top"] = "⊤" ABBREVS["sansi"] = "𝗂" ABBREVS["bbZ"] = "ℤ" ABBREVS["itiota"] = "𝜄" ABBREVS["blacktriangledown"] = "▾" ABBREVS["squoval"] = "▢" ABBREVS["rasp"] = "ʼ" ABBREVS["downharpoonright"] = "⇂" ABBREVS["bsanssix"] = "𝟲" ABBREVS["sqsubset"] = "⊏" ABBREVS["squarellblack"] = "⬕" ABBREVS["underrightharpoondown"] = "⃬" ABBREVS["succsim"] = "≿" ABBREVS["dashV"] = "⫣" ABBREVS["itzeta"] = "𝜁" ABBREVS["emdash"] = "—" ABBREVS["biA"] = "𝑨" ABBREVS["itPhi"] = "𝛷" ABBREVS["biJ"] = "𝑱" ABBREVS["bisansOmega"] = "𝞨" ABBREVS["scrM"] = "ℳ" ABBREVS["bin"] = "𝒏" ABBREVS["delta"] = "δ" ABBREVS["rfloor"] = "⌋" ABBREVS["eqslantless"] = "⪕" ABBREVS["twoheaduparrow"] = "↟" ABBREVS["bsansJ"] = "𝗝" ABBREVS["bisansM"] = "𝙈" ABBREVS["^phi"] = "ᵠ" ABBREVS["bisansd"] = "𝙙" ABBREVS["^i"] = "ⁱ" ABBREVS["eqcolon"] = "≕" ABBREVS["bfvarsigma"] = "𝛓" ABBREVS["bfrakM"] = "𝕸" ABBREVS["nsubseteq"] = "⊈" ABBREVS["bisansomega"] = "𝟂" ABBREVS["wedge"] = "∧" ABBREVS["^N"] = "ᴺ" ABBREVS["cdots"] = "⋯" ABBREVS["7/8"] = "⅞" ABBREVS["smblklozenge"] = "⬪" ABBREVS["spadesuit"] = "♠" ABBREVS["bfChi"] = "𝚾" ABBREVS["trapezium"] = "⏢" ABBREVS["bullseye"] = "◎" ABBREVS["scro"] = "ℴ" ABBREVS["tildetrpl"] = "≋" ABBREVS["leftrightsquigarrow"] = "↭" ABBREVS["^t"] = "ᵗ" ABBREVS["dbkarow"] = "⤏" ABBREVS["Sigma"] = "Σ" ABBREVS["longmapsto"] = "⟼" ABBREVS["DownArrowUpArrow"] = "⇵" ABBREVS["intbar"] = "⨍" ABBREVS["nasymp"] = "≭" ABBREVS["npreceq"] = "⪯̸" ABBREVS["isansM"] = "𝘔" ABBREVS["bbnine"] = "𝟡" ABBREVS["itdelta"] = "𝛿" ABBREVS["virgo"] = "♍" ABBREVS["bfPhi"] = "𝚽" ABBREVS["isansL"] = "𝘓" ABBREVS["boxast"] = "⧆" ABBREVS["bbV"] = "𝕍" ABBREVS["sansc"] = "𝖼" ABBREVS["bfUpsilon"] = "𝚼" ABBREVS["csupe"] = "⫒" ABBREVS["drbkarrow"] = "⤐" ABBREVS["bfrakC"] = "𝕮" ABBREVS["bscrl"] = "𝓵" ABBREVS["ell"] = "ℓ" ABBREVS["bfrakY"] = "𝖄" ABBREVS["squaretopblack"] = "⬒" ABBREVS["sansN"] = "𝖭" ABBREVS["isansB"] = "𝘉" ABBREVS["bisansPsi"] = "𝞧" ABBREVS["tau"] = "τ" ABBREVS["Vvert"] = "⦀" ABBREVS["circledS"] = "Ⓢ" ABBREVS["bsanse"] = "𝗲" ABBREVS["bbtwo"] = "𝟚" ABBREVS["boxdot"] = "⊡" ABBREVS["sanszero"] = "𝟢" ABBREVS["twoheadleftarrow"] = "↞" ABBREVS["barovernorthwestarrow"] = "↸" ABBREVS["mdwhtlozenge"] = "⬨" ABBREVS["bsansE"] = "𝗘" ABBREVS["bscrd"] = "𝓭" ABBREVS["Uparrow"] = "⇑" ABBREVS["squarevfill"] = "▥" ABBREVS["bfeight"] = "𝟖" ABBREVS["LeftVectorBar"] = "⥒" ABBREVS["_7"] = "₇" ABBREVS["rightdasharrow"] = "⇢" ABBREVS["itO"] = "𝑂" ABBREVS["sanst"] = "𝗍" ABBREVS["bisansu"] = "𝙪" ABBREVS["isansz"] = "𝘻" ABBREVS["sansO"] = "𝖮" ABBREVS["smwhtcircle"] = "◦" ABBREVS["nolinebreak"] = "⁠" ABBREVS["rangle"] = "⟩" ABBREVS["rightarrowgtr"] = "⭃" ABBREVS["libra"] = "♎" ABBREVS["Lambda"] = "Λ" ABBREVS["esh"] = "ʃ" ABBREVS["ttfive"] = "𝟻" ABBREVS["dsol"] = "⧶" ABBREVS["sqsupseteq"] = "⊒" ABBREVS["_r"] = "ᵣ" ABBREVS["tieconcat"] = "⁀" ABBREVS["itGamma"] = "𝛤" ABBREVS["itg"] = "𝑔" ABBREVS["odot"] = "⊙" ABBREVS["supseteqq"] = "⫆" ABBREVS["csup"] = "⫐" ABBREVS["bsansm"] = "𝗺" ABBREVS["bisansS"] = "𝙎" ABBREVS["boxminus"] = "⊟" ABBREVS["Rdsh"] = "↳" ABBREVS["varveebar"] = "⩡" ABBREVS["bfrakx"] = "𝖝" ABBREVS["k"] = "̨" ABBREVS["bfBeta"] = "𝚩" ABBREVS["bilambda"] = "𝝀" ABBREVS["nparallel"] = "∦" ABBREVS["Pi"] = "Π" ABBREVS["^n"] = "ⁿ" ABBREVS["conictaper"] = "⌲" ABBREVS["biBeta"] = "𝜝" ABBREVS["^z"] = "ᶻ" ABBREVS["gtrapprox"] = "⪆" ABBREVS["lessgtr"] = "≶" ABBREVS["scrw"] = "𝓌" ABBREVS["frakE"] = "𝔈" ABBREVS["bix"] = "𝒙" ABBREVS["ttthree"] = "𝟹" ABBREVS["overleftrightarrow"] = "⃡" ABBREVS["mdwhtcircle"] = "⚪" ABBREVS["bisansrho"] = "𝞺" ABBREVS["dotsim"] = "⩪" ABBREVS["bfrakX"] = "𝖃" ABBREVS["coloneq"] = "≔" ABBREVS["trademark"] = "™" ABBREVS["pisces"] = "♓" ABBREVS["bscrY"] = "𝓨" ABBREVS["bbfour"] = "𝟜" ABBREVS["rightarrowsupset"] = "⭄" ABBREVS["itu"] = "𝑢" ABBREVS["preceqq"] = "⪳" ABBREVS["bio"] = "𝒐" ABBREVS["eqcirc"] = "≖" ABBREVS["quarternote"] = "♩" ABBREVS["measangleldtosw"] = "⦫" ABBREVS["RightVectorBar"] = "⥓" ABBREVS["vysmblksquare"] = "⬝" ABBREVS["bscrz"] = "𝔃" ABBREVS["frakJ"] = "𝔍" ABBREVS["lgwhtsquare"] = "⬜" ABBREVS["sansf"] = "𝖿" ABBREVS["bsansvarepsilon"] = "𝞊" ABBREVS["bfnine"] = "𝟗" ABBREVS["upharpoonleft"] = "↿" ABBREVS["sansl"] = "𝗅" ABBREVS["wedgeq"] = "≙" ABBREVS["itChi"] = "𝛸" ABBREVS["^U"] = "ᵁ" ABBREVS["hrectangleblack"] = "▬" ABBREVS["hookrightarrow"] = "↪" ABBREVS["supsetneq"] = "⊋" ABBREVS["nis"] = "⋼" ABBREVS["bisansI"] = "𝙄" ABBREVS["biIota"] = "𝜤" ABBREVS["5/6"] = "⅚" ABBREVS["bbX"] = "𝕏" ABBREVS["bisansdelta"] = "𝞭" ABBREVS["succneqq"] = "⪶" ABBREVS["precneq"] = "⪱" ABBREVS["frakw"] = "𝔴" ABBREVS["diamondleftarrow"] = "⤝" ABBREVS["bbY"] = "𝕐" ABBREVS["bisansbeta"] = "𝞫" ABBREVS["bisansKappa"] = "𝞙" ABBREVS["bfIota"] = "𝚰" ABBREVS["bfTau"] = "𝚻" ABBREVS["rtll"] = "ɭ" ABBREVS["bim"] = "𝒎" ABBREVS["sout"] = "̶" ABBREVS["precsim"] = "≾" ABBREVS["invw"] = "ʍ" ABBREVS["bsansZ"] = "𝗭" ABBREVS["^E"] = "ᴱ" ABBREVS["biphi"] = "𝝋" ABBREVS["upkoppa"] = "ϟ" ABBREVS["trnsa"] = "ɒ" ABBREVS["^d"] = "ᵈ" ABBREVS["Gamma"] = "Γ" ABBREVS["preceq"] = "⪯" ABBREVS["bscrM"] = "𝓜" ABBREVS["bfraka"] = "𝖆" ABBREVS["isansH"] = "𝘏" ABBREVS["tosa"] = "⤩" ABBREVS["otimeslhrim"] = "⨴" ABBREVS["bsansOmega"] = "𝝮" ABBREVS["notin"] = "∉" ABBREVS["inglst"] = "ʖ" ABBREVS["frakl"] = "𝔩" ABBREVS["^u"] = "ᵘ" ABBREVS["ulblacktriangle"] = "◤" ABBREVS["bil"] = "𝒍" ABBREVS["_beta"] = "ᵦ" ABBREVS["sansR"] = "𝖱" ABBREVS["euro"] = "€" ABBREVS["circ"] = "∘" ABBREVS["bisansnabla"] = "𝞩" ABBREVS["prime"] = "′" ABBREVS["biH"] = "𝑯" ABBREVS["itomicron"] = "𝜊" ABBREVS["biTheta"] = "𝜣" ABBREVS["mdwhtsquare"] = "◻" ABBREVS["Angstrom"] = "Å" ABBREVS["isansh"] = "𝘩" ABBREVS["cdot"] = "⋅" ABBREVS["uplus"] = "⊎" ABBREVS["blockuphalf"] = "▀" ABBREVS["leftthreearrows"] = "⬱" ABBREVS["bid"] = "𝒅" ABBREVS["leftdbkarrow"] = "⤎" ABBREVS["itb"] = "𝑏" ABBREVS["rtimes"] = "⋊" ABBREVS["bisansvarTheta"] = "𝞡" ABBREVS["numero"] = "№" ABBREVS["carriagereturn"] = "↵" ABBREVS["gsiml"] = "⪐" ABBREVS["scrK"] = "𝒦" ABBREVS["circledtwodots"] = "⚇" ABBREVS["nmid"] = "∤" ABBREVS["DJ"] = "Đ" ABBREVS["bsanso"] = "𝗼" ABBREVS["scrq"] = "𝓆" ABBREVS["sansnine"] = "𝟫" ABBREVS["trianglecdot"] = "◬" ABBREVS["bfOmega"] = "𝛀" ABBREVS["bfZeta"] = "𝚭" ABBREVS["trny"] = "ʎ" ABBREVS["^3"] = "³" ABBREVS["^j"] = "ʲ" ABBREVS["bsansh"] = "𝗵" ABBREVS["bfrakE"] = "𝕰" ABBREVS["ldots"] = "…" ABBREVS["scrx"] = "𝓍" ABBREVS["DownLeftVectorBar"] = "⥖" ABBREVS["Supset"] = "⋑" ABBREVS["mdblklozenge"] = "⬧" ABBREVS["itvarsigma"] = "𝜍" ABBREVS["barcup"] = "⩂" ABBREVS["bftheta"] = "𝛉" ABBREVS["bif"] = "𝒇" ABBREVS["simrdots"] = "⩫" ABBREVS["pgamma"] = "ɣ" ABBREVS["ttM"] = "𝙼" ABBREVS["midbarvee"] = "⩝" ABBREVS["RightUpDownVector"] = "⥏" ABBREVS["enclosediamond"] = "⃟" ABBREVS["bisansAlpha"] = "𝞐" ABBREVS["^5"] = "⁵" ABBREVS["rightleftharpoonsup"] = "⥨" ABBREVS["ltcir"] = "⩹" ABBREVS["varhexagonlrbonds"] = "⌬" ABBREVS["upharpoonsleftright"] = "⥣" ABBREVS["varpi"] = "ϖ" ABBREVS["scrR"] = "ℛ" ABBREVS["bfH"] = "𝐇" ABBREVS["circledast"] = "⊛" ABBREVS["cap"] = "∩" ABBREVS["bir"] = "𝒓" ABBREVS["bscrh"] = "𝓱" ABBREVS["Kappa"] = "Κ" ABBREVS["vdash"] = "⊢" ABBREVS["bib"] = "𝒃" ABBREVS["smalltriangleright"] = "▹" ABBREVS["because"] = "∵" ABBREVS["barcap"] = "⩃" ABBREVS["^beta"] = "ᵝ" ABBREVS["bigtop"] = "⟙" ABBREVS["elinters"] = "⏧" ABBREVS["frakh"] = "𝔥" ABBREVS["bfvarpi"] = "𝛡" ABBREVS["bipi"] = "𝝅" ABBREVS["_chi"] = "ᵪ" ABBREVS["scrf"] = "𝒻" ABBREVS["Times"] = "⨯" ABBREVS["sqfse"] = "◪" ABBREVS["rightharpoonupdash"] = "⥬" ABBREVS["varniobar"] = "⋽" ABBREVS["^iota"] = "ᶥ" ABBREVS["biguplus"] = "⨄" ABBREVS["nVleftrightarrow"] = "⇼" ABBREVS["^a"] = "ᵃ" ABBREVS["^v"] = "ᵛ" ABBREVS["itr"] = "𝑟" ABBREVS["bisansV"] = "𝙑" ABBREVS["eqsim"] = "≂" ABBREVS["whiteinwhitetriangle"] = "⟁" ABBREVS["pupsil"] = "ʊ" ABBREVS["lrarc"] = "◞" ABBREVS["frakQ"] = "𝔔" ABBREVS["isansg"] = "𝘨" ABBREVS["tona"] = "⤧" ABBREVS["setminus"] = "∖" ABBREVS["nsqsubseteq"] = "⋢" ABBREVS["doublepipe"] = "ǂ" ABBREVS["lesdot"] = "⩿" ABBREVS["isansw"] = "𝘸" ABBREVS["bsansone"] = "𝟭" ABBREVS["scrl"] = "𝓁" ABBREVS["bbO"] = "𝕆" ABBREVS["therefore"] = "∴" ABBREVS["leftarrowtail"] = "↢" ABBREVS["scre"] = "ℯ" ABBREVS["smallni"] = "∍" ABBREVS["rightanglearc"] = "⊾" ABBREVS["measuredangle"] = "∡" ABBREVS["iti"] = "𝑖" ABBREVS["LeftTeeVector"] = "⥚" ABBREVS["bfrakK"] = "𝕶" ABBREVS["bisansvarphi"] = "𝟇" ABBREVS["sansk"] = "𝗄" ABBREVS["blkvertoval"] = "⬮" ABBREVS["scrr"] = "𝓇" ABBREVS["bisansPi"] = "𝞟" ABBREVS["longleftarrow"] = "⟵" ABBREVS["reglst"] = "ʕ" ABBREVS["dj"] = "đ" ABBREVS["downzigzagarrow"] = "↯" ABBREVS["supedot"] = "⫄" ABBREVS["biW"] = "𝑾" ABBREVS["ppprime"] = "‴" ABBREVS["biX"] = "𝑿" ABBREVS["scrd"] = "𝒹" ABBREVS["intprod"] = "⨼" ABBREVS["notgreaterless"] = "≹" ABBREVS["frakn"] = "𝔫" ABBREVS["mdsmblksquare"] = "◾" ABBREVS["bsansg"] = "𝗴" ABBREVS["whitepointerleft"] = "◅" ABBREVS["bfomega"] = "𝛚" ABBREVS["bsansnine"] = "𝟵" ABBREVS["^A"] = "ᴬ" ABBREVS["bisansxi"] = "𝞷" ABBREVS["_5"] = "₅" ABBREVS["scrF"] = "ℱ" ABBREVS["measangleurtone"] = "⦬" ABBREVS["bscrI"] = "𝓘" ABBREVS["3/8"] = "⅜" ABBREVS["biy"] = "𝒚" ABBREVS["bisansz"] = "𝙯" ABBREVS["rtlr"] = "ɽ" ABBREVS["subsub"] = "⫕" ABBREVS["frakz"] = "𝔷" ABBREVS["sansQ"] = "𝖰" ABBREVS["strns"] = "⏤" ABBREVS["gtrsim"] = "≳" ABBREVS["uparrowbarred"] = "⤉" ABBREVS["^Phi"] = "ᶲ" ABBREVS["bidelta"] = "𝜹" ABBREVS["adots"] = "⋰" ABBREVS["downdasharrow"] = "⇣" ABBREVS["rho"] = "ρ" ABBREVS["dh"] = "ð" ABBREVS["bscrK"] = "𝓚" ABBREVS["gla"] = "⪥" ABBREVS["itxi"] = "𝜉" ABBREVS["bfpi"] = "𝛑" ABBREVS["bfthree"] = "𝟑" ABBREVS["mdsmwhtcircle"] = "⚬" ABBREVS["bfEta"] = "𝚮" ABBREVS["eqdot"] = "⩦" ABBREVS["bfrakh"] = "𝖍" ABBREVS["emptysetobar"] = "⦱" ABBREVS["ittau"] = "𝜏" ABBREVS["leftthreetimes"] = "⋋" ABBREVS["bfrakc"] = "𝖈" ABBREVS["jupiter"] = "♃" ABBREVS["tta"] = "𝚊" ABBREVS["_a"] = "ₐ" ABBREVS["biPsi"] = "𝜳" ABBREVS["bsansPsi"] = "𝝭" ABBREVS["bumpeq"] = "≏" ABBREVS["oiint"] = "∯" ABBREVS["bigblacktriangledown"] = "▼" ABBREVS["dotplus"] = "∔" ABBREVS["bbS"] = "𝕊" ABBREVS["opluslhrim"] = "⨭" ABBREVS["searrow"] = "↘" ABBREVS["mdwhtdiamond"] = "⬦" ABBREVS["nvtwoheadrightarrow"] = "⤀" ABBREVS["bfrakj"] = "𝖏" ABBREVS["biDelta"] = "𝜟" ABBREVS["itT"] = "𝑇" ABBREVS["scrh"] = "𝒽" ABBREVS["diamondtopblack"] = "⬘" ABBREVS["diceii"] = "⚁" ABBREVS["ttE"] = "𝙴" ABBREVS["cirfl"] = "◐" ABBREVS["bbj"] = "𝕛" ABBREVS["bfA"] = "𝐀" ABBREVS["bsansa"] = "𝗮" ABBREVS["VDash"] = "⊫" ABBREVS["upomicron"] = "ο" ABBREVS["bscro"] = "𝓸" ABBREVS["bsansT"] = "𝗧" ABBREVS["bisansC"] = "𝘾" ABBREVS["frakV"] = "𝔙" ABBREVS["rsqhook"] = "⫎" ABBREVS["palh"] = "̡" ABBREVS["longleftsquigarrow"] = "⬳" ABBREVS["trnm"] = "ɯ" ABBREVS["^6"] = "⁶" ABBREVS["boxdiag"] = "⧄" ABBREVS["bic"] = "𝒄" ABBREVS["bscry"] = "𝔂" ABBREVS["quotedblright"] = "”" ABBREVS["upsampi"] = "ϡ" ABBREVS["bfrakD"] = "𝕯" ABBREVS["itDelta"] = "𝛥" ABBREVS["itKappa"] = "𝛫" ABBREVS["linefeed"] = "↴" ABBREVS["ttJ"] = "𝙹" ABBREVS["geqqslant"] = "⫺" ABBREVS["varsigma"] = "ς" ABBREVS["bfrakO"] = "𝕺" ABBREVS["bisanseta"] = "𝞰" ABBREVS["dyogh"] = "ʤ" ABBREVS["bsansfour"] = "𝟰" ABBREVS["^y"] = "ʸ" ABBREVS["mdblksquare"] = "◼" ABBREVS["binabla"] = "𝜵" ABBREVS["bisansupsilon"] = "𝞾" ABBREVS["scrB"] = "ℬ" ABBREVS["rtls"] = "ʂ" ABBREVS["sqrint"] = "⨖" ABBREVS["itQ"] = "𝑄" ABBREVS["bfPi"] = "𝚷" ABBREVS["nu"] = "ν" ABBREVS["leftrightharpoons"] = "⇋" ABBREVS["preccurlyeq"] = "≼" ABBREVS["ddots"] = "⋱" ABBREVS["nvrightarrowtail"] = "⤔" ABBREVS["bipartial"] = "𝝏" ABBREVS["flat"] = "♭" ABBREVS["otimes"] = "⊗" ABBREVS["bfE"] = "𝐄" ABBREVS["lnapprox"] = "⪉" ABBREVS["npolint"] = "⨔" ABBREVS["bfM"] = "𝐌" ABBREVS["bscre"] = "𝓮" ABBREVS["sansu"] = "𝗎" ABBREVS["astrosun"] = "☉" ABBREVS["_t"] = "ₜ" ABBREVS["itTheta"] = "𝛩" ABBREVS["bichi"] = "𝝌" ABBREVS["vartriangleleft"] = "⊲" ABBREVS["bisansiota"] = "𝞲" ABBREVS["simplus"] = "⨤" ABBREVS["NotSquareSuperset"] = "⊐̸" ABBREVS["scrS"] = "𝒮" ABBREVS["bsansEpsilon"] = "𝝚" ABBREVS["bisansEpsilon"] = "𝞔" ABBREVS["bsanszeta"] = "𝝵" ABBREVS["ltlmr"] = "ɱ" ABBREVS["Psi"] = "Ψ" ABBREVS["upvarbeta"] = "ϐ" ABBREVS["bisansomicron"] = "𝞸" ABBREVS["squareurblack"] = "⬔" ABBREVS["mdlgblkcircle"] = "●" ABBREVS["scrb"] = "𝒷" ABBREVS["RightDownVectorBar"] = "⥕" ABBREVS["odiv"] = "⨸" ABBREVS["late"] = "⪭" ABBREVS["ominus"] = "⊖" ABBREVS["bscrt"] = "𝓽" ABBREVS["bbm"] = "𝕞" ABBREVS["grave"] = "̀" ABBREVS["odotslashdot"] = "⦼" ABBREVS["scrv"] = "𝓋" ABBREVS["sansD"] = "𝖣" ABBREVS["bbq"] = "𝕢" ABBREVS["rightpentagonblack"] = "⭓" ABBREVS["isinobar"] = "⋷" ABBREVS["bsansepsilon"] = "𝝴" ABBREVS["eqeqeq"] = "⩶" ABBREVS["bfone"] = "𝟏" ABBREVS["neuter"] = "⚲" ABBREVS["lesges"] = "⪓" ABBREVS["bowtie"] = "⋈" ABBREVS["frakH"] = "ℌ" ABBREVS["squareulblack"] = "◩" ABBREVS["bbU"] = "𝕌" ABBREVS["prod"] = "∏" ABBREVS["bfraku"] = "𝖚" ABBREVS["isansn"] = "𝘯" ABBREVS["leftharpoonsupdown"] = "⥢" ABBREVS["biUpsilon"] = "𝜰" ABBREVS["lgblksquare"] = "⬛" ABBREVS["sansn"] = "𝗇" ABBREVS["downwhitearrow"] = "⇩" ABBREVS["big"] = "𝒈" ABBREVS["succcurlyeq"] = "≽" ABBREVS["geqslant"] = "⩾" ABBREVS["^c"] = "ᶜ" ABBREVS["bscrw"] = "𝔀" ABBREVS["awint"] = "⨑" ABBREVS["scrW"] = "𝒲" ABBREVS["LeftDownVectorBar"] = "⥙" ABBREVS["_)"] = "₎" ABBREVS["not"] = "̸" ABBREVS["frako"] = "𝔬" ABBREVS["bisanspsi"] = "𝟁" ABBREVS["bigoplus"] = "⨁" ABBREVS["circledequal"] = "⊜" ABBREVS["veeeq"] = "≚" ABBREVS["rightanglemdot"] = "⦝" ABBREVS["biAlpha"] = "𝜜" ABBREVS["itPi"] = "𝛱" ABBREVS["ohm"] = "Ω" ABBREVS["nsucceq"] = "⪰̸" ABBREVS["obslash"] = "⦸" ABBREVS["bsansd"] = "𝗱" ABBREVS["^K"] = "ᴷ" ABBREVS["H"] = "̋" ABBREVS["bsansvarsigma"] = "𝞁" ABBREVS["bisanschi"] = "𝟀" ABBREVS["2/3"] = "⅔" ABBREVS["squarellquad"] = "◱" ABBREVS["bfR"] = "𝐑" ABBREVS["upstigma"] = "ϛ" ABBREVS["digamma"] = "ϝ" ABBREVS["bsanseta"] = "𝝶" ABBREVS["sansV"] = "𝖵" ABBREVS["bisansPhi"] = "𝞥" ABBREVS["vartriangleright"] = "⊳" ABBREVS["bisansBeta"] = "𝞑" ABBREVS["nsupseteqq"] = "⫆̸" ABBREVS["bfrakr"] = "𝖗" ABBREVS["bisansUpsilon"] = "𝞤" ABBREVS["subsup"] = "⫓" ABBREVS["NestedLessLess"] = "⪡" ABBREVS["bfseven"] = "𝟕" ABBREVS["biT"] = "𝑻" ABBREVS["o"] = "ø" ABBREVS["divideontimes"] = "⋇" ABBREVS["bixi"] = "𝝃" ABBREVS["triangleright"] = "▷" ABBREVS["bfw"] = "𝐰" ABBREVS["bbG"] = "𝔾" ABBREVS["disin"] = "⋲" ABBREVS["gsime"] = "⪎" ABBREVS["NotNestedGreaterGreater"] = "⪢̸" ABBREVS["jmath"] = "ȷ" ABBREVS["lgwhtcircle"] = "◯" ABBREVS["blackinwhitesquare"] = "▣" ABBREVS["bbE"] = "𝔼" ABBREVS["diagdown"] = "╲" ABBREVS["doteq"] = "≐" ABBREVS["bfraky"] = "𝖞" ABBREVS["bsansgamma"] = "𝝲" ABBREVS["geq"] = "≥" ABBREVS["ttS"] = "𝚂" ABBREVS["bigslopedwedge"] = "⩘" ABBREVS["supsup"] = "⫖" ABBREVS["upint"] = "⨛" ABBREVS["urarc"] = "◝" ABBREVS["bscrT"] = "𝓣" ABBREVS["bigcup"] = "⋃" ABBREVS["simeq"] = "≃" ABBREVS["vysmblkcircle"] = "∙" ABBREVS["bbL"] = "𝕃" ABBREVS["gvertneqq"] = "≩︀" ABBREVS["bsansr"] = "𝗿" ABBREVS["bfKappa"] = "𝚱" ABBREVS["rightarrowtail"] = "↣" ABBREVS["bisanstheta"] = "𝞱" ABBREVS["diceiii"] = "⚂" ABBREVS["bis"] = "𝒔" ABBREVS["bfrakp"] = "𝖕" ABBREVS["^chi"] = "ᵡ" ABBREVS["multimap"] = "⊸" ABBREVS["triangleleftblack"] = "◭" ABBREVS["Delta"] = "Δ" ABBREVS["varhexagonblack"] = "⬢" ABBREVS["bfT"] = "𝐓" ABBREVS["llarc"] = "◟" ABBREVS["bscri"] = "𝓲" ABBREVS["iff"] = "⟺" ABBREVS["Rho"] = "Ρ" ABBREVS["leqqslant"] = "⫹" ABBREVS["lllnest"] = "⫷" ABBREVS["bfh"] = "𝐡" ABBREVS["backprime"] = "‵" ABBREVS["bfj"] = "𝐣" ABBREVS["isansm"] = "𝘮" ABBREVS["topsemicircle"] = "◠" ABBREVS["itpartial"] = "𝜕" ABBREVS["lambda"] = "λ" ABBREVS["highminus"] = "¯" ABBREVS["LeftDownTeeVector"] = "⥡" ABBREVS["ttt"] = "𝚝" ABBREVS["itR"] = "𝑅" ABBREVS["starequal"] = "≛" ABBREVS["blanksymbol"] = "␢" ABBREVS["nvLeftarrow"] = "⤂" ABBREVS["triangledown"] = "▿" ABBREVS["bisansZeta"] = "𝞕" ABBREVS["circlearrowright"] = "↻" ABBREVS["frakZ"] = "ℨ" ABBREVS["closedvarcap"] = "⩍" ABBREVS["itd"] = "𝑑" ABBREVS["scrp"] = "𝓅" ABBREVS["bfrakT"] = "𝕿" ABBREVS["pbgam"] = "ɤ" ABBREVS["isindot"] = "⋵" ABBREVS["blacktriangleleft"] = "◀" ABBREVS["bscrG"] = "𝓖" ABBREVS["bfrakb"] = "𝖇" ABBREVS["succnsim"] = "⋩" ABBREVS["eqqless"] = "⪙" ABBREVS["bfn"] = "𝐧" ABBREVS["bfrakl"] = "𝖑" ABBREVS["cong"] = "≅" ABBREVS["sansX"] = "𝖷" ABBREVS["bisansb"] = "𝙗" ABBREVS["iteta"] = "𝜂" ABBREVS["varsupsetneq"] = "⊋︀" ABBREVS["bsanssigma"] = "𝞂" ABBREVS["bsansPhi"] = "𝝫" ABBREVS["isansk"] = "𝘬" ABBREVS["pppprime"] = "⁗" ABBREVS["bsansw"] = "𝘄" ABBREVS["bisanss"] = "𝙨" ABBREVS["low"] = "˕" ABBREVS["eqvparsl"] = "⧥" ABBREVS["medwhitestar"] = "⭐" ABBREVS["quad"] = " " ABBREVS["eqqgtr"] = "⪚" ABBREVS["measangleultonw"] = "⦭" ABBREVS["bigsqcap"] = "⨅" ABBREVS["supsub"] = "⫔" ABBREVS["sun"] = "☼" ABBREVS["bfI"] = "𝐈" ABBREVS["isansb"] = "𝘣" ABBREVS["ity"] = "𝑦" ABBREVS["ltln"] = "ɲ" ABBREVS["lazysinv"] = "∾" ABBREVS["RightTriangleBar"] = "⧐" ABBREVS["rh"] = "̢" ABBREVS["asteq"] = "⩮" ABBREVS["Subset"] = "⋐" ABBREVS["itV"] = "𝑉" ABBREVS["vysmwhtsquare"] = "⬞" ABBREVS["bsansbeta"] = "𝝱" ABBREVS["biE"] = "𝑬" ABBREVS["Rlarr"] = "⥂" ABBREVS["leftmoon"] = "☾" ABBREVS["_+"] = "₊" ABBREVS["bisansGamma"] = "𝞒" ABBREVS["bfY"] = "𝐘" ABBREVS["sqcap"] = "⊓" ABBREVS["succnapprox"] = "⪺" ABBREVS["nleq"] = "≰" ABBREVS["bbsix"] = "𝟞" ABBREVS["bfW"] = "𝐖" ABBREVS["biPhi"] = "𝜱" ABBREVS["pprime"] = "″" ABBREVS["bfO"] = "𝐎" ABBREVS["vee"] = "∨" ABBREVS["bivarkappa"] = "𝝒" ABBREVS["bbe"] = "𝕖" ABBREVS["^s"] = "ˢ" ABBREVS["frakv"] = "𝔳" ABBREVS["isansf"] = "𝘧" ABBREVS["ttL"] = "𝙻" ABBREVS["^9"] = "⁹" ABBREVS["approxeq"] = "≊" ABBREVS["RightTeeVector"] = "⥛" ABBREVS["_h"] = "ₕ" ABBREVS["ttR"] = "𝚁" ABBREVS["rightharpoonup"] = "⇀" ABBREVS["dlcorn"] = "⎣" ABBREVS["rightarrowbar"] = "⇥" ABBREVS["hermitconjmatrix"] = "⊹" ABBREVS["notslash"] = "⌿" ABBREVS["rightarrow"] = "→" ABBREVS["bisigma"] = "𝝈" ABBREVS["upand"] = "⅋" ABBREVS["frakB"] = "𝔅" ABBREVS["geqq"] = "≧" ABBREVS["rightpentagon"] = "⭔" ABBREVS["Mapsfrom"] = "⤆" ABBREVS["itB"] = "𝐵" ABBREVS["circletophalfblack"] = "◓" ABBREVS["rmoustache"] = "⎱" ABBREVS["u"] = "˘" ABBREVS["bbpi"] = "ℼ" ABBREVS["intBar"] = "⨎" ABBREVS["Epsilon"] = "Ε" ABBREVS["1/10"] = "⅒" ABBREVS["1/3"] = "⅓" ABBREVS["leftrightharpoondownup"] = "⥋" ABBREVS["rightharpoonaccent"] = "⃑" ABBREVS["itJ"] = "𝐽" ABBREVS["_l"] = "ₗ" ABBREVS["RightDownTeeVector"] = "⥝" ABBREVS["viewdata"] = "⌗" ABBREVS["overbar"] = "̅" ABBREVS["bisansw"] = "𝙬" ABBREVS["mu"] = "μ" ABBREVS["sansI"] = "𝖨" ABBREVS["ttv"] = "𝚟" ABBREVS["diamondleftarrowbar"] = "⤟" ABBREVS["bisansO"] = "𝙊" ABBREVS["zeta"] = "ζ" ABBREVS["1/7"] = "⅐" ABBREVS["diamondrightblack"] = "⬗" ABBREVS["bbPi"] = "ℿ" ABBREVS["bfx"] = "𝐱" ABBREVS["exclamdown"] = "¡" ABBREVS["biRho"] = "𝜬" ABBREVS["itv"] = "𝑣" ABBREVS["gneq"] = "⪈" ABBREVS["itn"] = "𝑛" ABBREVS["curvearrowleft"] = "↶" ABBREVS["nlesssim"] = "≴" ABBREVS["frakp"] = "𝔭" ABBREVS["mercury"] = "☿" ABBREVS["^O"] = "ᴼ" ABBREVS["lpargt"] = "⦠" ABBREVS["le"] = "≤" ABBREVS["bscrF"] = "𝓕" ABBREVS["leftcurvedarrow"] = "⬿" ABBREVS["bscrm"] = "𝓶" ABBREVS["bfD"] = "𝐃" ABBREVS["isansW"] = "𝘞" ABBREVS["^7"] = "⁷" ABBREVS["tttwo"] = "𝟸" ABBREVS["bfupsilon"] = "𝛖" ABBREVS["hermaphrodite"] = "⚥" ABBREVS["candra"] = "̐" ABBREVS["triangleplus"] = "⨹" ABBREVS["ulcorner"] = "⌜" ABBREVS["bbI"] = "𝕀" ABBREVS["hbar"] = "ħ" ABBREVS["itZ"] = "𝑍" ABBREVS["sansP"] = "𝖯" ABBREVS["bffour"] = "𝟒" ABBREVS["tteight"] = "𝟾" ABBREVS["varepsilon"] = "ε" ABBREVS["tty"] = "𝚢" ABBREVS["bsansTau"] = "𝝩" ABBREVS["bisanslambda"] = "𝞴" ABBREVS["yogh"] = "ʒ" ABBREVS["bsansi"] = "𝗶" ABBREVS["glst"] = "ʔ" ABBREVS["intprodr"] = "⨽" ABBREVS["annuity"] = "⃧" ABBREVS["bsimilarrightarrow"] = "⭇" ABBREVS["sanssix"] = "𝟨" ABBREVS["blackrighthalfcircle"] = "◗" ABBREVS["downarrow"] = "↓" ABBREVS["eulermascheroni"] = "ℇ" ABBREVS["minusdot"] = "⨪" ABBREVS["revangle"] = "⦣" ABBREVS["gtrdot"] = "⋗" ABBREVS["circledR"] = "®" ABBREVS["nVdash"] = "⊮" ABBREVS["downarrowbarred"] = "⤈" ABBREVS["veeodot"] = "⩒" ABBREVS["leq"] = "≤" ABBREVS["sansC"] = "𝖢" ABBREVS["biupsilon"] = "𝝊" ABBREVS["nsime"] = "≄" ABBREVS["parallel"] = "∥" ABBREVS["squarehfill"] = "▤" ABBREVS["NotRightTriangleBar"] = "⧐̸" ABBREVS["scru"] = "𝓊" ABBREVS["Digamma"] = "Ϝ" ABBREVS["bsansSigma"] = "𝝨" ABBREVS["PropertyLine"] = "⅊" ABBREVS["leftleftarrows"] = "⇇" ABBREVS["nvDash"] = "⊭" ABBREVS["frakm"] = "𝔪" ABBREVS["bfC"] = "𝐂" ABBREVS["verti"] = "ˌ" ABBREVS["Rrightarrow"] = "⇛" ABBREVS["eqless"] = "⋜" ABBREVS["itsigma"] = "𝜎" ABBREVS["bsansphi"] = "𝞅" ABBREVS["toea"] = "⤨" ABBREVS["itf"] = "𝑓" ABBREVS["bbc"] = "𝕔" ABBREVS["frakd"] = "𝔡" ABBREVS["seovnearrow"] = "⤭" ABBREVS["openo"] = "ɔ" ABBREVS["gneqq"] = "≩" ABBREVS["updasharrow"] = "⇡" ABBREVS["bisansP"] = "𝙋" ABBREVS["bsansx"] = "𝘅" ABBREVS["^-"] = "⁻" ABBREVS["dingasterisk"] = "✽" ABBREVS["sansz"] = "𝗓" ABBREVS["bfRho"] = "𝚸" ABBREVS["1/4"] = "¼" ABBREVS["ttZ"] = "𝚉" ABBREVS["oplus"] = "⊕" ABBREVS["rceil"] = "⌉" ABBREVS["lesdoto"] = "⪁" ABBREVS["uminus"] = "⩁" ABBREVS["leftarrowonoplus"] = "⬲" ABBREVS["ttV"] = "𝚅" ABBREVS["bivarphi"] = "𝝓" ABBREVS["itH"] = "𝐻" ABBREVS["updownarrow"] = "↕" ABBREVS["itG"] = "𝐺" ABBREVS["sansW"] = "𝖶" ABBREVS["cup"] = "∪" ABBREVS["upin"] = "⟒" ABBREVS["ringplus"] = "⨢" ABBREVS["lsimg"] = "⪏" ABBREVS["itm"] = "𝑚" ABBREVS["itbeta"] = "𝛽" ABBREVS["Or"] = "⩔" ABBREVS["longrightsquigarrow"] = "⟿" ABBREVS["rdiagovsearrow"] = "⤰" ABBREVS["gtcir"] = "⩺" ABBREVS["_e"] = "ₑ" ABBREVS["lsqhook"] = "⫍" ABBREVS["tesh"] = "ʧ" ABBREVS["bscrp"] = "𝓹" ABBREVS["varkappa"] = "ϰ" ABBREVS["bbP"] = "ℙ" ABBREVS["bbr"] = "𝕣" ABBREVS["cbrt"] = "∛" ABBREVS["trianglerighteq"] = "⊵" ABBREVS["biF"] = "𝑭" ABBREVS["emptysetocirc"] = "⦲" ABBREVS["Coloneq"] = "⩴" ABBREVS["scrG"] = "𝒢" ABBREVS["euler"] = "ℯ" ABBREVS["bscru"] = "𝓾" ABBREVS["sansd"] = "𝖽" ABBREVS["AA"] = "Å" ABBREVS["frakj"] = "𝔧" ABBREVS["bfalpha"] = "𝛂" ABBREVS["biOmicron"] = "𝜪" ABBREVS["bisansphi"] = "𝞿" ABBREVS["ttone"] = "𝟷" ABBREVS["_("] = "₍" ABBREVS["bfB"] = "𝐁" ABBREVS["exists"] = "∃" ABBREVS["fhr"] = "ɾ" ABBREVS["bscrJ"] = "𝓙" ABBREVS["Uuparrow"] = "⤊" ABBREVS["biMu"] = "𝜧" ABBREVS["bsansomicron"] = "𝝾" ABBREVS["thickspace"] = " " ABBREVS["endash"] = "–" ABBREVS["sansU"] = "𝖴" ABBREVS["bisansN"] = "𝙉" ABBREVS["blackcircleulquadwhite"] = "◕" ABBREVS["ttl"] = "𝚕" ABBREVS["bisansvartheta"] = "𝟅" ABBREVS["bsansQ"] = "𝗤" ABBREVS["bizeta"] = "𝜻" ABBREVS["bsansvarTheta"] = "𝝧" ABBREVS["bbsemi"] = "⨟" ABBREVS["gesdoto"] = "⪂" ABBREVS["bieta"] = "𝜼" ABBREVS["oslash"] = "⊘" ABBREVS["itZeta"] = "𝛧" ABBREVS["itEpsilon"] = "𝛦" ABBREVS["smt"] = "⪪" ABBREVS["scrP"] = "𝒫" ABBREVS["bscrb"] = "𝓫" ABBREVS["sansp"] = "𝗉" ABBREVS["trna"] = "ɐ" ABBREVS["itY"] = "𝑌" ABBREVS["bisanse"] = "𝙚" ABBREVS["wideangledown"] = "⦦" ABBREVS["bsanszero"] = "𝟬" ABBREVS["bby"] = "𝕪" ABBREVS["sblhr"] = "˓" ABBREVS["simminussim"] = "⩬" ABBREVS["subsetdot"] = "⪽" ABBREVS["turnediota"] = "℩" ABBREVS["bsansA"] = "𝗔" ABBREVS["join"] = "⨝" ABBREVS["bscrj"] = "𝓳" ABBREVS["bot"] = "⊥" ABBREVS["scrD"] = "𝒟" ABBREVS["frakP"] = "𝔓" ABBREVS["gnsim"] = "⋧" ABBREVS["Chi"] = "Χ" ABBREVS["biO"] = "𝑶" ABBREVS["sqfl"] = "◧" ABBREVS["vertoverlay"] = "⃒" ABBREVS["tripleplus"] = "⧻" ABBREVS["nabla"] = "∇" ABBREVS["scrX"] = "𝒳" ABBREVS["_m"] = "ₘ" ABBREVS["models"] = "⊧" ABBREVS["lneqq"] = "≨" ABBREVS["trnrl"] = "ɺ" ABBREVS["Cup"] = "⋓" ABBREVS["propto"] = "∝" ABBREVS["rtln"] = "ɳ" ABBREVS["bbx"] = "𝕩" ABBREVS["bfPsi"] = "𝚿" ABBREVS["ite"] = "𝑒" ABBREVS["biomega"] = "𝝎" ABBREVS["bbij"] = "ⅉ" ABBREVS["ttF"] = "𝙵" ABBREVS["rq"] = "’" ABBREVS["mlcp"] = "⫛" ABBREVS["leftsquigarrow"] = "⇜" ABBREVS["bsansy"] = "𝘆" local lastBackslashX = -1 local lastBackslashY = -1 function cplen(c) if c >= 192 and c < 224 then return 2 elseif c >= 224 and c < 240 then return 3 elseif c >= 240 and c < 248 then return 4 end return 1 end -- 1-based, [b, e] inclusive range function utf8substring(s, b, e) local accum = "" local pos = 1 local i = 1 while i <= #s do local c = string.byte(string.sub(s, i, i)) if pos > e then break end if pos >= b then accum = accum .. string.sub(s, i, i + cplen(c) - 1) end i = i + cplen(c) pos = pos + 1 end return accum end function abbrevCompleter(buf) local cur = buf:GetActiveCursor() local completions = {} local suggestions = {} if lastBackslashX ~= -1 and cur.X - lastBackslashX > 0 and lastBackslashY == cur.Y then local curLine = buf:Line(cur.Y) local abbrev = utf8substring(curLine, lastBackslashX + 1, cur.X) for a, s in pairs(ABBREVS) do local i, j = string.find(a, abbrev, 1, true) if i == 1 then suggestions[#suggestions+1] = a completions[#completions+1] = string.sub(a, j + 1) end end end return completions, suggestions end function onRune(bp, r) if r == "\\" then lastBackslashX = bp.Cursor.X lastBackslashY = bp.Cursor.Y elseif lastBackslashX == bp.Cursor.X then lastBackslashX = lastBackslashX + 1 end end function preInsertTab(bp) if lastBackslashX ~= -1 and bp.Cursor.X - lastBackslashX > 0 and lastBackslashY == bp.Cursor.Y then local curLine = bp.Buf:Line(bp.Cursor.Y) local abbrev = utf8substring(curLine, lastBackslashX + 1, bp.Cursor.X) local substitution = ABBREVS[abbrev] if substitution ~= nil then local abbrevlen = bp.Cursor.X - lastBackslashX -- +1 for the backslash for i = 1,abbrevlen+1 do bp:Backspace() end -- the `-` is here to dereference a pointer, blah blah -- look at the autoclose plugin (autoclose.lua, line 32) bp.Buf:Insert(-bp.Cursor.Loc, substitution) return false else if bp.Buf:Autocomplete(abbrevCompleter) then return false end end end return true end
local module = { Darken = require(script.Darken), Emphasise = require(script.Emphasise), GetContrastRatio = require(script.GetContrastRatio), GetLuminance = require(script.GetLuminance), Hex = require(script.Hex), Int = require(script.Int), Lighten = require(script.Lighten), } return module
local expand = require 'expand' local gui = require 'gui' renoise.tool():add_menu_entry { name = 'Main Menu:Tools:Expand Song...', invoke = gui.show_dialog, } renoise.tool():add_keybinding { name = 'Pattern Editor:Expand:Expand Song...', invoke = gui.show_dialog, } renoise.tool():add_keybinding { name = 'Pattern Editor:Expand:Expand Song by 2x', invoke = function() expand.expand_song(2, true, true) end, }
Core.AllowUnmoddedClients = false -- Limit all classes to two weapons ServerSettings.DisabledEquipPoints.add("Light", Loadouts.EquipPoints.Tertiary) ServerSettings.DisabledEquipPoints.add("Medium", Loadouts.EquipPoints.Tertiary) ServerSettings.DisabledEquipPoints.add("Heavy", Loadouts.EquipPoints.Tertiary) -- Weapon Bans -- Mines -- Packs --ServerSettings.BannedItems.add("Light", "Stealth Pack") -- Perks defaultGotySettings = { -- Time settings TimeLimit = 25, WarmupTime = 7, RespawnTime = 5, SniperRespawnDelay = 0, EndMatchWaitTime = 12, AmmoPickupLifespan = 60, CTFFlagTimeout = 40, -- Team settings TeamAssignType = TeamAssignTypes.Unbalanced, AutoBalanceTeams = false, FriendlyFire = true, FriendlyFireMultiplier = 1, TeamCredits = true, BaseAssets = false, -- Score CTFCapLimit = 7, ArenaRounds = 1, -- Flag FlagDragLight = 0, FlagDragMedium = 0, FlagDragHeavy = 0, FlagDragDeceleration = 0, -- Vehicles VehiclesEarnedWithCredits = true, GravCycleLimit = 4, BeowulfLimit = 1, ShrikeLimit = 1, GravCycleCost = 5000, BeowulfCost = 35000, ShrikeCost = 35000, GravCycleEjectionSeat = false, BeowulfEjectionSeat = false, ShrikeEjectionSeat = false, -- Inventory call-in EnableInventoryCallIn = true, InventoryStationsRestoreEnergy = true, InventoryCallInBlocksPlayers = false, InventoryCallInCost = 2000, InventoryCallInBuildUpTime = 2.0, InventoryCallInCooldownTime = 30.0, -- GOTY fixes UseGOTYShieldPack = true, UseGOTYBXTCharging = true, UseGOTYJackalAirburst = true, RageThrustPackDependsOnCapperSpeed = true, } -- Function to set or override any settings function applyServerSettings(settings) for setting, value in pairs(settings) do ServerSettings[setting] = value end end -- Apply GOTY settings at preset load time applyServerSettings(defaultGotySettings)
local capi = {timer=timer,client=client} local awful = require( "awful" ) local color = require( "gears.color" ) local surface = require( "gears.surface" ) local cairo = require( "lgi" ).cairo local tag = require( "awful.tag" ) local client = require( "awful.client" ) local themeutils = require( "blind.common.drawing" ) local wibox_w = require( "wibox.widget" ) local radical = require( "radical" ) local arrow = require("blind.arrow") local debug = debug local path = debug.getinfo(1,"S").source:gsub("theme.*",""):gsub("@","") local theme = {} arrow.task.theme,arrow.tag.theme = theme,theme ------------------------------------------------------------------------------------------------------ -- -- -- DEFAULT COLORS, FONT AND SIZE -- -- -- ------------------------------------------------------------------------------------------------------ theme.default_height = 16 theme.font = "snap" theme.path = path theme.bg_normal = "#071504" theme.bg_focus = "#00B400" theme.bg_urgent = "#5B0000" theme.bg_minimize = "#040A1A" theme.bg_highlight = "#0E2051" theme.bg_alternate = "#062709" theme.fg_normal = "#00FF00" theme.fg_focus = "#7ACE75" theme.fg_urgent = "#FF7777" theme.fg_minimize = "#1577D3" --theme.border_width = "1" --theme.border_normal = "#555555" --theme.border_focus = "#535d6c" --theme.border_marked = "#91231c" theme.border_width = "0" theme.border_width2 = "2" theme.border_normal = "#555555" theme.border_focus = "#535d6c" theme.border_marked = "#91231c" theme.tasklist_floating_icon = path .."Icon/titlebar/floating.png" theme.tasklist_ontop_icon = path .."Icon/titlebar/ontop.png" theme.tasklist_sticky_icon = path .."Icon/titlebar/sticky.png" theme.tasklist_floating_focus_icon = path .."Icon/titlebar/floating_focus.png" theme.tasklist_ontop_focus_icon = path .."Icon/titlebar/ontop_focus.png" theme.tasklist_sticky_focus_icon = path .."Icon/titlebar/sticky_focus.png" theme.tasklist_plain_task_name = true ------------------------------------------------------------------------------------------------------ -- -- -- TAG AND TASKLIST FUNCTIONS -- -- -- ------------------------------------------------------------------------------------------------------ -- There are another variables sets -- overriding the default one when -- defined, the sets are: -- [taglist|tasklist]_[bg|fg]_[focus|urgent] -- titlebar_[bg|fg]_[normal|focus] -- Example: --taglist_bg_focus = #ff0000 ------------------------------------------------------------------------------------------------------ -- -- -- TAGLIST/TASKLIST -- -- -- ------------------------------------------------------------------------------------------------------ -- Display the taglist squares theme.taglist_bg_image_empty = nil theme.taglist_bg_image_selected = path .."Icon/bg/used_bg_green2.png" theme.taglist_bg_image_used = path .."Icon/bg/used_bg_green.png" theme.taglist_bg_image_urgent = path .."Icon/bg/urgent_bg.png" theme.taglist_bg_image_remote_selected = path .."Icon/bg/selected_bg_green.png" theme.taglist_bg_image_remote_used = path .."Icon/bg/used_bg_green.png" theme.taglist_squares_unsel = function(wdg,m,t,objects,idx) return arrow.tag.gen_tag_bg(wdg,m,t,objects,idx,theme.taglist_bg_image_used) end theme.taglist_squares_sel = function(wdg,m,t,objects,idx) return arrow.tag.gen_tag_bg(wdg,m,t,objects,idx,theme.taglist_bg_image_selected) end theme.taglist_squares_sel_empty = function(wdg,m,t,objects,idx) return arrow.tag.gen_tag_bg(wdg,m,t,objects,idx,theme.taglist_bg_image_selected) end theme.taglist_squares_unsel_empty = function(wdg,m,t,objects,idx) return arrow.tag.gen_tag_bg(wdg,m,t,objects,idx,nil) end theme.taglist_disable_icon = true theme.bg_image_normal = function(wdg,m,t,objects) return arrow.task.gen_task_bg(wdg,m,t,objects,nil) end theme.bg_image_focus = function(wdg,m,t,objects) return arrow.task.gen_task_bg(wdg,m,t,objects,theme.taglist_bg_image_used) end theme.bg_image_urgent = function(wdg,m,t,objects) return arrow.task.gen_task_bg(wdg,m,t,objects,theme.taglist_bg_image_urgent) end theme.bg_image_minimize = function(wdg,m,t,objects) return arrow.task.gen_task_bg(wdg,m,t,objects,nil) end theme.tasklist_disable_icon = true theme.monochrome_icons = true ------------------------------------------------------------------------------------------------------ -- -- -- MENU -- -- -- ------------------------------------------------------------------------------------------------------ -- Variables set for theming menu -- menu_[bg|fg]_[normal|focus] -- menu_[border_color|border_width] theme.menu_submenu_icon = path .."Icon/tags/arrow.png" theme.menu_scrollmenu_down_icon = path .."Icon/tags/arrow_down.png" theme.menu_scrollmenu_up_icon = path .."Icon/tags/arrow_up.png" theme.awesome_icon = path .."Icon/awesome2.png" theme.menu_height = 20 theme.menu_width = 130 theme.menu_border_width = 2 theme.border_width = 1 theme.border_color = theme.fg_normal theme.wallpaper = "/home/lepagee/bg/final/bin_ascii_ds.png" ------------------------------------------------------------------------------------------------------ -- -- -- TITLEBAR -- -- -- ------------------------------------------------------------------------------------------------------ -- You can add as many variables as -- you wish and access them by using -- beautiful.variable in your rc.lua --bg_widget = #cc0000 -- Define the image to load theme.titlebar_close_button_normal = path .."Icon/titlebar/close_normal_inactive.png" theme.titlebar_close_button_focus = path .."Icon/titlebar/close_focus_inactive.png" theme.titlebar_ontop_button_normal_inactive = path .."Icon/titlebar/ontop_normal_inactive.png" theme.titlebar_ontop_button_focus_inactive = path .."Icon/titlebar/ontop_focus_inactive.png" theme.titlebar_ontop_button_normal_active = path .."Icon/titlebar/ontop_normal_active.png" theme.titlebar_ontop_button_focus_active = path .."Icon/titlebar/ontop_focus_active.png" theme.titlebar_sticky_button_normal_inactive = path .."Icon/titlebar/sticky_normal_inactive.png" theme.titlebar_sticky_button_focus_inactive = path .."Icon/titlebar/sticky_focus_inactive.png" theme.titlebar_sticky_button_normal_active = path .."Icon/titlebar/sticky_normal_active.png" theme.titlebar_sticky_button_focus_active = path .."Icon/titlebar/sticky_focus_active.png" theme.titlebar_floating_button_normal_inactive = path .."Icon/titlebar/floating_normal_inactive.png" theme.titlebar_floating_button_focus_inactive = path .."Icon/titlebar/floating_focus_inactive.png" theme.titlebar_floating_button_normal_active = path .."Icon/titlebar/floating_normal_active.png" theme.titlebar_floating_button_focus_active = path .."Icon/titlebar/floating_focus_active.png" theme.titlebar_maximized_button_normal_inactive = path .."Icon/titlebar/maximized_normal_inactive.png" theme.titlebar_maximized_button_focus_inactive = path .."Icon/titlebar/maximized_focus_inactive.png" theme.titlebar_maximized_button_normal_active = path .."Icon/titlebar/maximized_normal_active.png" theme.titlebar_maximized_button_focus_active = path .."Icon/titlebar/maximized_focus_active.png" theme.titlebar_resize = path .."Icon/titlebar/resize.png" theme.titlebar_tag = path .."Icon/titlebar/tag.png" theme.titlebar_bg_focus = theme.bg_normal theme.titlebar_title_align = "left" theme.titlebar_height = 16 ------------------------------------------------------------------------------------------------------ -- -- -- LAYOUTS -- -- -- ------------------------------------------------------------------------------------------------------ -- You can use your own layout icons like this: theme.layout_fairh = path .."Icon/layouts/fairh.png" theme.layout_fairv = path .."Icon/layouts/fairv.png" theme.layout_floating = path .."Icon/layouts/floating.png" theme.layout_magnifier = path .."Icon/layouts/magnifier.png" theme.layout_max = path .."Icon/layouts/max.png" theme.layout_fullscreen = path .."Icon/layouts/fullscreen.png" theme.layout_tilebottom = path .."Icon/layouts/tilebottom.png" theme.layout_tileleft = path .."Icon/layouts/tileleft.png" theme.layout_tile = path .."Icon/layouts/tile.png" theme.layout_tiletop = path .."Icon/layouts/tiletop.png" theme.layout_spiral = path .."Icon/layouts/spiral.png" theme.layout_spiraldwindle = path .."Icon/layouts/spiral_d.png" theme.layout_fairh_s = path .."Icon/layouts_small/fairh.png" theme.layout_fairv_s = path .."Icon/layouts_small/fairv.png" theme.layout_floating_s = path .."Icon/layouts_small/floating.png" theme.layout_magnifier_s = path .."Icon/layouts_small/magnifier.png" theme.layout_max_s = path .."Icon/layouts_small/max.png" theme.layout_fullscreen_s = path .."Icon/layouts_small/fullscreen.png" theme.layout_tilebottom_s = path .."Icon/layouts_small/tilebottom.png" theme.layout_tileleft_s = path .."Icon/layouts_small/tileleft.png" theme.layout_tile_s = path .."Icon/layouts_small/tile.png" theme.layout_tiletop_s = path .."Icon/layouts_small/tiletop.png" theme.layout_spiral_s = path .."Icon/layouts_small/spiral.png" theme.layout_spiraldwindle_s = path .."Icon/layouts_small/spiral_d.png" return theme -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
local TriangleModule = { --[[ Vector3 A, B, and C DataModel Parent [optional] Vector3 center ]] DrawTriangle = function(a, b, c, parent, width) local width = width and width or 0.2 local wedge = Instance.new("WedgePart") -- Make the wedge we'll need later wedge.Anchored = true wedge.TopSurface = Enum.SurfaceType.Smooth wedge.BottomSurface = Enum.SurfaceType.Smooth wedge.Material = "SmoothPlastic" --wedge.Color = Color3.new(0, 110/255, 255/255) wedge.Transparency = 0 wedge.CanCollide = true local edges = { {longest = (c - b), other = (a - b), position = b}, {longest = (a - c), other = (b - c), position = c}, {longest = (b - a), other = (c - a), position = a}, } table.sort(edges, function(a, b) return a.longest.magnitude > b.longest.magnitude end) local edge = edges[1] -- get angle between two vectors local theta = math.acos(edge.longest.unit:Dot(edge.other.unit)) -- angle between two vectors -- SOHCAHTOA local s1 = Vector2.new(edge.other.magnitude * math.cos(theta), edge.other.magnitude * math.sin(theta)) local s2 = Vector2.new(edge.longest.magnitude - s1.x, s1.y) -- positions local p1 = edge.position + edge.other * 0.5 -- wedge1's position local p2 = edge.position + edge.longest + (edge.other - edge.longest) * 0.5 -- wedge2's position -- rotation matrix facing directions local right = edge.longest:Cross(edge.other).unit local up = right:Cross(edge.longest).unit local back = edge.longest.unit -- put together the cframes local cf1 = CFrame.new( -- wedge1 cframe p1.x + (-right.x * (width/2)), p1.y + (-right.y * (width/2)), p1.z + (-right.z * (width/2)), -right.x, up.x, back.x, -right.y, up.y, back.y, -right.z, up.z, back.z ) local cf2 = CFrame.new( -- wedge2 cframe p2.x + (right.x * (-width/2)), p2.y + (right.y * (-width/2)), p2.z + (right.z * (-width/2)), right.x, up.x, -back.x, right.y, up.y, -back.y, right.z, up.z, -back.z ) --]] --[[ local cf1 = CFrame.new( -- wedge1 cframe p1.x, p1.y, p1.z, -right.x, up.x, back.x, -right.y, up.y, back.y, -right.z, up.z, back.z ) local cf2 = CFrame.new( -- wedge2 cframe p2.x, p2.y, p2.z, right.x, up.x, -back.x, right.y, up.y, -back.y, right.z, up.z, -back.z ) --]] -- cf1 = cf1 + cf1.RightVector * (width/2) -- cf2 = cf2 + cf2.RightVector * (-width/2) -- put it all together by creating the wedges local model = Instance.new("Model") model.Parent = parent model.Name = "Triangle" local w1 = wedge:Clone() w1.Name = "Wedge1" local w2 = wedge:Clone() w2.Name = "Wedge2" w1.Size = Vector3.new(width, s1.y, s1.x) w2.Size = Vector3.new(width, s2.y, s2.x) w1.CFrame = cf1 w2.CFrame = cf2 w1.Parent = model w2.Parent = model return model end, --[[ Vector3 A, B, and C Model Triangle ]] UpdateTriangle = function(a, b, c, triangle) local edges = { {longest = (c - b), other = (a - b), position = b}, {longest = (a - c), other = (b - c), position = c}, {longest = (b - a), other = (c - a), position = a}, } table.sort(edges, function(a, b) return a.longest.magnitude > b.longest.magnitude end) local edge = edges[1] -- get angle between two vectors local theta = math.acos(edge.longest.unit:Dot(edge.other.unit)) -- angle between two vectors -- SOHCAHTOA local s1 = Vector2.new(edge.other.magnitude * math.cos(theta), edge.other.magnitude * math.sin(theta)) local s2 = Vector2.new(edge.longest.magnitude - s1.x, s1.y) -- positions local p1 = edge.position + edge.other * 0.5 -- wedge1's position local p2 = edge.position + edge.longest + (edge.other - edge.longest) * 0.5 -- wedge2's position -- rotation matrix facing directions local right = edge.longest:Cross(edge.other).unit local up = right:Cross(edge.longest).unit local back = edge.longest.unit -- put together the cframes local cf1 = CFrame.new( -- wedge1 cframe p1.x, p1.y, p1.z, -right.x, up.x, back.x, -right.y, up.y, back.y, -right.z, up.z, back.z ) local cf2 = CFrame.new( -- wedge2 cframe p2.x, p2.y, p2.z, right.x, up.x, -back.x, right.y, up.y, -back.y, right.z, up.z, -back.z ) -- put it all together by creating the wedges local w1 = triangle:FindFirstChild("Wedge1") local w2 = triangle:FindFirstChild("Wedge2") w1.Size = Vector3.new(0.2, s1.y, s1.x) w2.Size = Vector3.new(0.2, s2.y, s2.x) w1.CFrame = cf1 w2.CFrame = cf2 end } return TriangleModule
function toto () print("toto") end tototututiti=tmr.create() tmr.alarm(tototututiti, 1000, tmr.ALARM_AUTO, toto)
---@class CS.FairyGUI.GearDisplay : CS.FairyGUI.GearBase ---@field public pages String[] ---@field public connected boolean ---@type CS.FairyGUI.GearDisplay CS.FairyGUI.GearDisplay = { } ---@return CS.FairyGUI.GearDisplay ---@param owner CS.FairyGUI.GObject function CS.FairyGUI.GearDisplay.New(owner) end function CS.FairyGUI.GearDisplay:Apply() end function CS.FairyGUI.GearDisplay:UpdateState() end ---@return number function CS.FairyGUI.GearDisplay:AddLock() end ---@param token number function CS.FairyGUI.GearDisplay:ReleaseLock(token) end return CS.FairyGUI.GearDisplay
artifactreward44 = { minimumLevel = 0, maximumLevel = -1, customObjectName = "Artifact 44", directObjectTemplate = "object/tangible/collection/col_jalopy_crate_10.iff", craftingValues = { }, customizationStringNames = {}, customizationValues = {} } addLootItemTemplate("artifactreward44", artifactreward44)
local CONFIG_FILE_PREFIX = minetest.get_current_modname().."_" crafting.config = {} local print_settingtypes = false local function setting(stype, name, default, description) local value if stype == "bool" then value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name) elseif stype == "string" then value = minetest.setting_get(CONFIG_FILE_PREFIX..name) elseif stype == "int" or stype == "float" then value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name)) end if value == nil then value = default end crafting.config[name] = value if print_settingtypes then minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default)) end end setting("bool", "import_default_recipes", true, "Import default crafting system recipes") setting("bool", "clear_default_crafting", false, "Clear default crafting system recipes") setting("bool", "sort_alphabetically", false, "Sort crafting output list alphabetically") setting("bool", "show_guides", true, "Show crafting guides")
--- -- @module window local Rectangle = require("models.rectangle") local window = {} --- -- @treturn bool always true -- @error error message function window.enter_fullscreen() local os = love.system.getOS() local is_mobile_os = table.find({"Android", "iOS"}, os) if not is_mobile_os then return true end local ok = love.window.setFullscreen(true, "desktop") if not ok then return nil, "unable to enter fullscreen" end return true end --- -- @treturn Rectangle function window.create_screen() local x, y, width, height = love.window.getSafeArea() return Rectangle:new(x, y, width, height) end return window
local Recount = _G.Recount local AceLocale = LibStub("AceLocale-3.0") local L = AceLocale:GetLocale( "Recount" ) local revision = tonumber(string.sub("$Revision: 1311 $", 12, -3)) if Recount.Version < revision then Recount.Version = revision end local GameTooltip = GameTooltip local dbCombatants local srcRetention local dstRetention local DetailTitles = { } DetailTitles.Interrupts = { TopNames = L["Interrupted Who"], TopCount = "", TopAmount = L["Interrupts"], BotNames = L["Interrupted"], BotMin = "", BotAvg = "", BotMax = "", BotAmount = L["Count"] } function Recount:SpellInterrupt(timestamp, eventtype, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, spellId, spellName, spellSchool, extraSpellId, extraSpellName, extraSpellSchool) if not spellName then spellName = "Melee" end local ability = extraSpellName .. " (" .. spellName .. ")" Recount:AddInterruptData(srcName, dstName, ability, srcGUID, srcFlags, dstGUID, dstFlags, extraSpellId) -- Elsia: Keep both interrupting spell and interrupted spell end function Recount:AddInterruptData(source, victim, ability, srcGUID, srcFlags, dstGUID, dstFlags, spellId) -- Friendly fire interrupt? (Duels) local FriendlyFire = Recount:IsFriendlyFire(srcFlags, dstFlags) -- Before any further processing need to check if we are going to be placed in combat or in combat if not Recount.InCombat and Recount.db.profile.RecordCombatOnly then if (not FriendlyFire) and (Recount:InGroup(srcFlags) or Recount:InGroup(dstFlags)) then Recount:PutInCombat() else return end end -- Need to add events for potential deaths Recount.cleventtext = source.." interrupts "..victim.." "..ability -- Name and ID of pet owners local sourceowner local sourceownerID local victimowner local victimownerID source, sourceowner, sourceownerID = Recount:DetectPet(source, srcGUID, srcFlags) victim, victimowner, victimownerID = Recount:DetectPet(victim, dstGUID, dstFlags) srcRetention = Recount.srcRetention if srcRetention then if not dbCombatants[source] then Recount:AddCombatant(source, sourceowner, srcGUID, srcFlags, sourceownerID) end -- Elsia: Until here is if pets interupts anybody. local sourceData = dbCombatants[source] if sourceData then Recount:SetActive(sourceData) Recount:AddCurrentEvent(sourceData, "MISC", false, nil, Recount.cleventtext) -- Fight tracking purposes to speed up leaving combat sourceData.LastFightIn = Recount.db2.FightNum Recount:AddAmount(sourceData, "Interrupts", 1) Recount:AddTableDataSum(sourceData,"InterruptData",victim,ability,1) end end dstRetention = Recount.dstRetention if dstRetention then if not dbCombatants[victim] then Recount:AddCombatant(victim, victimowner, dstGUID, dstFlags, victimownerID) -- Elsia: Bug, owner missing here end local victimData = dbCombatants[victim] if victimData then Recount:SetActive(victimData) Recount:AddCurrentEvent(victimData, "MISC", true, nil, Recount.cleventtext) -- Fight tracking purposes to speed up leaving combat victimData.LastFightIn = Recount.db2.FightNum end end end local DataModes = { } function DataModes:InterruptReturner(data, num) if not data then return 0 end if num == 1 then return (data.Fights[Recount.db.profile.CurDataSet].Interrupts or 0) end return (data.Fights[Recount.db.profile.CurDataSet].Interrupts or 0), {{data.Fights[Recount.db.profile.CurDataSet].InterruptData, L["'s Interrupts"], DetailTitles.Interrupts}} end local TooltipFuncs = { } function TooltipFuncs:Interrupts(name, data) --local SortedData, total GameTooltip:ClearLines() GameTooltip:AddLine(name) Recount:AddSortedTooltipData(L["Top 3"].." "..L["Interrupted"],data and data.Fights[Recount.db.profile.CurDataSet] and data.Fights[Recount.db.profile.CurDataSet].InterruptData, 3) GameTooltip:AddLine("<"..L["Click for more Details"]..">", 0, 0.9, 0) end Recount:AddModeTooltip(L["Interrupts"], DataModes.InterruptReturner, TooltipFuncs.Interrupts, nil, nil, nil, nil) local oldlocalizer = Recount.LocalizeCombatants function Recount.LocalizeCombatants() dbCombatants = Recount.db2.combatants oldlocalizer() end
--- --- Generated by MLN Team (https://www.immomo.com) --- Created by MLN Team. --- DateTime: 15-01-2020 17:35 --- --- --- 用于自适应Cell高度。需要配合自动布局使用 --- ---@note 在init和fillData时候布局尽量不要获取cell.contentView的宽高,因为这时候有可能是不准确的 ---@class TableViewAutoFitAdapter @parent class ---@public field name string ---@type TableViewAutoFitAdapter local _class = { _priveta_class_name = "TableViewAutoFitAdapter"} --- --- 构造方法 --- --- --- 初始化一个适配器对象 --- ---@return TableViewAutoFitAdapter function TableViewAutoFitAdapter() return _class end --- --- 根据复用ID回调高度 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, row:number):void --- 回调格式: --- ``` --- function(table cell,number row) --- ---cell:视图cell --- ---row:视图页数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:heightForCellByReuseId(reuseId, callback) return self end --- --- 设置组数回调 --- ---@param callback fun():void --- 回调格式: --- ``` --- function() --- ---在回调中返回组数,默认为1 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 该方法不设置,默认组数为1 function _class:sectionCount(callback) return self end --- --- 设置行数回调 --- --- --- 根据组数返回对应的行数 --- ---@param callback fun(section:number):void --- 回调格式: --- ``` --- function(number section) --- ---section:组数,根据组数返回对应的行数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:rowCount(callback) return self end --- --- 设置回调复用ID --- --- --- 根据组数和行数返回对应cell的复用ID --- ---@param callback fun(section:number, row:number):void --- 回调格式: --- ``` --- function(number section,number row) --- ---section:组数 --- ---row:行数 --- ---返回复用ID,string --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 使用该方法需要配合initCellByReuseId和fillCellDataByReuseId方法,默认id写法与此方法不要同时使用 function _class:reuseId(callback) return self end --- --- 设置初始化cell的回调 --- --- --- 根据复用ID,组数和行数进行初始化cell的回调 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table):void --- 回调格式: --- ``` --- function(table cell) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 使用该方法,配合fillCellDataByReuseId和reuseId方法,注意:方法中获取cell中控件宽/高是不准确的 function _class:initCellByReuseId(reuseId, callback) return self end --- --- 设置进行数据赋值的回调 --- --- --- 根据复用ID,组数和行数进行cell的数据赋值操作 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 使用该方法,配合reuseId和initCellByReuseId方法,注意:方法中获取cell中控件宽/高是不准确的 function _class:fillCellDataByReuseId(reuseId, callback) return self end --- --- 设置初始化cell的回调 --- ---@param callback fun(cell:table):void --- 回调格式: --- ``` --- function(table cell) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 注意:方法中获取cell中控件宽/高是不准确的 function _class:initCell(callback) return self end --- --- 设置cell赋值的回调 --- --- --- 根据cell,组数和行数对cell进行赋值操作 --- ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 注意:方法中获取cell中控件宽/高是不准确的 function _class:fillCellData(callback) return self end --- --- 点击了某行 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:selectedRowByReuseId(reuseId, callback) return self end --- --- 设置点击cell的回调 --- ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:selectedRow(callback) return self end --- --- 设置某个reuseID对应cell的长按回调 --- --- --- 设置某个reuseID对应cell的长按回调,触发时长0.5s --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:longPressRowByReuseId(reuseId, callback) return self end --- --- 设置cell的长按回调 --- --- --- 设置cell的长按回调,触发时长0.5s --- ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter function _class:longPressRow(callback) return self end --- --- 设置返回某行的高度的回调 --- ---@param callback fun(section:number, row:number):void --- 回调格式: --- ``` --- function(number section,number row) --- ---section:组数 --- ---row:行数 --- ---返回高度,number --- end --- ``` ---@return TableViewAutoFitAdapter function _class:heightForCell(callback) return self end --- --- 设置返回某行的高度的回调 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(section:number, row:number):void --- 回调格式: --- ``` --- function(number section,number row) --- ---section:组数 --- ---row:行数 --- ---返回高度,number --- end --- ``` ---@return TableViewAutoFitAdapter function _class:heightForCellByReuseId(reuseId, callback) return self end --- --- cell将要展示的回调 --- ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note iOS端会在刚刚展示的时候就调用,Android会在完全展示后调用 function _class:cellWillAppear(callback) return self end --- --- cell已经消失后的回调 --- ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 注意时机问题,即该回调的调用时机是cell已经消失 function _class:cellDidDisappear(callback) return self end --- --- cell将要展示时的回调 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 需配合reuseId方法使用,iOS端会在刚刚展示的时候就调用,Android会在完全展示后调用 function _class:cellWillAppearByReuseId(reuseId, callback) return self end --- --- cell已经消失后的回调 --- ---@param reuseId string reuseId:复用ID ---@param callback fun(cell:table, section:number, row:number):void --- 回调格式: --- ``` --- function(table cell,number section,number row) --- ---cell:cell视图表, 类型为Lua中的table,表中仅存在一个元素contentView --- ---section:组数 --- ---row:行数 --- end --- ``` ---@return TableViewAutoFitAdapter ---@note 需配合reuseId方法使用 function _class:cellDidDisappearByReuseId(reuseId, callback) return self end --- --- 点击Cell后高亮 --- ---@param isShow boolean 是否开启,默认关闭 ---@return TableViewAutoFitAdapter function _class:showPressed(isShow) return self end --- --- 获取是否开启了高亮效果 --- ---@return boolean 布尔值 function _class:showPressed() return true end --- --- 点击后的高亮颜色 --- ---@param pressedColor Color 设置cell点击后的高亮颜色 ---@return TableViewAutoFitAdapter function _class:pressedColor(pressedColor) return self end --- --- 获取高亮颜色 --- ---@return Color 色值 function _class:pressedColor() return Color() end return _class
local t = {} t.init = {x = 1, y = 1} t.layout = {} t.layout[1] = { {2, 3, 2}, {1, 2, 1}, {1, 5, 1} } t.moves = {5, 6} t.message = { en = "Orange blocks are similar to other color blocks", es = "Los bloques naranjas son similares a otros bloques de color", } return t
local Blueprint = require('motras_blueprint') local Slot = require('motras_slot') local TallPlatformStationPattern = require('motras_blueprint_patterns.tall_platform_station') local WidePlatformStationPattern = require('motras_blueprint_patterns.wide_platform_station') local c = require('motras_constants') local t = require('motras_types') describe('Blueprint', function () describe('createStation', function () it('creates station with small platforms (prefer side)', function () local blueprint1 = Blueprint:new{}:createStation( TallPlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 1, horizontalSize = 1} ); assert.are.same({ [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 0})] = 'platform.module' }, blueprint1:toTpf2Template()) local blueprint2 = Blueprint:new{}:createStation( TallPlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 2, horizontalSize = 3} ) assert.are.same({ [Slot.makeId({type = t.PLATFORM, gridX = -1, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 1, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.TRACK, gridX = -1, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 1, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = -1, gridY = 0})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 0, gridY = 0})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 1, gridY = 0})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = -1, gridY = 1})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 1})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 1, gridY = 1})] = 'platform.module', }, blueprint2:toTpf2Template()) end) it('creates station with large platforms (prefer side)', function () local blueprint1 = Blueprint:new{}:createStation( WidePlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 1, horizontalSize = 1} ) assert.are.same({ [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 0})] = 'platform.module' }, blueprint1:toTpf2Template()) local blueprint2 = Blueprint:new{}:createStation( WidePlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 2, horizontalSize = 3} ) assert.are.same({ [Slot.makeId({type = t.PLATFORM, gridX = -1, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 1, gridY = -2})] = 'platform.module', [Slot.makeId({type = t.TRACK, gridX = -1, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 1, gridY = -1})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = -1, gridY = 0})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 0, gridY = 0})] = 'track.module', [Slot.makeId({type = t.TRACK, gridX = 1, gridY = 0})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = -1, gridY = 1})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 1})] = 'platform.module', [Slot.makeId({type = t.PLATFORM, gridX = 1, gridY = 1})] = 'platform.module', }, blueprint2:toTpf2Template()) end) end) describe('addModuleToTemplate', function () it('adds module to template', function () local blueprint = Blueprint:new{} blueprint:addModuleToTemplate(Slot.makeId({type = t.TRACK, gridX = 1, gridY = 1}), 'track.module') assert.are.same({ [Slot.makeId({type = t.TRACK, gridX = 1, gridY = 1})] = 'track.module' }, blueprint:toTpf2Template()) end) end) describe('decorateEachPlatform', function () it ('decorates all platform modules', function () local blueprint1 = Blueprint:new{}:decorateEachPlatform(function (platformBlueprint) platformBlueprint:addAsset(t.DECORATION, 'bench.module', 7) end):createStation( TallPlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 1, horizontalSize = 1} ); assert.are.same({ [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 0})] = 'platform.module', [Slot.makeId({type = t.DECORATION, gridX = 0, gridY = 0, assetId = 7})] = 'bench.module' }, blueprint1:toTpf2Template()) end) end) describe('decorateEachTrack', function () it ('decorates all track modules', function () local blueprint1 = Blueprint:new{}:decorateEachTrack(function (trackBlueprint) trackBlueprint:addAsset(t.DECORATION, 'sign.module', 7) end):createStation( TallPlatformStationPattern:new{platformModule = 'platform.module', trackModule = 'track.module', trackCount = 1, horizontalSize = 1} ); assert.are.same({ [Slot.makeId({type = t.TRACK, gridX = 0, gridY = -1})] = 'track.module', [Slot.makeId({type = t.PLATFORM, gridX = 0, gridY = 0})] = 'platform.module', [Slot.makeId({type = t.DECORATION, gridX = 0, gridY = -1, assetId = 7})] = 'sign.module' }, blueprint1:toTpf2Template()) end) end) end)
function get_actions() return "Attack", "Item", "Defend", "Run", "" end
-- -- (C) 2013 Kriss@XIXs.com -- local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,_VERSION,xpcall,module,require=coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,_VERSION,xpcall,module,require --module local M={ modname=(...) } ; package.loaded[M.modname]=M function M.bake(oven,wpan) local framebuffers=oven.rebake("wetgenes.gamecake.framebuffers") local wfill=oven.rebake("wetgenes.gamecake.widgets.fill") wpan=wpan or {} function wpan.mouse(widget,act,_x,_y,keyname) local x,y=widget:mousexy(_x,_y) local tx=x-(widget.pan_px or 0) local ty=y-(widget.pan_py or 0) if tx>=0 and tx<widget.hx and ty>=0 and ty<widget.hy then if widget and widget.parent and widget.parent.daty then if keyname=="wheel_add" and act==-1 then widget.parent.daty:dec() return elseif keyname=="wheel_sub" and act==-1 then widget.parent.daty:inc() return end end end return widget.meta.mouse(widget,act,_x,_y,keyname) end function wpan.update(widget) return widget.meta.update(widget) end function wpan.draw(widget) return widget.meta.draw(widget) end function wpan.setup(widget,def) -- local it={} -- widget.pan=it widget.class="pan" widget.pan_px=0 widget.pan_py=0 -- widget.clip=true widget.key=wpan.key widget.mouse=wpan.mouse widget.update=wpan.update widget.draw=wpan.draw widget.layout=wfill.layout widget.fbo=framebuffers.create(0,0,0) -- widget.clip=true return widget end return wpan end
local log = require("structlog") local sinks = log.sinks describe("Module", function() it("should expose interface details", function() assert.equals("table", type(sinks.Console)) assert.equals("table", type(sinks.NvimNotify)) assert.equals("table", type(sinks.File)) assert.equals("table", type(sinks.RotatingFile)) end) end)
--[[ Project Parser ]]-- local projParser = {} --[[ Convert filesystem path to require path > path (string) full path to .lua file > rootPath (string) full path to the project root < path (string) ]] local function fs2reqPath(path, rootPath) rootPath = rootPath :gsub('\\\\', '/') :gsub('\\', '/') path = path :gsub(rootPath..'/', '') :gsub(rootPath, '') :gsub('%.lua', '') :gsub('/init', '') :gsub('/', '.') return path end --[[ Recursively scan directory and return list with each file path. > folder (string) folder path > fileTree (table) [{}] table to extend < fileTree (table) result table ]] local function scanDir(folder, fileTree) if not fileTree then fileTree = {} end local ostype = package.config:sub(1, 1) if ostype == "\\" or ostype == "\\\\" then ostype "windows" else ostype = "linux" end folder = folder:gsub("\\\\", "/"):gsub("\\", "/") -- Files -- local file local command if ostype == "windows" then command = 'dir "'..folder..'" /b /a-d-h' else command = 'ls -p "'..folder..'" | grep -v /' end file = io.popen(command) for item in file:lines() do item = (folder.."/"..item):gsub("//", "/") table.insert(fileTree, item) end file:close() -- Folders -- if ostype == "windows" then command = 'dir "'..folder..'" /b /ad-h' else command = 'ls -p "'..folder..'" | grep /' end file = io.popen(command) for item in file:lines() do item = item:gsub("\\", "") fileTree = scanDir(folder.."/"..item, fileTree) end file:close() return fileTree end --[[ Select and return only those files whose extensions are '.lua'. > fileTree (table) < fileTree (table) ]] local function filterFiles(fileTree) local set = {} for _, path in ipairs(fileTree) do if path:find('%.lua$') then table.insert(set, path) end end return set end --[[ Returns a new list consisting of all the given lists concatenated into one. > ... ({integer=any}) lists < result ({integer=any}) concatenated list ]] local function concat(...) local rtn = {} for i = 1, select("#", ...) do local t = select(i, ...) if t ~= nil then for _, v in ipairs(t) do rtn[#rtn + 1] = v end end end return rtn end --[[ Get list of all parseable files in directory. > rootPath (string) root directory full path > pathFilters (table) [] search files only in these subdirs < files ({integer=string}) list of fs-file paths < requires (table) list of req-file paths ]] function projParser.getFiles(rootPath, pathFilters) local files = {} if not pathFilters or #pathFilters == 0 then files = filterFiles(scanDir(rootPath)) else for _, filter in ipairs(pathFilters) do local found = filterFiles(scanDir(rootPath .. '/' .. filter)) files = concat(files, found) end end table.sort(files, function(a, b) return a:upper() < b:upper() end) local requires = {} for index, path in ipairs(files) do path = fs2reqPath(path, rootPath) requires[index] = path end return files, requires end return projParser
local t = Def.ActorFrame {}; t[#t+1] = Def.Sprite{ InitCommand=cmd(Center;diffuse,1,1,1,0.2;fadetop,1); OnCommand=function(self) self:LoadFromSongBackground(GAMESTATE:GetCurrentSong()) self:scaletoclipped(SCREEN_WIDTH,SCREEN_HEIGHT) end; }; t[#t+1] = Def.Quad{ InitCommand=cmd(zoomto,150,SCREEN_HEIGHT;diffuse,0,0,0,0.75;horizalign,left;x,SCREEN_LEFT;y,SCREEN_CENTER_Y); }; t[#t+1] = Def.Quad{ InitCommand=cmd(zoomto,150,SCREEN_HEIGHT;diffuse,0,0,0,0.75;horizalign,right;x,SCREEN_RIGHT;y,SCREEN_CENTER_Y); }; return t;
-- FIXME: Check for IsError? local MATERIAL = FindMetaTable("IMaterial") function MATERIAL:AlphaModulate(flAlpha) self:SetFloat("$alpha", flAlpha / 255) end function MATERIAL:ColorModulate(col) self:SetVector("$color", col:ToVector()) end function MATERIAL:GetAlphaModulation() return self:GetFloat("$alpha") end function MATERIAL:GetColorModulation() return self:GetVector("$color"):ToColor() -- FIXME: Test if valid first? end function MATERIAL:GetMappingWidth() return self:GetTexture("$basetexture"):GetMappingWidth() end function MATERIAL:GetMappingHeight() return self:GetTexture("$basetexture"):GetMappingHeight() end -- Credits to Z0mb1n3: https://facepunch.com/showthread.php?t=1542841&p=51421705&viewfull=1#post51421705 local iOffset = 4 + 8 + 4 + 2 + 2 + 4 function MATERIAL:GetNumAnimationFrames() -- FIXME: Check for error texture? local File = file.Open("materials/" .. self:GetTexture("$basetexture"):GetName() .. ".vtf", "rb", "GAME") if (File) then File:Seek(iOffset) local iRet = math.SignedToUnsigned(File:ReadShort(), 16) File:Close() return iRet end return 0 end
local _, _, majorv, minorv, rev = string.find(_VERSION, "(%d).(%d)[.]?([%d]?)") local VersionNumber = tonumber(majorv) * 100 + tonumber(minorv) * 10 + (((string.len(rev) == 0) and 0) or tonumber(rev)) lua_declare("lua_version", VersionNumber) lua_declare("lua_version_510", 510) lua_declare("lua_version_520", 520) lua_declare("lua_version_530", 530)
ability_culling_blade = class({}) LinkLuaModifier('modifier_ability_culling_blade_buff', 'heroes/axe/culling_blade', LUA_MODIFIER_MOTION_NONE) function ability_culling_blade:OnSpellStart() local target = self:GetCursorTarget() local caster = self:GetCaster() local kill_threshold = self:GetSpecialValueFor('kill_threshold') local damage = self:GetSpecialValueFor('damage') local speed_duration = self:GetSpecialValueFor('speed_duration') local speed_aoe = self:GetSpecialValueFor('speed_aoe') if target:GetHealth() <= kill_threshold then target:Kill(self, attacker) target:EmitSound('Hero_Axe.Culling_Blade_Success') self:GetCaster():StartGestureWithPlaybackRate( ACT_DOTA_CAST_ABILITY_4, 1 ) if target:IsHero() then self:EndCooldown() end local culling_kill_particle = ParticleManager:CreateParticle("particles/units/heroes/hero_axe/axe_culling_blade_kill.vpcf", PATTACH_CUSTOMORIGIN, target) ParticleManager:SetParticleControl(culling_kill_particle, 4, target:GetOrigin()) ParticleManager:ReleaseParticleIndex(culling_kill_particle) local enemies = FindUnitsInRadius(caster:GetTeamNumber(), target:GetAbsOrigin(), nil, speed_aoe, DOTA_UNIT_TARGET_TEAM_FRIENDLY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_ANY_ORDER, false) for k,v in pairs(enemies) do print(v:GetUnitName()) v:AddNewModifier(caster, self, 'modifier_ability_culling_blade_buff', {duration = speed_duration}) end return end ApplyDamage({ victim = target, attacker = caster, ability = self, damage = damage, damage_type = self:GetAbilityDamageType(), }) self:GetCaster():StartGestureWithPlaybackRate( ACT_DOTA_CAST_ABILITY_4, 1 ) target:EmitSound('Hero_Axe.Culling_Blade_Fail') end modifier_ability_culling_blade_buff = class({ IsHidden = function(self) return false end, IsPurgable = function(self) return true end, IsDebuff = function(self) return false end, IsBuff = function(self) return true end, RemoveOnDeath = function(self) return true end, AllowIllusionDuplicate = function(self) return true end, DeclareFunctions = function(self) return {MODIFIER_PROPERTY_MOVESPEED_BONUS_PERCENTAGE,MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT} end, GetModifierMoveSpeedBonus_Percentage = function(self) return self.movespeed end, GetModifierAttackSpeedBonus_Constant = function(self) return self.atkSpeed end, }) function modifier_ability_culling_blade_buff:OnCreated() self.movespeed = self:GetAbility():GetSpecialValueFor('speed_bonus') self.atkSpeed = self:GetAbility():GetSpecialValueFor('atk_speed_bonus') end
slot0 = class("RollingBallGameView", import("..BaseMiniGameView")) slot1 = "event:/ui/ddldaoshu2" slot2 = "event:/ui/boat_drag" slot3 = "event:/ui/break_out_full" slot4 = "event:/ui/sx-good" slot5 = "event:/ui/sx-perfect" slot6 = "event:/ui/sx-jishu" slot7 = "event:/ui/furnitrue_save" slot0.getUIName = function (slot0) return "RollingBallGameUI" end slot0.init = function (slot0) slot1 = slot0:GetMGData() slot2 = slot0:GetMGHubData() slot0.tplScoreTip = findTF(slot0._tf, "tplScoreTip") slot0.tplRemoveEffect = findTF(slot0._tf, "sanxiaoxiaoshi") slot0.effectUI = findTF(slot0._tf, "effectUI") slot0.tplEffect = findTF(slot0._tf, "tplEffect") slot0.effectPoolTf = findTF(slot0._tf, "effectPool") slot0.effectPool = {} slot0.effectDatas = {} slot0.effectTargetPosition = findTF(slot0.effectUI, "effectTargetPos").localPosition slot0.rollingUI = findTF(slot0._tf, "rollingUI") slot0.rollingEffectUI = findTF(slot0._tf, "rollingEffectUI") slot0.tplGrid = findTF(slot0._tf, "tplRollingGrid") slot0.gridPoolTf = findTF(slot0._tf, "gridPool") slot0.gridsPool = {} slot0.gridDic = {} slot0.fillGridDic = {} slot0.startFlag = false slot0.dragAlphaGrid = RollingBallGrid.New(slot3) setActive(slot0.dragAlphaGrid:getTf(), false) slot0.timer = Timer.New(function () slot0:onTimer() end, 0.016666666666666666, -1) for slot7 = 1, RollingBallConst.horizontal, 1 do slot0.gridDic[slot7] = {} slot0.fillGridDic[slot7] = {} for slot11 = 1, RollingBallConst.vertical, 1 do table.insert(slot0.gridDic[slot7], false) end end slot0.goodEffect = slot0.findTF(slot0, "sanxiaoGood") slot0.greatEffect = slot0:findTF("sanxiaoGreat") slot0.perfectEffect = slot0:findTF("sanxiaoPerfect") slot0.caidaiTf = findTF(slot0._tf, "zhuanzhu_caidai") setActive(slot0.caidaiTf, false) slot0.startUI = findTF(slot0._tf, "startUI") onButton(slot0, findTF(slot0.startUI, "btnStart"), function () if not slot0.startFlag then setActive(slot0.startUI, false) setActive:gameStart() end end, SFX_CONFIRM) onButton(slot0, findTF(slot0.startUI, "btnRule"), function () pg.MsgboxMgr.GetInstance():ShowMsgBox({ type = MSGBOX_TYPE_HELP, helps = pg.gametip.help_rollingBallGame.tip }) end, SFX_CONFIRM) setActive(slot0.startUI, true) slot0.scoreUI = findTF(slot0._tf, "scoreUI") slot0.labelCurScore = findTF(slot0.scoreUI, "labelCur") slot0.labelHigh = findTF(slot0.scoreUI, "labelHigh") slot0.scoreNew = findTF(slot0.scoreUI, "new") onButton(slot0, findTF(slot0.scoreUI, "btnEnd"), function () setActive(slot0.scoreUI, false) setActive(slot0.startUI, true) end, SFX_CANCEL) setActive(slot0.scoreUI, false) slot0.downProgress = findTF(slot0._tf, "downProgress") slot0.downTimeSlider = findTF(slot0.downProgress, "Slider").GetComponent(slot4, typeof(Slider)) slot0.labelGameTime = findTF(slot0._tf, "labelGameTime") slot0.labelGameScore = findTF(slot0._tf, "labelGameScore") slot0.endLess = findTF(slot0._tf, "endLess") setActive(slot0.endLess, true) slot0.closeUI = findTF(slot0._tf, "closeUI") setActive(slot0.closeUI, false) onButton(slot0, findTF(slot0.closeUI, "btnOk"), function () if not slot0.countStart then slot0:closeView() end end, SFX_CONFIRM) onButton(slot0, findTF(slot0.closeUI, "btnCancel"), function () setActive(slot0.closeUI, false) end, SFX_CANCEL) slot0.overLight = findTF(slot0._tf, "overLight") setActive(slot0.overLight, false) onButton(slot0, findTF(slot0._tf, "btnClose"), function () if not slot0.startFlag then slot0:closeView() else setActive(slot0.closeUI, true) end end, SFX_CANCEL) end slot0.getGameTimes = function (slot0) return slot0:GetMGHubData().count end slot0.showScoreUI = function (slot0, slot1) if slot1 > ((slot0:GetMGData():GetRuntimeData("elements") and #slot2 > 0 and slot2[1]) or 0) then setActive(slot0.scoreNew, true) else setActive(slot0.scoreNew, false) end setActive(slot0.scoreUI, true) setText(slot0.labelCurScore, slot1) setText(slot0.labelHigh, (slot1 < slot3 and slot3) or slot1) slot0:StoreDataToServer({ (slot1 < slot3 and slot3) or slot1 }) if slot0:getGameTimes() > 0 then slot0:SendSuccess(0) end end slot0.showCountStart = function (slot0, slot1) setActive(slot2, true) slot0.countIndex = 3 slot0.countStart = true pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot0) function slot3(slot0) slot0.countIndex = slot0.countIndex - 1 slot3 = GetComponent(slot2, typeof(CanvasGroup)) seriesAsync({ function (slot0) GetSpriteFromAtlasAsync("ui/rollingBallGame_atlas", "count_" .. slot0, function (slot0) setImageSprite(slot0, slot0, true) end) LeanTween.value(go(slot1), 0, 1, 0.5).setOnUpdate(slot1, System.Action_float(function (slot0) slot0.alpha = slot0 end)).setOnComplete(slot1, System.Action(function () slot0() end)) end, function (slot0) LeanTween.value(go(slot0), 1, 0, 0.5):setOnUpdate(System.Action_float(function (slot0) slot0.alpha = slot0 end)).setOnComplete(slot1, System.Action(function () slot0() end)) end }, slot0) end slot4 = {} for slot8 = 1, 3, 1 do table.insert(slot4, slot3) end seriesAsync(slot4, function () slot0.countStart = false setActive(false, false) false() end) end slot0.gameStart = function (slot0) slot0.startFlag = true seriesAsync({ function (slot0) slot0:showCountStart(slot0) end, function (slot0) slot0.moveDatas = {} slot0.selectGrid = nil slot0.selectEnterGrid = nil slot0.dragOffsetPos = Vector3(0, 0, 0) slot0.changeGridsDic = nil slot0.downTime = RollingBallConst.downTime slot0.comboAmount = 0 slot0.stopFlag = false slot0.onBeginDragTime = nil if slot0:getGameTimes() > 0 then slot0.gameTime = RollingBallConst.gameTime else slot0.gameTime = RollingBallConst.finishGameTime end slot0.gameTimeReal = Time.realtimeSinceStartup slot0.gameTimeFlag = true setActive(slot0.endLess, false) slot0.gameScore = 0 slot0:firstInitGrid() slot0:moveGridsBySelfPos(slot0.gridDic) slot0:timerStart() end }, nil) end slot0.gameStop = function (slot0) slot0:timerStop() pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot0) for slot4 = #slot0.effectDatas, 1, -1 do slot0:returnEffect(slot0.effectDatas[slot4].tf) table.remove(slot0.effectDatas, slot4) end for slot4 = 1, RollingBallConst.horizontal, 1 do for slot8 = 1, RollingBallConst.vertical, 1 do if slot0.gridDic[slot4][slot8] then slot0.gridDic[slot4][slot8]:setEventActive(false) end end end slot0:clearUI() slot0:showScoreUI(slot0.gameScore, 1000) end slot0.timerStart = function (slot0) if not slot0.timer.running then slot0.timer:Start() end end slot0.timerStop = function (slot0) if slot0.timer.running then slot0.timer:Stop() end end slot0.fallingGridDic = function (slot0) function slot1(slot0, slot1) for slot5 = slot1 + 1, RollingBallConst.vertical, 1 do if slot0.gridDic[slot0][slot5] then return slot5 end end return 0 end for slot5 = 1, RollingBallConst.horizontal, 1 do for slot9 = 1, RollingBallConst.vertical, 1 do if not slot0.gridDic[slot5][slot9] and RollingBallConst.vertical - slot9 > 0 and slot1(slot5, slot9) > 0 then slot0.gridDic[slot5][slot11] = false slot0.gridDic[slot5][slot9] = slot0.gridDic[slot5][slot11] slot0.gridDic[slot5][slot9]:setPosData(slot5, slot9) end end end end slot0.firstInitGrid = function (slot0) for slot4 = 1, RollingBallConst.horizontal, 1 do slot0.fillGridDic[slot4] = {} for slot8 = 1, RollingBallConst.vertical, 1 do if not slot0.gridDic[slot4][slot8] then slot9 = {} if slot4 > 2 and slot0.gridDic[slot4 - 2][slot8]:getType() == slot0.gridDic[slot4 - 1][slot8]:getType() then table.insert(slot9, slot0.gridDic[slot4 - 2][slot8]:getType()) end if slot8 > 2 and slot0.gridDic[slot4][slot8 - 2]:getType() == slot0.gridDic[slot4][slot8 - 1]:getType() then table.insert(slot9, slot0.gridDic[slot4][slot8 - 2]:getType()) end slot10 = slot0:createGrid(slot0:getRandomType(slot9), slot4, slot8) slot0.gridDic[slot4][slot8] = slot10 slot0:setFillGridPosition(slot10, slot4, #slot0.fillGridDic[slot4]) table.insert(slot0.fillGridDic[slot4], slot10) end end end end slot0.fillEmptyGrid = function (slot0) for slot4 = 1, RollingBallConst.horizontal, 1 do slot0.fillGridDic[slot4] = {} for slot8 = 1, RollingBallConst.vertical, 1 do if not slot0.gridDic[slot4][slot8] then slot9 = slot0:createGrid(slot0:getRandomType(), slot4, slot8) slot0.gridDic[slot4][slot8] = slot9 slot0:setFillGridPosition(slot9, slot4, #slot0.fillGridDic[slot4]) table.insert(slot0.fillGridDic[slot4], slot9) end end end end slot0.setFillGridPosition = function (slot0, slot1, slot2, slot3) slot1:setPosition((slot2 - 1) * RollingBallConst.grid_width, (RollingBallConst.vertical + slot3) * RollingBallConst.grid_height) end slot0.onTimer = function (slot0) for slot4 = #slot0.moveDatas, 1, -1 do slot8 = slot0.moveDatas[slot4].grid.getPosition(slot6).y slot10 = slot0.moveDatas[slot4].endY if slot0.moveDatas[slot4].grid.getPosition(slot6).x == slot0.moveDatas[slot4].endX and slot8 == slot10 then slot6:setEventActive(true) table.remove(slot0.moveDatas, slot4) else slot11, slot12 = nil if math.abs(slot9 - slot7) < RollingBallConst.moveSpeed or slot9 == slot7 then slot11 = slot9 - slot7 elseif slot7 < slot9 then slot11 = RollingBallConst.moveSpeed elseif slot9 < slot7 then slot11 = -RollingBallConst.moveSpeed end if math.abs(slot10 - slot8) < RollingBallConst.moveSpeed or slot8 == slot10 then slot12 = 0 slot8 = slot10 elseif slot8 < slot10 then slot12 = RollingBallConst.moveSpeed elseif slot10 < slot8 then slot12 = -RollingBallConst.moveSpeed end slot6:setPosition(slot7 + slot11, slot8 + slot12) end end for slot4 = #slot0.effectDatas, 1, -1 do slot0.effectDatas[slot4].ax = (slot0.effectTargetPosition.x - slot0.effectDatas[slot4].tf.localPosition.x) * 0.002 slot0.effectDatas[slot4].ay = (slot0.effectTargetPosition.y - slot0.effectDatas[slot4].tf.localPosition.y) * 0.002 slot0.effectDatas[slot4].vx = slot0.effectDatas[slot4].vx + slot0.effectDatas[slot4].ax slot0.effectDatas[slot4].vy = slot0.effectDatas[slot4].vy + slot0.effectDatas[slot4].ay slot0.effectDatas[slot4].tf.localPosition.x = slot0.effectDatas[slot4].tf.localPosition.x + slot0.effectDatas[slot4].vx slot0.effectDatas[slot4].tf.localPosition.y = slot0.effectDatas[slot4].tf.localPosition.y + slot0.effectDatas[slot4].vy slot0.effectDatas[slot4].tf.localPosition = slot0.effectDatas[slot4].tf.localPosition if slot0.effectDatas[slot4].tf.localPosition.x < slot0.effectTargetPosition.x then slot0:returnEffect(slot5.tf) table.remove(slot0.effectDatas, slot4) end end if slot0.onBeginDragTime and slot0.downTime > 0 then slot0.downTime = slot0.downTime - (Time.realtimeSinceStartup - slot0.onBeginDragTime) * 1000 slot0.onBeginDragTime = Time.realtimeSinceStartup if slot0.downTime <= 0 then slot0.downTime = 0 if slot0.selectGrid then slot0.selectGrid.onEndDrag(slot2) slot0:onGridUp(slot2) slot0.selectGrid.addUpCallback(slot2, function (slot0, slot1) slot0:onGridUp(slot1) end) slot0.selectGrid.addDragCallback(slot2, function (slot0, slot1) slot0:onGridDrag(slot1, slot0, slot1) end) end end end slot0.downTimeSlider.value = slot0.downTime / RollingBallConst.downTime if slot0.gameTimeFlag and slot0.gameTime > 0 and not isActive(slot0.closeUI) then slot0.gameTime = slot0.gameTime - (Time.realtimeSinceStartup - slot0.gameTimeReal) * 1000 if slot0.gameTime > 0 and slot0.gameTime <= 8000 and not isActive(slot0.overLight) then setActive(slot0.overLight, true) end if slot0.gameTime <= 0 then slot0.gameTime = 0 setActive(slot0.overLight, false) slot0.stopFlag = true end end slot0.gameTimeReal = Time.realtimeSinceStartup if math.floor(slot0.gameTime / 60000) < 10 then slot1 = "0" .. slot1 or slot1 end if math.floor(slot0.gameTime % 60000 / 1000) < 10 then slot2 = "0" .. slot2 or slot2 end if math.floor(math.floor(slot0.gameTime % 1000) / 10) < 10 then setText(slot0.labelGameTime, slot1 .. ":" .. slot2 .. ":" .. ("0" .. slot3 or slot3)) end if #slot0.moveDatas == 0 then if slot0.stopFlag then slot0:gameStop() return end if slot0.checkSuccesFlag then slot0.checkSuccesFlag = false slot0:checkSuccessGrid() end if slot0.isMoveing then slot0.isMoveing = false end elseif not slot0.isMoveing then slot0.isMoveing = true end end slot0.moveGridsByChangeDic = function (slot0) slot0.moveDatas = {} for slot4 = 1, #slot0.changeGridsDic, 1 do for slot9 = 1, #slot0.changeGridsDic[slot4], 1 do if slot5[slot9].grid ~= slot0.selectGrid then slot0:moveGridToPos(slot10.grid, slot10.posX, slot10.posY) end end end if #slot0.moveDatas > 0 then slot0:timerStart() end end slot0.moveGridsBySelfPos = function (slot0, slot1, slot2) slot0.moveDatas = {} for slot6 = 1, #slot1, 1 do for slot10 = 1, #slot1[slot6], 1 do if slot1[slot6][slot10] and slot11 ~= slot2 then slot0:moveGridToPos(slot11, slot11:getPosData()) end end end if #slot0.moveDatas > 0 then slot0:timerStart() end end slot0.moveGridToPos = function (slot0, slot1, slot2, slot3) slot4 = slot1:getPosition().x slot5 = slot1:getPosition().y slot7 = (slot3 - 1) * RollingBallConst.grid_height if math.floor(slot6) == math.floor(slot2) and math.floor(slot7) == math.floor(slot3) then return end slot1:setEventActive(false) table.insert(slot0.moveDatas, { grid = slot1, endX = slot6, endY = slot7 }) end slot0.updateMoveGridDic = function (slot0) for slot4 = 1, #slot0.changeGridsDic, 1 do for slot9 = 1, #slot0.changeGridsDic[slot4], 1 do if slot5[slot9].grid then slot10.grid:setPosData(slot10.posX, slot10.posY) end end end slot0:sortGridDic() end slot0.sortGridDic = function (slot0) slot1 = {} function slot2(slot0, slot1) for slot5 = 1, #slot0, 1 do slot6, slot7 = slot0[slot5]:getPosData() if slot6 == slot0 and slot7 == slot1 then return table.remove(slot0, slot5) end end return nil end for slot6 = 1, #slot0.gridDic, 1 do for slot10 = 1, #slot0.gridDic[slot6], 1 do slot12 = nil if slot0.gridDic[slot6][slot10] ~= slot6 or slot12 ~= slot10 then table.insert(slot1, slot0.gridDic[slot6][slot10]) slot0.gridDic[slot6][slot10] = false end end end for slot6 = 1, #slot0.gridDic, 1 do for slot10 = 1, #slot0.gridDic[slot6], 1 do if slot0.gridDic[slot6][slot10] == false then slot0.gridDic[slot6][slot10] = slot2(slot6, slot10) end end end end slot0.checkSuccessGrid = function (slot0) slot1 = nil slot0:updateRemoveFlag() slot0.gameTimeFlag = false slot2 = {} seriesAsync({ function (slot0) for slot4 = 1, RollingBallConst.horizontal, 1 do for slot8 = 1, RollingBallConst.vertical, 1 do slot0.gridDic[slot4][slot8].setEventActive(slot9, false) if slot0.gridDic[slot4][slot8]:getRemoveFlagV() or slot9:getRemoveFlagH() then slot11, slot12 = slot9:getPosData() if not slot1[slot9:getRemoveId()] then slot1[slot10] = { amount = 0, posList = {} } end slot1[slot10].amount = slot1[slot10].amount + 1 table.insert(slot1[slot10].posList, { x = slot11, y = slot12 }) slot0:returnGrid(slot9) slot0.gridDic[slot4][slot8] = false if not slot2 then slot2 = true end end end end slot0() end, function (slot0) if slot0 then LeanTween.delayedCall(go(slot1.rollingUI), 0.7, System.Action(function () slot0() end)) LeanTween.delayedCall.updateScore(slot1, ) LeanTween.delayedCall.updateScore:updateCombo() pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot1) else slot1.comboAmount = 0 slot0() end end, function (slot0) if not slot0.stopFlag then slot0:fallingGridDic() slot0:fillEmptyGrid() slot0:moveGridsBySelfPos(slot0.gridDic, nil) if slot0.moveGridsBySelfPos then slot0.checkSuccesFlag = true end end slot0() end }, function () slot0.gameTimeFlag = true end) end slot0.updateCombo = function (slot0) setActive(slot0.goodEffect, false) setActive(slot0.greatEffect, false) setActive(slot0.perfectEffect, false) if slot0.comboAmount == 2 then setActive(slot0.goodEffect, true) pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot0) elseif slot0.comboAmount == 3 then setActive(slot0.greatEffect, true) pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot0) elseif slot0.comboAmount >= 4 then setActive(slot0.perfectEffect, true) pg.CriMgr.GetInstance():PlaySoundEffect_V3(pg.CriMgr.GetInstance().PlaySoundEffect_V3) end if slot0.comboAmount > 1 then if LeanTween.isTweening(go(slot0.caidaiTf)) then LeanTween.cancel(go(slot0.caidaiTf)) end LeanTween.delayedCall(go(slot0.caidaiTf), 3, System.Action(function () setActive(slot0.caidaiTf, false) end)) setActive(slot0.caidaiTf, true) end end slot0.updateScore = function (slot0, slot1) for slot5, slot6 in pairs(slot1) do slot0.comboAmount = slot0.comboAmount + 1 end slot2 = 10 * slot0.comboAmount slot3 = 0 for slot7, slot8 in pairs(slot1) do slot9 = nil slot3 = slot3 + slot2 * ((slot8.amount == 3 and 1) or (slot8.amount == 4 and 1.5) or 2) * slot8.amount slot10 = slot2 * ((slot8.amount == 3 and 1) or (slot8.amount == 4 and 1.5) or 2) for slot14 = 1, #slot8.posList, 1 do slot0:addGridScoreTip(slot8.posList[slot14], slot10) slot0:addRemoveEffect(slot8.posList[slot14]) end end LeanTween.delayedCall(go(slot0.labelGameScore), 0.7, System.Action(function () if LeanTween.isTweening(go(slot0.labelGameScore)) then LeanTween.cancel(go(slot0.labelGameScore)) end LeanTween.value(go(slot0.labelGameScore), slot0, slot1, 1.7):setOnUpdate(System.Action_float(function (slot0) setText(slot0.labelGameScore, math.floor(slot0)) end)).setOnComplete(slot2, System.Action(function () setText(slot0.labelGameScore, ) end)) slot0.gameScore = slot0.gameScore + pg.CriMgr.GetInstance().PlaySoundEffect_V3(slot2, pg.CriMgr.GetInstance().PlaySoundEffect_V3) end)) end slot0.updateRemoveFlag = function (slot0) for slot4 = 1, RollingBallConst.horizontal, 1 do for slot8 = 1, RollingBallConst.vertical, 1 do slot0:checkGridRemove(slot0.gridDic[slot4][slot8], slot4, slot8) end end end slot0.checkGridRemove = function (slot0, slot1, slot2, slot3) if not slot1:getRemoveFlagH() and slot2 < RollingBallConst.horizontal - 1 then slot4 = 0 slot5 = true slot6 = nil slot7 = {} for slot11 = slot2, RollingBallConst.horizontal, 1 do if slot1:getType() == slot0.gridDic[slot11][slot3]:getType() and slot5 then slot4 = slot4 + 1 table.insert(slot7, slot0.gridDic[slot11][slot3]) if slot0.gridDic[slot11][slot3]:getRemoveId() then slot6 = slot0.gridDic[slot11][slot3]:getRemoveId() end else slot5 = nil end end if slot4 and slot4 >= 3 then slot6 = slot6 or slot0:getGridRemoveId() for slot11 = 1, #slot7, 1 do slot7[slot11]:setRemoveFlagH(true, slot6) end end end if not slot1:getRemoveFlagV() and slot3 < RollingBallConst.vertical - 1 then slot4 = 0 slot5 = true slot6 = nil slot7 = {} for slot11 = slot3, RollingBallConst.vertical, 1 do if slot1:getType() == slot0.gridDic[slot2][slot11]:getType() and slot5 then slot4 = slot4 + 1 table.insert(slot7, slot0.gridDic[slot2][slot11]) if slot0.gridDic[slot2][slot11]:getRemoveId() then slot6 = slot0.gridDic[slot2][slot11]:getRemoveId() end else slot5 = nil end end if slot4 and slot4 >= 3 then slot6 = slot6 or slot0:getGridRemoveId() for slot11 = 1, #slot7, 1 do slot7[slot11]:setRemoveFlagV(true, slot6) end end end end slot0.onGridDown = function (slot0, slot1) if slot0.isMoveing or slot0.selectGrid or #slot0.moveDatas > 0 then return end pg.CriMgr.GetInstance():PlaySoundEffect_V3(slot0) slot0.selectGrid = slot1 slot0.selectGrid:getTf():SetAsLastSibling() end slot0.onGridUp = function (slot0, slot1) slot0.selectGrid = nil if slot0.changeGridsDic then slot0:updateMoveGridDic() slot0.changeGridsDic = nil end slot0:clearDragAlpha() slot0.onBeginDragTime = nil slot0:moveGridsBySelfPos(slot0.gridDic, nil) slot0.checkSuccesFlag = true slot0.downTime = RollingBallConst.downTime end slot0.checkChangePos = function (slot0, slot1) slot2, slot3 = slot1:getPosData() slot4, slot5 = slot0.selectGrid:getPosData() if slot1 == slot0.selectGrid or (slot4 ~= slot2 and slot5 ~= slot3) then slot0:moveGridsBySelfPos(slot0.gridDic, slot0.selectGrid, function () return end) slot0.selectEnterGrid = nil slot0.changeGridsDic = nil slot0.changePosX, slot0.changePosY = nil else if slot0.changePosX == slot2 and slot0.changePosY == slot3 then return end slot0.changePosY = slot3 slot0.changePosX = slot2 slot0:updateEnterGrid(slot0.changePosX, slot0.changePosY) slot0:moveGridsByChangeDic() end end slot0.onGridBeginDrag = function (slot0, slot1, slot2, slot3) if slot0.isMoveing or not slot0.selectGrid or slot1 ~= slot0.selectGrid then return end slot0.onBeginDragTime = Time.realtimeSinceStartup slot0.downTime = RollingBallConst.downTime slot10, slot11 = slot0.selectGrid:getPosData() slot0:setDragAlpha(slot5, slot6, slot0.selectGrid:getType()) slot0.changePosX, slot0.changePosY = nil slot0.dragOffsetPos.x = slot3.position.x - slot0.selectGrid:getTf().transform.localPosition.x slot0.dragOffsetPos.y = slot3.position.y - slot0.selectGrid.getTf().transform.localPosition.y end slot0.onGridDrag = function (slot0, slot1, slot2, slot3) if not slot0.selectGrid or slot1 ~= slot0.selectGrid then return end if not slot0.uiCam then slot0.uiCam = GameObject.Find("UICamera"):GetComponent("Camera") end slot7 = slot0.rollingUI:InverseTransformPoint(slot4).y - RollingBallConst.grid_height / 2 if slot0.rollingUI.InverseTransformPoint(slot4).x - RollingBallConst.grid_width / 2 < 0 then slot6 = 0 end if slot7 < 0 then slot7 = 0 end if slot6 > (RollingBallConst.horizontal - 1) * RollingBallConst.grid_width then slot6 = (RollingBallConst.horizontal - 1) * RollingBallConst.grid_width end if slot7 > (RollingBallConst.vertical - 1) * RollingBallConst.grid_height then slot7 = (RollingBallConst.vertical - 1) * RollingBallConst.grid_height end slot0.selectGrid:changePosition(slot6, slot7) if slot0:getGridByPosition(slot0.selectGrid:getPosition()) and slot8 ~= slot0.selectGrid then slot9, slot10 = slot8:getPosData() slot11, slot12 = slot0.selectGrid:getPosData() if math.abs(slot13) + math.abs(slot10 - slot12) == 1 then slot0:updateMove(slot9, slot10) elseif math.abs(slot14) < math.abs(slot13) then if slot13 > 0 then slot9 = slot11 + 1 end if slot13 < 0 then slot9 = slot11 - 1 end slot0:updateMove(slot9, slot12) else if slot14 > 0 then slot10 = slot12 + 1 end if slot14 < 0 then slot10 = slot12 - 1 end slot0:updateMove(slot11, slot10) end end end slot0.updateMove = function (slot0, slot1, slot2) if RollingBallConst.horizontal < slot1 or RollingBallConst.vertical < slot2 then return end slot0:changeDragGrid(slot1, slot2) slot0:updateMoveGridDic() slot0.changeGridsDic = nil slot0:moveGridsBySelfPos(slot0.gridDic, slot0.selectGrid) slot0:setDragAlpha(slot1, slot2, slot0.selectGrid:getType()) end slot0.getGridByPosition = function (slot0, slot1) slot3 = math.floor((slot1.y + RollingBallConst.grid_height / 2) / RollingBallConst.grid_height) + 1 if math.floor((slot1.x + RollingBallConst.grid_width / 2) / RollingBallConst.grid_width) + 1 >= 1 and slot2 <= RollingBallConst.horizontal and slot3 >= 1 and slot3 <= RollingBallConst.vertical then return slot0.gridDic[slot2][slot3] end return nil end slot0.updateEnterGrid = function (slot0, slot1, slot2) slot3, slot4 = slot0.selectGrid:getPosData() slot0.changeGridsDic = {} for slot8 = 1, #slot0.gridDic, 1 do slot0.changeGridsDic[slot8] = {} for slot12 = 1, #slot0.gridDic[slot8], 1 do if slot8 ~= slot3 and slot12 ~= slot4 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 }) elseif slot8 == slot3 and slot12 == slot4 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot1, posY = slot2 }) elseif slot8 == slot3 then if slot4 < slot12 and slot12 <= slot2 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 - 1 }) elseif slot12 < slot4 and slot2 <= slot12 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 + 1 }) else table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 }) end elseif slot12 == slot4 then if slot3 < slot8 and slot8 <= slot1 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8 - 1, posY = slot12 }) elseif slot8 < slot3 and slot1 <= slot8 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8 + 1, posY = slot12 }) else table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 }) end end end end end slot0.changeDragGrid = function (slot0, slot1, slot2) slot3, slot4 = slot0.selectGrid:getPosData() slot0.changeGridsDic = {} for slot8 = 1, #slot0.gridDic, 1 do slot0.changeGridsDic[slot8] = {} for slot12 = 1, #slot0.gridDic[slot8], 1 do if slot8 == slot1 and slot12 == slot2 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot3, posY = slot4 }) elseif slot8 == slot3 and slot12 == slot4 then table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot1, posY = slot2 }) else table.insert(slot0.changeGridsDic[slot8], { grid = slot0.gridDic[slot8][slot12], posX = slot8, posY = slot12 }) end end end end slot0.createGrid = function (slot0, slot1, slot2, slot3) slot4 = nil slot5 = #slot0.gridsPool if #slot0.gridsPool > 0 then slot4 = table.remove(slot0.gridsPool, 1) else RollingBallGrid.New(tf(Instantiate(slot0.tplGrid))).addDownCallback(slot4, function (slot0, slot1) slot0:onGridDown(slot1) end) RollingBallGrid.New(tf(Instantiate(slot0.tplGrid))).addUpCallback(slot4, function (slot0, slot1) slot0:onGridUp(slot1) end) RollingBallGrid.New(tf(Instantiate(slot0.tplGrid))).addBeginDragCallback(slot4, function (slot0, slot1) slot0:onGridBeginDrag(slot1, slot0, slot1) end) RollingBallGrid.New(tf(Instantiate(slot0.tplGrid))).addDragCallback(slot4, function (slot0, slot1) slot0:onGridDrag(slot1, slot0, slot1) end) setActive(RollingBallGrid.New(tf(Instantiate(slot0.tplGrid))).getTf(slot4), true) end slot4:setParent(slot0.rollingUI) slot4:setType(slot1) slot4:setPosData(slot2, slot3) return slot4 end slot0.setDragAlpha = function (slot0, slot1, slot2, slot3) slot0.dragAlphaGrid:setPosition(slot4, (slot2 - 1) * RollingBallConst.grid_height) slot0.dragAlphaGrid:setType(slot3) setActive(slot0.dragAlphaGrid:getTf(), true) end slot0.clearDragAlpha = function (slot0) setActive(slot0.dragAlphaGrid:getTf(), false) end slot0.returnGrid = function (slot0, slot1) slot0:removeGrid(slot1) slot1:clearData() slot1:setParent(slot0.gridPoolTf) slot1:setEventActive(false) table.insert(slot0.gridsPool, slot1) end slot0.removeGrid = function (slot0, slot1) slot2, slot3 = slot1:getPosData() if not slot0.gridDic[slot2][slot3] then slot0.gridDic[slot2][slot3] = false end end slot0.getRandomType = function (slot0, slot1) if slot1 then slot2 = {} for slot6 = 1, RollingBallConst.grid_type_amount, 1 do if not table.contains(slot1, slot6) then table.insert(slot2, slot6) end end return slot2[math.random(1, #slot2)] end return math.random(1, RollingBallConst.grid_type_amount) end slot0.addGridScoreTip = function (slot0, slot1, slot2) slot5 = slot0:getScoreTip() slot5.localPosition = Vector3(slot6, slot7, 0) setText(findTF(slot5, "text"), "+" .. slot2) LeanTween.moveLocalY(go(slot5), (slot1.y - 1) * RollingBallConst.grid_height + 30, 0.5):setOnComplete(System.Action(function () slot0:returnScoreTip(slot0) end)) end slot0.addRemoveEffect = function (slot0, slot1) slot0:getRemoveEffect().localPosition = Vector3((slot1.x - 1) * RollingBallConst.grid_width + 50, (slot1.y - 1) * RollingBallConst.grid_height + 50, -350) LeanTween.delayedCall(go(slot4), 0.7, System.Action(function () slot0:returnRemoveEffect(slot0) end)) end slot0.getRemoveEffect = function (slot0) if not slot0.removeEffectPool then slot0.removeEffectPool = {} slot0.removeEffects = {} end slot1 = nil if #slot0.removeEffectPool > 1 then slot1 = table.remove(slot0.removeEffectPool, #slot0.removeEffectPool) else setParent(slot1, slot0.rollingEffectUI, false) table.insert(slot0.removeEffects, tf(Instantiate(slot0.tplRemoveEffect))) end setActive(slot1, true) return slot1 end slot0.returnRemoveEffect = function (slot0, slot1) setActive(slot1, false) table.insert(slot0.removeEffectPool, slot1) end slot0.getScoreTip = function (slot0) if not slot0.scoreTipPool then slot0.scoreTipPool = {} slot0.scoreTips = {} end slot1 = nil if #slot0.scoreTipPool > 1 then slot1 = table.remove(slot0.scoreTipPool, #slot0.scoreTipPool) else setParent(slot1, slot0.rollingEffectUI, false) table.insert(slot0.scoreTips, tf(Instantiate(slot0.tplScoreTip))) end setActive(slot1, true) return slot1 end slot0.returnScoreTip = function (slot0, slot1) setActive(slot1, false) table.insert(slot0.scoreTipPool, slot1) end slot0.addEffect = function (slot0, slot1) slot3 = slot0:getEffect() setParent(slot3, slot0.effectUI, false) setActive(slot3, true) slot3.localPosition = slot0.effectUI:InverseTransformPoint(slot1) table.insert(slot0.effectDatas, { vy = 2, ay = 0, vx = 2, ax = 0, tf = slot3 }) end slot0.clearUI = function (slot0) slot0.moveDatas = {} slot0.startFlag = false slot0.stopFlag = false setText(slot0.labelGameScore, "0000") setText(slot0.labelGameTime, "") setActive(slot0.endLess, true) slot0.downTimeSlider.value = 1 setActive(slot0.closeUI, false) setActive(slot0.overLight, false) slot0:clearDragAlpha() for slot4 = #slot0.effectDatas, 1, -1 do slot0:returnEffect(slot5) table.remove(slot0.effectDatas, slot4) end for slot4 = 1, RollingBallConst.horizontal, 1 do for slot8 = 1, RollingBallConst.vertical, 1 do if slot0.gridDic[slot4][slot8] then slot0:returnGrid(slot0.gridDic[slot4][slot8]) slot0.gridDic[slot4][slot8] = false end end end end slot0.getEffect = function (slot0) if #slot0.effectPool > 0 then return table.remove(slot0.effectPool, #slot0.effectPool) end return tf(Instantiate(slot0.tplEffect)) end slot0.returnEffect = function (slot0, slot1) SetParent(slot1, slot0.effectPoolTf, false) table.insert(slot0.effectPool, slot1) end slot0.getGridRemoveId = function (slot0) if not slot0.removeId then slot0.removeId = 0 end slot0.removeId = slot0.removeId + 1 return tostring(slot0.removeId) end slot0.onBackPressed = function (slot0) if not slot0.startFlag then slot0:emit(slot0.ON_BACK_PRESSED) end end slot0.willExit = function (slot0) if slot0.timer and slot0.timer.running then slot0.timer:Stop() end if LeanTween.isTweening(go(slot0.caidaiTf)) then LeanTween.cancel(go(slot0.caidaiTf)) end if LeanTween.isTweening(go(slot0.labelGameScore)) then LeanTween.cancel(go(slot0.labelGameScore)) end if LeanTween.isTweening(go(slot0.rollingUI)) then LeanTween.cancel(go(slot0.rollingUI)) end if slot0.scoreTips then for slot4 = 1, #slot0.scoreTips, 1 do if LeanTween.isTweening(go(slot0.scoreTips[slot4])) then LeanTween.cancel(go(slot0.scoreTips[slot4])) end end end if slot0.removeEffects then for slot4 = 1, #slot0.removeEffects, 1 do if LeanTween.isTweening(go(slot0.removeEffects[slot4])) then LeanTween.cancel(go(slot0.removeEffects[slot4])) end end end slot0.timer = nil end return slot0
local UpdateSystem = Tiny.processingSystem(Class "UpdateSystem") UpdateSystem.filter = Tiny.requireAll("update") function UpdateSystem:process(e, dt) e:update(dt) end return UpdateSystem
Class = require("pl.class") Script = require("speedwalking.script") Types = require("pl.types") Class.Avalon_Alotria_Tor_Innen(Script) function Avalon_Alotria_Tor_Innen:setup() world.AddTriggerEx("avalon_alotria_tor_innen_offen", "*Es ist weit geoeffnet.*", "speedwalk_active_script():success()", trigger_flag.Enabled, NOCHANGE, 0, '', '', sendto.script, 100 ) world.AddTriggerEx("avalon_alotria_tor_innen_geoeffnet", "Laut rasselnd oeffnet sich das Tor.", "speedwalk_active_script():success()", trigger_flag.Enabled, NOCHANGE, 0, '', '', sendto.script, 100 ) world.AddTriggerEx("avalon_alotria_tor_innen_geschlossen", "*Es ist geschlossen.*", "speedwalk_active_script():ziehe_hebel()", trigger_flag.Enabled, NOCHANGE, 0, '', '', sendto.script, 100 ) self.time = get_unix_time() self:add_command("betrachte tor") end function Avalon_Alotria_Tor_Innen:teardown() world.DeleteTrigger("avalon_alotria_tor_innen_geoeffnet") world.DeleteTrigger("avalon_alotria_tor_innen_geschlossen") world.DeleteTrigger("avalon_alotria_tor_innen_offen") end function Avalon_Alotria_Tor_Innen:inverts(s) return Types.type(s) == 'Avalon_Alotria_Tor_Aussen' end function Avalon_Alotria_Tor_Innen:ziehe_hebel() self:add_command("ziehe hebel") self.time = get_unix_time() end function Avalon_Alotria_Tor_Innen:pop_command() cmd = self._base.pop_command(self) if not Types.is_empty(cmd) then return cmd end if get_unix_time()-self.time > 5 then self:ziehe_hebel() return self._base.pop_command(self) end end function Avalon_Alotria_Tor_Innen:get_duration() return 3.0 end return Avalon_Alotria_Tor_Innen
--[[ Localization.lua Translations for Dominos Cast (German) --]] local L = LibStub('AceLocale-3.0'):NewLocale('Dominos-CastBar', 'deDE') if not L then return end L.Texture = 'Textur' L.Width = 'Breite' L.Height = 'H\195\182he' L.Display_time = 'Zeige Zeit' L.Padding = "Padding" --Needs Translation
return {'lejeune'}
function slot3() return display.newLayer() end MyResTopBar = class(slot1, "MyResTopBar") MyResTopBar.ctor = function (slot0, slot1) slot0._resOrItemPanes = {} slot0._curShowingResOrItemPanes = {} slot0._resTypesOrItemVos = {} slot5 = slot1 slot0.pushResesOrItemVos(slot3, slot0) slot4 = slot0 slot0.retain(slot3) end MyResTopBar.createResOrItemPane = function (slot0, slot1) slot2 = nil slot5 = slot1 if type(slot4) == "table" then slot8 = slot0 slot2 = ccsPoolMgr.get(slot4, ccsPoolMgr, "csb/common/MyItemTopPane.csb", false) else slot8 = slot0 slot2 = ccsPoolMgr.get(slot4, ccsPoolMgr, "csb/common/MyResTopPane.csb", false) end slot6 = slot2 table.insert(slot4, slot0._resOrItemPanes) slot6 = slot2 slot0.addChild(slot4, slot0) if slot2.setType then slot6 = slot1 slot2.setType(slot4, slot2) elseif slot2.setItemVo then slot6 = slot1 slot2.setItemVo(slot4, slot2) end return slot2 end MyResTopBar.pushResesOrItemVos = function (slot0, slot1) slot4 = slot0 slot0.removeAllPanes(slot3) if slot1 and #slot1 > 0 then slot4 = slot1 for slot5, slot6 in ipairs(slot3) do slot10 = slot6 slot11 = false DisplayUtil.setVisible(slot0, slot7) slot11 = slot6 table.insert(slot0, slot0._resTypesOrItemVos) end end end MyResTopBar.removeAllPanes = function (slot0) slot3 = slot0._resOrItemPanes for slot4, slot5 in pairs(slot2) do if slot5.getType then slot9 = slot5 slot12 = slot5 resTweenMgr.removeTempResPane(slot7, resTweenMgr, slot5.getType(slot11)) end slot9 = slot5 ccsPoolMgr.put(slot7, ccsPoolMgr) end slot0._resOrItemPanes = {} slot0._curShowingResOrItemPanes = {} slot0._resTypesOrItemVos = {} end MyResTopBar.onHide = function (slot0, slot1) slot2 = 0.2 if slot1 then slot2 = 0 end slot5 = slot0._curShowingResOrItemPanes for slot6, slot7 in ipairs(slot4) do if slot7.getType then slot11 = slot7 slot14 = slot7 resTweenMgr.removeTempResPane(slot9, resTweenMgr, slot7.getType(slot13)) end slot12 = { autoAlpha = 0 } TweenLite.to(slot9, slot7, slot2) end end MyResTopBar.onShow = function (slot0, slot1) slot2 = 0.2 if slot1 then slot2 = 0 end slot0._curShowingResOrItemPanes = {} slot5 = slot0._resOrItemPanes for slot6, slot7 in ipairs(slot4) do slot8 = true if slot7.getType then slot11 = Hero slot14 = slot7 slot8 = Hero.isMainResOpen(slot10, slot7.getType(slot13)) end slot12 = slot8 slot7.setVisible(slot10, slot7) if slot8 then slot12 = slot7 table.insert(slot10, slot0._curShowingResOrItemPanes) end end slot5 = slot0 slot0.checkPositions(slot4) slot5 = slot0._curShowingResOrItemPanes for slot6, slot7 in ipairs(slot4) do if slot7.getType then slot11 = slot7 slot14 = slot7 resTweenMgr.pushTempResPane(slot9, resTweenMgr, slot7.getType(slot13)) end slot12 = { autoAlpha = 1 } TweenLite.to(slot9, slot7, slot2) end end MyResTopBar.checkPositions = function (slot0) if #slot0._curShowingResOrItemPanes > 0 then slot5 = slot0._curShowingResOrItemPanes[1] slot4 = (slot0._curShowingResOrItemPanes[1].getContentSize(slot4).width + 15) * slot1 - 15 slot7 = slot0._curShowingResOrItemPanes for slot8, slot9 in ipairs(slot6) do slot17 = slot8 - 1 slot13 = -0.5 * slot4 + (slot8 - 1) * slot3 + math.max(slot15, 0) * slot2 slot9.setPositionX(slot11, slot9) end end end MyResTopBar.destroy = function (slot0) if slot0._resOrItemPanes then slot3 = slot0._resOrItemPanes for slot4, slot5 in ipairs(slot2) do if slot5.getType then slot9 = slot5 slot12 = slot5 resTweenMgr.removeTempResPane(slot7, resTweenMgr, slot5.getType(slot11)) end slot9 = slot5 ccsPoolMgr.put(slot7, ccsPoolMgr) end slot0._curShowingResOrItemPanes = nil slot0._resOrItemPanes = nil end slot3 = slot0 slot0.removeFromParent(slot2) slot3 = slot0 slot0.release(slot2) end return
return function(children) local index = 1 return function(entity, dt) while index <= #children do local current = children[index] local result = current(entity, dt) if result == 'success' then index = 1 return 'success' end if result == 'running' then return 'running' end index = index + 1 end index = 1 return 'failure' end end
local logs = {} local w, h = term.getSize() local function log(text) table.insert(logs, os.epoch('utc') .. " " .. text) end local function dumpLogs() local f = fs.open("dump.log", "w") f.write(table.concat(logs, "\n")) f.close() end local function loadtable(path) local file = fs.open(path, "r") local content = textutils.unserialize(file.readAll()) file.close() return content end term.clear() term.setCursorPos(1, 1) print("Bem Vindo ao NewOS!") sleep(0.5) print() print("Caregando Lista de Pacotes...") local packageDirs = loadtable("/boot/package.path") for i, v in pairs(packageDirs) do package.path = package.path .. ";" .. v end _G.package = package print(package.path) sleep(1) -- animation term.setBackgroundColor(colors.black) term.clear() term.setBackgroundColor(colors.green) for i = 1, h do term.setCursorPos(1, i) term.clearLine() sleep(0.05) end local opus = { '555ddd5ddddddddddddddddddd55555ddd555555', '5dd5dd5dddddddddddddddddd5ddddd5d5dddddd', '5dd5dd5d55555555d5ddddd5d5ddddd5d5dddddd', '5dd5dd5d5dddddd5d5ddddd5d5ddddd5dd55555d', '5dd5dd5d5dddddd5d5ddddd5d5ddddd5ddddddd5', '5dd5dd5d5d55555dd5dd5dd5d5ddddd5ddddddd5', '5dd5dd5d5dddddddd5d5d5d5d5ddddd5ddddddd5', '5ddd555d55555555dd5ddd5ddd55555dd555555d', } for k,line in ipairs(opus) do term.setCursorPos((w - 38) / 2, k + (h - #opus) / 2) term.blit(string.rep(' ', #line), string.rep('a', #line), line) end sleep(1) -- local function main() local processes = {} local selectedProcessID = 0 local selectedProcess local lastProcID = 0 local native = term.current() local wm = {} local w, h = term.getSize() local titlebarID = 0 local keysDown = {} local resizeStartX local resizeStartY local resizeStartW local resizeStartH local mvmtX = nil local util = require("util") local file = util.loadModule("file") local theme = file.readTable("/etc/colors.cfg") local serviceWindow = window.create(native, 1, 1, 1, 1, false) local top = 0 local function updateProcesses() for i, v in pairs(processes) do term.redirect(v.window) coroutine.resume(v.coroutine) end end local function drawProcess(proc) if proc.showTitlebar == false then term.redirect(proc.window) if proc.maximazed then proc.window.reposition(1, 2, w, h - 1) else proc.window.reposition(proc.x, proc.y, proc.width, proc.height) end proc.window.redraw() else term.redirect(native) if proc.maximazed then proc.window.reposition(1, 3, w, h - 2) if proc == selectedProcess then paintutils.drawLine(1, 2, w, 2, theme.window.titlebar.backgroundSelected) else paintutils.drawLine(1, 2, w, 2, theme.window.titlebar.background) end term.setCursorPos(math.floor((w - string.len(proc.title) / 2) / 2), 2) term.setTextColor(theme.window.titlebar.text) term.write(proc.title) if not proc.disableControls then term.setCursorPos(1, 2) if proc == selectedProcess then term.setTextColor(theme.window.close) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") if proc == selectedProcess then term.setTextColor(theme.window.minimize) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") if proc == selectedProcess then term.setTextColor(theme.window.maximize) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") end else proc.window.reposition(proc.x, proc.y + 1, proc.width, proc.height) if proc == selectedProcess then paintutils.drawLine(proc.x, proc.y, proc.x + proc.width - 1, proc.y, theme.window.titlebar.backgroundSelected) else paintutils.drawLine(proc.x, proc.y, proc.x + proc.width - 1, proc.y, theme.window.titlebar.background) end term.setCursorPos(proc.x + math.floor((proc.width - string.len(proc.title)) / 2), proc.y) term.setTextColor(theme.window.titlebar.text) term.write(proc.title) if not proc.disableControls then term.setCursorPos(proc.x, proc.y) if proc == selectedProcess then term.setTextColor(theme.window.close) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") if proc == selectedProcess then term.setTextColor(theme.window.minimize) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") if proc == selectedProcess then term.setTextColor(theme.window.maximize) else term.setTextColor(theme.window.titlebar.text) end term.write("\7") end end term.redirect(proc.window) proc.window.redraw() end end local function drawProcesses() term.redirect(native) term.setBackgroundColor(theme.desktop.background) term.clear() term.setCursorPos(33,19) term.setTextColor(colors.lime) term.write("Versão para testes\19") term.setCursorPos(1,5) if selectedProcess.minimized then wm.selectProcess(titlebarID or 1) else drawProcess(selectedProcess) end if selectedProcess.minimized == true then selectedProcessID = 1 selectedProcess = processes[1] end for i, v in pairs(processes) do if i ~= selectedProcessID then if v.minimized then v.window.setVisible(false) else drawProcess(v) end end end drawProcess(selectedProcess) updateProcesses() end function wm.selectProcess(pid) if processes[pid] then selectedProcessID = pid selectedProcess = processes[pid] selectedProcess.window.setVisible(true) selectedProcess.window.redraw() drawProcesses() end end function wm.selectProcessAfter(pid, time) sleep(time) wm.selectProcess(pid) end function wm.unminimizeProcess(pid) processes[pid].minimized = false end function wm.listProcesses() return processes end function wm.getSelectedProcess() return selectedProcess end function wm.getSelectedProcessID() return selectedProcessID end function wm.endProcess(pid) local proc = processes[pid] if proc then if pid == selectedProcessID then wm.selectProcess(titlebarID) end proc.window.setVisible(false) processes[pid] = nil drawProcesses() end end local function removeDeadProcesses() for i, v in pairs(processes) do if coroutine.status(v.coroutine) == "dead" then wm.endProcess(i) end end end local function contains(tbl, elem) for i, v in pairs(tbl) do if elem == v then return true end end return false end local function isKeyDown(id) for i, v in pairs(keysDown) do if v == id then return i end end end function wm.getSize() return native.getSize() end function wm.changeSettings(pid, newSettings) if not newSettings.title and type(path) == "string" then newSettings.title = fs.getName(path) if newSettings.title:sub(-4) == ".lua" then newSettings.title = newSettings.title:sub(1, -5) end elseif type(path) ~= "string" then newSettings.title = "Untitled" end if newSettings.showTitlebar == nil or newSettings.showTitlebar == true then newSettings.showTitlebar = true end if not newSettings.width then newSettings.width = 20 end if not newSettings.height then newSettings.height = 10 end if not newSettings.x then newSettings.x = math.ceil(w / 2 - (newSettings.width / 2)) end if not newSettings.y then if (newSettings.height % 2) == 0 then newSettings.y = math.ceil(h / 2 - (newSettings.height / 2)) else newSettings.y = math.ceil(h / 2 - (newSettings.height / 2)) + 1 end end local process = processes[pid] newSettings.path = process.path newSettings.window = process.window newSettings.coroutine = process.coroutine processes[pid] = newSettings end function wm.createProcess(path, settings) lastProcID = lastProcID + 1 if not settings.title and type(path) == "string" then settings.title = fs.getName(path) if settings.title:sub(-4) == ".lua" then settings.title = settings.title:sub(1, -5) end elseif type(path) ~= "string" then settings.title = "Untitled" end if settings.showTitlebar == nil or settings.showTitlebar == true then settings.showTitlebar = true end if not settings.width then settings.width = 20 end if not settings.height then settings.height = 10 end if not settings.x then settings.x = math.ceil(w / 2 - (settings.width / 2)) end if not settings.y then if (settings.height % 2) == 0 then settings.y = math.ceil(h / 2 - (settings.height / 2)) else settings.y = math.ceil(h / 2 - (settings.height / 2)) + 1 end end settings.path = path local newTable = table newTable["contains"] = contains local function run() end log(type(path)) local req = _G.require if type(path) == "string" then run = function() _G.require = require _G.wm = wm _G.id = lastProcID _G.table = newTable _G.shell = shell os.run({ _G = _G, package = package }, path) sleep(1000) end elseif type(path) == "function" then log("running as func") run = function() local wm = wm local id = lastProcID local table = newTable local textbox = textbox path(textbox) end end settings.window = window.create(native, settings.x, settings.y, settings.width, settings.height) term.redirect(settings.window) settings.coroutine = coroutine.create(run) coroutine.resume(settings.coroutine) settings.window.redraw() table.insert(processes, lastProcID, settings) return lastProcID end function wm.createService(path) lastProcID = lastProcID + 1 local function run() end local ins = {} if type(path) == "string" then run = function() _G.require = require _G.wm = wm _G.id = lastProcID _G.table = newTable _G.shell = shell os.run({ _G = _G, package = package }, path) sleep(1000) end elseif type(path) == "function" then log("running as func") run = function() local wm = wm local id = lastProcID local table = newTable local textbox = textbox path(textbox) end end ins.coroutine = coroutine.create(run) ins.window = serviceWindow return lastProcID end local loginID = wm.createProcess("/bin/ui/login.lua", { showTitlebar = true, dontShowInTitlebar = true, disableControls = true, title = "Login", height = 7, y = (h / 2) - 4 }) wm.selectProcess(loginID) wm.createService(function() sleep(5) os.reboot() end) drawProcesses() while true do local e = {os.pullEvent()} if string.sub(e[1], 1, 6) == "mouse_" and not selectedProcess.minimized then local m, x, y = e[2], e[3], e[4] -- Resize checking if resizeStartX ~= nil and m == 2 then log(e[1]) if e[1] == "mouse_up" then resizeStartX = nil resizeStartY = nil resizeStartW = nil resizeStartH = nil drawProcesses() elseif e[1] == "mouse_drag" then selectedProcess.width = (resizeStartW + (x - resizeStartX)) selectedProcess.height = (resizeStartH + (y - resizeStartY)) term.redirect(selectedProcess.window) coroutine.resume(selectedProcess.coroutine, "term_resize") drawProcesses() end -- Moving windows & x and max / min buttons elseif not selectedProcess.minimized and not selectedProcess.maximazed and selectedProcess.showTitlebar and x >= selectedProcess.x and x <= selectedProcess.x + selectedProcess.width - 1 and y == selectedProcess.y and e[1] == "mouse_click" and mvmtX == nil then if not selectedProcess.disableControls and x == selectedProcess.x and e[1] == "mouse_click" then wm.endProcess(selectedProcessID) drawProcesses() elseif not selectedProcess.disableControls and x == selectedProcess.x + 1 and e[1] == "mouse_click" then selectedProcess.minimized = true drawProcesses() elseif not selectedProcess.disableControls and x == selectedProcess.x + 2 and e[1] == "mouse_click" then selectedProcess.maximazed = true term.redirect(selectedProcess.window) coroutine.resume(selectedProcess.coroutine, "term_resize") drawProcesses() else mvmtX = x - selectedProcess.x drawProcesses() end -- Max window controls elseif selectedProcess.maximazed == true and y == 2 then if not selectedProcess.disableControls and x == 1 and e[1] == "mouse_click" then wm.endProcess(selectedProcessID) drawProcesses() elseif not selectedProcess.disableControls and x == 2 and e[1] == "mouse_click" then selectedProcess.minimized = true drawProcesses() elseif not selectedProcess.disableControls and x == 3 then selectedProcess.maximazed = false term.redirect(selectedProcess.window) coroutine.resume(selectedProcess.coroutine, "term_resize") drawProcesses() end -- Window movement elseif not selectedProcess.maximazed and selectedProcess.showTitlebar and x >= selectedProcess.x - 1 and x <= selectedProcess.x + selectedProcess.width and y >= selectedProcess.y - 1 and y <= selectedProcess.y + 1 and e[1] == "mouse_drag" or e[1] == "mouse_up" and mvmtX ~= nil then if e[1] == "mouse_drag" and mvmtX then selectedProcess.x = x - mvmtX + 1 selectedProcess.y = y drawProcesses() else mvmtX = nil end elseif not selectedProcess.disallowResizing and x == selectedProcess.x + selectedProcess.width - 1 and y == selectedProcess.y + selectedProcess.height and m == 2 then if e[1] == "mouse_click" then resizeStartX = x resizeStartY = y resizeStartW = selectedProcess.width resizeStartH = selectedProcess.height log("resize start") end -- Passing events (not maximazed) elseif not selectedProcess.maximazed and x >= selectedProcess.x and x <= selectedProcess.x + selectedProcess.width - 1 and y >= selectedProcess.y and y <= selectedProcess.y + selectedProcess.height - 1 then term.redirect(selectedProcess.window) local pass = {} if selectedProcess.showTitlebar == true then pass = { e[1], m, x - selectedProcess.x + 1, y - selectedProcess.y } else pass = { e[1], m, x - selectedProcess.x + 1, y - selectedProcess.y + 1 } end coroutine.resume(selectedProcess.coroutine, table.unpack(pass)) -- Passing events (maximazed) elseif selectedProcess.maximazed and y > 2 then term.redirect(selectedProcess.window) local pass = {} if selectedProcess.showTitlebar == true then pass = { e[1], m, x, y - 2 } else pass = { e[1], m, x, y - 1 } end coroutine.resume(selectedProcess.coroutine, table.unpack(pass)) elseif e[1] == "mouse_click" then for i, v in pairs(processes) do if x >= v.x and x <= v.x + v.width - 1 and y >= v.y and y <= v.y + v.height - 1 then wm.selectProcess(i) local pass = {} if selectedProcess.showTitlebar == true then pass = { e[1], m, x - selectedProcess.x + 1, y - selectedProcess.y } else pass = { e[1], m, x - selectedProcess.x + 1, y - selectedProcess.y + 1 } end term.redirect(selectedProcess.window) coroutine.resume(selectedProcess.coroutine, table.unpack(pass)) break end end end elseif e[1] == "char" or string.sub(e[1], 1, 3) == "key" or e[1] == "paste" then if e[1] == "key" then table.insert(keysDown, e[2]) elseif e[1] == "key_up" then if isKeyDown(e[2]) then table.remove(keysDown, isKeyDown(e[2])) end end if isKeyDown(keys.leftCtrl) and isKeyDown(keys.leftShift) and isKeyDown(keys.delete) then wm.selectProcess(wm.createProcess("/bin/ui/tskmgr.lua", { width = 30, height = 15, title = "Task Manager" })) drawProcesses() end term.redirect(selectedProcess.window) coroutine.resume(selectedProcess.coroutine, table.unpack(e)) elseif e[1] == "wm_fancyshutdown" then term.redirect(native) shell.run("/bin/ui/fancyshutdown.lua", e[2]) elseif e[1] == "wm_login" then titlebarID = wm.createProcess("/bin/ui/titlebar.lua", { x = 1, y = 1, width = w, height = 1, showTitlebar = false, dontShowInTitlebar = true }) wm.selectProcess(titlebarID) else for i, v in pairs(processes) do term.redirect(v.window) coroutine.resume(v.coroutine, table.unpack(e)) v.window.redraw() end drawProcesses() end -- Update windows term.redirect(selectedProcess.window) removeDeadProcesses() for i, v in pairs(processes) do if i ~= selectedProcessID then term.redirect(v.window) coroutine.resume(v.coroutine, "keepalive") end end if selectedProcess.minimized then wm.selectProcess(titlebarID or 1) else drawProcess(selectedProcess) end log(tostring(selectedProcess.minimized)) end end local function split(inputstr, sep) if sep == nil then sep = "%s" end local t={} for str in string.gmatch(inputstr, "([^"..sep.."]+)") do table.insert(t, str) end return t end local ok, err = xpcall(main, function(err) term.redirect(term.native()) term.setCursorPos(1, 3) term.setTextColor(colors.white) term.clear() print("Fatal System Error:", err) local w, h = term.getSize() local tb = split(debug.traceback(), "\n") for i, v in pairs(tb) do if i >= 13 then print("...") return else print(v) end end term.setCursorPos(1, 19) read() dumpLogs() end)
--[[ INIT FUNCTIONS ]] QhunCore.Addon.coreInit() -- init the singleton of the core event emitter QhunCore.EventEmitter.new(true)
--[[ #part of the 3DreamEngine by Luke100000 bake.lua - merges several materials into one --]] local lib = _3DreamEngine function lib:bakeMaterial(o, ID) return lib:bakeMaterials({o}, o.obj.path .. "_" .. (ID or o.name)) end function lib:bakeMaterials(list, ID) local atlas = {{0, 0, 1, 0}} local uvs = { } local uvo = { } local used if love.filesystem.getInfo("bakedMaterials/" .. ID .. ".atlas") then local file = love.filesystem.read("bakedMaterials/" .. ID .. ".atlas") atlas, uvs, uvo, used = unpack(packTable.unpack(file)) else local found = false local materials = { } local materialsLookup = { } for d,o in pairs(list) do if o.materials then found = true --fetch all materials for _,m in ipairs(o.materials) do materials[m.name] = 0 materialsLookup[m.name] = m end --approximate per material area for _,f in ipairs(o.faces) do local m = o.materials[f[1]] local a = vec3(o.vertices[f[1]]) local b = vec3(o.vertices[f[2]]) local c = vec3(o.vertices[f[3]]) local ab = b-a local ac = c-a local s = ab:cross(ac):length() / 2 materials[m.name] = materials[m.name] + s end --get UVs bounds uvo[d] = { } for _,f in ipairs(o.faces) do local m = o.materials[f[1]] uvs[m.name] = uvs[m.name] or {math.huge, math.huge, -math.huge, -math.huge} local uv = { o.texCoords[f[1]], o.texCoords[f[2]], o.texCoords[f[3]], } local cx = math.floor((uv[1][1] + uv[2][1] + uv[3][1]) / 3) local cy = math.floor((uv[1][2] + uv[2][2] + uv[3][2]) / 3) uvo[d][f[1]] = {cx, cy} uvo[d][f[2]] = {cx, cy} uvo[d][f[3]] = {cx, cy} for v = 1, 3 do local a = uv[v] uvs[m.name][1] = math.min(uvs[m.name][1], a[1] - cx) uvs[m.name][2] = math.min(uvs[m.name][2], a[2] - cy) uvs[m.name][3] = math.max(uvs[m.name][3], a[1] - cx) uvs[m.name][4] = math.max(uvs[m.name][4], a[2] - cy) end end end end assert(found, "no material buffers found") --get priority local totalPriority = 0 local priority = { } for m,p in pairs(materials) do local area = math.sqrt((uvs[m][1] - uvs[m][3])^2 + (uvs[m][2] - uvs[m][4])^2) local textures = materialsLookup[m].tex_albedo local prio = p * area * (textures and 1.0 or 0.001) priority[m] = prio totalPriority = totalPriority + prio end --normalize priority local count = 0 local priorities = { } for m,p in pairs(materials) do priority[m] = priority[m] / totalPriority priorities[#priorities+1] = m end --aprox required subdivision counts based on priority while #atlas < #priorities do local a = table.remove(atlas, 1) local h = a[3] / 2 table.insert(atlas, {a[1], a[2], h}) table.insert(atlas, {a[1]+h, a[2], h}) table.insert(atlas, {a[1]+h, a[2]+h, h}) table.insert(atlas, {a[1], a[2]+h, h}) end --sort atlases by their size table.sort(atlas, function(a, b) return a[3] > b[3] end) --sort priorities table.sort(priorities, function(a, b) return priority[a] > priority[b] end) --insert for i,m in pairs(priorities) do atlas[i][4] = m atlas[m] = atlas[i] end --bake local res = 1024 local canvases = { "tex_albedo", "tex_material", "tex_normal", "tex_emission", } used = { } love.filesystem.createDirectory(("bakedMaterials/" .. ID):match("(.*/)")) --render individual images for _, name in pairs(canvases) do local canvas = love.graphics.newCanvas(res, res, {mipmaps = "manual"}) for i = 1, canvas:getMipmapCount() do love.graphics.push("all") love.graphics.setBlendMode("replace", "premultiplied") love.graphics.setCanvas(canvas, i) local w, h = canvas:getDimensions() love.graphics.scale(w / 2^(i-1), h / 2^(i-1)) for d,s in ipairs(atlas) do if s[4] then local mat = materialsLookup[s[4]] local tex = type(mat[name]) == "string" and self:getImage(mat[name], true) local uv = uvs[s[4]] local mesh = love.graphics.newMesh({ {0, 0, uv[1], uv[2]}, {1, 0, uv[3], uv[2]}, {1, 1, uv[3], uv[4]}, {0, 1, uv[1], uv[4]}, }) if name == "tex_albedo" then love.graphics.setColor(mat.color) used[name] = true elseif name == "tex_material" then love.graphics.setColor(mat.roughness, mat.metallic, 1.0) used[name] = true if type(mat[name]) == "table" then for i = 1, 3 do local tex = self:getImage(mat[name][i+2], true) love.graphics.setColorMask(i == 1, i == 2, i == 3, false) if tex then mesh:setTexture(tex) love.graphics.setColor(1, 1, 1) else mesh:setTexture() love.graphics.setColor(mat.roughness, mat.metallic, 1.0) end love.graphics.draw(mesh, s[1], s[2], 0, s[3]) love.graphics.setColorMask(true, true, true, true) end mesh = false end elseif name == "tex_emission" then love.graphics.setColor(mat.emission) if tex or mat.emission[1] + mat.emission[2] + mat.emission[3] > 0 then used[name] = true end elseif name == "tex_normal" then if not tex then love.graphics.setColor(0.5, 0.5, 1.0) end elseif tex then love.graphics.setColor(1, 1, 1) used[name] = true end if mesh then if tex then mesh:setTexture(tex) end love.graphics.draw(mesh, s[1], s[2], 0, s[3]) end end end love.graphics.pop() end if used[name] then canvas:newImageData():encode("tga", "bakedMaterials/" .. ID .. "_" .. name .. ".tga") end end --export atlas data local file = packTable.pack({atlas, uvs, uvo, used}) love.filesystem.write("bakedMaterials/" .. ID .. ".atlas", file) end --adapt UV for d,o in pairs(list) do for i,s in ipairs(o.texCoords) do local m = o.materials[i] local a = atlas[m.name] local uv_origin = uvo[d][i] or {0, 0} local uv = uvs[m.name] or {0, 0, 1, 1} local x = (s[1] - uv_origin[1] - uv[1]) / (uv[3] - uv[1]) local y = (s[2] - uv_origin[2] - uv[2]) / (uv[4] - uv[2]) o.texCoords[i] = { a[1] + math.clamp(x, 0, 1) * a[3], a[2] + math.clamp(y, 0, 1) * a[3], } end --set new material o.material = self:newMaterial() if used.tex_albedo then o.material.tex_albedo = "bakedMaterials/" .. ID .. "_tex_albedo.tga" o.material.color = {1, 1, 1, 1} end if used.tex_normal then o.material.tex_normal = "bakedMaterials/" .. ID .. "_tex_normal.tga" end if used.tex_material then o.material.tex_material = "bakedMaterials/" .. ID .. "_tex_material.tga" o.material.roughness = 1.0 o.material.metallic = 1.0 end if used.tex_emission then o.material.tex_emission = "bakedMaterials/" .. ID .. "_tex_emission.tga" o.material.emission = {1, 1, 1} end end end
function ShadowmoonRetainer_OnEnterCombat(Unit,Event) Unit:RegisterEvent("ShadowmoonRetainer_Shoot", 4000, 0) end function ShadowmoonRetainer_Shoot(Unit,Event) Unit:FullCastSpellOnTarget(15547,Unit:GetRandomPlayer(3)) end function ShadowmoonRetainer_OnLeaveCombat(Unit,Event) Unit:RemoveEvents() end function ShadowmoonRetainer_OnDied(Unit,Event) Unit:RemoveEvents() end RegisterUnitEvent(22102, 1, "ShadowmoonRetainer_OnEnterCombat") RegisterUnitEvent(22102, 2, "ShadowmoonRetainer_OnLeaveCombat") RegisterUnitEvent(22102, 4, "ShadowmoonRetainer_OnDied")
--[[ This function is executed every time you press the 'execute' button ]] function init() local forward_speed = 0.1 / 10 -- m 0.1m per 10s local rotate_speed = math.pi * 0.0535 / 10 -- a full circle per 10s, 0.0535 is the distance between two wheels settings = { {'clockwise', rotate_speed, rotate_speed}, {'counter-clockwise', -rotate_speed, -rotate_speed}, {'forward', forward_speed, -forward_speed}, {'backwards', -forward_speed, forward_speed}, {'stop', 0, 0} } count = 1 end --[[ This function is executed at each time step It must contain the logic of your controller ]] function step() -- set velocity local index = math.ceil(count / 50) -- 50 ticks = 10s local desc, left, right = table.unpack(settings[index]) robot.differential_drive.set_linear_velocity(left, right) print(string.format('--- step = %d, setting = %s ---', count, desc)) print(string.format('left: target_vel = %f, delta_pos = %f', left, robot.differential_drive.encoders.left)) print(string.format('right: target_vel = %f, delta_pos = %f', right, robot.differential_drive.encoders.right)) -- increment the config variable if count < 201 then -- 50 ticks per state * 4 states + 1 stop state count = count + 1 end end --[[ This function is executed every time you press the 'reset' button in the GUI. It is supposed to restore the state of the controller to whatever it was right after init() was called. The state of sensors and actuators is reset automatically by ARGoS. ]] function reset() count = 1 end --[[ This function is executed only once, when the robot is removed from the simulation ]] function destroy() end
--[[ Copyright 2017 wrxck <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local setloc = {} local mattata = require('mattata') local http = require('socket.http') local url = require('socket.url') local json = require('dkjson') local redis = require('mattata-redis') local configuration = require('configuration') function setloc:init() setloc.commands = mattata.commands( self.info.username ):command('setloc').table setloc.help = [[/setloc <location> - Sets your location to the given value.]] end function setloc.check_loc(location) local jstr, res = http.request('http://maps.googleapis.com/maps/api/geocode/json?address=' .. url.escape(location)) if res ~= 200 then return false, configuration.errors.connection end local jdat = json.decode(jstr) if jdat.status == 'ZERO_RESULTS' then return false, configuration.errors.results end return true, jdat.results[1].geometry.location.lat .. ':' .. jdat.results[1].geometry.location.lng .. ':' .. jdat.results[1].formatted_address end function setloc.set_loc(user, location) local validate, res = setloc.check_loc(location) if not validate then return res end local latitude, longitude, address = res:match('^(.-):(.-):(.-)$') local user_loc = json.encode( { ['latitude'] = latitude, ['longitude'] = longitude, ['address'] = address } ) local hash = mattata.get_user_redis_hash( user, 'location' ) if hash then redis:hset( hash, 'location', user_loc ) return 'Your location has been updated to: ' .. address .. '\nYou can now use commands such as /weather and /location, without needing to specify a location - your location will be used by default. Giving a different location as the command argument will override this.' end end function setloc.get_loc(user) local hash = mattata.get_user_redis_hash( user, 'location' ) if hash then local location = redis:hget( hash, 'location' ) if not location or location == 'false' or location == nil then return false else return location end end end function setloc:on_message(message, configuration) local input = mattata.input(message.text) if not input then local location = setloc.get_loc(message.from) if not location then return mattata.send_reply( message, 'You don\'t have a location set. Use /setloc <location> to set one.' ) end return mattata.send_reply( message, 'Your location is currently set to: ' .. json.decode(location).address ) end return mattata.send_message( message.chat.id, setloc.set_loc( message.from, input ) ) end return setloc
local Compression = require(script.Compression) local Migration = require(script.Migration) local Throttle = require(script.Throttle) local Data = {} function Data.unpack(value, migrations) if value == nil then return nil end return Migration.unpack(Compression.unpack(value), migrations) end function Data.pack(value, migrations) return Compression.pack(Migration.pack(value, migrations)) end function Data.update(collection, key, transform) local data local ok, err = Throttle.update(collection._dataStore, key, function(oldValue) data = transform(Data.unpack(oldValue, collection.migrations)) if data == nil then return nil end return Data.pack(data, collection.migrations) end) if not ok then error(err) end return data end return Data
-- Gkyl ------------------------------------------------------------------------ -- -- Collide two gyriokinetic species with different mass, mean flow and/or -- temperature with the multispecies LBO-G operator. -- local Plasma = require("App.PlasmaOnCartGrid").Gyrokinetic() local Constants = require "Lib.Constants" -- Universal parameters (SI units). local eps0, eV = Constants.EPSILON0, Constants.ELEMENTARY_CHARGE local hbar = Constants.PLANCKS_CONSTANT_H/(2.*math.pi) -- (J s). local qe, qi = -eV, eV local mp = Constants.PROTON_MASS local me = Constants.ELECTRON_MASS n0 = 7e19 -- Number density (1/m^3). local Te0 = 40*eV -- Electron temperature (J). local Ti0 = 80*eV -- Ion temperature (J). local mi = mp -- Ion mass (kg). local massRatio = mi/me -- Ion to electron mass ratio. local B0 = 1.2 -- External magnetic field amplitude (T). local me = mi/massRatio -- Electron mass (kg). local vte, vti = math.sqrt(Te0/me), math.sqrt(Ti0/mi) -- Thermal speeds (m/s). local polyOrder = 1 local vMini, vMaxi = -5.*vti, 5.*vti -- Minimum and maximum ion velocity. local vMine, vMaxe = -5.*vte, 5.*vte -- Minimum and maximum electron velocity. local Nv = 8 -- Number of cells in one dim of velocity space. -- Parameters defining the initial condition. local A, delta = n0, 0.5 local kve, kvi = (2.*math.pi/(2.*vte)), (2.*math.pi/(2.*vti)) local betae, betai = 1.25*vti, 1.*vti local sigmae, sigmai = vte, vti local betaG = 0.0 local function coulombLog_sr(qs, qr, ms, mr, ns, nr, vts, vtr) -- Coulomb logarithm in Gkeyll (see online documentation): local m_sr, u_sr = ms*mr/(ms+mr), math.sqrt(3.*vts^2+3.*vtr^2) local omega_ps, omega_pr = math.sqrt(ns*qs^2/(ms*eps0)), math.sqrt(nr*qr^2/(mr*eps0)) local omega_cs, omega_cr = math.abs(qs*B0/ms), math.abs(qr*B0/mr) local rMax = 1./math.sqrt((omega_ps^2+omega_cs^2)/(vts^2+3.*vts^2)+(omega_pr^2+omega_cr^2)/(vtr^2+3.*vts^2)) local rMin = math.max(math.abs(qs*qr)/(4.*math.pi*eps0*m_sr*u_sr^2), hbar/(2.*math.exp(0.5)*u_sr*m_sr)) return 0.5*math.log(1. + (rMax/rMin)^2) end local function alpha_E(qs, qr, ms, mr, ns, nr, vts, vtr) local logLambda = 0.5*( coulombLog_sr(qs, qr, ms, mr, ns, nr, vts, vtr) +coulombLog_sr(qr, qs, mr, ms, nr, ns, vtr, vts) ) return (2.*ns*nr*(qs*qr)^2*logLambda)/(3.*(2.*math.pi)^(3./2.)*eps0^2*ms*mr*(vts^2+vtr^2)^(3./2.)) end local function nuG_sr(qs, qr, ms, mr, ns, nr, vts, vtr, beta) -- LBO-G collision frequency. local alphaE = alpha_E(qs, qr, ms, mr, ns, nr, vts, vtr) return alphaE*(ms+mr)/((1.+beta)*ms*ns) end local nuElcIon = nuG_sr(qe, qi, me, mi, n0, n0, vte, vti, betaG) local nuIonElc = nuG_sr(qi, qe, mi, me, n0, n0, vti, vte, betaG) local nuElcElc = nuG_sr(qe, qe, me, me, n0, n0, vte, vte, betaG) local nuIonIon = nuG_sr(qi, qi, mi, mi, n0, n0, vti, vti, betaG) print(" Collision frequencies (1/s):") print(string.format(" nu_ei = %g", nuElcIon)) print(string.format(" nu_ie = %g", nuIonElc)) print(string.format(" nu_ee = %g", nuElcElc)) print(string.format(" nu_ii = %g", nuIonIon)) local dtMin = 4.e-13 -- Approx. dt needed in higher res sim (128x128 p=2). -- Initial distribution function. local function initDistF(A, delta, kv, beta, sigma, mass, v) local vMag = math.sqrt(v[1]^2+2.*v[2]*B0/mass) return (A*(1.+delta*math.cos(kv*vMag))/((2.*math.pi*sigma^2)^(3./2.))) *math.exp(-((v[1]-beta)^2+2.*v[2]*B0/mass)/(2.*(sigma^2))) end vlasovApp = Plasma.App { tEnd = 1.e4*dtMin, -- End time. nFrame = 10, -- Number of frames to write. lower = {-1.0}, -- Configuration space lower left. upper = { 1.0}, -- Configuration space upper right. cells = {1} , -- Configuration space cells. basis = "serendipity", -- One of "serendipity" or "maximal-order". polyOrder = polyOrder, -- Polynomial order. timeStepper = "rk3", -- One of "rk2", "rk3" or "rk3s4". maximumDt = dtMin, cflFrac = 1.e6, -- To force dt=maximumDt. decompCuts = {1}, -- Cuts in each configuration direction. useShared = false, -- If to use shared memory. -- Boundary conditions for configuration space. periodicDirs = {1}, -- Periodic directions. ion = Plasma.Species { charge = qi, mass = mi, -- Velocity space grid. lower = {vMini, 0.}, upper = {vMaxi, 0.5*mi*(vMaxi^2)/B0}, cells = {Nv, Nv}, init = function(t, xn) -- Initial conditions. x, v = xn[1], {xn[2], xn[3]} return initDistF(A, delta, kvi, betai, sigmai, mi, v) end, evolve = true, evolveCollisionless = false, -- No collisionless terms. diagnostics = {"intM0", "intM1", "intM2"}, nDistFuncFrame = 1, -- Output a single distribution function. -- Collisions. coll = Plasma.LBOCollisions { collideWith = { "elc" }, frequencies = { nuIonElc }, -- Optional arguments: lboType = "LBO-G", }, }, elc = Plasma.Species { charge = qe, mass = me, -- Velocity space grid. lower = {vMine, 0.}, upper = {vMaxe, 0.5*me*(vMaxe^2)/B0}, cells = {Nv, Nv}, init = function(t, xn) -- Initial conditions. x, v = xn[1], {xn[2], xn[3]} return initDistF(A, delta, kve, betae, sigmae, me, v) end, evolve = true, evolveCollisionless = false, -- No collisionless terms. diagnostics = {"intM0", "intM1", "intM2"}, nDistFuncFrame = 1, -- Output a single distribution function. -- Collisions. coll = Plasma.LBOCollisions { collideWith = { "ion"}, frequencies = { nuElcIon }, -- Optional arguments: lboType = "LBO-G", }, }, -- Field solver. field = Plasma.Field { evolve = false, -- Evolve fields? externalPhi = function (t, xn) return 0.0 end, kperp2 = 0.0 }, -- Magnetic geometry. externalField = Plasma.Geometry { -- Background magnetic field. bmag = function (t, xn) return B0 end, -- Geometry is not time-dependent. evolve = false, }, } -- Run application. vlasovApp:run()
include( "autorun/shared/sh_silentstep.lua" ) CreateClientConVar( "ss_walk_override_sprint", "1", true, true ) net.Receive( "SILENT_STEP_DATA", function( len ) local steamid = net.ReadString() SStep.silent[steamid] = net.ReadBool() SStep.rlysilent[steamid] = net.ReadBool() end ) hook.Add( "CreateMove", "ss_walk_override_sprint", function( cmd ) local buttons = cmd:GetButtons() if bit.band( buttons, IN_WALK ) > 0 and bit.band( buttons, IN_SPEED ) > 0 then if GetConVar( "ss_walk_override_sprint" ):GetBool() then cmd:SetButtons( bit.band( buttons, bit.bnot( IN_SPEED ) ) ) end end end )
-- toxic jungle object local Jungle = {} -- list of tree entities Jungle.allowed_trees = { --"dead-dry-hairy-tree", --"dead-grey-trunk", --"dead-tree", --"dry-hairy-tree", --"dry-tree", --"green-coral", "tree-01", "tree-02", "tree-02-red", "tree-03", "tree-04", "tree-05", "tree-06", "tree-06-brown", "tree-07", "tree-08", "tree-08-brown", "tree-08-red", "tree-09", "tree-09-brown", "tree-09-red" } -- list of surfaces allowed for jungles Jungle.allowed_surfaces = { "nauvis" } Jungle.generate_trees = function(event) local surface = event.surface local allowed = false if settings.global[fcm_defines.keys.names.settings.jungle_enabled].value then for _,s in pairs(Jungle.allowed_surfaces) do if surface.name == s then allowed = true break end end end if fcm_debug then log("Jungle: generation on chunk ready, surface: "..tostring(allowed).."; mountains enabled: "..tostring(settings.global[fcm_defines.keys.names.settings.mountains_enabled].value).."; RSO remove trees: "..tostring(settings.global[fcm_defines.keys.names.settings.rso_remove_trees].value)) end if not allowed then return end -- top left of the chunk local minx = event.area.left_top.x local miny = event.area.left_top.y -- bottom right of the chunk local maxx = event.area.right_bottom.x local maxy = event.area.right_bottom.y local density = settings.global[fcm_defines.keys.names.settings.jungle_density].value -- iterate left to right for x = minx, maxx do -- iterate up to down for y = miny, maxy do if math.random() < density then -- chose random tree type local tree_type = Jungle.allowed_trees[math.random(#Jungle.allowed_trees)] -- spawn tree local check_for_resources = surface.count_entities_filtered({type = "resource", area = {{x-2,y-2},{x+2,y+2}}}) --if fcm_debug then log("Jungle: tile have resources: "..check_for_resources) end --if fcm_debug then log("Jungle: check to possible tree place: "..tostring(check_for_resources==0).."; "..tostring(not settings.global[fcm_defines.keys.names.settings.mountains_enabled].value).."; "..tostring(not settings.global[fcm_defines.keys.names.settings.rso_remove_trees].value)) end if check_for_resources == 0 or ((not settings.global[fcm_defines.keys.names.settings.mountains_enabled].value) and (not settings.global[fcm_defines.keys.names.settings.rso_remove_trees].value)) then if check_for_resources == 1 and fcm_debug then log("Jungle: mountains enabled: "..tostring(settings.global[fcm_defines.keys.names.settings.mountains_enabled].value).."; RSO remove trees: "..tostring(settings.global[fcm_defines.keys.names.settings.rso_remove_trees].value)) end --if fcm_debug then log("Jungle: (Mountains disabled and RSO removing trees) or tile is not resource") end if surface.can_place_entity{name = tree_type, position = {x, y}} then --if fcm_debug then log("Jungle: can place_tree at "..x..","..y) end surface.create_entity{name = tree_type, position = {x, y}} end end end end end if settings.global[fcm_defines.keys.names.settings.rso_remove_trees].value then for _, entity in pairs(surface.find_entities_filtered({type = "tree", area = {{minx,miny},{maxx,maxy}}})) do if entity.valid and surface.count_entities_filtered({type = "resource", area = {{entity.position.x-2,entity.position.y-2},{entity.position.x+2,entity.position.y+2}}}) ~= 0 then entity.destroy() end end end end Jungle.register_surface = function(surface_name) if surface_name then Jungle.allowed_surfaces[#Jungle.allowed_surfaces+1] = surface_name if fcm_debug then log("Added jungle surface: "..surface_name) end end end Jungle.unregister_surface = function(surface_name) if surface_name then for i,s in ipairs(Jungle.allowed_surfaces) do if surface_name == s then table.remove(Jungle.allowed_surfaces,i) if fcm_debug then log("Removed jungle surface: "..surface_name) end end end end end fcm_registry.events.on_chunk_generated[#fcm_registry.events.on_chunk_generated+1] = Jungle.generate_trees remote.add_interface("fcm_jungle",{ register_surface = Jungle.register_surface, unregister_surface = Jungle.unregister_surface })
--- General LightingManager which can tween items in lighting -- @classmod LightingManager local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore")) local ObjectTweenManager = require("ObjectTweenManager") local Lighting = game:GetService("Lighting") local HttpService = game:GetService("HttpService") local LightingManager = {} LightingManager.__index = LightingManager LightingManager.ClassName = "LightingManager" function LightingManager.new() local self = setmetatable({}, LightingManager) self._objectTweenManager = ObjectTweenManager.new() return self end --- Ain't sexy, but it'll do function LightingManager:_getObject(path) if not path:sub(1, #("Lighting.")) == "Lighting." then error("Bad path") end local base_path = path:sub(#("Lighting.") + 1) if base_path == "" then return Lighting end local current = Lighting for word in base_path:gmatch("%w+") do local new_obj = current:FindFirstChild(word) if not new_obj then warn("Unable to find " .. path) return nil end current = new_obj end return current end --- Tweens properties based upon a table with the following information -- @param propertyTable Set of properties to tween --[[ { Priority = 0; Id = "BASELINE"; Objects = { ["Lighting"] = { Brightness = `Number`; OutdoorAmbient = `Color3`; FogColor = `Color3`; FogStart = `Number; FogEnd = `Number; }; ["Lighting.ColorCorrection"] = { Saturation = `Number; Contrast = `Number; }; ["Lighting.SunRays"] = { Intensity = `Number; }; }; --]] function LightingManager:TweenProperties(propertyTable) assert(propertyTable) assert(propertyTable.Id) assert(propertyTable.Objects) assert(propertyTable.Priority) local key = propertyTable.Id .. HttpService:GenerateGUID() local priority = propertyTable.Priority local objects = {} for path, properties in pairs(propertyTable.Objects) do assert(type(path) == "string") assert(type(properties) == "table", "Not a table") local object = self:_getObject(path) if object then assert(not objects[object]) objects[object] = true self._objectTweenManager:TweenProperties(priority, key, object, properties) end end return function() for object, _ in pairs(objects) do self._objectTweenManager:RemoveTween(key, object) end end end function LightingManager:Destroy() self._objectTweenManager:Destroy() setmetatable(self, nil) end return LightingManager.new()
local class = require('middleclass') local Engine = require('Engine') local Entity = require('Entity') local json = require('cjson') local File = cc.FileUtils:getInstance() local State = class('State') function State:initialize() self.engine = Engine() for _, v in ipairs({'DisplaySystem', ''}) do local Sys = require('app.systems.'..v) local sys = Sys() self.engine:addSystem(sys) end for _, v in ipairs(conf.entities) do local entity = Entity() for _, c in ipairs(v.components) do local Com = require('app.components.'..c.class) local com = Com(c) entity:add(com) end entity.name = v.name entity.tag = v.tag print('add Entiry: ', v.name) self.engine:addEntity(entity) end end function State:update(dt) self.engine:update(dt) end function State:draw() self.engine:draw() end return State
local assert=assert;local a,b,c,d=math.sqrt,math.cos,math.sin,math.atan2;local e={}e.__index=e;local function f(g,h)return setmetatable({x=g or 0,y=h or 0},e)end;local i=f(0,0)local function j(k,l)return f(b(k)*l,c(k)*l)end;local function m(n)return type(n)=='table'and type(n.x)=='number'and type(n.y)=='number'end;function e:clone()return f(self.x,self.y)end;function e:unpack()return self.x,self.y end;function e:__tostring()return"("..tonumber(self.x)..","..tonumber(self.y)..")"end;function e.__unm(o)return f(-o.x,-o.y)end;function e.__add(o,p)assert(m(o)and m(p),"Add: wrong argument types (<vector> expected)")return f(o.x+p.x,o.y+p.y)end;function e.__sub(o,p)assert(m(o)and m(p),"Sub: wrong argument types (<vector> expected)")return f(o.x-p.x,o.y-p.y)end;function e.__mul(o,p)if type(o)=="number"then return f(o*p.x,o*p.y)elseif type(p)=="number"then return f(p*o.x,p*o.y)else assert(m(o)and m(p),"Mul: wrong argument types (<vector> or <number> expected)")return o.x*p.x+o.y*p.y end end;function e.__div(o,p)assert(m(o)and type(p)=="number","wrong argument types (expected <vector> / <number>)")return f(o.x/p,o.y/p)end;function e.__eq(o,p)return o.x==p.x and o.y==p.y end;function e.__lt(o,p)return o.x<p.x or o.x==p.x and o.y<p.y end;function e.__le(o,p)return o.x<=p.x and o.y<=p.y end;function e.permul(o,p)assert(m(o)and m(p),"permul: wrong argument types (<vector> expected)")return f(o.x*p.x,o.y*p.y)end;function e:toPolar()return f(d(self.x,self.y),self:len())end;function e:len2()return self.x*self.x+self.y*self.y end;function e:len()return a(self.x*self.x+self.y*self.y)end;function e.dist(o,p)assert(m(o)and m(p),"dist: wrong argument types (<vector> expected)")local q=o.x-p.x;local r=o.y-p.y;return a(q*q+r*r)end;function e.dist2(o,p)assert(m(o)and m(p),"dist: wrong argument types (<vector> expected)")local q=o.x-p.x;local r=o.y-p.y;return q*q+r*r end;function e:normalizeInplace()local s=self:len()if s>0 then self.x,self.y=self.x/s,self.y/s end;return self end;function e:normalized()return self:clone():normalizeInplace()end;function e:rotateInplace(t)local u,v=b(t),c(t)self.x,self.y=u*self.x-v*self.y,v*self.x+u*self.y;return self end;function e:rotated(t)local u,v=b(t),c(t)return f(u*self.x-v*self.y,v*self.x+u*self.y)end;function e:perpendicular()return f(-self.y,self.x)end;function e:projectOn(n)assert(m(n),"invalid argument: cannot project vector on "..type(n))local v=(self.x*n.x+self.y*n.y)/(n.x*n.x+n.y*n.y)return f(v*n.x,v*n.y)end;function e:mirrorOn(n)assert(m(n),"invalid argument: cannot mirror vector on "..type(n))local v=2*(self.x*n.x+self.y*n.y)/(n.x*n.x+n.y*n.y)return f(v*n.x-self.x,v*n.y-self.y)end;function e:cross(n)assert(m(n),"cross: wrong argument types (<vector> expected)")return self.x*n.y-self.y*n.x end;function e:trimInplace(w)local v=w*w/self:len2()v=v>1 and 1 or math.sqrt(v)self.x,self.y=self.x*v,self.y*v;return self end;function e:angleTo(x)if x then return d(self.y,self.x)-d(x.y,x.x)end;return d(self.y,self.x)end;function e:trimmed(w)return self:clone():trimInplace(w)end;return setmetatable({new=f,fromPolar=j,isvector=m,zero=i},{__call=function(y,...)return f(...)end})
local blips={} local REFRESH_INTERVAL=10000 local function odswiez() local pojazdy={} local c = getElementData(localPlayer,"character") if (c and c.gg_id) then for i,v in ipairs(getElementsByType("vehicle")) do local dbid=tonumber(getElementData(v,"dbid")) local vgid = getElementData(v,"owning_gang") or 0 if c.gg_id == vgid and dbid then table.insert(pojazdy,{gid=vgid, element = v}) end end for i,v in ipairs(pojazdy) do if v.gid == c.gg_id and not blips[v.element] then if getElementDimension(v.element)~=getElementDimension(localPlayer) or getElementInterior(v.element)~=getElementDimension(localPlayer) then return end blips[v.element]=createBlipAttachedTo(v.element, 0, 1, 0,238,255, 255, 255) setElementData(blips[v.element], "upd", getTickCount()) end end for i,v in ipairs(blips) do if (getTickCount()-getElementData(v,"upd")>(REFRESH_INTERVAL*2)) then destroyElement(v) blips[i]=nil end end end end setTimer(odswiez, REFRESH_INTERVAL, 0) --[[ local pojazdy = {} local c = getElementData(localPlayer,"character") if (c and c.gg_id) then -- jesli jest w gangu, for i,v in ipairs(getElementsByType("vehicle")) do local dbid = tonumber(getElementData(v,"dbid")) if c.gg_id == tonumber(getElementData()) ]]
kilnstrider = Creature:new { objectName = "@npc_spawner_n:kilnstrider", socialGroup = "imperial", faction = "imperial", level = 178, chanceHit = 12.25, damageMin = 1020, damageMax = 1750, baseXp = 16794, baseHAM = 200000, baseHAMmax = 200000, armor = 2, resists = {75,75,90,80,45,45,100,70,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0.0, ferocity = 0, pvpBitmask = NONE, creatureBitmask = KILLER, optionsBitmask = AIENABLED, diet = HERBIVORE, templates = {"object/mobile/space_imperial_tier4_tatooine_kilnstrider.iff"}, lootGroups = {}, weapons = {}, conversationTemplate = "", attacks = {} } CreatureTemplates:addCreatureTemplate(kilnstrider, "kilnstrider")
--[[ Feature decoder generator. Given RNN state, produce categorical distribution over tokens and features. Implements $$[softmax(W^1 h + b^1), softmax(W^2 h + b^2), ..., softmax(W^n h + b^n)] $$. --]] local FeaturesGenerator, parent = torch.class('onmt.FeaturesGenerator', 'nn.Container') --[[ Parameters: * `rnnSize` - Input rnn size. * `outputSize` - Output size (number of tokens). * `features` - table of feature sizes. --]] function FeaturesGenerator:__init(rnnSize, outputSize, features) parent.__init(self) self.net = self:_buildGenerator(rnnSize, outputSize, features) self:add(self.net) end function FeaturesGenerator:_buildGenerator(rnnSize, outputSize, features) local generator = nn.ConcatTable() -- Add default generator. generator:add(nn.Sequential() :add(onmt.Generator(rnnSize, outputSize)) :add(nn.SelectTable(1))) -- Add a generator for each target feature. for i = 1, #features do generator:add(nn.Sequential() :add(nn.Linear(rnnSize, features[i]:size())) :add(nn.LogSoftMax())) end return generator end function FeaturesGenerator:updateOutput(input) self.output = self.net:updateOutput(input) return self.output end function FeaturesGenerator:updateGradInput(input, gradOutput) self.gradInput = self.net:updateGradInput(input, gradOutput) return self.gradInput end function FeaturesGenerator:accGradParameters(input, gradOutput, scale) self.net:accGradParameters(input, gradOutput, scale) end
--[[ ServerPaths Contains resource paths for the server sided engine. ]] --------------------- -- Roblox Services -- --------------------- local ServerScriptService=game:GetService("ServerScriptService") return{ ["ServerClasses"]={}, ["SharedClasses"]={}, ["Utils"]={}, ["Services"]={ServerScriptService.Services} }
local function aggregateData(ids, namespace, aggregate, aggregateColumn, groupByColumn) local result = {} local total = {} for i, id in ipairs(ids) do local currEntityStorageKey = getEntityStorageKey(namespace, id) local aggregateValue = false local groupByValue = "*" -- only non count aggregate need the count value if aggregate ~= "count" then aggregateValue = redis.call("HGET", currEntityStorageKey, aggregateColumn) end -- try to get the group by value if isnotempty(groupByColumn) then if groupByColumn == aggregateColumn then groupByValue = aggregateValue else groupByValue = redis.call("HGET", currEntityStorageKey, groupByColumn) end if groupByValue == false then groupByValue = "" end end -- convert the value aggregateValue = tonumber(aggregateValue) if aggregate == "count" then if result[groupByValue] then result[groupByValue] = result[groupByValue] + 1 else result[groupByValue] = 1 end -- the rest of the aggregate must need a valid aggregate value elseif aggregateValue ~= nil then if aggregate == "min" then if result[groupByValue] ~= nil then result[groupByValue] = math.min(result[groupByValue], aggregateValue) else result[groupByValue] = aggregateValue end elseif aggregate == "max" then if result[groupByValue] ~= nil then result[groupByValue] = math.max(result[groupByValue], aggregateValue) else result[groupByValue] = aggregateValue end elseif aggregate == "sum" then if result[groupByValue] ~= nil then result[groupByValue] = result[groupByValue] + aggregateValue else result[groupByValue] = aggregateValue end elseif aggregate == "avg" then if result[groupByValue] ~= nil then result[groupByValue] = result[groupByValue] + aggregateValue total[groupByValue] = total[groupByValue] + 1 else result[groupByValue] = aggregateValue total[groupByValue] = 1 end end end end -- do operation on avg if aggregate == "avg" then for key, value in pairs(result) do result[key] = result[key] / total[key] end end return result end local function finalOrderBy(ids, tableName, column, order, offset, limit) local currTempStorageKey = getTempStorageKey(tableName, column) -- remove temp table (if exist for some reason) redis.call("DEL", currTempStorageKey) -- add value into temp table for i, id in ipairs(ids) do local currEntityStorageKey = getEntityStorageKey(tableName, id) local value = redis.call("HGET", currEntityStorageKey, column) if not isnumeric(value) then value = "-inf" end redis.call("ZADD", currTempStorageKey, value, id) end -- do sorting local tempIds = {} local min = "-inf" local max = "+inf" if order == "asc" then tempIds = redis.call("ZRANGEBYSCORE", currTempStorageKey, min, max, "LIMIT", offset, limit) else tempIds = redis.call("ZREVRANGEBYSCORE", currTempStorageKey, max, min, "LIMIT", offset, limit) end -- remove temp table redis.call("DEL", currTempStorageKey) return tempIds end local function whereSearch(ids, namespace, whereArgvs) local newIds = {} for i, id in ipairs(ids) do local condition = true for ii, whereArgv in ipairs(whereArgvs) do local currEntityStorageKey = getEntityStorageKey(namespace, id) local attributeValue = redis.call("HGET", currEntityStorageKey, whereArgv["column"]) if attributeValue == false then -- if we do not have the value, then it depends on the operator if whereArgv["operator"] == "=" then condition = false break elseif whereArgv["operator"] == "like" then condition = false break elseif whereArgv["operator"] == "!=" then condition = true break end else if whereArgv["operator"] == "=" and (attributeValue ~= whereArgv["searchValue"]) then condition = false break elseif whereArgv["operator"] == "like" and (not string.find(attributeValue, whereArgv["searchValue"])) then condition = false break elseif whereArgv["operator"] == "!=" and attributeValue == whereArgv["searchValue"] then condition = false break end end end if condition then table.insert(newIds, id) end end return newIds end -- keys local indexCount = tonumber(ARGV[1]) local whereCount = tonumber(ARGV[2]) local offset = tonumber(ARGV[3]) local limit = tonumber(ARGV[4]) local tableName = ARGV[5] local aggregate = ARGV[6] local aggregateColumn = ARGV[7] local groupByColumn = ARGV[8] local finalSortByColumn = ARGV[9] local finalSortByOrder = ARGV[10] -- find the ids of the intersection of the indexes local indexArr = {} local indexTbls = {} local index = 11 -- we only able to do sorting for the first where cause local firstTable = true for i = index, index + indexCount * 3 - 1, 3 do -- increment for latter use index = index + 3 local column = ARGV[i] local min = ARGV[i + 1] local max = ARGV[i + 2] local indexStorageKey = getIndexStorageKey(tableName, column) -- we do checking for the first sorted set only if firstTable then firstTable = false local order = "asc" -- override the order if column == finalSortByColumn then order = finalSortByOrder -- we reset the final order finalSortByColumn = "" finalSortByOrder = "" end if order == "asc" then indexArr = redis.call("ZRANGEBYSCORE", indexStorageKey, min, max) else indexArr = redis.call("ZREVRANGEBYSCORE", indexStorageKey, max, min) end else local ids = redis.call("ZREVRANGEBYSCORE", indexStorageKey, max, min) indexTbls[#indexTbls + 1] = table.toTable(ids) end end -- find out all intersect id local ids = table.whereIndexIntersect(indexArr, indexTbls) -- do where search if needed if whereCount > 0 then local whereArgvs = {} for i = index, index + whereCount * 3 - 1, 3 do local whereArgv = {} whereArgv["column"] = ARGV[i] whereArgv["operator"] = ARGV[i + 1] whereArgv["searchValue"] = ARGV[i + 2] whereArgvs[#whereArgvs + 1] = whereArgv end ids = whereSearch(ids, tableName, whereArgvs) end -- do aggreate if isnotempty(aggregate) then local result = {} if aggregate == "count" and isempty(groupByColumn) then result["*"] = #ids else result = aggregateData(ids, tableName, aggregate, aggregateColumn, groupByColumn) end return cjson.encode(result) else if isnotempty(finalSortByColumn) and isnotempty(finalSortByOrder) then -- do a final ordering ids = finalOrderBy(ids, tableName, finalSortByColumn, finalSortByOrder, offset, limit) elseif offset ~= 0 or limit ~= -1 then -- offset and limit -- the index starts at 1, but if you use 0, 2, it can also get the first 2 records ids = table.slice(ids, 1 + offset, limit == -1 and #ids or offset + limit) end end return ids
local has_telescope, telescope = pcall(require, "telescope") -- TODO: make dependency errors occur in a better way if not has_telescope then error("This plugin requires telescope.nvim (https://github.com/nvim-telescope/telescope.nvim)") end -- start the database client local db_client = require("telescope._extensions.frecency.db_client") db_client.init() -- finder code local conf = require('telescope.config').values local entry_display = require "telescope.pickers.entry_display" local finders = require "telescope.finders" local path = require('telescope.path') local pickers = require "telescope.pickers" local sorters = require "telescope._extensions.frecency.sorter" local utils = require('telescope.utils') local os_path_sep = vim.loop.os_uname().sysname == "Windows" and "\\" or "/" local show_scores = false local frecency = function(opts) opts = opts or {} local cwd = vim.fn.expand(opts.cwd or vim.fn.getcwd()) -- opts.lsp_workspace_filter = true -- TODO: decide on how to handle cwd or lsp_workspace for pathname shorten? local results = db_client.get_file_scores(opts) -- TODO: pass `filter_workspace` option local display_cols = {} display_cols[1] = show_scores and {width = 8} or nil table.insert(display_cols, {remaining = true}) local displayer = entry_display.create { separator = "", hl_chars = {[os_path_sep] = "TelescopePathSeparator"}, items = display_cols } -- TODO: look into why this gets called so much local bufnr, buf_is_loaded, filename, hl_filename, display_items local make_display = function(entry) bufnr = vim.fn.bufnr buf_is_loaded = vim.api.nvim_buf_is_loaded filename = entry.name hl_filename = buf_is_loaded(bufnr(filename)) and "TelescopeBufferLoaded" or "" if opts.tail_path then filename = utils.path_tail(filename) elseif opts.shorten_path then filename = utils.path_shorten(filename) end filename = path.make_relative(filename, cwd) display_items = show_scores and {{entry.score, "Directory"}} or {} table.insert(display_items, {filename, hl_filename}) return displayer(display_items) end pickers.new(opts, { prompt_title = "Frecency", finder = finders.new_table { results = results, entry_maker = function(entry) return { value = entry.filename, display = make_display, ordinal = entry.filename, name = entry.filename, score = entry.score } end, }, previewer = conf.file_previewer(opts), sorter = sorters.get_substr_matcher(opts), }):find() end return telescope.register_extension { setup = function(ext_config) show_scores = ext_config.show_scores or false end, exports = { frecency = frecency, }, }
local ros = require 'ros' require 'ros.actionlib.SimpleActionServer' local actionlib = ros.actionlib local function SimpleActionServer_onGoal(as) ros.INFO("SimpleActionServer_onGoal") local g = as:acceptNewGoal() print(g) assert(as:isActive()) -- ensure goal is active local r = as:createResult() r.result = 123 print(r) --as:setAborted(r, 'no') as:setSucceeded(r, 'done') end local function SimpleActionServer_onPreempt(as) ros.INFO("SimpleActionServer_onPreempt") as:setPreempted(nil, 'blub') end local function testSimpleActionServer() ros.init('test_action_server') ros.console.setLoggerLevel('actionlib', ros.console.Level.Debug) nh = ros.NodeHandle() local as = actionlib.SimpleActionServer(nh, 'test_action', 'actionlib/Test') as:registerGoalCallback(SimpleActionServer_onGoal) as:registerPreemptCallback(SimpleActionServer_onPreempt) print('Starting action server...') as:start() while ros.ok() do ros.spinOnce() sys.sleep(0.01) end as:shutdown() nh:shutdown() ros.shutdown() end testSimpleActionServer()
-- CopyOp example -- See results in the console local origNode = osg.Group() origNode:setName("Original Node") origNode:setUpdateCallback(osg.NodeCallback(function(node, noveVisitor) loginfo("Updating '" .. node:getName() .. "'") -- Since 3.3 must return bool return true end)) local clonedNode1 = origNode:clone( osg.CopyOp(bit_or(osg.CopyOp.DEEP_COPY_NODES))):asNode() clonedNode1:setName("Cloned Node 1") local clonedNode2 = origNode:clone( osg.CopyOp(bit_or(osg.CopyOp.DEEP_COPY_NODES, osg.CopyOp.DEEP_COPY_CALLBACKS))):asNode() clonedNode2:setName("Cloned Node 2") local root = osg.Group() root:addChild(origNode) root:addChild(clonedNode1) root:addChild(clonedNode2) local scene = reactorController:getReactorByName("Scene") scene.node:addChild(root)
local M = {} local Path = require("plenary.path") local workspaces = require("workspaces") local _sessions = require("habitats.sessions") local _util = require("habitats.util") local config = { path = Path:new(vim.fn.stdpath("data"), "habitats.nvim"), global_cd = true, sort = true, notify_info = true, hooks = { add = {}, remove = {}, open_pre = {}, open = {}, } } function M.add(name, path) if not name or not path then _util.notify.err("Missing name or path!") end workspaces.add_swap(name, path) end function M.delete(name) -- TODO: remove session data workspaces.remove(name) end function M.rename(name, new_name) -- TODO _util.notify.warn("Not implemented!") -- if config.notify_info then -- _util.notify.info(string.format("habitat [%s -> %s] renamed", name, new_name)) -- end end function M.get() return workspaces.get() end function M.list() return workspaces.list() end function M.open(name) workspaces.open(name) -- Force normal mode in new workspace. -- Recent telescope changes seem to keep insert mode at times. vim.schedule(function() local mode = vim.fn.mode() if mode ~= "n" then vim.api.nvim_input "<ESC>" end end) end local function init_files() if not config.path:exists() then config.path:mkdir() end if not config.habitats_path:exists() then config.habitats_path:touch() end if not config.sessions_path:exists() then config.sessions_path:mkdir() end end function M.setup(opts) config = vim.tbl_deep_extend('force', config, opts or {}) config.path = Path:new(config.path) config.habitats_path = config.path:joinpath("habitats") config.sessions_path = config.path:joinpath("sessions") init_files() workspaces.setup{ path = config.habitats_path.filename, global_cd = config.global_cd, sort = config.sort, notify_info = false, hooks = { add = vim.tbl_flatten{ config.hooks.add, function(name, path) if config.notify_info then _util.notify.info(string.format("habitat [%s -> %s] added", name, path)) end end }, remove = vim.tbl_flatten{ config.hooks.remove, function(name, path) if config.notify_info then _util.notify.info(string.format("habitat [%s -> %s] deleted", name, path)) end end }, open_pre = vim.tbl_flatten{ function() logger.debug("habitats.open_pre") end, config.hooks.open_pre, function() _sessions.save_and_stop() for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do if vim.bo[bufnr].modified then _util.notify.warn("Save your changes first!") return false end if vim.bo[bufnr].filetype == "toggleterm" then _util.notify.warn("One or more open terminals found!") return false end end for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do vim.api.nvim_buf_delete(bufnr, {}) end end, }, open = vim.tbl_flatten{ function(name) logger.debug("habitats.open") require("titan.lsp").reload_custom_commands() _sessions.load(name) -- Set kitty tab name -- local result = vim.fn.system({"kitty", "@", "set-tab-title", "-m", "recent:0", name}) -- print(result) end, config.hooks.open, }, } } _sessions.setup{ session_path = config.sessions_path.filename, } require("telescope").load_extension("habitats") end return M
Survival = class("Survival", Gamemode) function Survival:initialize() signal.register('newGame', self.setupWaves) end function Survival:reset() game.firstWave = false game.startingWave = 0 game.wave = game.startingWave game.timeToNextWave = 3 game.waveTime = 0 game.waveStartTime = 0 game._postWaveCalled = false game._preWaveCalled = false game.boss = nil game.waveTimer = nil end function Survival:update(dt) if game.waveTimer then game.prevT = game.waveTimer.running if math.floor(game.prevT) ~= math.floor(game.prevT+dt) then signal.emit('waveCountdown') end game.waveTimer:update(dt) end if game.boss then if game.boss.health <= 0 then game.boss = nil end end if #objects == 1 and game.waves[game.wave+1] == nil and not (player.health <= 0) then state.switch(gameover) signal.emit('survivalVictory') end if #objects == 1 and not game.waveTimer and game.boss == nil then if not game._postWaveCalled then self:onWaveEnd() end end end function Survival:onWaveStart() if game._preWaveCalled then return end signal.emit('waveStart') game.firstWave = false self:startWave() game.waveTimer = nil if game.boss ~= nil then signal.emit('bossSpawn') end game._postWaveCalled = false game._preWaveCalled = true end function Survival:onWaveEnd() if game._postWaveCalled then return end signal.emit('waveEnded', game.wave, game.time - game.waveStartTime) if game.waves[game.wave+1] ~= nil then if game.waves[game.wave+1].boss ~= nil then signal.emit('bossIncoming') end end game.waveTimer = cron.after(game.timeToNextWave, function() if not game._preWaveCalled then self:onWaveStart() end end) game._postWaveCalled = true game._preWaveCalled = false end function Survival:setupWaves() game.waves = {} game.waves[1] = { blobs = 10, sweepers = 0, healers = 0, tanks = 0, } game.waves[2] = { blobs = 0, sweepers = 7, tanks = 0, ninjas = 0, } game.waves[3] = { blobs = 20, sweepers = 0, healers = 2, } game.waves[4] = { blobs = 25, sweepers = 12, healers = 2, } game.waves[5] = { blobs = 0, tanks = 1, healers = 0, } game.waves[6] = { blobs = 35, sweepers = 0, tanks = 2, } game.waves[7] = { blobs = 25, tanks = 3, healers = 3, } game.waves[8] = { blobs = 0, sweepers = 12, healers = 3, tanks = 4, } game.waves[9] = { blobs = 40, healers = 4, tanks = 5, sweepers = 15, } game.waves[10] = { boss = Megabyte, } end function Survival:startWave() game.waveTimer = nil game.waveStartTime = game.time -- set the wave start time to the game time if game.wave == nil then game.wave = game.startingWave elseif game.waves[game.wave+1] == nil then state.switch(gameover) else game.wave = game.wave + 1 end self:setPrimaryText("WAVE "..game.wave) if game.waves[game.wave] ~= nil and game.wave ~= game.startingWave then self:spawnEnemies() end end function Survival:spawnEnemies() local wave = nil if w ~= nil then wave = w else wave = game.wave end local currentWave = game.waves[wave] if currentWave.blobs ~= nil then for i=1, currentWave.blobs do local p = vector(math.random(-game.worldSize.x/2, game.worldSize.x/2), math.random(-game.worldSize.y/2, game.worldSize.y/2)) p = p + (p - player.position):normalized()*150 local b = Blob:new(p) game:add(b) end end if currentWave.sweepers ~= nil then -- number of line enemies to spawn local num = currentWave.sweepers -- margin from the sides of the screen local margin = 600 self:spawnSweepers(num, margin) end if currentWave.healers ~= nil then for i=1, currentWave.healers do local p = vector(math.random(-game.worldSize.x/2, game.worldSize.x/2), math.random(-game.worldSize.y/2, game.worldSize.y/2)) p = p + (p - player.position):normalized()*250 local b = Healer:new(p) game:add(b) end end if currentWave.tanks ~= nil then for i=1, currentWave.tanks do local p = vector(math.random(-game.worldSize.x/2, game.worldSize.x/2), math.random(-game.worldSize.y/2, game.worldSize.y/2)) p = p + (p - player.position):normalized()*150 local b = Tank:new(p) game:add(b) end end if currentWave.ninjas ~= nil then for i=1, currentWave.ninjas do local p = vector(math.random(-game.worldSize.x/2, game.worldSize.x/2), math.random(-game.worldSize.y/2, game.worldSize.y/2)) p = p + (p - player.position):normalized()*150 local b = Ninja:new(p) game:add(b) end end if currentWave.boss ~= nil then local b = currentWave.boss:new() game.boss = game:add(b) end end -- spawns sets of sweepers function Survival:spawnSweepers(count, margin) local minimumCount = math.min(2, count) -- minimum count will be 2, unless count is only 1 local circleCount = math.random(minimumCount, count/3) -- pick a random number of sweepers if count - circleCount == 1 then -- ensure that after this, there won't be only one more sweeper to allocate. if there is, then add one more to this set instead circleCount = circleCount + 1 end local position = vector(math.random(-game.worldSize.x/2 + margin, game.worldSize.x/2 - margin), math.random(-game.worldSize.y/2 + margin, game.worldSize.y/2 - margin)) local radius = math.random(200, 700) for i = 1, circleCount do radius = radius*.9 -- makes the circles for each sweeper get a bit smaller local percent = i / (circleCount) -- used for circular movement game:add(Sweeper:new( position, percent, num, radius )) end local newMargin = margin * 1.2 -- increase the margin with each iteration, so that it tends towards the center more local newCount = count - circleCount if newCount > 0 then self:spawnSweepers(count - circleCount, newMargin) end end function Survival:draw() if game.waveText ~= nil and game.wave > 0 then self:drawPrimaryText() end if game.boss ~= nil then self:drawBossHealthBar() end self:drawPlayerHealthBar() self:drawBossIncoming() end function Survival:drawBossIncoming() love.graphics.setFont(font[48]) if game.waveTimer ~= nil and game.waveTimer.time - game.waveTimer.running <= 3 and #objects == 1 then local t = game.waveTimer.time - game.waveTimer.running love.graphics.print(math.ceil(t), love.graphics.getWidth()/2 - love.graphics.getFont():getWidth(math.ceil(t))/2, 150) if game.waves[game.wave+1] ~= nil then if game.waves[game.wave+1].boss ~= nil then love.graphics.print("BOSS INCOMING", love.graphics.getWidth()/2 - love.graphics.getFont():getWidth("BOSS INCOMING")/2, 100) end end end end function Survival:drawPlayerHealthBar() if state.current() ~= game then return end local height = 10 local multiplier = player.health / player.maxHealth local width = love.graphics.getWidth() * multiplier love.graphics.setColor(204/255, 15/255, 10/255, 1) love.graphics.rectangle("fill", love.graphics.getWidth()/2 - width/2, love.graphics.getHeight()-height, width/2, height) love.graphics.rectangle("fill", love.graphics.getWidth()/2, love.graphics.getHeight()-height, width/2, height) love.graphics.setColor(1, 1, 1) end function Survival:drawBossHealthBar() love.graphics.setColor(1, 1, 1) local multiplier = game.boss.health/game.boss.maxHealth love.graphics.rectangle("fill", 50, 50, (love.graphics.getWidth()-100)*multiplier, 25) local text = string.upper(game.boss.name) love.graphics.setFont(fontLight[24]) love.graphics.print(text, math.floor(love.graphics.getWidth()/2-love.graphics.getFont():getWidth(text)/2), 10) end function Survival:setPrimaryText(text) game.waveText = text game.waveTextTime = 3 end function Survival:drawPrimaryText() if game.waveTextTime <= 0 or game.firstWave then return end game.waveTextTime = game.waveTextTime - love.timer.getDelta() love.graphics.setLineWidth(1) love.graphics.setFont(font[48]) love.graphics.setColor(1, 1, 1, 1) love.graphics.print(game.waveText, love.graphics.getWidth()/2 - love.graphics.getFont():getWidth(game.waveText)/2, 100) end
object_tangible_loot_creature_loot_collections_space_reactor_mark_01_cygnus = object_tangible_loot_creature_loot_collections_space_shared_reactor_mark_01_cygnus:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_reactor_mark_01_cygnus, "object/tangible/loot/creature/loot/collections/space/reactor_mark_01_cygnus.iff")
-- not working btw _G.silentaim = true local players = game:GetService("Players") local plr = players.LocalPlayer local mouse = plr:GetMouse() local camera = game.Workspace.CurrentCamera local teamcheck = true function ClosestPlayerToMouse() local dist = math.huge local target = nil for i,v in pairs(players:GetPlayers()) do if v ~= plr and v.Character and v.Character:FindFirstChild("Head") and teamcheck and _G.silentaim and v.TeamColor ~= plr.TeamColor and v.Character.Humanoid.Health ~= 0 then local screenpoint = camera:WorldToScreenPoint(v.Character.Head.Position) local check = (Vector2.new(mouse.X,mouse.Y)-Vector2.new(screenpoint.X,screenpoint.Y)).magnitude if check < dist then check = dist target = v end end end return target end local mt = getrawmetatable(game) setreadonly(mt, false) local namecall = mt.__namecall mt.namecall = function(self,...) local args = {...} local method = getnamecallmethod() if tostring(self) == "" and tostring(method) == "FireServer" then args[1] = ClosestPlayerToMouse().Character.Humanoid args[3] = "Head" return self.FireServer(self,unpack(args)) end return namecall(self,...) end end
--[[ Map Tools: unbreakable default nodes Copyright (c) 2012-2017 Hugo Locurcio and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] local S = maptools.intllib maptools.creative = maptools.config["hide_from_creative_inventory"] minetest.register_node("maptools:stone", { description = S("Unbreakable Stone"), range = 12, stack_max = 10000, tiles = {"default_stone.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:stonebrick", { description = S("Unbreakable Stone Brick"), range = 12, stack_max = 10000, tiles = {"default_stone_brick.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:tree", { description = S("Unbreakable Tree"), range = 12, stack_max = 10000, tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) minetest.register_node("maptools:jungletree", { description = S("Unbreakable Jungle Tree"), range = 12, stack_max = 10000, tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) minetest.register_node("maptools:cactus", { description = S("Unbreakable Cactus"), range = 12, stack_max = 10000, tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), on_place = minetest.rotate_node }) minetest.register_node("maptools:papyrus", { description = S("Unbreakable Papyrus"), drawtype = "plantlike", range = 12, stack_max = 10000, tiles = {"default_papyrus.png"}, inventory_image = "default_papyrus.png", wield_image = "default_papyrus.png", walkable = false, paramtype = "light", sunlight_propagates = true, drop = "", selection_box = { type = "fixed", fixed = {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375} }, groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_leaves_defaults(), }) minetest.register_node("maptools:dirt", { description = S("Unbreakable Dirt"), range = 12, stack_max = 10000, tiles = {"default_dirt.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults(), }) minetest.register_node("maptools:wood", { description = S("Unbreakable Wooden Planks"), range = 12, stack_max = 10000, tiles = {"default_wood.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), }) minetest.register_node("maptools:junglewood", { description = S("Unbreakable Junglewood Planks"), range = 12, stack_max = 10000, tiles = {"default_junglewood.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_wood_defaults(), }) minetest.register_node("maptools:glass", { description = S("Unbreakable Glass"), range = 12, stack_max = 10000, drawtype = "glasslike", tiles = {"default_glass.png"}, paramtype = "light", sunlight_propagates = true, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_glass_defaults(), }) minetest.register_node("maptools:leaves", { description = S("Unbreakable Leaves"), range = 12, stack_max = 10000, drawtype = "allfaces_optional", tiles = {"default_leaves.png"}, paramtype = "light", drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_leaves_defaults(), }) minetest.register_node("maptools:sand", { description = S("Unbreakable Sand"), range = 12, stack_max = 10000, tiles = {"default_sand.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_sand_defaults(), }) minetest.register_node("maptools:gravel", { description = S("Unbreakable Gravel"), range = 12, stack_max = 10000, tiles = {"default_gravel.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults({ footstep = {name="default_gravel_footstep", gain=0.35}, dug = {name="default_gravel_footstep", gain=0.6}, }), }) minetest.register_node("maptools:clay", { description = S("Unbreakable Clay"), range = 12, stack_max = 10000, tiles = {"default_clay.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults(), }) minetest.register_node("maptools:desert_sand", { description = S("Unbreakable Desert Sand"), range = 12, stack_max = 10000, tiles = {"default_desert_sand.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_sand_defaults(), }) minetest.register_node("maptools:sandstone", { description = S("Unbreakable Sandstone"), range = 12, stack_max = 10000, tiles = {"default_sandstone.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:sandstone_brick", { description = S("Unbreakable Sandstone Brick"), range = 12, stack_max = 10000, tiles = {"default_sandstone_brick.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:desert_stone", { description = S("Unbreakable Desert Stone"), range = 12, stack_max = 10000, tiles = {"default_desert_stone.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:desert_cobble", { description = S("Unbreakable Desert Cobble"), range = 12, stack_max = 10000, tiles = {"default_desert_cobble.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:desert_stonebrick", { description = S("Unbreakable Desert Stone Brick"), range = 12, stack_max = 10000, tiles = {"default_desert_stone_brick.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:grass", { description = S("Unbreakable Dirt with Grass"), range = 12, stack_max = 10000, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, paramtype2 = "facedir", drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain = 0.4}, }), }) minetest.register_node("maptools:fullgrass", { description = S("Unbreakable Full Grass"), range = 12, stack_max = 10000, tiles = {"default_grass.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.4}, }), }) for slab_num = 1,3,1 do minetest.register_node("maptools:slab_grass_" .. slab_num * 4, { description = S("Grass Slab"), range = 12, stack_max = 10000, tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^maptools_grass_side_" .. slab_num * 4 .. ".png"}, drawtype = "nodebox", node_box = { type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + slab_num * 0.25, 0.5}, }, sunlight_propagates = true, paramtype = "light", paramtype2 = "facedir", drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}), }) end minetest.register_node("maptools:cobble", { description = S("Unbreakable Cobblestone"), range = 12, stack_max = 10000, tiles = {"default_cobble.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:mossycobble", { description = S("Unbreakable Mossy Cobblestone"), range = 12, stack_max = 10000, tiles = {"default_mossycobble.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:brick", { description = S("Unbreakable Brick"), range = 12, stack_max = 10000, tiles = {"default_brick.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:coalblock", { description = S("Unbreakable Coal Block"), range = 12, stack_max = 10000, tiles = {"default_coal_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:steelblock", { description = S("Unbreakable Steel Block"), range = 12, stack_max = 10000, tiles = {"default_steel_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:goldblock", { description = S("Unbreakable Gold Block"), range = 12, stack_max = 10000, tiles = {"default_gold_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:copperblock", { description = S("Unbreakable Copper Block"), range = 12, stack_max = 10000, tiles = {"default_copper_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:bronzeblock", { description = S("Unbreakable Bronze Block"), range = 12, stack_max = 10000, tiles = {"default_bronze_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("maptools:diamondblock", { description = S("Unbreakable Diamond Block"), range = 12, stack_max = 10000, tiles = {"default_diamond_block.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}, sounds = default.node_sound_stone_defaults(), }) -- Farming: minetest.register_node("maptools:soil_wet", { description = "Wet Soil", range = 12, stack_max = 10000, tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, drop = "", groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1}, sounds = default.node_sound_dirt_defaults(), }) minetest.register_node("maptools:desert_sand_soil_wet", { description = "Wet Desert Sand Soil", range = 12, stack_max = 10000, drop = "", tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"}, groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, desert = 1}, sounds = default.node_sound_sand_defaults(), })
local PANEL = {} function PANEL:Init() //self:SetTitle( "" ) //self:ShowCloseButton( false ) //self:SetDraggable( false ) self.Items = {} self.List = vgui.Create( "DListView", self ) local col1 = self.List:AddColumn( "Ordered Item" ) local col2 = self.List:AddColumn( "Cost" ) col1:SetMinWidth( 150 ) col2:SetMinWidth( 50 ) col2:SetMaxWidth( 100 ) self.Button = vgui.Create( "DImageButton", self ) self.Button:SetImage( "toxsin/airdrop" ) self.Button.OnMousePressed = function() self.List:Clear() self.Items = {} RunConsoleCommand( "ordershipment" ) RunConsoleCommand( "gm_showteam" ) end end function PANEL:AddItems( id, amt ) local tbl = item.GetByID( id ) if tbl.Price * amt > LocalPlayer():GetNWInt( "Cash", 0 ) then return end for i=1,amt do table.insert( self.Items, id ) end self.List:Clear() for k,v in pairs( self.Items ) do local tbl = item.GetByID( v ) self.List:AddLine( tbl.Name, tbl.Price ) end end function PANEL:GetPadding() return 5 end function PANEL:PerformLayout() local x,y = self:GetPadding(), self:GetPadding() + 30 self.List:SetSize( self:GetWide() * 0.5 - ( 2 * self:GetPadding() ), self:GetTall() - ( 2 * self:GetPadding() ) - 30 ) self.List:SetPos( x, y ) self.Button:SetSize( self:GetWide() * 0.5 - ( 2 * self:GetPadding() ), self:GetTall() - ( 2 * self:GetPadding() ) - 30 ) self.Button:SetPos( x + self.List:GetWide() + self:GetPadding(), self:GetPadding() + 30 ) self:SizeToContents() end function PANEL:Paint() draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 0, 0, 0, 255 ) ) draw.RoundedBox( 4, 1, 1, self:GetWide() - 2, self:GetTall() - 2, Color( 150, 150, 150, 150 ) ) draw.SimpleText( "Shipment Display", "ItemDisplayFont", self:GetWide() * 0.5, 10, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER ) end derma.DefineControl( "ShopMenu", "A shop menu.", PANEL, "PanelBase" )
local market_pin_map = require("qnFiles/qnPlist/hall/market_pin"); require("uiex/spannableText"); local RechargeVipItem = class(CommonGameLayer, false); RechargeVipItem.s_vipNameMap = { ["VIP月卡"] = "vip_month_title.png", ["VIP周卡"] = "vip_week_title.png", ["VIP体验卡"] = "vip_experience_title.png", }; RechargeVipItem.s_controls = { itemBtn = 1, vip_name = 2, vip_type = 3, vip_price_img = 4, vip_price_txt = 5, vip_info_txt = 6, vip_img = 7, }; RechargeVipItem.ctor = function(self, data) super(self, require(RechargeViewPath.."rechargeVipItem") ); self:setSize( self.m_root:getSize() ); self.m_data = data; self:showContent(); end RechargeVipItem.dtor = function(self) ImageCache.getInstance():cleanRef(self); end RechargeVipItem.showContent = function(self) local vipName = self:findViewById(self.s_controls.vip_name); vipName:setText(self.m_data.name); local fileVipName = RechargeVipItem.s_vipNameMap[self.m_data.name]; local vipImage = self:findViewById(self.s_controls.vip_img); if fileVipName then vipImage:setFile(market_pin_map[fileVipName]); vipImage:setVisible(true); else vipImage:setVisible(false); vipName:setVisible(true); end local vip_price_img = self:findViewById(self.s_controls.vip_price_img); local vip_price_txt = self:findViewById(self.s_controls.vip_price_txt); local priceImage = RechargeDataInterface.getInstance():getGoodPriceImage(self.m_data.pamount); if priceImage then vip_price_img:setVisible(true); vip_price_txt:setVisible(false); vip_price_img:setFile(priceImage); else vip_price_img:setVisible(false); vip_price_txt:setVisible(true); vip_price_txt:setText(string.concat(self.m_data.pamount,"元")); end self:findViewById(self.s_controls.vip_info_txt):setText(self.m_data.desc); self:findViewById(self.s_controls.vip_info_txt):setScrollBarWidth(0) if not string.isEmpty(self.m_data.icon) then ImageCache.getInstance():request(self.m_data.icon, self, self.onDownLoadIcon); end end RechargeVipItem.onDownLoadIcon = function(self, url, imagePath, item) if imagePath then self:findViewById(self.s_controls.vip_type):setFile(imagePath); end end RechargeVipItem.onPayVipClick = function(self) if self.m_data then EventDispatcher.getInstance():dispatch(RechargeController.s_pay, PayConfig.eGoodsListId.MarketVip, self.m_data); UBReport.getInstance():report(UBConfig.kHallMallItemClick, self.m_data.id or ""); end end RechargeVipItem.s_controlConfig = { [RechargeVipItem.s_controls.itemBtn] = {"itemBtn"}, [RechargeVipItem.s_controls.vip_name] = {"itemBtn", "vip_name"}, [RechargeVipItem.s_controls.vip_type] = {"itemBtn","vip_type"}, [RechargeVipItem.s_controls.vip_price_img] = {"itemBtn", "vip_price_bg", "vip_price_img"}, [RechargeVipItem.s_controls.vip_price_txt] = {"itemBtn", "vip_price_bg", "vip_price_txt"}, [RechargeVipItem.s_controls.vip_info_txt] = {"itemBtn", "vip_desc_bg", "vip_info_txt"}, [RechargeVipItem.s_controls.vip_img] = {"itemBtn", "vip_img"}, }; RechargeVipItem.s_controlFuncMap = { [RechargeVipItem.s_controls.itemBtn] = RechargeVipItem.onPayVipClick, }; return RechargeVipItem;
--[[ temps v1.0 Copyright © 2017, Mojo All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of temps nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Mojo BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] _addon.name = 'temps' _addon.author = 'Mojo' _addon.version = '1.0' _addon.command = 'temps' require('chat') require('logger') require('pack') config = require('config') items = require('items') packets = require('packets') local help_text = [[ temps - Command List: 1. help - Displays this help menu. 2. buy - Buys all temporary items in an escha zone. * buy - Buys all temporary items. * buy radialens - Buys all temporary items and also attempts to buy a radialens, even if it is on your blacklist or if you already have one. 3. blacklist - Add(a)/Remove(r) items from your blacklist. * blacklist add radialens - Adds radialens to your blacklist. * blacklist a radialens - Adds radialens to your blacklist. * blacklist remove radialens - Removes radialens from your blacklist. * blacklist r radialens - Removes radialens from your blacklist. 4. turbo - Toggle the turbo feature. * turbo - Enables or disables the turbo feature. Notes: You must be near an escha NPC that sells temporary items. A buy radialens command will refresh your radialens duration in the event that you already have one. ]] local defaults = { turbo = false, blacklist = S{ 'mollifier', 'primeval brew', 'radialens', } } local settings = config.load('settings.xml', defaults) local handlers = {} local state = 'idle' local zone = nil local force = nil local silt = 0 local key_ids = {} local key_items = 0 local outstanding = 0 local inflight = {} local temp_items = { [1] = 0, [2] = 0, } local conditions = { temps = false, busy = false, } local zones = { [288] = {npc = "Affi", menu = 9701}, [289] = {npc = "Dremi", menu = 9701}, [291] = {npc = "Shiftrix", menu = 9701}, } local function busy_wait(block, timeout, message) local start = os.time() while conditions[block] and ((os.time() - start) < timeout) do coroutine.sleep(.1) end if os.time() - start >= timeout then conditions[block] = false return "timed out - %s":format(message) end end local function validate(constrain) zone = windower.ffxi.get_info()['zone'] if zones[zone] then local npc = windower.ffxi.get_mob_by_name(zones[zone].npc) if npc and ((math.sqrt(npc.distance) < 6) or (not constrain)) then return npc else error("Too far from %s.":format(zones[zone].npc)) end else error("Not in an Escha zone.") end end local function has_item(item) if item.key_item then return (math.floor(key_items/math.pow(2, item.offset)) % 2) == 1 else return (math.floor(temp_items[math.floor(item.offset/32) + 1]/math.pow(2, item.offset % 32)) % 2) == 1 end end local function force_purchase(item) return (item.name == force) end local function ignore_item(item) return settings.blacklist:contains(item.name:lower()) end local function purchase_items() local npc = validate() local count = 0 for item_id, item in pairs(items) do if force_purchase(item) or (not has_item(item)) then if ignore_item(item) and (not force_purchase(item)) then windower.add_to_chat(100, string.format("Ignoring \30\2%s\30\43.", item.name)) else local p = packets.new('outgoing', 0x5b, { ["Target"] = npc.id, ["Option Index"] = item.option, ["Target Index"] = npc.index, ["Automated Message"] = true, ["Zone"] = zone, ["Menu ID"] = zones[zone].menu, }) windower.add_to_chat(100, string.format("Purchasing \30\2%s\30\43.", item.name)) packets.inject(p) state = 'purchase' inflight[item_id] = true count = count + 1 if not settings.turbo then coroutine.sleep(1) end end end end if count == 0 then windower.add_to_chat(100, "No temporary items to buy.") else outstanding = outstanding + count if outstanding == 0 then windower.add_to_chat(100, "Finished purchasing all temporary items.") end end end local function exit_menu(id, data, modified, injected, blocked) if (id == 0x5b) and ((state == 'init') or (state == 'purchase')) then local p = packets.parse('outgoing', data) local npc = validate() if (p['Target'] == npc.id) and not p['Automated Message'] then outstanding = 0 state = 'idle' end end end local function observe_temps(id, data, modified, injected, blocked) if (id == 0x5c) and conditions['temps'] then local p = packets.parse('incoming', data) temp_items[1] = p['Menu Parameters']:unpack('I', 1) temp_items[2] = p['Menu Parameters']:unpack('I', 5) conditions['temps'] = false end end local function process_dialogue_event(id, data, modified, injected, blocked) if (id == 0x34) and (state == 'init') then local p = packets.parse('incoming', data) state = 'purchase' silt = p['Menu Parameters']:unpack('I', 5) key_items = p['Menu Parameters']:unpack('I', 9) conditions['temps'] = true busy_wait('temps', 10, 'observe temp items') purchase_items() end end local function check_inflight(iid) if (inflight[iid]) then inflight[iid] = nil outstanding = outstanding - 1 if outstanding == 0 then windower.add_to_chat(100, "Finished purchasing all temporary items.") end end end local function receive_item(id, data, modified, injected, blocked) if (id == 0x20) and (state == 'purchase') then local p = packets.parse('incoming', data) check_inflight(p['Item']) end end local function obtained_key_item(p, item_id) if (math.floor(item_id/512) == p['Type']) then local bit = item_id % 512 local n = bit % 8 local character = math.floor(bit/8) + 1 return ((math.floor(p['Key item available']:byte(character)/math.pow(2, n)) % 2) == 1) else return false end end local function receive_key_items(id, data, modified, injected, blocked) if (id == 0x55) and (state == 'purchase') then local p = packets.parse('incoming', data) for k, v in pairs(inflight) do if obtained_key_item(p, k) then check_inflight(k) end end end end local function validate_item(item) for k, v in pairs(items) do if item:lower() == v.name:lower() then return v.name end end error("%s not found in items list.":format(item)) end local function start(override) if not (state == 'idle') then return error("Addon is busy.") elseif override then force = validate_item(override) if not force then return else notice("Override provided for %s.":format(force)) end else force = nil end local npc = validate(true) if npc then local p = packets.new('outgoing', 0x01a, { ["Target"] = npc.id, ["Target Index"] = npc.index, }) packets.inject(p) state = 'init' else state = 'idle' end end local function help() windower.add_to_chat(100, help_text) end local function blacklist(cmd, name) if not cmd then return error("No blacklist command provided.") elseif not S{'add', 'a', 'remove', 'r'}:contains(cmd) then return error("Unknown blacklist command %s.":format(cmd)) elseif not name then return error("No blacklist command parameter provided.") end local item = validate_item(name) if not item then return elseif S{'add', 'a'}:contains(cmd) then notice("Adding %s to your blacklist.":format(item)) settings.blacklist:add(item:lower()) else notice("Removing %s from your blacklist.":format(item)) settings.blacklist:remove(item:lower()) end settings:save() end local function turbo() if settings.turbo then notice("Disabling turbo.") settings.turbo = false else notice("Enabling turbo.") settings.turbo = true end settings:save() end local function handle_command(cmd, ...) local cmd = cmd and cmd:lower() or 'help' if handlers[cmd] then handlers[cmd](...) else error("Unknown command %s.":format(cmd)) end end handlers['buy'] = start handlers['help'] = help handlers['blacklist'] = blacklist handlers['turbo'] = turbo windower.register_event('incoming chunk', process_dialogue_event) windower.register_event('incoming chunk', receive_item) windower.register_event('incoming chunk', receive_key_items) windower.register_event('incoming chunk', observe_temps) windower.register_event('outgoing chunk', exit_menu) windower.register_event('addon command', handle_command)
local cel = require 'cel' local M = { red=cel.color.rgb(1, 0, 0), yellow=cel.color.rgb(1, 1, 0), green=cel.color.rgb(0, 1, 0), blue=cel.color.rgb(0, 0, 1), blue5=cel.color.setsaturation(cel.color.rgb(0, 0, 1), .5), cyan=cel.color.rgb(0, 1, 1), cyan5=cel.color.setsaturation(cel.color.rgb(0, 1, 1), .5), cyan8=cel.color.setsaturation(cel.color.rgb(0, 1, 1), .8), black=cel.color.rgb(0, 0, 0), gray1=cel.color.rgb(.1, .1, .1), gray2=cel.color.rgb(.2, .2, .2), gray3=cel.color.rgb(.3, .3, .3), gray4=cel.color.rgb(.4, .4, .4), gray5=cel.color.rgb(.5, .5, .5), gray6=cel.color.rgb(.6, .6, .6), gray7=cel.color.rgb(.7, .7, .7), gray8=cel.color.rgb(.8, .8, .8), gray9=cel.color.rgb(.9, .9, .9), white=cel.color.rgb(1, 1, 1), oceanblue=cel.color.rgb8(0, 136, 204), } M.themecolor = M.oceanblue M.themebordercolor = M.white M.themetextcolor = M.white M.themecomplement = cel.color.getcomplement(M.themecolor, nil, .6, 1) M.themecomplementlight = cel.color.getcomplement(M.themecolor, nil, .8, 1) return M
PLUGIN.name = "Weapon Select" PLUGIN.author = "STEAM_0:1:29606990" PLUGIN.description = "A replacement for the default weapon selection." if (SERVER) then return end if (CLIENT) then ix.hotbar = ix.hotbar or { activeSlot = 0, lastSwitch = 0, animDelay = 2, animLength = 1, weaponSlots = {}, panel = nil } function PLUGIN:LoadFonts(font) surface.CreateFont("GmodZ_HB_SlotLabel", { font = font, size = 16, weight = 300 }) surface.CreateFont("GmodZ_HB_ActiveSlot", { font = font, size = ScreenScale(18), weight = 0 }) surface.CreateFont("GmodZ_HB_InactiveSlot", { font = font, size = ScreenScale(12), weight = 0 }) end function ix.hotbar.OnIndexChanged(weapon) if (IsValid(weapon)) then ix.hotbar.lastSwitch = CurTime() + ix.hotbar.animDelay if (!IsValid(ix.hotbar.panel)) then ix.hotbar.panel = vgui.Create("gmodz_hotbar") end ix.hotbar.panel:InvalidateLayout(true) end end function ix.hotbar.Hide() if (!IsValid(ix.hotbar.panel)) then return end ix.hotbar.panel:Remove() ix.hotbar.panel = nil end function ix.hotbar.ReformatWeaponSelect() if (IsValid(ix.hotbar.panel)) then return end local items = {} ix.hotbar.weaponSlots = {} ix.hotbar.weaponSlots[1] = 0 -- hands local weapons = LocalPlayer():GetWeapons() local model, name for k, v in pairs(LocalPlayer():GetItems() or {}) do if (v.isWeapon and v:GetData("equip")) then for k2, v2 in ipairs(weapons) do if (v.class == v2:GetClass() and !items[v.class]) then name = v2:GetPrintName():utf8upper() model = #v2:GetWeaponWorldModel() > 0 and v2:GetWeaponWorldModel() or v:GetWeaponViewModel() ix.hotbar.weaponSlots[#ix.hotbar.weaponSlots + 1] = {k2, v2, name, model} items[v.class] = true end end end end for k, v in ipairs(weapons) do if (items[v:GetClass()]) then goto SKIP end name = v:GetPrintName():utf8upper() model = #v:GetWeaponWorldModel() > 0 and v:GetWeaponWorldModel() or v:GetWeaponViewModel() if (v:GetClass() == "ix_hands") then ix.hotbar.weaponSlots[1] = {k, v, name, model} else ix.hotbar.weaponSlots[#ix.hotbar.weaponSlots + 1] = {k, v, name, model} end ::SKIP:: end end function PLUGIN:HUDShouldDraw(name) if (name == "CHudWeaponSelection") then return false end end function PLUGIN:PlayerBindPress(client, bind, pressed) bind = bind:lower() if (!pressed or !bind:find("invprev") and !bind:find("invnext") and !bind:find("slot") and !bind:find("attack")) then return end local currentWeapon = client:GetActiveWeapon() local bValid = IsValid(currentWeapon) local bTool if (client:InVehicle() or (bValid and currentWeapon:GetClass() == "weapon_physgun" and client:KeyDown(IN_ATTACK))) then return end if (bValid and currentWeapon:GetClass() == "gmod_tool") then local tool = client:GetTool() bTool = tool and (tool.Scroll != nil) end if (!bind:find("attack")) then ix.hotbar.ReformatWeaponSelect() end if (bind:find("invprev") and !bTool) then local oldIndex = ix.hotbar.activeSlot ix.hotbar.activeSlot = math.min(ix.hotbar.activeSlot + 1, #ix.hotbar.weaponSlots) if (oldIndex != ix.hotbar.activeSlot and ix.hotbar.weaponSlots[ix.hotbar.activeSlot]) then ix.hotbar.OnIndexChanged(ix.hotbar.weaponSlots[ix.hotbar.activeSlot][2]) end return true elseif (bind:find("invnext") and !bTool) then local oldIndex = ix.hotbar.activeSlot ix.hotbar.activeSlot = math.max(ix.hotbar.activeSlot - 1, 1) if (oldIndex != ix.hotbar.activeSlot and ix.hotbar.weaponSlots[ix.hotbar.activeSlot]) then ix.hotbar.OnIndexChanged(ix.hotbar.weaponSlots[ix.hotbar.activeSlot][2]) end return true elseif (bind:find("slot")) then ix.hotbar.activeSlot = math.Clamp(tonumber(bind:match("slot(%d)")) or 1, 1, #ix.hotbar.weaponSlots) if (ix.hotbar.weaponSlots[ix.hotbar.activeSlot]) then ix.hotbar.OnIndexChanged(ix.hotbar.weaponSlots[ix.hotbar.activeSlot][2]) end return true elseif (bind:find("attack") and IsValid(ix.hotbar.panel)) then local weapon = ix.hotbar.weaponSlots[ix.hotbar.activeSlot] if (weapon and IsValid(weapon[2])) then LocalPlayer():EmitSound(hook.Run("WeaponSelectSound", weapon[2]) or "HL2Player.Use") input.SelectWeapon(weapon[2]) ix.hotbar.Hide() end return true end end function PLUGIN:Think() if (!IsValid(LocalPlayer()) or !LocalPlayer():Alive()) then ix.hotbar.Hide() end end function PLUGIN:ScoreboardShow() ix.hotbar.Hide() end end
--LOVELY_WINDOWS, a window/screen manager module/library for Love2D --FEATURES: --easily switch window dimensions --add key input --handles ratio --MIT LICENSE --@flamendless local WINDOW = {} local _window = {} local WIDTH = {} local HEIGHT = {} local currentMode = "f1" function WINDOW.initialize(gameWidth,gameHeight) _window.windowWidth = love.graphics.getWidth() _window.windowHeight = love.graphics.getHeight() _window.gameWidth = gameWidth or love.graphics.getWidth() _window.gameHeight = gameHeight or love.graphics.getHeight() _window.ratio = math.min(_window.windowWidth/_window.gameWidth, _window.windowHeight/_window.gameHeight) end function WINDOW.getRatio() return _window.ratio end function WINDOW.keyInput(key) if WIDTH[key] ~= nil then WINDOW.switch(key) end end function WINDOW.switch(key) if key ~= currentMode then love.window.setMode(WIDTH[key], HEIGHT[key]) WINDOW.initialize(_window.gameWidth,_window.gameHeight) currentMode = key end end function WINDOW.addInputTable(tab) if type(tab) == "table" then for k,v in pairs(tab) do WIDTH[k] = v[1] HEIGHT[k] = v[2] end end end function WINDOW.listInput() for k,v in pairs(WIDTH) do print("WIDTH:KEY " .. k .. "|| SIZE: " .. v ) end for k,v in pairs(HEIGHT) do print("HEIGHT:KEY " .. k .. "|| SIZE: " .. v ) end end return WINDOW
ITEM.ID = "radio"; ITEM.Name = "Radio"; ITEM.Description = "A radio, with controllable frequency."; ITEM.Model = "models/items/combine_rifle_cartridge01.mdl"; ITEM.Weight = 1; ITEM.FOV = 10; ITEM.CamPos = Vector( -0.08, 50, 50 ); ITEM.LookAt = Vector( 0, 0, 0 ); ITEM.BulkPrice = 250; ITEM.License = LICENSE_BLACK; ITEM.Usable = true; ITEM.UseText = "Channel"; ITEM.OnPlayerUse = function( self, ply ) if( CLIENT ) then if( GAMEMODE:LookupCombineFlag( ply:ActiveFlag() ) ) then GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "Your Combine radio channel is hardcoded...", { CB_ALL, CB_IC } ); return; end CCP.RadioSelector = vgui.Create( "DFrame" ); CCP.RadioSelector:SetSize( 250, 114 ); CCP.RadioSelector:Center(); CCP.RadioSelector:SetTitle( "Change Channel (0-999)" ); CCP.RadioSelector.lblTitle:SetFont( "CombineControl.Window" ); CCP.RadioSelector:MakePopup(); CCP.RadioSelector.PerformLayout = CCFramePerformLayout; CCP.RadioSelector:PerformLayout(); CCP.RadioSelector.Entry = vgui.Create( "DTextEntry", CCP.RadioSelector ); CCP.RadioSelector.Entry:SetFont( "CombineControl.LabelBig" ); CCP.RadioSelector.Entry:SetPos( 10, 34 ); CCP.RadioSelector.Entry:SetSize( 100, 30 ); CCP.RadioSelector.Entry:PerformLayout(); CCP.RadioSelector.Entry:RequestFocus(); CCP.RadioSelector.Entry:SetNumeric( true ); CCP.RadioSelector.Entry:SetValue( ply:RadioFreq() ); CCP.RadioSelector.Entry:SetCaretPos( string.len( CCP.RadioSelector.Entry:GetValue() ) ); CCP.RadioSelector.OK = vgui.Create( "DButton", CCP.RadioSelector ); CCP.RadioSelector.OK:SetFont( "CombineControl.LabelSmall" ); CCP.RadioSelector.OK:SetText( "OK" ); CCP.RadioSelector.OK:SetPos( 190, 74 ); CCP.RadioSelector.OK:SetSize( 50, 30 ); function CCP.RadioSelector.OK:DoClick() local val = tonumber( CCP.RadioSelector.Entry:GetValue() ); if( val >= 0 ) then if( val <= 999 ) then CCP.RadioSelector:Remove(); GAMEMODE:AddChat( Color( 200, 200, 200, 255 ), "CombineControl.ChatNormal", "Your radio channel is now " .. tostring( val ) .. ".", { CB_ALL, CB_IC } ); net.Start( "nChangeRadio" ); net.WriteFloat( val ); net.SendToServer(); else GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "Highest channel is 999.", { CB_ALL, CB_IC } ); end else GAMEMODE:AddChat( Color( 200, 0, 0, 255 ), "CombineControl.ChatNormal", "Lowest channel is 0.", { CB_ALL, CB_IC } ); end end CCP.RadioSelector.OK:PerformLayout(); CCP.RadioSelector.Entry.OnEnter = CCP.RadioSelector.OK.DoClick; end end
----------------------------------------- -- ID: 4265 -- Item: Black Drop -- Transports the user to their Home Point ----------------------------------------- require("scripts/globals/status") require("scripts/globals/msg") function onItemCheck(target) if (target:hasStatusEffect(tpz.effect.MEDICINE)) then return tpz.msg.basic.ITEM_NO_USE_MEDICATED end return 0 end function onItemUse(target) target:addStatusEffect(tpz.effect.MEDICINE, 0, 0, 3600) target:warp() end
--[[============================================================================ ProcessSlicer.lua ============================================================================]]-- --[[ ProcessSlicer allows you to slice up a function which takes a lot of processing time into multiple calls via Lua coroutines. * Example usage: local slicer = ProcessSlicer(my_process_func, my_callback, arg1, argX) -- The optional callback function will be called when the process has -- finished. If the process has a return value, the callback will be -- called with the return value as argument. -- If you don't want a callback, but want to add arguments, replace -- my_callback with nil. -- This starts calling 'my_process_func' in idle, passing all arguments -- you've specified in the ProcessSlicer constructor. slicer:start() -- To abort a running sliced process, you can call "stop" at any time -- from within your processing function of outside of it in the main thread. -- As soon as your process function returns, the slicer is automatically -- stopped. slicer:stop() -- To give processing time back to Renoise, call 'coroutine.yield()' -- anywhere in your process function to temporarily yield back to Renoise: function my_process_func() for j=1,100 do -- do something that needs a lot of time, and periodically call -- "coroutine.yield()" to give processing time back to Renoise. Renoise -- will switch back to this point of the function as soon as has done -- "its" job: coroutine.yield() end end * Drawbacks: By slicing your processing function, you will also slice any changes that are done to the Renoise song into multiple undo actions (one action per slice/yield). Modal dialogs will block the slicer, cause on_idle notifications are not fired then. It will even block your own process GUI when trying to show it modal. ]] class "ProcessSlicer" function ProcessSlicer:__init(process_func, callback, ...) assert(type(process_func) == "function", "expected a function as first argument") assert(callback == nil or type(callback) == "function", "expected nil or a function as second argument") self.__process_func = process_func self.__process_func_args = arg self.__process_thread = nil self.__callback = callback self.__data = nil end -------------------------------------------------------------------------------- -- returns true when the current process currently is running function ProcessSlicer:running() return (self.__process_thread ~= nil) end -------------------------------------------------------------------------------- -- start a process function ProcessSlicer:start() assert(not self:running(), "process already running") self.__process_thread = coroutine.create(self.__process_func) renoise.tool().app_idle_observable:add_notifier( ProcessSlicer.__on_idle, self) end -------------------------------------------------------------------------------- -- stop a running process function ProcessSlicer:stop() assert(self:running(), "process not running") renoise.tool().app_idle_observable:remove_notifier( ProcessSlicer.__on_idle, self) self.__process_thread = nil end -------------------------------------------------------------------------------- -- reverse of unpack: puts any number of arguments into a table local function pack(...) return arg end -------------------------------------------------------------------------------- -- function that gets called from Renoise to do idle stuff. switches back -- into the processing function or detaches the thread function ProcessSlicer:__on_idle() assert(self.__process_thread ~= nil, "ProcessSlicer internal error: ".. "expected no idle call with no thread running") -- continue or start the process while its still active if (coroutine.status(self.__process_thread) == 'suspended') then local result = pack(coroutine.resume( self.__process_thread, unpack(self.__process_func_args)) ) local succeeded = result[1] table.remove(result,1) result.n = nil self.__data = result if (not succeeded) then -- stop the process on errors self:stop() -- and forward the error to the main thread error(result[2]) end -- stop when the process function completed elseif (coroutine.status(self.__process_thread) == 'dead') then self:stop() if (self.__callback ~= nil) then self.__callback(self.__data) end end end
local AssistDescConfig=nil local function loadAssistDescConfig(id) AssistDescConfig= AssistDescConfig or LoadDatabaseWithKey("function_info", "function_id") or {} if not AssistDescConfig[id] then ERROR_LOG(id.."在配置表function_info的function_id列不存在") end return AssistDescConfig[id] or {} end local Tips_list_Config = nil local function GetTipsConfig(gid) if Tips_list_Config== nil then Tips_list_Config = {} DATABASE.ForEach("tips", function(row) Tips_list_Config[row.gid] = row.tips end) end if gid then return Tips_list_Config[gid] else return Tips_list_Config end end local consume_Config=nil local function loadConsumeConfig(id) consume_Config = consume_Config or LoadDatabaseWithKey("common_consume", "id") or {} return consume_Config[id] or {} end local showItemDescConfig = nil;--节日商店类型描述 local function GetShowItemDescConfig(type) if showItemDescConfig == nil then showItemDescConfig = LoadDatabaseWithKey("show_wenzi", "type"); end if type then return showItemDescConfig[type]; else return showItemDescConfig; end end return { GetAssistDescConfig = loadAssistDescConfig,--获取描述Text GetTipsConfig=GetTipsConfig,--获取提示配置 GetConsumeConfig=loadConsumeConfig, GetShowItemDescConfig=GetShowItemDescConfig, }
mesecon.on_placenode = function (pos, node) if mesecon:is_receptor_on(node.name) then mesecon:receptor_on(pos, mesecon:receptor_get_rules(node)) elseif mesecon:is_powered(pos) then if mesecon:is_conductor(node.name) then mesecon:turnon (pos) mesecon:receptor_on (pos, mesecon:conductor_get_rules(node)) else mesecon:changesignal(pos, node) mesecon:activate(pos, node) end elseif mesecon:is_conductor_on(node.name) then mesecon:swap_node(pos, mesecon:get_conductor_off(node.name)) elseif mesecon:is_effector_on (node.name) then mesecon:deactivate(pos, node) end end mesecon.on_dignode = function (pos, node) if mesecon:is_conductor_on(node.name) then mesecon:receptor_off(pos, mesecon:conductor_get_rules(node)) elseif mesecon:is_receptor_on(node.name) then mesecon:receptor_off(pos, mesecon:receptor_get_rules(node)) end end minetest.register_on_placenode(mesecon.on_placenode) minetest.register_on_dignode(mesecon.on_dignode)
-- This file applies a patch from -- https://github.com/3scale/lua-resty-limit-traffic/commit/c53f2240e953a9656580dbafcc142363ab063100 -- It can be removed when https://github.com/openresty/lua-resty-limit-traffic/pull/34 is merged and released. local _M = {} local resty_limit_count = require('resty.limit.count') local setmetatable = setmetatable local mt = { __index = _M } function _M.new(...) local lim, err = resty_limit_count.new(...) if lim then return setmetatable(lim, mt) else return nil, err end end function _M.incoming(self, key, commit) local dict = self.dict local limit = self.limit local window = self.window local count, err if commit then count, err = dict:incr(key, 1, 0, window) if not count then return nil, err end if count > limit then count, err = dict:incr(key, -1) if not count then return nil, err end return nil, "rejected" end else count = (dict:get(key) or 0) + 1 end if count > limit then return nil, "rejected" end return 0, limit - count end -- uncommit remaining and return remaining value function _M.uncommit(self, key) assert(key) local dict = self.dict local limit = self.limit local count, err = dict:incr(key, -1) if not count then if err == "not found" then count = 0 else return nil, err end end return limit - count end return setmetatable(_M, { __index = resty_limit_count })
slot0 = class("AttachmentBombEnemyCell", import("view.level.cell.StaticCellView")) slot0.StateLive = 1 slot0.StateDead = 2 slot0.GetOrder = function (slot0) return ChapterConst.CellPriorityAttachment end slot0.Update = function (slot0) slot1 = slot0.info if IsNil(slot0.go) then slot0:PrepareBase("bomb_enemy_" .. slot1.attachmentId) end slot2 = slot0.state if slot1.flag == 0 and slot0.state ~= slot0.StateLive then slot0.state = slot0.StateLive slot0.dead = nil slot0:ClearLoader() slot3 = pg.specialunit_template[slot1.attachmentId] slot0:GetLoader():GetPrefab("leveluiview/Tpl_Enemy", "Tpl_Enemy", function (slot0) setParent(slot0, slot0.tf) tf(slot0).anchoredPosition = Vector2(0, 10) slot0:GetLoader():GetSprite("enemies/" .. slot1.prefab, "", findTF(slot0, "icon")) slot1(findTF(slot0, "titleContain/bg_s"), slot1.enemy_point == 5) slot1(findTF(slot0, "titleContain/bg_m"), slot1.enemy_point == 8) slot1(findTF(slot0, "titleContain/bg_h"), slot1.enemy_point == 10) slot0.enemy = slot0 slot0:ResetCanvasOrder() slot0:Update() end) elseif slot1.flag == 1 and slot0.state ~= slot0.StateDead then slot0.state = slot0.StateDead slot0.enemy = nil slot0.ClearLoader(slot0) slot3 = pg.land_based_template[slot1.attachmentId] slot0:GetLoader():GetPrefab("leveluiview/Tpl_Dead", "Tpl_Dead", function (slot0) setParent(slot0, slot0.tf) tf(slot0).anchoredPosition = Vector2(0, 10) slot0:GetLoader():GetSprite("enemies/" .. slot1.prefab .. "_d_blue", "", findTF(slot0, "icon")) setActive(findTF(slot0, "effect_not_open"), false) setActive(findTF(slot0, "effect_open"), false) setActive(slot2, findTF(slot0, "huoqiubaozha") == slot3.StateLive) slot0.dead = slot0 slot0:ResetCanvasOrder() slot0:Update() end) end if slot1.flag == 0 and slot0.enemy then setActive(findTF(slot0.enemy, "effect_found"), slot1.trait == ChapterConst.TraitVirgin) if slot1.trait == ChapterConst.TraitVirgin then pg.CriMgr.GetInstance().PlaySoundEffect_V3(slot3, SFX_UI_WEIGHANCHOR_ENEMY) end end end return slot0
-- ä | \195\164 -- ü | \195\188 -- ß | \195\159 if GetLocale() ~= "deDE" then return end local L10N = { ["a#"] = "einem" , ["absorbed"] = "absorbiert" , ["a crit on"] = "einem Krit bei" , ["and"] = "und" , ["Attack (swing)"] = "Angriff" , ["blocked"] = "verstopft" , ["Close"] = "Schlie\195\159en" , ["damage#"] = "Schadenpunkte" , ["defeated_bythem"] = "besiegte" , ["defeated_byyou"] = "besiegtest" , ["No modifiers"] = "Keine Modifikatoren" , ["Partially"] = "Teilweise" , ["Rank"] = "Rang" , ["resisted"] = "resistiert" , ["Unknown command"] = "Unbekannter Befehl" , ["with"] = "mit" , ["you_accusative"] = "dich" , ["you_nominative"] = "du" , ["Your History"] = "Deine Geschichte" } KaydeeUF = select(2, ...) KaydeeUF.L10N = setmetatable(L10N, { __index = KaydeeUF.L10N })
function class(init) local c,mt = {},{} c.__index = c mt.__call = function(class_tbl, ...) local obj = {} setmetatable(obj,c) init(obj,...) return obj end setmetatable(c, mt) return c end