Initial commit

This commit is contained in:
meehl committed 2025-10-16 17:00:59 +02:00
commit 6e1613f73f
48 files changed
+13682

No files matched your search

+1
View File
@@ -0,0 +1 @@
/target/
Generated
+3999
View File
File diff suppressed because it is too large. Load diff
+39
View File
@@ -0,0 +1,39 @@
[package]
name = "rusty-path-of-building"
version = "0.1.0"
edition = "2024"
[dependencies]
ahash = "0.8.12"
anyhow = "1.0"
arboard = { version = "3.6.1", default-features = false, features = ["wayland-data-control"] }
bytemuck = "1.23.2"
clap = { version = "4.5.46", features = ["derive"] }
dds = "0.1.0"
directories = "6.0.0"
env_logger = "0.10"
euclid = { version = "0.22.11", features = ["bytemuck"] }
fast_image_resize = { version = "5.3.0", features = ["image"] }
flate2 = "1.1.2"
glob = "0.3.3"
image = { version = "0.25.8", default-features = false, features = ["rayon", "jpeg", "png"] }
log = "0.4"
mlua = { version = "0.11.2", features = ["luajit", "anyhow"] }
nohash-hasher = "0.2.0"
num-traits = "0.2.19"
open = "5.3.2"
ordered-float = "5.0.0"
parley = "0.6.0"
pollster = "0.3"
profiling = "1.0"
puffin_http = { version = "0.16", optional = true }
regex = "1.11.2"
swash = "0.2.5"
tar = "0.4.44"
ureq = "3.1.2"
wgpu = { version = "27.0.1", default-features = false, features = ["std", "parking_lot", "vulkan", "wgsl"] }
winit = "0.30"
zstd = "0.13.3"
[features]
profile-with-puffin = ["profiling/profile-with-puffin", "dep:puffin_http"]
+46
View File
@@ -0,0 +1,46 @@
Digitized data copyright (c) 2010 Google Corporation
with Reserved Font Arimo, Tinos and Cousine.
Copyright (c) 2012 Red Hat, Inc.
with Reserved Font Name Liberation.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
+123
View File
@@ -0,0 +1,123 @@
Bitstream Vera Fonts Copyright
The fonts have a generous copyright, allowing derivative works (as
long as "Bitstream" or "Vera" are not in the names), and full
redistribution (so long as they are not *sold* by themselves). They
can be be bundled, redistributed and sold with any software.
The fonts are distributed under the following copyright:
Copyright
=========
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
Vera is a trademark of Bitstream, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the fonts accompanying this license ("Fonts") and associated
documentation files (the "Font Software"), to reproduce and distribute
the Font Software, including without limitation the rights to use,
copy, merge, publish, distribute, and/or sell copies of the Font
Software, and to permit persons to whom the Font Software is furnished
to do so, subject to the following conditions:
The above copyright and trademark notices and this permission notice
shall be included in all copies of one or more of the Font Software
typefaces.
The Font Software may be modified, altered, or added to, and in
particular the designs of glyphs or characters in the Fonts may be
modified and additional glyphs or characters may be added to the
Fonts, only if the fonts are renamed to names not containing either
the words "Bitstream" or the word "Vera".
This License becomes null and void to the extent applicable to Fonts
or Font Software that has been modified and is distributed under the
"Bitstream Vera" names.
The Font Software may be sold as part of a larger software package but
no copy of one or more of the Font Software typefaces may be sold by
itself.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the names of Gnome, the Gnome
Foundation, and Bitstream Inc., shall not be used in advertising or
otherwise to promote the sale, use or other dealings in this Font
Software without prior written authorization from the Gnome Foundation
or Bitstream Inc., respectively. For further information, contact:
fonts at gnome dot org.
Copyright FAQ
=============
1. I don't understand the resale restriction... What gives?
Bitstream is giving away these fonts, but wishes to ensure its
competitors can't just drop the fonts as is into a font sale system
and sell them as is. It seems fair that if Bitstream can't make money
from the Bitstream Vera fonts, their competitors should not be able to
do so either. You can sell the fonts as part of any software package,
however.
2. I want to package these fonts separately for distribution and
sale as part of a larger software package or system. Can I do so?
Yes. A RPM or Debian package is a "larger software package" to begin
with, and you aren't selling them independently by themselves.
See 1. above.
3. Are derivative works allowed?
Yes!
4. Can I change or add to the font(s)?
Yes, but you must change the name(s) of the font(s).
5. Under what terms are derivative works allowed?
You must change the name(s) of the fonts. This is to ensure the
quality of the fonts, both to protect Bitstream and Gnome. We want to
ensure that if an application has opened a font specifically of these
names, it gets what it expects (though of course, using fontconfig,
substitutions could still could have occurred during font
opening). You must include the Bitstream copyright. Additional
copyrights can be added, as per copyright law. Happy Font Hacking!
6. If I have improvements for Bitstream Vera, is it possible they might get
adopted in future versions?
Yes. The contract between the Gnome Foundation and Bitstream has
provisions for working with Bitstream to ensure quality additions to
the Bitstream Vera font family. Please contact us if you have such
additions. Note, that in general, we will want such additions for the
entire family, not just a single font, and that you'll have to keep
both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
glyphs to the font, they must be stylistically in keeping with Vera's
design. Vera cannot become a "ransom note" font. Jim Lyles will be
providing a document describing the design elements used in Vera, as a
guide and aid for people interested in contributing to Vera.
7. I want to sell a software package that uses these fonts: Can I do so?
Sure. Bundle the fonts with your software and sell your software
with the fonts. That is the intent of the copyright.
8. If applications have built the names "Bitstream Vera" into them,
can I override this somehow to use fonts of my choosing?
This depends on exact details of the software. Most open source
systems and software (e.g., Gnome, KDE, etc.) are now converting to
use fontconfig (see www.fontconfig.org) to handle font configuration,
selection and substitution; it has provisions for overriding font
names and subsituting alternatives. An example is provided by the
supplied local.conf file, which chooses the family Bitstream Vera for
"sans", "serif" and "monospace". Other software (e.g., the XFree86
core server) has other mechanisms for font substitution.
Binary file not shown.
+80
View File
@@ -0,0 +1,80 @@
T=lzip
UNAME ?= $(shell uname)
DESTDIR ?= /
PKG_CONFIG ?= pkg-config
INSTALL ?= install
RM ?= rm
LUA_IMPL ?= luajit
CC ?= $(MAC_ENV) g++
LUA_VERSION = $(shell $(PKG_CONFIG) --print-provides --silence-errors $(LUA_IMPL))
ifeq ($(LUA_VERSION),)
LUA_CMOD ?= /usr/lib/lua/5.1
LUA_LMOD ?= /usr/share/lua/5.1
LIBDIR ?= /usr/lib
LUA_INC ?= /usr/include
ZLIB_LIBS = -L/usr/lib -lz
else
LUA_CMOD ?= $(shell $(PKG_CONFIG) --variable INSTALL_CMOD $(LUA_IMPL))
LUA_LMOD ?= $(shell $(PKG_CONFIG) --variable INSTALL_LMOD $(LUA_IMPL))
LIBDIR ?= $(shell $(PKG_CONFIG) --variable libdir $(LUA_IMPL))
LUA_INC ?= $(shell $(PKG_CONFIG) --variable includedir $(LUA_IMPL))
LUA_LIBS = $(shell $(PKG_CONFIG) --libs $(LUA_IMPL))
ZLIB_LIBS = $(shell $(PKG_CONFIG) --libs zlib)
endif
ifeq ($(UNAME), Linux)
OS_FLAGS ?= -shared
endif
ifeq ($(UNAME), Darwin)
OS_FLAGS ?= -bundle -undefined dynamic_lookup
MAC_ENV ?= env MACOSX_DEPLOYMENT_TARGET='10.3'
endif
ifneq ($(DEBUG),)
DBG = -ggdb
endif
ifeq ($(DEV),)
WARN = -Wall -Wno-unused-value
else
WARN = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
endif
INCLUDES = -I$(LUA_INC)
DEFINES =
LIBS = $(ZLIB_LIBS) -lstdc++
COMMONFLAGS = -O2 -g -pipe -fPIC $(OS_FLAGS) $(DBG)
LF = $(LIBS) $(LDFLAGS)
CF = $(INCLUDES) $(DEFINES) $(COMMONFLAGS) $(WARN) -DPTHREADS $(CFLAGS)
#SCR = src/lua/*.lua src/lua/cURL/*.lua src/lua/cURL/impl/*.lua
SRCS = src/*.cpp
OBJS = $(subst src/,,$(subst .c,.o,$(SRCS)))
BIN = $(T).so
STATIC_LIB = $(T).a
all: $(BIN)
$(BIN): $(SRCS)
$(CC) $(CF) -o $@ $^ $(LF)
$(OBJS): $(SRCS)
$(CC) $(CF) -c $^ $(LF)
$(STATIC_LIB): $(OBJS)
ar rcs $@ $^
#install: all
# $(INSTALL) -d $(DESTDIR)$(LUA_CMOD) $(DESTDIR)$(LUA_LMOD)/cURL/impl
# $(INSTALL) $(BIN) $(DESTDIR)$(LUA_CMOD)
# $(INSTALL) src/lua/cURL.lua $(DESTDIR)$(LUA_LMOD)
# $(INSTALL) src/lua/cURL/safe.lua $(DESTDIR)$(LUA_LMOD)/cURL
# $(INSTALL) src/lua/cURL/utils.lua $(DESTDIR)$(LUA_LMOD)/cURL
# $(INSTALL) src/lua/cURL/impl/cURL.lua $(DESTDIR)$(LUA_LMOD)/cURL/impl
clean:
$(RM) -f $(BIN) $(OBJS) $(STATIC_LIB)
+735
View File
@@ -0,0 +1,735 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
#ifdef _WIN32
#define LZIP_EXPORT __declspec(dllexport)
#else
#define LZIP_EXPORT
#endif
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "luajit.h"
}
typedef unsigned char byte;
typedef unsigned int dword;
typedef unsigned long lword;
char* AllocString(char* st)
{
if (st == NULL) {
return NULL;
}
int aslen = strlen(st) + 1;
char* al = new char[aslen];
strcpy(al, st);
return al;
}
char* AllocStringLen(int len)
{
char* al = new char[len+1];
al[len] = 0;
return al;
}
void FreeString(char* st)
{
if (st) delete st;
}
// =============
// Configuration
// =============
static const int FS_INFLATE_BUFFER = 65536;
// ==========================
// Zip File format structures
// ==========================
#pragma pack(push, 1)
struct zf_cdHeader_s {
int sig; // 0x02014b50 (50,4B,01,02)
short ver_made;
short ver_ext;
short flag;
short method;
short ftime;
short fdate;
int crc32;
lword szComp;
lword szUcomp;
short szName;
short szExtra;
short szComm;
short nDisk;
short attInt;
int attExt;
int hOffset;
};
struct zf_localHeader_s {
int sig; // 0x04034b50 (50,4B,03,04)
short ver_ext;
short flag;
short method;
short ftime;
short fdate;
int crc32;
lword szComp;
lword szUcomp;
short szName;
short szExtra;
};
struct zf_dataDesc_s {
int crc32;
lword szComp;
lword szUcomp;
};
struct zf_cdEnd_s {
int sig; // 0x06054b50 (50,4B,05,06)
short nDisk;
short stDisk;
short noeDisk;
short noeTotal;
int szTotal;
int cdOffset;
short szComm;
};
#pragma pack(pop)
// =========================
// Zip File format constants
// =========================
static const int ZF_MAXVER = 20;
static const int ZF_GPBF_ENC = 0x0001;
static const int ZF_GPBF_DD = 0x0008;
static const int ZF_METHOD_STORE = 0;
static const int ZF_METHOD_DEFLATE = 8;
static const int ZF_SIG_CDHEADER = 0x02014B50;
static const int ZF_SIG_LOCALHEADER = 0x04034B50;
static const int ZF_SIG_CDEND = 0x06054B50;
// ===============
// ZLib Alloc/Free
// ===============
static void* ZF_Alloc(void* unused, dword num, dword size)
{
return new byte[num*size];
}
static void ZF_Free(void* unused, void* ptr)
{
delete (byte*)ptr;
}
// =======
// Classes
// =======
struct fs_fileInfo_s {
FILE* f; // Zip file
char* name; // Filename
int fo; // File offset
int szU; // Uncompressed size
int szC; // Compressed size, 0 if not compressed
};
// ================
// fsInflator class
// ================
class fs_inflator_c {
public:
fs_inflator_c(fs_fileInfo_s* i);
~fs_inflator_c();
int Inflate(byte* buf, int len);// Inflate
private:
int pC; // Read pointer
byte* ibuf; // Input buffer
int ibuflen; // Input buffer length
fs_fileInfo_s* i; // Info structure
z_stream* zst; // ZLib stream
void FillInput();// Fill decompression input
};
fs_inflator_c::fs_inflator_c(fs_fileInfo_s* info)
{
i = info;
// Initialise stream
zst = new z_stream;
memset(zst, 0, sizeof(z_stream));
zst->zalloc = ZF_Alloc;
zst->zfree = ZF_Free;
// Initialise decompression input
pC = 0;
if (i->szC < FS_INFLATE_BUFFER) {
ibuflen = i->szC;
} else {
ibuflen = FS_INFLATE_BUFFER;
}
ibuf = new byte[ibuflen];
FillInput();
// Start decompressor
inflateInit2(zst, -MAX_WBITS);
}
fs_inflator_c::~fs_inflator_c()
{
// Stop decompressor
inflateEnd(zst);
// Release stream and input buffer
delete ibuf;
delete zst;
}
void fs_inflator_c::FillInput()
{
// Relocate any remaining input
int remin = zst->avail_in;
if (remin) {
memcpy(ibuf, zst->next_in, remin);
}
// Get reading amount
int rdmax = ibuflen - remin;
int rd = i->szC - pC;
if (rd > rdmax) {
rd = rdmax;
}
// Read into buffer
if (rd) {
fseek(i->f, i->fo + pC, SEEK_SET);
fread(ibuf + remin, rd, 1, i->f);
}
// Update stream
zst->next_in = ibuf;
zst->avail_in+= rd;
pC+= rd;
}
int fs_inflator_c::Inflate(byte* out, int len)
{
// Prepare stream
zst->next_out = out;
zst->avail_out = len;
while (1) {
// Decompress some data
int r = inflate(zst, Z_SYNC_FLUSH);
switch (r) {
case Z_OK:
// Progress made, check if we're done
if (zst->avail_out == 0) {
return len;
}
break;
case Z_BUF_ERROR:
// No progress made, so give it more input
FillInput();
break;
default:
// We got an error
case Z_STREAM_END:
// Reached the end of the stream
return len - zst->avail_out;
}
}
}
// =============
// fsFile class
// =============
enum vf_state_e {
VF_OPEN =0x01, // Open
VF_SEEK =0x04 // Seek enabled
};
class fs_file_c {
public:
fs_file_c(fs_fileInfo_s* i);
~fs_file_c();
void Seek(int pos, int mode); // Seek
int Read(byte* buf, int len); // Read data
int Length(); // Return the file length
int Tell(); // Return the read pointer
private:
fs_fileInfo_s* i; // Info structure
int pU; // Read pointer
fs_inflator_c* inf; // Inflator
};
fs_file_c::fs_file_c(fs_fileInfo_s* info)
{
i = info;
// Create inflator
if (i->szC) {
inf = new fs_inflator_c(i);
} else {
inf = NULL;
}
// Set position
pU = 0;
}
fs_file_c::~fs_file_c()
{
delete inf;
}
void fs_file_c::Seek(int pos, int mode)
{
int seekto;
switch (mode) {
case SEEK_SET:
seekto = pos;
break;
case SEEK_CUR:
seekto = pU + pos;
break;
case SEEK_END:
seekto = i->szU - pos;
break;
default:
return;
}
if (i->szC) {
int diff = seekto - pU;
if (diff > 0) {
// Seek forward
byte* sk = new byte[diff];
Read(sk, diff);
delete[] sk;
} else if (diff < 0) {
// Restart reading
pU = 0;
// Recreate inflator
delete inf;
inf = new fs_inflator_c(i);
if (seekto) {
// Seek forward
byte* sk = new byte[seekto];
Read(sk, seekto);
delete[] sk;
}
}
} else {
pU = seekto;
if (pU < 0) {
pU = 0;
} else if (pU > i->szU) {
pU = i->szU;
}
}
}
int fs_file_c::Read(byte* out, int len)
{
// Determine read length
int rp = len + pU;
if (rp > i->szU) len = i->szU - pU;
if (len == 0) {
return 0;
}
if (i->szC) {
// Decompress
len = inf->Inflate(out, len);
} else {
// Raw read
fseek(i->f, i->fo + pU, SEEK_SET);
len = fread(out, 1, len, i->f);
}
pU+= len;
return len;
}
int fs_file_c::Length()
{
return i->szU;
}
int fs_file_c::Tell()
{
return pU;
}
// =============
// zipFile class
// =============
class fs_zipFile_c {
public:
fs_zipFile_c(const char* zname);
~fs_zipFile_c();
int numFiles;
fs_fileInfo_s** files;
private:
FILE* zf; // File handle
int filesSz;
int GetSignature(); // Get next signature
};
int fs_zipFile_c::GetSignature()
{
int sig = 0;
if (fread(&sig, 4, 1, zf) == 0) {
return 0;
}
fseek(zf, -4, SEEK_CUR);
return sig;
}
fs_zipFile_c::fs_zipFile_c(const char* zname)
{
numFiles = 0;
filesSz = 32;
files = new fs_fileInfo_s*[filesSz];
int sig;
// Open and lock file
zf = fopen(zname, "rb");
if (zf == NULL) {
return;
}
// Check signature
sig = GetSignature();
if (strncmp((char*)&sig, "Rar", 3) == 0) {
fclose(zf);
return;
}
// Read local headers
while (sig == ZF_SIG_LOCALHEADER) {
zf_localHeader_s lh;
if (fread(&lh, sizeof(lh), 1, zf) == 0) {
fclose(zf);
return;
}
if (lh.szName) {
// Read filename
char* fname = AllocStringLen(lh.szName);
fread(fname, lh.szName, 1, zf);
// Add it in if it is a file
if (fname[lh.szName-1] != '/') {
// Fill in info
fs_fileInfo_s* fi = new fs_fileInfo_s;
fi->f = zf;
fi->name = fname;
fi->fo = ftell(zf) + lh.szExtra;
fi->szU = lh.szUcomp;
fi->szC = (lh.method == ZF_METHOD_DEFLATE)? lh.szComp : 0;
// Record file
if (numFiles == filesSz) {
filesSz<<= 1;
files = (fs_fileInfo_s**)realloc(files, sizeof(fs_fileInfo_s*)*filesSz);
}
files[numFiles++] = fi;
} else {
FreeString(fname);
}
// Skip the extra information and file data
fseek(zf, lh.szExtra + lh.szComp, SEEK_CUR);
}
sig = GetSignature();
}
}
fs_zipFile_c::~fs_zipFile_c()
{
fclose(zf);
for (int f = 0; f < numFiles; f++) {
delete files[f]->name;
delete files[f];
}
delete files;
}
// =============
// Lua Interface
// =============
static int IsUserData(lua_State* L, int index, const char* metaName)
{
if (lua_type(L, index) != LUA_TUSERDATA || lua_getmetatable(L, index) == 0) {
return 0;
}
lua_getfield(L, lua_upvalueindex(1), metaName);
int ret = lua_rawequal(L, -2, -1);
lua_pop(L, 2);
return ret;
}
struct lzip_s {
fs_zipFile_c* zipFile;
};
static lzip_s* GetZip(lua_State* L, const char* method, bool valid)
{
if ( !IsUserData(L, 1, "zipMeta") ) {
luaL_error(L, "zip:%s() must be used on a zip handle", method);
}
lzip_s* lz = (lzip_s*)lua_touserdata(L, 1);
lua_remove(L, 1);
if (valid && lz->zipFile == NULL) {
luaL_error(L, "zip:%s(): zip handle is closed");
}
return lz;
}
struct lzipFile_s {
fs_file_c* file;
};
static lzipFile_s* GetZipFile(lua_State* L, const char* method, bool valid)
{
if ( !IsUserData(L, 1, "zipFileMeta") ) {
luaL_error(L, "zipFile:%s() must be used on a zip file handle", method);
}
lzipFile_s* lzf = (lzipFile_s*)lua_touserdata(L, 1);
lua_remove(L, 1);
if (valid && lzf->file == NULL) {
luaL_error(L, "zipFile:%s(): zip file handle is closed");
}
return lzf;
}
static int l_open(lua_State* L)
{
int n = lua_gettop(L);
if (n < 1 || !lua_isstring(L, 1)) {
luaL_error(L, "Usage: lzip.open(fileName)");
}
fs_zipFile_c* zipFile = new fs_zipFile_c(lua_tostring(L, 1));
if (zipFile->numFiles == 0) {
delete zipFile;
return 0;
}
lzip_s* lz = (lzip_s*)lua_newuserdata(L, sizeof(lzip_s));
lz->zipFile = zipFile;
lua_pushvalue(L, lua_upvalueindex(2));
lua_setmetatable(L, -2);
return 1;
}
static int l_zip_Close(lua_State* L)
{
lzip_s* lz = GetZip(L, "Closea", false);
delete lz->zipFile;
lz->zipFile = NULL;
return 0;
}
static int l_zip_GetNumFiles(lua_State* L)
{
lzip_s* lz = GetZip(L, "GetNumFiles", true);
lua_pushinteger(L, lz->zipFile->numFiles);
return 1;
}
static int l_zip_GetFileName(lua_State* L)
{
lzip_s* lz = GetZip(L, "GetFileName", true);
int n = lua_gettop(L);
if (n < 1 || !lua_isnumber(L, 1)) {
luaL_error(L, "Usage: zip:GetFileName(index)");
}
int index = lua_tointeger(L, 1);
if (index < 1 || index > lz->zipFile->numFiles) {
return 0;
}
lua_pushstring(L, lz->zipFile->files[index - 1]->name);
return 1;
}
static int l_zip_GetFileSize(lua_State* L)
{
lzip_s* lz = GetZip(L, "GetFileSize", true);
int n = lua_gettop(L);
if (n < 1 || !lua_isnumber(L, 1)) {
luaL_error(L, "Usage: zip:GetFileSize(index)");
}
int index = lua_tointeger(L, 1);
if (index < 1 || index > lz->zipFile->numFiles) {
return 0;
}
lua_pushinteger(L, lz->zipFile->files[index - 1]->szU);
return 1;
}
static int l_zip_OpenFile(lua_State* L)
{
lzip_s* lz = GetZip(L, "OpenFile", true);
int n = lua_gettop(L);
if (n < 1 || !(lua_isnumber(L, 1) || lua_isstring(L, 1))) {
luaL_error(L, "Usage: zip:OpenFile(index) or zip:OpenFile(fileName)");
}
fs_fileInfo_s* i = NULL;
if (lua_isnumber(L, 1)) {
int index = lua_tointeger(L, 1);
if (index < 1 || index > lz->zipFile->numFiles) {
luaL_error(L, "zip:OpenFile(): invalid index");
}
i = lz->zipFile->files[index - 1];
} else {
const char* name = lua_tostring(L, 1);
for (int index = 0; index < lz->zipFile->numFiles; index++) {
if ( !strcmp(name, lz->zipFile->files[index]->name) ) {
i = lz->zipFile->files[index];
break;
}
}
if ( !i ) {
return 0;
}
}
fs_file_c* file = new fs_file_c(i);
lzipFile_s* lzf = (lzipFile_s*)lua_newuserdata(L, sizeof(lzipFile_s));
lzf->file = file;
lua_pushvalue(L, lua_upvalueindex(2));
lua_setmetatable(L, -2);
return 1;
}
static int l_zipFile_Close(lua_State* L)
{
lzipFile_s* lzf = GetZipFile(L, "Close", false);
delete lzf->file;
lzf->file = NULL;
return 0;
}
static int l_zipFile_Read(lua_State* L)
{
lzipFile_s* lzf = GetZipFile(L, "Read", true);
int n = lua_gettop(L);
if (n < 1) {
luaL_error(L, "Usage: zipFile:Read(count) or zipFile:read(\"*a\")");
}
int count;
if (lua_isnumber(L, 1)) {
count = lua_tointeger(L, 1);
} else {
if ( !strcmp(lua_tostring(L, 1), "*a") ) {
count = lzf->file->Length() - lzf->file->Tell();
} else {
luaL_error(L, "zipFile:Read(): unrecognised format: %s", lua_tostring(L, 1));
}
}
if (count < 1) {
lua_pushstring(L, "");
return 1;
}
byte* buf = new byte[count];
lzf->file->Read(buf, count);
lua_pushlstring(L, (char*)buf, count);
return 1;
}
static int l_zipFile_Length(lua_State* L)
{
lzipFile_s* lzf = GetZipFile(L, "Read", true);
lua_pushinteger(L, lzf->file->Length());
return 1;
}
extern "C" LZIP_EXPORT int luaopen_lzip(lua_State* L)
{
lua_settop(L, 0);
lua_newtable(L); // Library table
lua_newtable(L); // Zip metatable
lua_newtable(L); // Zip file metatable
lua_pushvalue(L, 2);
lua_setfield(L, 1, "zipMeta");
lua_pushvalue(L, 2);
lua_setfield(L, 2, "__index");
lua_pushvalue(L, 3);
lua_setfield(L, 1, "zipFileMeta");
lua_pushvalue(L, 3);
lua_setfield(L, 3, "__index");
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
lua_pushcclosure(L, l_open, 2);
lua_setfield(L, 1, "open");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zip_Close, 1);
lua_setfield(L, 2, "__gc");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zip_Close, 1);
lua_setfield(L, 2, "Close");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zip_GetNumFiles, 1);
lua_setfield(L, 2, "GetNumFiles");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zip_GetFileName, 1);
lua_setfield(L, 2, "GetFileName");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zip_GetFileSize, 1);
lua_setfield(L, 2, "GetFileSize");
lua_pushvalue(L, 1);
lua_pushvalue(L, 3);
lua_pushcclosure(L, l_zip_OpenFile, 2);
lua_setfield(L, 2, "OpenFile");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zipFile_Close, 1);
lua_setfield(L, 3, "__gc");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zipFile_Close, 1);
lua_setfield(L, 3, "Close");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zipFile_Read, 1);
lua_setfield(L, 3, "Read");
lua_pushvalue(L, 1);
lua_pushcclosure(L, l_zipFile_Length, 1);
lua_setfield(L, 3, "Length");
// Pop metatables
lua_pop(L, 2);
return 1;
}
+301
View File
@@ -0,0 +1,301 @@
#@
-- Path of Building
--
-- Module: Update Check
-- Checks for updates
--
local connectionProtocol, proxyURL = ...
local xml = require("xml")
local sha1 = require("sha1")
local curl = require("lcurl.safe")
local lzip = require("lzip")
local globalRetryLimit = 10
local function downloadFileText(source, file)
for i = 1, 5 do
if i > 1 then
ConPrintf("Retrying... (%d of 5)", i)
end
local text = ""
local easy = curl.easy()
local escapedUrl = source..easy:escape(file)
easy:setopt_url(escapedUrl)
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
if connectionProtocol then
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
end
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
easy:setopt_writefunction(function(data)
text = text..data
return true
end)
local _, error = easy:perform()
easy:close()
if not error then
return text
end
ConPrintf("Download failed (%s)", error:msg())
if globalRetryLimit == 0 or i == 5 then
return nil, error:msg()
end
globalRetryLimit = globalRetryLimit - 1
end
end
local function downloadFile(source, file, outName)
for i = 1, 5 do
if i > 1 then
ConPrintf("Retrying... (%d of 5)", i)
end
local easy = curl.easy()
local escapedUrl = source..easy:escape(file)
easy:setopt_url(escapedUrl)
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
if connectionProtocol then
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
end
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
local file = io.open(outName, "wb+")
easy:setopt_writefunction(file)
local _, error = easy:perform()
easy:close()
file:close()
if not error then
return true
end
ConPrintf("Download failed (%s)", error:msg())
if globalRetryLimit == 0 or i == 5 then
return nil, error:msg()
end
globalRetryLimit = globalRetryLimit - 1
end
return true
end
ConPrintf("Checking for update...")
-- Use built-in helpers to obtain absolute paths without spawning a shell.
local scriptPath = (GetScriptPath and GetScriptPath()) or "."
local runtimePath = (GetRuntimePath and GetRuntimePath()) or scriptPath
-- Load and process local manifest
local localVer
local localPlatform, localBranch
local localFiles = { }
local localManXML = xml.LoadXMLFile(scriptPath.."/manifest.xml")
local localSource
if localManXML and localManXML[1].elem == "PoBVersion" then
for _, node in ipairs(localManXML[1]) do
if type(node) == "table" then
if node.elem == "Version" then
localVer = node.attrib.number
localPlatform = node.attrib.platform
localBranch = node.attrib.branch
elseif node.elem == "Source" then
if node.attrib.part == "default" then
localSource = node.attrib.url
end
elseif node.elem == "File" then
local fullPath
node.attrib.name = node.attrib.name:gsub("{space}", " ")
fullPath = scriptPath .. "/" .. node.attrib.name
localFiles[node.attrib.name] = { sha1 = node.attrib.sha1, part = node.attrib.part, platform = node.attrib.platform, fullPath = fullPath }
end
end
end
end
if not localVer or not localSource or not localBranch or not next(localFiles) then
ConPrintf("Update check failed: invalid local manifest")
return nil, "Invalid local manifest"
end
localSource = localSource:gsub("{branch}", localBranch)
-- Download and process remote manifest
local remoteVer
local remoteFiles = { }
local remoteSources = { }
local remoteManText, errMsg = downloadFileText(localSource, "manifest.xml")
if not remoteManText then
ConPrintf("Update check failed: couldn't download version manifest")
return nil, "Couldn't download version manifest.\nReason: "..errMsg.."\nCheck your internet connectivity.\nIf you are using a proxy, specify it in Options."
end
local remoteManXML = xml.ParseXML(remoteManText)
if remoteManXML and remoteManXML[1].elem == "PoBVersion" then
for _, node in ipairs(remoteManXML[1]) do
if type(node) == "table" then
if node.elem == "Version" then
remoteVer = node.attrib.number
elseif node.elem == "Source" then
if not remoteSources[node.attrib.part] then
remoteSources[node.attrib.part] = { }
end
remoteSources[node.attrib.part][node.attrib.platform or "any"] = node.attrib.url
elseif node.elem == "File" then
if not node.attrib.platform or node.attrib.platform == localPlatform then
local fullPath
fullPath = scriptPath .. "/" .. node.attrib.name
remoteFiles[node.attrib.name] = { sha1 = node.attrib.sha1, part = node.attrib.part, platform = node.attrib.platform, fullPath = fullPath }
end
end
end
end
end
if not remoteVer or not next(remoteSources) or not next(remoteFiles) then
ConPrintf("Update check failed: invalid remote manifest")
return nil, "Invalid remote manifest"
end
-- Build lists of files to be updated or deleted
local updateFiles = { }
for name, data in pairs(remoteFiles) do
data.name = name
local sanitizedName = name:gsub("{space}", " ")
if (not localFiles[name] or localFiles[name].sha1 ~= data.sha1) and (not localFiles[sanitizedName] or localFiles[sanitizedName].sha1 ~= data.sha1) then
table.insert(updateFiles, data)
elseif localFiles[name] then
local file = io.open(localFiles[name].fullPath, "rb")
if not file then
ConPrintf("Warning: '%s' doesn't exist, it will be re-downloaded", data.name)
table.insert(updateFiles, data)
else
local content = file:read("*a")
file:close()
if data.sha1 ~= sha1(content) and data.sha1 ~= sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Warning: Integrity check on '%s' failed, it will be replaced", data.name)
table.insert(updateFiles, data)
end
end
end
end
local deleteFiles = { }
for name, data in pairs(localFiles) do
data.name = name
local unSanitizedName = name:gsub(" ", "{space}")
if not remoteFiles[name] and not remoteFiles[unSanitizedName] then
table.insert(deleteFiles, data)
end
end
if #updateFiles == 0 and #deleteFiles == 0 then
ConPrintf("No update available.")
return "none"
end
MakeDir("Update")
ConPrintf("Downloading update...")
-- Download changelog
downloadFile(localSource, "changelog.txt", scriptPath.."/changelog.txt")
-- Download files that need updating
local failedFile = false
local zipFiles = { }
for index, data in ipairs(updateFiles) do
if UpdateProgress then
UpdateProgress("Downloading %d/%d", index, #updateFiles)
end
local partSources = remoteSources[data.part]
local source = partSources[localPlatform] or partSources["any"]
source = source:gsub("{branch}", localBranch)
local fileName = scriptPath.."/Update/"..data.name:gsub("[\\/]","{slash}")
data.updateFileName = fileName
local zipName = source:match("/([^/]+%.zip)$")
if zipName then
if not zipFiles[zipName] then
ConPrintf("Downloading %s...", zipName)
local zipFileName = scriptPath.."/Update/"..zipName
downloadFile(source, "", zipFileName)
zipFiles[zipName] = lzip.open(zipFileName)
end
local zip = zipFiles[zipName]
if zip then
local zippedFile = zip:OpenFile(data.name)
if zippedFile then
local file = io.open(fileName, "wb+")
file:write(zippedFile:Read("*a"))
file:close()
zippedFile:Close()
else
ConPrintf("Couldn't extract '%s' from '%s' (extract failed)", data.name, zipName)
end
else
ConPrintf("Couldn't extract '%s' from '%s' (zip open failed)", data.name, zipName)
end
else
local skipDownload
local file = io.open(fileName, "rb")
if file then
local content = file:read("*all")
if data.sha1 == sha1(content) or data.sha1 == sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Using file from previous update attempt '%s'", fileName)
skipDownload = true
end
file:close()
end
if not skipDownload then
ConPrintf("Downloading %s... (%d of %d)", data.name, index, #updateFiles)
downloadFile(source, data.name, fileName)
end
end
local file = io.open(fileName, "rb")
if not file then
failedFile = true
else
local content = file:read("*all")
if data.sha1 ~= sha1(content) and data.sha1 ~= sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Hash mismatch on '%s'", fileName)
failedFile = true
end
file:close()
end
end
for name, zip in pairs(zipFiles) do
zip:Close()
os.remove(scriptPath.."/Update/"..name)
end
if failedFile then
ConPrintf("Update failed: one or more files couldn't be downloaded")
return nil, "One or more files couldn't be downloaded.\nCheck your internet connectivity,\nor try again later."
end
-- Create new manifest
localManXML = { elem = "PoBVersion" }
table.insert(localManXML, { elem = "Version", attrib = { number = remoteVer, platform = localPlatform, branch = localBranch } })
for part, platforms in pairs(remoteSources) do
for platform, url in pairs(platforms) do
table.insert(localManXML, { elem = "Source", attrib = { part = part, platform = platform ~= "any" and platform, url = url } })
end
end
for name, data in pairs(remoteFiles) do
table.insert(localManXML, { elem = "File", attrib = { name = data.name, sha1 = data.sha1, part = data.part, platform = data.platform } })
end
xml.SaveXMLFile(localManXML, scriptPath.."/Update/manifest.xml")
-- Build list of operations to apply the update
local updateMode = "normal"
local ops = { }
for _, data in pairs(updateFiles) do
-- Ensure that the destination path of this file exists
local dirStr = ""
for dir in data.fullPath:gmatch("([^/]*/)") do
dirStr = dirStr .. dir
MakeDir(dirStr)
end
table.insert(ops, 'move "'..data.updateFileName..'" "'..data.fullPath..'"')
end
for _, data in pairs(deleteFiles) do
table.insert(ops, 'delete "'..data.fullPath..'"')
end
table.insert(ops, 'move "'..scriptPath..'/Update/manifest.xml" "'..scriptPath..'/manifest.xml"')
-- Write operations file
local opFile = io.open(scriptPath.."/Update/opFile.txt", "w+")
opFile:write(table.concat(ops, "\n"))
opFile:close()
ConPrintf("Update is ready.")
return updateMode
+843
View File
@@ -0,0 +1,843 @@
<PoBVersion>
<Version number="2.56.0" branch="master" platform="any" />
<Source part="default" url="https://raw.githubusercontent.com/meehl/RustyPathOfBuilding/main/manifest/poe1/" />
<Source part="origin" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding/{branch}/" />
<Source part="runtime" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding/{branch}/runtime/" />
<Source part="program" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding/{branch}/src/" />
<Source part="tree" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding/{branch}/src/" />
<File name="changelog.txt" part="origin" sha1="933ef317b5a11557ce262cdc883cfa9e4e87b55c" />
<File name="help.txt" part="origin" sha1="e486cb63a78f5ca355430b67fa23e02fd30f5771" />
<File name="LICENSE.md" part="origin" sha1="c77635aa1ba0a2ffe8eb72f93b3376e3a3d2041a" />
<File name="Assets/ascendants/ascendant.jpeg" part="program" sha1="c9edaa10dad44c5361f873e68fa39a831338e9ec" />
<File name="Assets/ascendants/assassin.jpeg" part="program" sha1="82d8d31e9a1d264c08ef4a957fe28177fb67f5bf" />
<File name="Assets/ascendants/berserker.jpeg" part="program" sha1="70ccdec8abbe2a9a4168ab38831ca26bb2fc7255" />
<File name="Assets/ascendants/champion.jpeg" part="program" sha1="3c11e9d2b2b08cd28ff06bf0e13f0b41fb0698ed" />
<File name="Assets/ascendants/chieftain.jpeg" part="program" sha1="2c6426835fbf3027c89408d1f5fa0b7c65811c44" />
<File name="Assets/ascendants/deadeye.jpeg" part="program" sha1="db3c642f1efc677df0139249d93075f4c0c2b19c" />
<File name="Assets/ascendants/duelist.jpeg" part="program" sha1="315ad783038d13b20f1f038f3f0e32aca4aa6b17" />
<File name="Assets/ascendants/elementalist.jpeg" part="program" sha1="693e024f76ef69270933fb10070e41696e4cf4f2" />
<File name="Assets/ascendants/gladiator.jpeg" part="program" sha1="cd71323728b591f79200a8ce6ec9e0fcc10fae3a" />
<File name="Assets/ascendants/guardian.jpeg" part="program" sha1="5797165fa27ff6cb62d9a709c171d4c0a0c2e503" />
<File name="Assets/ascendants/hierophant.jpeg" part="program" sha1="41c03949a987a380074ec78848154be3a84ed618" />
<File name="Assets/ascendants/inquisitor.jpeg" part="program" sha1="a7b100990fc8d74c7de8182495d2840fa47dc7e2" />
<File name="Assets/ascendants/juggernaut.jpeg" part="program" sha1="381fb7fa80da82a8560b544c9566042ec6438ba5" />
<File name="Assets/ascendants/marauder.jpeg" part="program" sha1="6dda7b04e864c66841272b42c93955831378de3f" />
<File name="Assets/ascendants/necromancer.jpeg" part="program" sha1="b09dc962e2c539ee371c398e3f862da2f73ec49d" />
<File name="Assets/ascendants/occultist.jpeg" part="program" sha1="3c3124c4acfd2dab0163a2cc886c7f9d7da5c7d7" />
<File name="Assets/ascendants/pathfinder.jpeg" part="program" sha1="9b2d1b29c794f8c8f77945ac8c25395c94095583" />
<File name="Assets/ascendants/raider.jpeg" part="program" sha1="4dda4b034c1f58404b98179b64d08599273fd544" />
<File name="Assets/ascendants/ranger.jpeg" part="program" sha1="d4fef8b5e0e6581acf467652371299469fc1b4c5" />
<File name="Assets/ascendants/saboteur.jpeg" part="program" sha1="6644c93405c7303f190716f6ac65e3784daee862" />
<File name="Assets/ascendants/scion.jpeg" part="program" sha1="0a1cda2e166199a23825599c063a0362ede0364f" />
<File name="Assets/ascendants/shadow.jpeg" part="program" sha1="07d5aa2cffad83917d42f767509f5c71c0b8d20d" />
<File name="Assets/ascendants/slayer.jpeg" part="program" sha1="a49448923dd0423b232c3ef51d3c747c2326aa68" />
<File name="Assets/ascendants/templar.jpeg" part="program" sha1="29ad35a62925836d1a74c3f1778710fd393087de" />
<File name="Assets/ascendants/trickster.jpeg" part="program" sha1="379afc28a6caee74b4649f674ab1ff1d34cbbcbf" />
<File name="Assets/ascendants/warden.jpeg" part="program" sha1="4dda4b034c1f58404b98179b64d08599273fd544" />
<File name="Assets/ascendants/witch.jpeg" part="program" sha1="e4d3efec008934c6d24d4be0178fd8934da1244e" />
<File name="Assets/game_ui_small.png" part="program" sha1="3e3f01a7c21ffe5ee7dfb644e9f3b7188c319d4d" />
<File name="Assets/icon_amulet.png" part="program" sha1="5979958dc0975fea63d57b15ef311ecda56f3fda" />
<File name="Assets/icon_belt.png" part="program" sha1="a6739f6a6d5ebb100ea57732227c2bb568483eb6" />
<File name="Assets/icon_body_armour.png" part="program" sha1="c5237359ed6ea5b81772b1d35029b757c87041cc" />
<File name="Assets/icon_boots.png" part="program" sha1="7e52b33f4c72802cf6b63056abe21e26719b857c" />
<File name="Assets/icon_bow.png" part="program" sha1="c0a5e9c8b8030b0f3f331782a0a161b901be0999" />
<File name="Assets/icon_gloves.png" part="program" sha1="9fe16986f5c2858b40149416e89f036a9e9582a0" />
<File name="Assets/icon_helmet.png" part="program" sha1="eb3271f3e9e94e2523ce2d0b90c6fd2b1c3e0435" />
<File name="Assets/icon_quiver.png" part="program" sha1="719bd6edc05f655ff5c7ec4a047dde34b6006e0e" />
<File name="Assets/icon_ring_left.png" part="program" sha1="01b88d06e8e505af62a776e818b77fb20a8661d6" />
<File name="Assets/icon_ring_right.png" part="program" sha1="dc1ab4a69f7199970a28cac489b0ba9aeeff028b" />
<File name="Assets/icon_shield.png" part="program" sha1="7ed6a0b926e593588daffc9149041cd817ca264c" />
<File name="Assets/icon_shield_swap.png" part="program" sha1="d82df8de7a60827d81007f141db5867eca080f8a" />
<File name="Assets/icon_weapon.png" part="program" sha1="24fd23457f7b609324ad5f5bb8cb576cc4a7c058" />
<File name="Assets/icon_weapon_2.png" part="program" sha1="10a946226cfe1832ff839b77c0d927d4be2bb43c" />
<File name="Assets/icon_weapon_2_swap.png" part="program" sha1="2e0ee90278daa40da9177e0658f2900c49a69127" />
<File name="Assets/icon_weapon_swap.png" part="program" sha1="2fe92098fb38157483928bad3a26c623d4fefae1" />
<File name="Assets/range_guide.png" part="program" sha1="825cef1fe84d30da6e280799f0a885e270807f31" />
<File name="Assets/ring.png" part="program" sha1="6ef89c50f3505dd2c114b3edbcac017ab969d176" />
<File name="Assets/ShadedInnerRing.png" part="program" sha1="6ad9088ebaed6646dbd3d231d563dc9611ba4bc6" />
<File name="Assets/ShadedInnerRingFlipped.png" part="program" sha1="c13f41ef7cbfc14017a10776d21b121f0e558667" />
<File name="Assets/ShadedOuterRing.png" part="program" sha1="988dee6e0cf9906d78015bc1762b1d95983e89cb" />
<File name="Assets/ShadedOuterRingFlipped.png" part="program" sha1="ffffef32179d39d48db697e9c9e07fdf022457f7" />
<File name="Assets/small_ring.png" part="program" sha1="03e2039559d686a7df2d66bd6f92938e7e02da76" />
<File name="Classes/BuildListControl.lua" part="program" sha1="dd5b90a9f901096ed9d88783398ca5060b2419bf" />
<File name="Classes/ButtonControl.lua" part="program" sha1="697870f9f43eee2c804be087849b46849c83153a" />
<File name="Classes/CalcBreakdownControl.lua" part="program" sha1="bd5ce2ddfdca47d7945f9029f134cbfa93511fd4" />
<File name="Classes/CalcSectionControl.lua" part="program" sha1="468063496e5e998ba4f79450df5b70e9ebb06077" />
<File name="Classes/CalcsTab.lua" part="program" sha1="e825dbbf97f114ac1425a6cdef04e3ac00841857" />
<File name="Classes/CheckBoxControl.lua" part="program" sha1="d828081e58f493f7688f8a3eed5af1ee389e3326" />
<File name="Classes/ConfigSetListControl.lua" part="program" sha1="dcd4b1ef3e7a19be3c8e551c446c509865dbcedc" />
<File name="Classes/ConfigTab.lua" part="program" sha1="d093c29624275c92beade4e8eff186ac7bdee5f8" />
<File name="Classes/Control.lua" part="program" sha1="1e1502ee51ba61006c346e9360131b7d3754b542" />
<File name="Classes/ControlHost.lua" part="program" sha1="8521dcf6c04880f22c2972618e58aa50fbea1be7" />
<File name="Classes/DraggerControl.lua" part="program" sha1="239b2fbc675d4fe9a8fe36a79fe93870ae298bc6" />
<File name="Classes/DropDownControl.lua" part="program" sha1="a67f62e62c480d77ae82f9a6cf6b440ec0b79e3c" />
<File name="Classes/EditControl.lua" part="program" sha1="123ec882687fc517145dad2ad91c7e80acdfbb4e" />
<File name="Classes/ExtBuildListControl.lua" part="program" sha1="4d1dedc752e5c979ae0ad3928faaec8b8ea052be" />
<File name="Classes/ExtBuildListProvider.lua" part="program" sha1="79d6bab71c0e0194e7c5b48e6cfb348d85e20263" />
<File name="Classes/FolderListControl.lua" part="program" sha1="b1ac8024c4eb927edd69220bf66c082778de25e6" />
<File name="Classes/GemSelectControl.lua" part="program" sha1="ce865b58670f6f049aeadedc9177b7200cf2c21a" />
<File name="Classes/ImportTab.lua" part="program" sha1="28c1991ba60b04501c36f2046ee4314ee4110d7c" />
<File name="Classes/Item.lua" part="program" sha1="4288a1d8baaf532e1c0e94a10f320256d3e852a8" />
<File name="Classes/ItemDBControl.lua" part="program" sha1="da94e83db8cc655861dafb774c7110729129ffcf" />
<File name="Classes/ItemListControl.lua" part="program" sha1="909a4efe03ac4b993954627819bc0a02cd951fa1" />
<File name="Classes/ItemSetListControl.lua" part="program" sha1="443038191a6ba3a17c3ce6683b96ab2797cf5d39" />
<File name="Classes/ItemSlotControl.lua" part="program" sha1="b8fe8523bd8c1d475ded6ae73c1f1cad4b434145" />
<File name="Classes/ItemsTab.lua" part="program" sha1="4271ddab915b026e21c51961f95106b84c1757c0" />
<File name="Classes/LabelControl.lua" part="program" sha1="b6c56903b054e14c302a5e4e60ed8e91764bc6a0" />
<File name="Classes/ListControl.lua" part="program" sha1="ba5079fe6a1a38bc8c1cf758d42a62a4a7209e84" />
<File name="Classes/MinionListControl.lua" part="program" sha1="b9324d7c16d20ac4d7508ecd151c2e9838fdb98c" />
<File name="Classes/MinionSearchListControl.lua" part="program" sha1="475c5d7f1ab35d088ed62947a27e19a9fe26b87d" />
<File name="Classes/ModDB.lua" part="program" sha1="b98d03ad7398aacf7782c0b1bbd813bc90528301" />
<File name="Classes/ModList.lua" part="program" sha1="f42809e4219ec3b887e1f55cfcc85f73462d397a" />
<File name="Classes/ModStore.lua" part="program" sha1="9e03937e6e5772ca6e4b001313ae7c29e26bd332" />
<File name="Classes/NotableDBControl.lua" part="program" sha1="8a01029c56ea354efeea213c664b723c1f14c63d" />
<File name="Classes/NotesTab.lua" part="program" sha1="de067274e65a7d71940caead279c3a1f8d6fce3e" />
<File name="Classes/PartyTab.lua" part="program" sha1="8f2fc8b8e4d98db34520c5b2f94b3459911e6e41" />
<File name="Classes/PassiveMasteryControl.lua" part="program" sha1="d26082d3fa6485b0813c3a988d180208fdd652ef" />
<File name="Classes/PassiveSpec.lua" part="program" sha1="be6f2416987f9ae7e78b1ee6fe6b9df204ab55cd" />
<File name="Classes/PassiveSpecListControl.lua" part="program" sha1="694d7b088e895348857b97a78babb00d612469f8" />
<File name="Classes/PassiveTree.lua" part="program" sha1="f230517c9f4d7186c9e3afca6175a33f552a4dfb" />
<File name="Classes/PassiveTreeView.lua" part="program" sha1="b4e80b76801d882aa4f6fb7ed6be42a1a1923ddb" />
<File name="Classes/PathControl.lua" part="program" sha1="2107211dc604f4382da52ba757114665ab5862ba" />
<File name="Classes/PoBArchivesProvider.lua" part="program" sha1="c2f3f922c82a48a92faaf125b5207c41eb1a2c5a" />
<File name="Classes/PopupDialog.lua" part="program" sha1="f37b60b6589d4ff0c721c2418d78409f2dc69452" />
<File name="Classes/PowerReportListControl.lua" part="program" sha1="9308c76ea2cdf04ff9d00ffd7fa77d0ea7112eb6" />
<File name="Classes/RectangleOutlineControl.lua" part="program" sha1="4da285dbe76549deae46d3835e00c382c59c18b4" />
<File name="Classes/ResizableEditControl.lua" part="program" sha1="1270c263bd762759cc1121c3eeb4906018136e05" />
<File name="Classes/ScrollBarControl.lua" part="program" sha1="58f68ca961c625d3aba4c8946f7894371c74d335" />
<File name="Classes/SearchHost.lua" part="program" sha1="1fd99b9fbd2c9d26e99397cece708771ce2ad0e1" />
<File name="Classes/SectionControl.lua" part="program" sha1="56f40224d0766ed2699b1ff839f79c43fd5cbf44" />
<File name="Classes/SharedItemListControl.lua" part="program" sha1="907f697112a9738028c8a358e996a7ca8766ea1b" />
<File name="Classes/SharedItemSetListControl.lua" part="program" sha1="0925d72eeb17b464b835289bb71e912056bc6565" />
<File name="Classes/SkillListControl.lua" part="program" sha1="e600c266088ec0f68bda0f5e79d0dd4ac344b715" />
<File name="Classes/SkillSetListControl.lua" part="program" sha1="2694184c7fec8b25a3af11f228b830f55859bc69" />
<File name="Classes/SkillsTab.lua" part="program" sha1="beb0246c7385af0d4839b20b28368aaa30da1991" />
<File name="Classes/SliderControl.lua" part="program" sha1="a668ed8ac5bcc6d12277bd8c406d9d754032861e" />
<File name="Classes/TextListControl.lua" part="program" sha1="08444ee7a89fac97d6727541b0e94b4997c1c7af" />
<File name="Classes/TimelessJewelListControl.lua" part="program" sha1="474caa03d4c6e6d9d5f01a95eaf500f3bacec814" />
<File name="Classes/TimelessJewelSocketControl.lua" part="program" sha1="a47645db39133957917a0d0f090cf4cc70c4f980" />
<File name="Classes/Tooltip.lua" part="program" sha1="7942a38f6179b9234de93162da75b72f94981787" />
<File name="Classes/TooltipHost.lua" part="program" sha1="c9854fd295d8305b0d2b1a31ac28b44a53ec791d" />
<File name="Classes/TradeQuery.lua" part="program" sha1="52b4113ff2cfb75e542c88cc7ce634228d88f3a8" />
<File name="Classes/TradeQueryGenerator.lua" part="program" sha1="4159bc81895ee113b1dc7fe18bb613533c8d4f0f" />
<File name="Classes/TradeQueryRateLimiter.lua" part="program" sha1="85c8a28c7d2bacf5bf91a97165a2ebd89bc238c0" />
<File name="Classes/TradeQueryRequests.lua" part="program" sha1="7fcc19a8d12e90dcbd38c2b8327a30200134d91e" />
<File name="Classes/TradeStatWeightMultiplierListControl.lua" part="program" sha1="2d3c11bb563279bffc4f93763a652a6f430ffd59" />
<File name="Classes/TreeTab.lua" part="program" sha1="93e1113eb9597ae66affc18306b1560ba263765d" />
<File name="Classes/UndoHandler.lua" part="program" sha1="ce4835c384c834da0de47b0302b1e774c8300c6b" />
<File name="Data/Bases/amulet.lua" part="program" sha1="58d127510adccde11930f0ab0426800d3552aa56" />
<File name="Data/Bases/axe.lua" part="program" sha1="44a3e4fc2a44a8b46b78e74961f37943a8119af6" />
<File name="Data/Bases/belt.lua" part="program" sha1="3aec735e68cdaabd8d14aa200a998e916454eafa" />
<File name="Data/Bases/body.lua" part="program" sha1="6cf992e9510f7e2ba7b00087c30cba7bda87edb7" />
<File name="Data/Bases/boots.lua" part="program" sha1="3ec6c75649868e75d5eb2348f063e11245c8fae4" />
<File name="Data/Bases/bow.lua" part="program" sha1="7043106eff0115e346dc8af0ed3a817f0c027539" />
<File name="Data/Bases/claw.lua" part="program" sha1="ab33fac15e211050ddf27cc67a7ae58eaa29f6c9" />
<File name="Data/Bases/dagger.lua" part="program" sha1="30c2f0504fcef511cada84894f7ca8975a065255" />
<File name="Data/Bases/fishing.lua" part="program" sha1="f080afa67f98dbd62a0eaa6f2a9494e5c5a27198" />
<File name="Data/Bases/flask.lua" part="program" sha1="da9d87e9c562b51e16833544dc3afc83996420b2" />
<File name="Data/Bases/gloves.lua" part="program" sha1="807f85ba2f60953f36400d5f059c93718830a270" />
<File name="Data/Bases/helmet.lua" part="program" sha1="f7f858bd89689b31f3cf0c4bc187500bec7e8ec1" />
<File name="Data/Bases/jewel.lua" part="program" sha1="31b864e0d3bf906d220ecaff5aac93b179b81f2b" />
<File name="Data/Bases/mace.lua" part="program" sha1="c41ba938c7a93bae08407d300f4c65d36a9b9069" />
<File name="Data/Bases/quiver.lua" part="program" sha1="f18199ebacbf449635be19c272bd79f4fb130b07" />
<File name="Data/Bases/ring.lua" part="program" sha1="148d8e1711469bb0e8b8c79dab86cea66e02a5fb" />
<File name="Data/Bases/shield.lua" part="program" sha1="d9d7511fb7ce19ffce6817918935775fe9dcfaa4" />
<File name="Data/Bases/staff.lua" part="program" sha1="ca23f0d162d1dba97c2b8ea4112c277c119b94d2" />
<File name="Data/Bases/sword.lua" part="program" sha1="ff5e7559b9657c35b812979aea3562892647d2c1" />
<File name="Data/Bases/tincture.lua" part="program" sha1="9c7818795876f50cd8eef377d2316208664432d9" />
<File name="Data/Bases/wand.lua" part="program" sha1="571a19b409b8557e88a6e6c29f00273ae1da5217" />
<File name="Data/BeastCraft.lua" part="program" sha1="023099cd50d7ab8cace27434746e212a981760b0" />
<File name="Data/Bosses.lua" part="program" sha1="81591b7eeaeebdf743ae032b8bf41714f2860e70" />
<File name="Data/BossSkills.lua" part="program" sha1="04ba9d9cece737a23af6e455b1c88e9a0e98ee5b" />
<File name="Data/ClusterJewels.lua" part="program" sha1="09a9c978bea8c63926cdda92bdd60eacd6a0162d" />
<File name="Data/Costs.lua" part="program" sha1="d93b6d71b4b8a2b5bf47135917b942770b30cb28" />
<File name="Data/Crucible.lua" part="program" sha1="05e08e6199cb03bb4a8db6371c76c967a69d8347" />
<File name="Data/EnchantmentBelt.lua" part="program" sha1="85409c93fa36ce5a7bd0b5684660190f0d33ebf4" />
<File name="Data/EnchantmentBody.lua" part="program" sha1="9328e81eeb950d4736cd8ec5d4548086b2180942" />
<File name="Data/EnchantmentBoots.lua" part="program" sha1="c3716b9da75cddf05f19ee08927409c22f7b5c80" />
<File name="Data/EnchantmentFlask.lua" part="program" sha1="4570f69a726386c86bb8704380dec2be1690c3ca" />
<File name="Data/EnchantmentGloves.lua" part="program" sha1="1fcdacb6f5e454b41163c0ddef1e4aa3444fe0fb" />
<File name="Data/EnchantmentHelmet.lua" part="program" sha1="02a3d157ba63ae767a9756e8a02f1fc5ca7ab986" />
<File name="Data/EnchantmentWeapon.lua" part="program" sha1="bcab0a9917aa30b78ee17624555912cc18f35bfd" />
<File name="Data/Essence.lua" part="program" sha1="6288bbcdc39e0830a31865c4940ffef6dcf2a5ac" />
<File name="Data/Gems.lua" part="program" sha1="4e51684bd626301d52fdb65d06f8cf45b69c888a" />
<File name="Data/Global.lua" part="program" sha1="e09f834de118bae2bf103aa5fccbec8d4f6a2b08" />
<File name="Data/Minions.lua" part="program" sha1="a1e9bd57f86a61a36e1de14e5bae4be4003dc275" />
<File name="Data/Misc.lua" part="program" sha1="457da8369d82b5b2f9d3704d4b58bf3581da65e6" />
<File name="Data/ModCache.lua" part="program" sha1="665fbe9b3bf2ad60727bbb92aae32e1b0aa82639" />
<File name="Data/ModFlask.lua" part="program" sha1="e58069a2ac5761564895f251745c96e6304a0e4b" />
<File name="Data/ModItem.lua" part="program" sha1="32a8fc04a4effa331f2d5467b732656473da6f28" />
<File name="Data/ModJewel.lua" part="program" sha1="633ddf71ab5af0af4dac1683b02c42d8acc88ddc" />
<File name="Data/ModJewelAbyss.lua" part="program" sha1="2252bccda6e3b70fbe93d06c6cbab0335dc04346" />
<File name="Data/ModJewelCharm.lua" part="program" sha1="06a89ae5d5dfbdf1be9dbb2f105e64efbd439657" />
<File name="Data/ModJewelCluster.lua" part="program" sha1="7754e7e236168e1b5393b3288963a0eaa47fa768" />
<File name="Data/ModMap.lua" part="program" sha1="29edb01606d86bf46267fbe91ad1dd51eef52dae" />
<File name="Data/ModMaster.lua" part="program" sha1="4c59bc77f199ddcc27cfa4edf1b4c5f322e8ad57" />
<File name="Data/ModNecropolis.lua" part="program" sha1="2cfb8dd49935c2661447dea226668c2b231fbc34" />
<File name="Data/ModTincture.lua" part="program" sha1="573e5fc25316fdaafad842fea181a520d42607b8" />
<File name="Data/ModVeiled.lua" part="program" sha1="6313fdf97113710bcc40fc6acc29e008fa7c1699" />
<File name="Data/Pantheons.lua" part="program" sha1="af9178675d2dc390891176e77209d8fd95dfcb77" />
<File name="Data/QueryMods.lua" part="program" sha1="54f813e5298c98c69a4e6d9039da17cadec7f9c5" />
<File name="Data/Rares.lua" part="program" sha1="7a2cf2496de9bd4fbdd042bece8214d60f57adb5" />
<File name="Data/Skills/act_dex.lua" part="program" sha1="a06aebf1ac5d0f68be38e220d473a897f4444389" />
<File name="Data/Skills/act_int.lua" part="program" sha1="2b82d9d3a2f272ea1b42461f07acca3358d42ce9" />
<File name="Data/Skills/act_str.lua" part="program" sha1="1a0bf74be5134ee56ca3fe1ffcbaef17709201ca" />
<File name="Data/Skills/glove.lua" part="program" sha1="260b66a5d3480d4619c7b752cb4b0a4fb12f8312" />
<File name="Data/Skills/minion.lua" part="program" sha1="ed8a0d25e481b4cc4c6b9d924ebcfd02aa03b33f" />
<File name="Data/Skills/other.lua" part="program" sha1="e00a8f0ca7c8ca5e72cfcb4e4e0695ae08d7b3d4" />
<File name="Data/Skills/spectre.lua" part="program" sha1="d25dce4e2bd212904a9fc1a00ac9e8d985e98582" />
<File name="Data/Skills/sup_dex.lua" part="program" sha1="ea672b25d063844f3b8f66e5819f99b0c0da7dca" />
<File name="Data/Skills/sup_int.lua" part="program" sha1="bf7a0ba908e660df358eeed62386da9c1e458ce3" />
<File name="Data/Skills/sup_str.lua" part="program" sha1="a4539df41f578ceecf6e22bf3ed656dd0e647e54" />
<File name="Data/SkillStatMap.lua" part="program" sha1="c590c3e093c3e2243502025a77e03a52c8151977" />
<File name="Data/Spectres.lua" part="program" sha1="e62923a4669da0f7403652afd6866ef118e8322e" />
<File name="Data/StatDescriptions/active_skill_gem_stat_descriptions.lua" part="program" sha1="78cb97df2ada6a16504595bb7849f86de1b62eae" />
<File name="Data/StatDescriptions/aura_skill_stat_descriptions.lua" part="program" sha1="cf1f7c4db13fb272d74e678a053b6e3ba91dccba" />
<File name="Data/StatDescriptions/banner_aura_skill_stat_descriptions.lua" part="program" sha1="2995f8b8685edb6324e1ed1a734a8667008133d9" />
<File name="Data/StatDescriptions/beam_skill_stat_descriptions.lua" part="program" sha1="9bb2253d65b7ffa70abb82de701b3294fea518b7" />
<File name="Data/StatDescriptions/brand_skill_stat_descriptions.lua" part="program" sha1="cdffcba2f7b50419b872d98adac7672216d94ab8" />
<File name="Data/StatDescriptions/buff_skill_stat_descriptions.lua" part="program" sha1="3c7c3e9dd6a571ebeda8ff49a410a9006d9829fe" />
<File name="Data/StatDescriptions/curse_skill_stat_descriptions.lua" part="program" sha1="b1ffacb9faabf5ab146ad853411b3acc21add9ab" />
<File name="Data/StatDescriptions/debuff_skill_stat_descriptions.lua" part="program" sha1="ed055b2ed43829ba3c676f52d2dccfed5856015d" />
<File name="Data/StatDescriptions/gem_stat_descriptions.lua" part="program" sha1="090f2f7192fe5d490df26ac42ac2435e7ace0575" />
<File name="Data/StatDescriptions/minion_attack_skill_stat_descriptions.lua" part="program" sha1="a61b63ca16573a7ecb17556fae77eeb06b47700d" />
<File name="Data/StatDescriptions/minion_skill_stat_descriptions.lua" part="program" sha1="bb4000302a79bdba60a8fa5c12fd08701ebea149" />
<File name="Data/StatDescriptions/minion_spell_damage_skill_stat_descriptions.lua" part="program" sha1="d9b57a9b3c5135b770046acef4a5dc7cbe72b90e" />
<File name="Data/StatDescriptions/minion_spell_skill_stat_descriptions.lua" part="program" sha1="4d6cdf0dcf7ae53a8e149cabf67bfbde9f5fdc98" />
<File name="Data/StatDescriptions/monster_stat_descriptions.lua" part="program" sha1="5754f489603586597c1cbe2605121da623d4d9b3" />
<File name="Data/StatDescriptions/offering_skill_stat_descriptions.lua" part="program" sha1="d462b786bfe0f16443c366d1347769875e9a41de" />
<File name="Data/StatDescriptions/secondary_debuff_skill_stat_descriptions.lua" part="program" sha1="77c64e32a13f04d661dc34bb5f24c2d01c67baea" />
<File name="Data/StatDescriptions/single_minion_spell_skill_stat_descriptions.lua" part="program" sha1="3c9a68e0af6ebb8c210460f108c062502e247be3" />
<File name="Data/StatDescriptions/skill_stat_descriptions.lua" part="program" sha1="3bf1626159a539df7dfc390794f3bca31d4d0fc0" />
<File name="Data/StatDescriptions/stat_descriptions.lua" part="program" sha1="475f66b1210599a61b75c797199a3edfa5ffa123" />
<File name="Data/StatDescriptions/tincture_stat_descriptions.lua" part="program" sha1="7bf558f9692f531c58fae338787fc73c39cf0979" />
<File name="Data/StatDescriptions/variable_duration_skill_stat_descriptions.lua" part="program" sha1="035f263f6f0f6a149a5fad3f7a16070f7e13c98d" />
<File name="Data/TattooPassives.lua" part="program" sha1="e24a7265d0cb6779ab9788a5435b07ea5d9bfb24" />
<File name="Data/TimelessJewelData/BrutalRestraint.zip" part="program" sha1="a0ba29b6daf0f08b84a5fcc64455e44f3c369c68" />
<File name="Data/TimelessJewelData/ElegantHubris.zip" part="program" sha1="ec474e3c9f052129fce1966858194c54cef681bd" />
<File name="Data/TimelessJewelData/GloriousVanity.zip.part0" part="program" sha1="8cef826fcaf0373a0989a998f46a993b82f99a1e" />
<File name="Data/TimelessJewelData/GloriousVanity.zip.part1" part="program" sha1="7934a7e878e1b7e87c89d35b8ea6491943d58375" />
<File name="Data/TimelessJewelData/GloriousVanity.zip.part2" part="program" sha1="40897375056d28dc171ab54b4e0aba13a6e7465a" />
<File name="Data/TimelessJewelData/GloriousVanity.zip.part3" part="program" sha1="9afd246eece1bfa97183784db36d0532eace9e4b" />
<File name="Data/TimelessJewelData/GloriousVanity.zip.part4" part="program" sha1="972c07b50bcedf290d8fbedc90556fb814f9cb14" />
<File name="Data/TimelessJewelData/LegionPassives.lua" part="program" sha1="62d9d37f16fa15f8b6acc4fd259d5e204e846907" />
<File name="Data/TimelessJewelData/LegionTradeIds.lua" part="program" sha1="a852a234591481dcd4c8ddf937fb0f75b69036bb" />
<File name="Data/TimelessJewelData/LethalPride.zip" part="program" sha1="0795c485e0d6b9c79705a6aa2bebf19fbb87024d" />
<File name="Data/TimelessJewelData/MilitantFaith.zip" part="program" sha1="a1cb40a6176920c5ba36750e81583c92dec26558" />
<File name="Data/TimelessJewelData/NodeIndexMapping.lua" part="program" sha1="ffd323e3bdb71e2e6b6a6aaea39bac8f222c667a" />
<File name="Data/Uniques/amulet.lua" part="program" sha1="ae1294b78044674c70c9f1272dd8363668c22b40" />
<File name="Data/Uniques/axe.lua" part="program" sha1="8bb784afa7f55dab9dfe30238e66e5c908b7121a" />
<File name="Data/Uniques/belt.lua" part="program" sha1="71a2140d4c626ad2f23afd5ed0e601cd0a8c7e74" />
<File name="Data/Uniques/body.lua" part="program" sha1="2e1ff2588699bc1e127da61a3182579e8461cbfa" />
<File name="Data/Uniques/boots.lua" part="program" sha1="695ee9297e8318ef9f2799f8603b0aa5b34cf7cf" />
<File name="Data/Uniques/bow.lua" part="program" sha1="16978c20d522db5d8d4034a84b945520833cba19" />
<File name="Data/Uniques/claw.lua" part="program" sha1="c1cf3b7b6cc655b71dddf060bdbfc9bce65b0899" />
<File name="Data/Uniques/dagger.lua" part="program" sha1="221a07501b6f32395a63543da7afb9c0498cf7c8" />
<File name="Data/Uniques/fishing.lua" part="program" sha1="51bfa6a311f69ef89cc83170daeb2004162ed67d" />
<File name="Data/Uniques/flask.lua" part="program" sha1="dcd988489786822f63c5a02c5e29942303d80312" />
<File name="Data/Uniques/gloves.lua" part="program" sha1="9eef518da4d3212bede915a6b2f235b799d5d32c" />
<File name="Data/Uniques/helmet.lua" part="program" sha1="28d586feb75e3200832fddef22bfb77a0b88abb6" />
<File name="Data/Uniques/jewel.lua" part="program" sha1="7705d92f38de5a7522190056dfcad5810c5c76df" />
<File name="Data/Uniques/mace.lua" part="program" sha1="845f20bddcc12e6b7ac72e97fc3e6f50f2360f68" />
<File name="Data/Uniques/quiver.lua" part="program" sha1="b99a019d76640092c763634232f62dd8d8b19b6b" />
<File name="Data/Uniques/ring.lua" part="program" sha1="8fbbde9b42d6524f6620e5a180d7b0075a6241ff" />
<File name="Data/Uniques/shield.lua" part="program" sha1="30c861c7bac3bea2405e1e8247e01d2a26627b07" />
<File name="Data/Uniques/Special/BoundByDestiny.lua" part="program" sha1="d8a431d78427cb9c6dd5ae080f8d4809b10400e2" />
<File name="Data/Uniques/Special/Generated.lua" part="program" sha1="aa56b9dccd772077d29f0abd6294b66022f55f7a" />
<File name="Data/Uniques/Special/New.lua" part="program" sha1="e117c4792f287b271ce86c35f2d3bc933e2d7bf2" />
<File name="Data/Uniques/Special/race.lua" part="program" sha1="fbe785fd8e6fc460ac459dd0d394ad5f6ba2661c" />
<File name="Data/Uniques/Special/WatchersEye.lua" part="program" sha1="12ca716983ce62e4630f49d0fd9c2c9a232adb0e" />
<File name="Data/Uniques/staff.lua" part="program" sha1="d50e78f3b952df43928124863c72c7de0d3a54c6" />
<File name="Data/Uniques/sword.lua" part="program" sha1="81fe736554d28b9970b3407ffa7845de91c11e6d" />
<File name="Data/Uniques/tincture.lua" part="program" sha1="840794783a1edb60a77f297411dd775ce4095cb1" />
<File name="Data/Uniques/wand.lua" part="program" sha1="009d9e452128e2e36eefa809c974296f013e5808" />
<File name="GameVersions.lua" part="program" sha1="d253257ea11b6117c6f4bee577c031a265ecaee0" />
<File name="Launch.lua" part="program" sha1="2a9eba3dbac31597e7357a3fc9121993c7902fb1" />
<File name="Modules/Build.lua" part="program" sha1="fd3f4825c724a9858c66ebf49da6b87966129cd5" />
<File name="Modules/BuildDisplayStats.lua" part="program" sha1="bb8517ccd372e3cfad8e68b7a65962ab0cf66269" />
<File name="Modules/BuildList.lua" part="program" sha1="99ac52b6fa77f0d6c9521b6b2f13621bfd7cbb07" />
<File name="Modules/BuildSiteTools.lua" part="program" sha1="7f3a76ee0f53b50972f53db2a96a7fac02b5c285" />
<File name="Modules/CalcActiveSkill.lua" part="program" sha1="2df26aa6b1ca7921c73b40033942fb22842e7363" />
<File name="Modules/CalcBreakdown.lua" part="program" sha1="edd6c08679fa4c7ed667895f86c7ee67257bfcf0" />
<File name="Modules/CalcDefence.lua" part="program" sha1="7d3fb206da65a85d3e5799be83a93bc630d4d283" />
<File name="Modules/CalcMirages.lua" part="program" sha1="3b1b8e427253bc360c4cd59b8af2308135058294" />
<File name="Modules/CalcOffence.lua" part="program" sha1="77fdd7b3a5a68c048d6e7491792618c338894ec9" />
<File name="Modules/CalcPerform.lua" part="program" sha1="b69790e03b8209995a6feb385c3a0659631ab5a9" />
<File name="Modules/Calcs.lua" part="program" sha1="f8777f3a48d7c7da3c9baf956dbae9e854a7c7ca" />
<File name="Modules/CalcSections.lua" part="program" sha1="20f0c7050e1d4681254872a51dc34eaa2cbf05a0" />
<File name="Modules/CalcSetup.lua" part="program" sha1="4b5e66b2098830d8584555512e4997cc95edd921" />
<File name="Modules/CalcTools.lua" part="program" sha1="7f1b90ad57b02eeb1ad9aebf0f00416a9f4bea75" />
<File name="Modules/CalcTriggers.lua" part="program" sha1="532c7c21e78a0adb235e43430bc85948bf5377c2" />
<File name="Modules/Common.lua" part="program" sha1="c21b9584cb570fb06896f6c870f59ffa385efb86" />
<File name="Modules/ConfigOptions.lua" part="program" sha1="70db40c7972dfe877d2e84014fc5e494d027664d" />
<File name="Modules/Data.lua" part="program" sha1="cf4d2529f7f20d8868c8c9b3f712db2ac623a1b5" />
<File name="Modules/DataLegionLookUpTableHelper.lua" part="program" sha1="170699925a438275137ba621206800e29f453eb3" />
<File name="Modules/ItemTools.lua" part="program" sha1="0c60e108e3b0a67ab9c3aac753b7f57bd2faa013" />
<File name="Modules/Main.lua" part="program" sha1="bfd493eaf4e793010b4da060fa78575cc4b5d122" />
<File name="Modules/ModParser.lua" part="program" sha1="c09c39819df6f116ed042c440b6cc87caf490fcf" />
<File name="Modules/ModTools.lua" part="program" sha1="cfb4065936e0916d0424cd1c6cb8102eef132856" />
<File name="Modules/PantheonTools.lua" part="program" sha1="ebe91a7d8f8444a6061acf4758da0e775cc8c314" />
<File name="Modules/StatDescriber.lua" part="program" sha1="c4f9c72fa319c798710926720b8519eb38c40c31" />
<File name="UpdateApply.lua" part="program" sha1="4dd42f413cb89a963e4ae1b40e214985b909c05b" />
<File name="UpdateCheck.lua" part="default" sha1="2ae35a08c9445d68c4fc92254fcf50c8b780bf72" />
<File name="lua/base64.lua" part="runtime" sha1="18629865eb351e483178b6524fb3935cbc9b8297" />
<File name="lua/dkjson.lua" part="runtime" sha1="d2c9e5433a24b8593886a36cfc267cb05d3bc529" />
<File name="lua/sha1/bit32_ops.lua" part="runtime" sha1="25bc8def626fd8d8bd3d37dcd96808c6b8b00087" />
<File name="lua/sha1/bit_ops.lua" part="runtime" sha1="53ce6b3174386d1e4565ced0c1a7f1b3df3bb83f" />
<File name="lua/sha1/common.lua" part="runtime" sha1="70faf0efa48e6d44c7b8a4279467f0025257b84f" />
<File name="lua/sha1/init.lua" part="runtime" sha1="e23c730650ac2ffe595b4ed2a5f3484225414ebd" />
<File name="lua/sha1/lua53_ops.lua" part="runtime" sha1="b10c732f322358c4112226df61af61f53a21b911" />
<File name="lua/sha1/pure_lua_ops.lua" part="runtime" sha1="0dff15b1cfd171a3572032346613adcf5e9962c2" />
<File name="lua/xml.lua" part="runtime" sha1="859e09104842f91a4aaa9a4d9fadf667535877e2" />
<File name="TreeData/2_6/skill_sprite-3-32f639bbfc42783ca7ec218a787dd918.jpg" part="tree" sha1="dc7a2a0383847ac28eade8a31a57a8bfa7b298e4" />
<File name="TreeData/2_6/skill_sprite-active-3-3e73c4c4534433ecfc340c7287093bd5.png" part="tree" sha1="baa878007cfac73bee50958d25617b95c0e73a2d" />
<File name="TreeData/2_6/skill_sprite-active-3-7798fabab8a21829831293c20ac9c414.jpg" part="tree" sha1="526654400851f032d3d2f46980c0ecc077aa0c4c" />
<File name="TreeData/2_6/tree.lua" part="tree" sha1="ee02b7e6e521896c498d8b222b1efab04538eaa7" />
<File name="TreeData/3_6/groups-3.png" part="tree" sha1="ea7ce14f355f5389cc5133c0999c53b943e6141b" />
<File name="TreeData/3_6/skills-3.jpg" part="tree" sha1="b5277c97e46807feeb98c241be5a77267fa56a85" />
<File name="TreeData/3_6/skills-disabled-3.jpg" part="tree" sha1="22ab849bbe94942c199c9b218f76da14fba58413" />
<File name="TreeData/3_6/tree.lua" part="tree" sha1="9c28311886cf10799b745e843c3b06b1c40f0c24" />
<File name="TreeData/3_7/groups-3.png" part="tree" sha1="6c1a0b5721a866755292721a097ee1520a100a95" />
<File name="TreeData/3_7/skills-3.jpg" part="tree" sha1="c3262896ffb085f04d0f4c830294a5c99982b7e2" />
<File name="TreeData/3_7/skills-disabled-3.jpg" part="tree" sha1="8b312d618e14a948628e9716861d1c6eb0b65774" />
<File name="TreeData/3_7/tree.lua" part="tree" sha1="2c73d57dabd0054b884b2a63b8af9948592fd6ef" />
<File name="TreeData/3_8/groups-3.png" part="tree" sha1="9ad64986cd50d2ac198b8e2b6f8c4aa1b6b3227a" />
<File name="TreeData/3_8/skills-3.jpg" part="tree" sha1="bf8f56caa6a57e1dd39782c5b692290b05fd55bd" />
<File name="TreeData/3_8/skills-disabled-3.jpg" part="tree" sha1="744565abb088b75fa335c0b3024a13f0e1a21033" />
<File name="TreeData/3_8/tree.lua" part="tree" sha1="e5ff335980875ef278038fa46f40e1f18a4b5f7a" />
<File name="TreeData/3_9/groups-3.png" part="tree" sha1="ddf012e0184c29bc1aee994badd8ede83aaebb73" />
<File name="TreeData/3_9/skills-3.jpg" part="tree" sha1="119218595a02d38e11ac331d4920d23f8acc86de" />
<File name="TreeData/3_9/skills-disabled-3.jpg" part="tree" sha1="e73624e16e81cb5393d07685a766dc3afc8f9e39" />
<File name="TreeData/3_9/tree.lua" part="tree" sha1="55bef2fbee9f9fc63e35d92b37b95f428c8d5ac2" />
<File name="TreeData/3_10/groups-3.png" part="tree" sha1="85a5d6410e38d62c567538caba62d1c20c306453" />
<File name="TreeData/3_10/skills-3.jpg" part="tree" sha1="5e178407366f55bd46739ecba312fcb3e0d515dc" />
<File name="TreeData/3_10/skills-disabled-3.jpg" part="tree" sha1="ef12b39c6dad5448e6f10c92a1b4e7cf38e00843" />
<File name="TreeData/3_10/tree.lua" part="tree" sha1="8328acf9bfecc4a2991348adbf0f683908ecb9fa" />
<File name="TreeData/3_11/groups-3.png" part="tree" sha1="351b940efd39cf3210babd01f8843b930a3c6165" />
<File name="TreeData/3_11/skills-3.jpg" part="tree" sha1="e24100ec6bc1a20486424f95f878f0ff75753f97" />
<File name="TreeData/3_11/skills-disabled-3.jpg" part="tree" sha1="b7a63aecf727ccc8e826d1cefd8d6ee7029714e0" />
<File name="TreeData/3_11/tree.lua" part="tree" sha1="2c66328deede4395fef5d7b1b81b697cdc8e0813" />
<File name="TreeData/3_12/groups-3.png" part="tree" sha1="5d0781818aa0fc971e40c71606794167f399b010" />
<File name="TreeData/3_12/skills-3.jpg" part="tree" sha1="250196fea41d29ba3a70f6f906bf909615fadb71" />
<File name="TreeData/3_12/skills-disabled-3.jpg" part="tree" sha1="5b955112389654a805be7f76a09d23efeb40b7f3" />
<File name="TreeData/3_12/tree.lua" part="tree" sha1="973784f215cdf0ea8889fcf019ca59c4213f4ba3" />
<File name="TreeData/3_13/groups-3.png" part="tree" sha1="5bfa14f0073f8835c12cb3297f0855dfc68eb869" />
<File name="TreeData/3_13/skills-3.jpg" part="tree" sha1="4e066860145766ebe0c606833f4cf41fe4bf90e4" />
<File name="TreeData/3_13/skills-disabled-3.jpg" part="tree" sha1="435f782d319f5457d75ca98fb3f1e75fac64e2c5" />
<File name="TreeData/3_13/tree.lua" part="tree" sha1="f9ab50ea0d56c60516829b1952b1709be308b6d3" />
<File name="TreeData/3_14/groups-3.png" part="tree" sha1="fe91708e0c16dc1bab7ee3f436914ef7201df9c9" />
<File name="TreeData/3_14/skills-3.jpg" part="tree" sha1="bcb605cce06852fb5a6961369229afe4a6bdff0f" />
<File name="TreeData/3_14/skills-disabled-3.jpg" part="tree" sha1="1f8841f20d25396f0a4b9ae2e5ba7ce28036ac45" />
<File name="TreeData/3_14/tree.lua" part="tree" sha1="77e80cea5bc31877fea3c17b6b640c54799ccc45" />
<File name="TreeData/3_15/groups-3.png" part="tree" sha1="ad86bd7b8d189d37eb1aa3e5bdc1f3c6c5e7aadc" />
<File name="TreeData/3_15/skills-3.jpg" part="tree" sha1="a2fb3f5bab2819204b80afbde7a27ba3e3b7f08e" />
<File name="TreeData/3_15/skills-disabled-3.jpg" part="tree" sha1="d1fcdec9f039bc9f16fb1bac837804bed42df6d7" />
<File name="TreeData/3_15/tree.lua" part="tree" sha1="ee8ffb8adab5728d6a8748d25244d9bcb58fe800" />
<File name="TreeData/3_16/mastery-active-effect-3.png" part="tree" sha1="3842bee3d952f6363b1f88e546519d2b0691849b" />
<File name="TreeData/3_16/mastery-active-selected-3.png" part="tree" sha1="3838d80b08d8789b455558e814dcbde686a1df14" />
<File name="TreeData/3_16/mastery-connected-3.png" part="tree" sha1="5b13e5f2d88d5118421f97042ce91e7ba3f80f1f" />
<File name="TreeData/3_16/mastery-disabled-3.png" part="tree" sha1="2401a6162eb0a9d831c15f987d972145e530bb77" />
<File name="TreeData/3_16/skills-3.jpg" part="tree" sha1="c638888d1c61852c9fbcafd49a54a9f9c7208598" />
<File name="TreeData/3_16/skills-disabled-3.jpg" part="tree" sha1="f637d86d9457c569e3327a424f34586b93bd1753" />
<File name="TreeData/3_16/tree.lua" part="tree" sha1="6558feaf4e34ec4cddfc6ffa10a88c2e212c7abd" />
<File name="TreeData/3_17/mastery-active-effect-3.png" part="tree" sha1="9a982c9da450c3e083d8043146fb6d77e4833819" />
<File name="TreeData/3_17/mastery-active-selected-3.png" part="tree" sha1="4e62d2dbcd68865fa4de780822a5485bf78d356a" />
<File name="TreeData/3_17/mastery-connected-3.png" part="tree" sha1="a7a9de0b0696e6a0084488c883e5e4a1031cfe43" />
<File name="TreeData/3_17/mastery-disabled-3.png" part="tree" sha1="33fdf3073f2a08809ec9009b4c1bddb311856cee" />
<File name="TreeData/3_17/skills-3.jpg" part="tree" sha1="d1680fbf429af45ef69eb82d39a3181b22694d18" />
<File name="TreeData/3_17/skills-disabled-3.jpg" part="tree" sha1="ac1e410f10e70277f6e17da02c22e02eba769d69" />
<File name="TreeData/3_17/tree.lua" part="tree" sha1="ef9a685526eb39c4e24e903269abe26a7e6061d8" />
<File name="TreeData/3_18/mastery-3.png" part="tree" sha1="e5b2b6f3e3c8c7cf851f388fcf50d52b26ff459e" />
<File name="TreeData/3_18/mastery-active-effect-3.png" part="tree" sha1="9a982c9da450c3e083d8043146fb6d77e4833819" />
<File name="TreeData/3_18/mastery-active-selected-3.png" part="tree" sha1="4e62d2dbcd68865fa4de780822a5485bf78d356a" />
<File name="TreeData/3_18/mastery-connected-3.png" part="tree" sha1="a7a9de0b0696e6a0084488c883e5e4a1031cfe43" />
<File name="TreeData/3_18/mastery-disabled-3.png" part="tree" sha1="33fdf3073f2a08809ec9009b4c1bddb311856cee" />
<File name="TreeData/3_18/skills-3.jpg" part="tree" sha1="d1680fbf429af45ef69eb82d39a3181b22694d18" />
<File name="TreeData/3_18/skills-disabled-3.jpg" part="tree" sha1="ac1e410f10e70277f6e17da02c22e02eba769d69" />
<File name="TreeData/3_18/tree.lua" part="tree" sha1="514b36ab6b68affd0b9868e85c2b45c92b27bb67" />
<File name="TreeData/3_19/Assets.lua" part="tree" sha1="45f21bb289acd71420a13b856ddd00e99c547ebc" />
<File name="TreeData/3_19/mastery-3.png" part="tree" sha1="eba9d0e2c14383bd03999bde470da87c549e0937" />
<File name="TreeData/3_19/mastery-active-effect-3.png" part="tree" sha1="4970ee4961dd0b8e17d0b9fb88a5a872156d6685" />
<File name="TreeData/3_19/mastery-active-selected-3.png" part="tree" sha1="af171059d970a888f371c721473c34386b67d712" />
<File name="TreeData/3_19/mastery-connected-3.png" part="tree" sha1="8d471f06922b04d128eef15f986a0df93bf73f95" />
<File name="TreeData/3_19/mastery-disabled-3.png" part="tree" sha1="65f7b13ce853806f30a3d7bdc35f65c0b9bb58bc" />
<File name="TreeData/3_19/skills-3.jpg" part="tree" sha1="d2a99f9d2280e5f35b725ba1b199a0299e9dac2d" />
<File name="TreeData/3_19/skills-disabled-3.jpg" part="tree" sha1="9eef2b38ffca230d21a265fd1729f6230bc22a69" />
<File name="TreeData/3_19/tree.lua" part="tree" sha1="e4cf555216dc69484f7accc96767eb28638de50b" />
<File name="TreeData/3_20/ascendancy-3.png" part="tree" sha1="2d94e5b833d843fecad23f1f42a1dc74e046cb65" />
<File name="TreeData/3_20/ascendancy-background-3.jpg" part="tree" sha1="e49ef2f589e5fa54b755b4efdf01fd9cecf5671c" />
<File name="TreeData/3_20/background-3.png" part="tree" sha1="1879f7fc11de729dd3b96592f08f011d386c3b56" />
<File name="TreeData/3_20/frame-3.png" part="tree" sha1="a65a54776892fcbf22209e8cbd0500cd594c3334" />
<File name="TreeData/3_20/group-background-3.png" part="tree" sha1="03f69c99e8208039966a9f59af75d2ce489b1d33" />
<File name="TreeData/3_20/jewel-3.png" part="tree" sha1="3435200b7a840357d132aad060a76fa3d4939bec" />
<File name="TreeData/3_20/jewel-radius.png" part="tree" sha1="d9056986fc84c673cdd6d45ca55792fa21847a7f" />
<File name="TreeData/3_20/line-3.png" part="tree" sha1="fac1fc847c200fef24ab2e069ea8253944d14645" />
<File name="TreeData/3_20/mastery-3.png" part="tree" sha1="eba9d0e2c14383bd03999bde470da87c549e0937" />
<File name="TreeData/3_20/mastery-active-effect-3.png" part="tree" sha1="4970ee4961dd0b8e17d0b9fb88a5a872156d6685" />
<File name="TreeData/3_20/mastery-active-selected-3.png" part="tree" sha1="af171059d970a888f371c721473c34386b67d712" />
<File name="TreeData/3_20/mastery-connected-3.png" part="tree" sha1="8d471f06922b04d128eef15f986a0df93bf73f95" />
<File name="TreeData/3_20/mastery-disabled-3.png" part="tree" sha1="65f7b13ce853806f30a3d7bdc35f65c0b9bb58bc" />
<File name="TreeData/3_20/PassiveMasteryConnectedButton.png" part="tree" sha1="514a1e5e95c69d02c393c3738970f4140e51a07a" />
<File name="TreeData/3_20/skills-3.jpg" part="tree" sha1="439d7a8cedf88baa67331b8b5577cf2fdc59105a" />
<File name="TreeData/3_20/skills-disabled-3.jpg" part="tree" sha1="a01660f5e8831d909effc5b26deabc93139c9741" />
<File name="TreeData/3_20/tree.lua" part="tree" sha1="d5587cb838db90f788e670cf6a31051a05ded047" />
<File name="TreeData/3_21/ascendancy-3.png" part="tree" sha1="464a66c648f66fababda6c9b98886f60c7f462ed" />
<File name="TreeData/3_21/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_21/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_21/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_21/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_21/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_21/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_21/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_21/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_21/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_21/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_21/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_21/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_21/PassiveMasteryConnectedButton.png" part="tree" sha1="514a1e5e95c69d02c393c3738970f4140e51a07a" />
<File name="TreeData/3_21/skills-3.jpg" part="tree" sha1="e7017f5f1edbf68b7e075216b15c8f19d08f2767" />
<File name="TreeData/3_21/skills-disabled-3.jpg" part="tree" sha1="58288be0171deaa51a1344942e20064661290925" />
<File name="TreeData/3_21/tree.lua" part="tree" sha1="1883c83e942d0bcd5086d8510c7367f97b3915dc" />
<File name="TreeData/3_22/ascendancy-3.png" part="tree" sha1="464a66c648f66fababda6c9b98886f60c7f462ed" />
<File name="TreeData/3_22/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_22/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_22/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_22/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_22/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_22/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_22/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_22/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_22/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_22/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_22/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_22/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_22/PassiveMasteryConnectedButton.png" part="tree" sha1="514a1e5e95c69d02c393c3738970f4140e51a07a" />
<File name="TreeData/3_22/skills-3.jpg" part="tree" sha1="3c19c01ab91c821861fc8ee16cc1844409b7c4da" />
<File name="TreeData/3_22/skills-disabled-3.jpg" part="tree" sha1="a3e836364fbce07ffc3d86b35fa9bcf9bf47c7fa" />
<File name="TreeData/3_22/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_22/tree.lua" part="tree" sha1="eadbbbfa71eafdb73e752edbdab4733361866483" />
<File name="TreeData/3_22_ruthless/ascendancy-3.png" part="tree" sha1="464a66c648f66fababda6c9b98886f60c7f462ed" />
<File name="TreeData/3_22_ruthless/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_22_ruthless/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_22_ruthless/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_22_ruthless/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_22_ruthless/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_22_ruthless/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_22_ruthless/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_22_ruthless/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_22_ruthless/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_22_ruthless/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_22_ruthless/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_22_ruthless/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_22_ruthless/skills-3.jpg" part="tree" sha1="3c19c01ab91c821861fc8ee16cc1844409b7c4da" />
<File name="TreeData/3_22_ruthless/skills-disabled-3.jpg" part="tree" sha1="a3e836364fbce07ffc3d86b35fa9bcf9bf47c7fa" />
<File name="TreeData/3_22_ruthless/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_22_ruthless/tree.lua" part="tree" sha1="ca5fcd2f9fc9a94645a371c71cf8cd3894607650" />
<File name="TreeData/3_23/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_23/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_23/ascendancy-background-3.png" part="tree" sha1="fafbd532bfd6e87b977fceb7f5c54ebeba556879" />
<File name="TreeData/3_23/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_23/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_23/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_23/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_23/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_23/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_23/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_23/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_23/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_23/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_23/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_23/PassiveMasteryConnectedButton.png" part="tree" sha1="514a1e5e95c69d02c393c3738970f4140e51a07a" />
<File name="TreeData/3_23/skills-3.jpg" part="tree" sha1="49b686a8c38927a073b7c0f642c19bd65890e293" />
<File name="TreeData/3_23/skills-disabled-3.jpg" part="tree" sha1="b279b6bf030f7dd9562f4277659b7f5f1cd7efdd" />
<File name="TreeData/3_23/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_23/tree.lua" part="tree" sha1="0cfbd4f5ad62086234618523c51b9d8980cf4d71" />
<File name="TreeData/3_23_ruthless/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_23_ruthless/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_23_ruthless/ascendancy-background-3.png" part="tree" sha1="fafbd532bfd6e87b977fceb7f5c54ebeba556879" />
<File name="TreeData/3_23_ruthless/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_23_ruthless/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_23_ruthless/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_23_ruthless/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_23_ruthless/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_23_ruthless/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_23_ruthless/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_23_ruthless/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_23_ruthless/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_23_ruthless/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_23_ruthless/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_23_ruthless/skills-3.jpg" part="tree" sha1="49b686a8c38927a073b7c0f642c19bd65890e293" />
<File name="TreeData/3_23_ruthless/skills-disabled-3.jpg" part="tree" sha1="b279b6bf030f7dd9562f4277659b7f5f1cd7efdd" />
<File name="TreeData/3_23_ruthless/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_23_ruthless/tree.lua" part="tree" sha1="594c6e6ee285aab6a64503566c6bbf24aeb79889" />
<File name="TreeData/3_24/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_24/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_24/ascendancy-background-3.png" part="tree" sha1="fafbd532bfd6e87b977fceb7f5c54ebeba556879" />
<File name="TreeData/3_24/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_24/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_24/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_24/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_24/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_24/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_24/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_24/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_24/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_24/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_24/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_24/PassiveMasteryConnectedButton.png" part="tree" sha1="514a1e5e95c69d02c393c3738970f4140e51a07a" />
<File name="TreeData/3_24/skills-3.jpg" part="tree" sha1="33b3264569110e642539a5f032b3ad6463770511" />
<File name="TreeData/3_24/skills-disabled-3.jpg" part="tree" sha1="f17518de203928c9f5905f0ad811964225f35e3e" />
<File name="TreeData/3_24/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_24/tree.lua" part="tree" sha1="81648ce52017b69a3539fe92a51f6189efb69b64" />
<File name="TreeData/3_24_ruthless/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_24_ruthless/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_24_ruthless/ascendancy-background-3.png" part="tree" sha1="fafbd532bfd6e87b977fceb7f5c54ebeba556879" />
<File name="TreeData/3_24_ruthless/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_24_ruthless/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_24_ruthless/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_24_ruthless/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_24_ruthless/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_24_ruthless/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_24_ruthless/mastery-3.png" part="tree" sha1="409f25a0fb89968967780b2573514f5047ff794d" />
<File name="TreeData/3_24_ruthless/mastery-active-effect-3.png" part="tree" sha1="7abf14dfed47ebc2d10d36a86a93ba41f151e673" />
<File name="TreeData/3_24_ruthless/mastery-active-selected-3.png" part="tree" sha1="b2d44de86c46292cf11dc89af6bcc7bd46bb9aa8" />
<File name="TreeData/3_24_ruthless/mastery-connected-3.png" part="tree" sha1="d53f9ceeab2df3a97e0e02214db582fd83bf55fc" />
<File name="TreeData/3_24_ruthless/mastery-disabled-3.png" part="tree" sha1="352e06181b1369497e8b9a13f4b30bd8bbc57ad9" />
<File name="TreeData/3_24_ruthless/skills-3.jpg" part="tree" sha1="33b3264569110e642539a5f032b3ad6463770511" />
<File name="TreeData/3_24_ruthless/skills-disabled-3.jpg" part="tree" sha1="f17518de203928c9f5905f0ad811964225f35e3e" />
<File name="TreeData/3_24_ruthless/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_24_ruthless/tree.lua" part="tree" sha1="0605c24348e7ebf96fb5a1e9eac9e3cd23a6bc76" />
<File name="TreeData/3_25/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_25/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_25/ascendancy-background-3.png" part="tree" sha1="5fa92be470099926c4281f723b0b4fee56f5be70" />
<File name="TreeData/3_25/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_25/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_25/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_25/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_25/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_25/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_25/mastery-3.png" part="tree" sha1="bf1e176d3f8905b5ec72e076dee4ef76a29763fa" />
<File name="TreeData/3_25/mastery-active-effect-3.png" part="tree" sha1="ffe6ad7528545ed043c08a31ecceb87d30d7453d" />
<File name="TreeData/3_25/mastery-active-selected-3.png" part="tree" sha1="7f5e45911247cd339943473516ab1dfb062b51d9" />
<File name="TreeData/3_25/mastery-connected-3.png" part="tree" sha1="5d5cb7a7e706e61c39c988073dffb9bc8343e545" />
<File name="TreeData/3_25/mastery-disabled-3.png" part="tree" sha1="da03b6fc68f28e7921eb89d0ba71d27ec4fc4a10" />
<File name="TreeData/3_25/skills-3.jpg" part="tree" sha1="4de55e7466365960faec3c49153f50f2987ff0c2" />
<File name="TreeData/3_25/skills-disabled-3.jpg" part="tree" sha1="007ad663947f77bde56ad2b2f20171eb3c67df76" />
<File name="TreeData/3_25/sprites.lua" part="tree" sha1="0a067e68f203f4698c5b4e14f16b0a7fe52bf170" />
<File name="TreeData/3_25/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_25/tree.lua" part="tree" sha1="e293f6ce15bb54ac7c01eabfdd8e8676538dfd49" />
<File name="TreeData/3_25_alternate/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_25_alternate/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_25_alternate/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_25_alternate/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_25_alternate/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_25_alternate/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_25_alternate/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_25_alternate/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_25_alternate/mastery-3.png" part="tree" sha1="bf1e176d3f8905b5ec72e076dee4ef76a29763fa" />
<File name="TreeData/3_25_alternate/mastery-active-effect-3.png" part="tree" sha1="ffe6ad7528545ed043c08a31ecceb87d30d7453d" />
<File name="TreeData/3_25_alternate/mastery-active-selected-3.png" part="tree" sha1="7f5e45911247cd339943473516ab1dfb062b51d9" />
<File name="TreeData/3_25_alternate/mastery-connected-3.png" part="tree" sha1="5d5cb7a7e706e61c39c988073dffb9bc8343e545" />
<File name="TreeData/3_25_alternate/mastery-disabled-3.png" part="tree" sha1="da03b6fc68f28e7921eb89d0ba71d27ec4fc4a10" />
<File name="TreeData/3_25_alternate/skills-3.jpg" part="tree" sha1="3ddcabbb422d4458a061df622239f6b1fcdbd553" />
<File name="TreeData/3_25_alternate/skills-disabled-3.jpg" part="tree" sha1="8b2e1b15e4101d8d92ac968f3f546e2937b900d2" />
<File name="TreeData/3_25_alternate/sprites.lua" part="tree" sha1="8771333e922da83245a65994a382084f3e101e29" />
<File name="TreeData/3_25_alternate/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_25_alternate/tree.lua" part="tree" sha1="e624bdf2956bad4ccc422bfd6c4ae40424fcd8af" />
<File name="TreeData/3_25_ruthless/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_25_ruthless/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_25_ruthless/ascendancy-background-3.png" part="tree" sha1="5fa92be470099926c4281f723b0b4fee56f5be70" />
<File name="TreeData/3_25_ruthless/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_25_ruthless/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_25_ruthless/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_25_ruthless/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_25_ruthless/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_25_ruthless/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_25_ruthless/mastery-3.png" part="tree" sha1="bf1e176d3f8905b5ec72e076dee4ef76a29763fa" />
<File name="TreeData/3_25_ruthless/mastery-active-effect-3.png" part="tree" sha1="ffe6ad7528545ed043c08a31ecceb87d30d7453d" />
<File name="TreeData/3_25_ruthless/mastery-active-selected-3.png" part="tree" sha1="7f5e45911247cd339943473516ab1dfb062b51d9" />
<File name="TreeData/3_25_ruthless/mastery-connected-3.png" part="tree" sha1="5d5cb7a7e706e61c39c988073dffb9bc8343e545" />
<File name="TreeData/3_25_ruthless/mastery-disabled-3.png" part="tree" sha1="da03b6fc68f28e7921eb89d0ba71d27ec4fc4a10" />
<File name="TreeData/3_25_ruthless/skills-3.jpg" part="tree" sha1="4de55e7466365960faec3c49153f50f2987ff0c2" />
<File name="TreeData/3_25_ruthless/skills-disabled-3.jpg" part="tree" sha1="007ad663947f77bde56ad2b2f20171eb3c67df76" />
<File name="TreeData/3_25_ruthless/sprites.lua" part="tree" sha1="0a067e68f203f4698c5b4e14f16b0a7fe52bf170" />
<File name="TreeData/3_25_ruthless/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_25_ruthless/tree.lua" part="tree" sha1="42d09b07ba706479413604c744f2bfc9a93dcd36" />
<File name="TreeData/3_25_ruthless_alternate/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_25_ruthless_alternate/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_25_ruthless_alternate/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_25_ruthless_alternate/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_25_ruthless_alternate/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_25_ruthless_alternate/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_25_ruthless_alternate/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_25_ruthless_alternate/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_25_ruthless_alternate/mastery-3.png" part="tree" sha1="bf1e176d3f8905b5ec72e076dee4ef76a29763fa" />
<File name="TreeData/3_25_ruthless_alternate/mastery-active-effect-3.png" part="tree" sha1="ffe6ad7528545ed043c08a31ecceb87d30d7453d" />
<File name="TreeData/3_25_ruthless_alternate/mastery-active-selected-3.png" part="tree" sha1="7f5e45911247cd339943473516ab1dfb062b51d9" />
<File name="TreeData/3_25_ruthless_alternate/mastery-connected-3.png" part="tree" sha1="5d5cb7a7e706e61c39c988073dffb9bc8343e545" />
<File name="TreeData/3_25_ruthless_alternate/mastery-disabled-3.png" part="tree" sha1="da03b6fc68f28e7921eb89d0ba71d27ec4fc4a10" />
<File name="TreeData/3_25_ruthless_alternate/skills-3.jpg" part="tree" sha1="3ddcabbb422d4458a061df622239f6b1fcdbd553" />
<File name="TreeData/3_25_ruthless_alternate/skills-disabled-3.jpg" part="tree" sha1="8b2e1b15e4101d8d92ac968f3f546e2937b900d2" />
<File name="TreeData/3_25_ruthless_alternate/sprites.lua" part="tree" sha1="8771333e922da83245a65994a382084f3e101e29" />
<File name="TreeData/3_25_ruthless_alternate/tattoo-active-effect-3.png" part="tree" sha1="065db8af17e487b91347dfda84c9a1e3be73ed5c" />
<File name="TreeData/3_25_ruthless_alternate/tree.lua" part="tree" sha1="2dd77407c7cbd7ff037c362b7741ed6dec59e63a" />
<File name="TreeData/3_26/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_26/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_26/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_26/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_26/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_26/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_26/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_26/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_26/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_26/mastery-3.png" part="tree" sha1="ba9c16a9b3608bd2c7f82ab2f8c679700a75eea3" />
<File name="TreeData/3_26/mastery-active-effect-3.png" part="tree" sha1="dc238fef8a7c69c5b2b41a16008418c390aace25" />
<File name="TreeData/3_26/mastery-active-selected-3.png" part="tree" sha1="636f19b9efa0c7d106d24c4c43b93684d5f9bf3d" />
<File name="TreeData/3_26/mastery-connected-3.png" part="tree" sha1="6de05de82a4916ca9e492071ae7533c529ac4b60" />
<File name="TreeData/3_26/mastery-disabled-3.png" part="tree" sha1="b5f14579abd5a52fc761ba0d013f1a4b2253b611" />
<File name="TreeData/3_26/skills-3.jpg" part="tree" sha1="142788c23289a60ca1cbbd9ea8413e030999b068" />
<File name="TreeData/3_26/skills-disabled-3.jpg" part="tree" sha1="cc15193961b4a31055eb46b33b27b57bf09b8098" />
<File name="TreeData/3_26/sprites.lua" part="tree" sha1="93fd965ee0b2e668eb8277dbc7f5e2233ce94d99" />
<File name="TreeData/3_26/tattoo-active-effect-3.png" part="tree" sha1="8d1f8944f2f92f48c42522f1a34b9deea83fdf25" />
<File name="TreeData/3_26/tree.lua" part="tree" sha1="e75db83a7c4dbf32579ca9f7c56922ca9924d375" />
<File name="TreeData/3_26_alternate/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_26_alternate/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_26_alternate/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_26_alternate/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_26_alternate/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_26_alternate/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_26_alternate/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_26_alternate/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_26_alternate/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_26_alternate/mastery-3.png" part="tree" sha1="ba9c16a9b3608bd2c7f82ab2f8c679700a75eea3" />
<File name="TreeData/3_26_alternate/mastery-active-effect-3.png" part="tree" sha1="dc238fef8a7c69c5b2b41a16008418c390aace25" />
<File name="TreeData/3_26_alternate/mastery-active-selected-3.png" part="tree" sha1="636f19b9efa0c7d106d24c4c43b93684d5f9bf3d" />
<File name="TreeData/3_26_alternate/mastery-connected-3.png" part="tree" sha1="6de05de82a4916ca9e492071ae7533c529ac4b60" />
<File name="TreeData/3_26_alternate/mastery-disabled-3.png" part="tree" sha1="b5f14579abd5a52fc761ba0d013f1a4b2253b611" />
<File name="TreeData/3_26_alternate/skills-3.jpg" part="tree" sha1="142788c23289a60ca1cbbd9ea8413e030999b068" />
<File name="TreeData/3_26_alternate/skills-disabled-3.jpg" part="tree" sha1="cc15193961b4a31055eb46b33b27b57bf09b8098" />
<File name="TreeData/3_26_alternate/sprites.lua" part="tree" sha1="93fd965ee0b2e668eb8277dbc7f5e2233ce94d99" />
<File name="TreeData/3_26_alternate/tattoo-active-effect-3.png" part="tree" sha1="8d1f8944f2f92f48c42522f1a34b9deea83fdf25" />
<File name="TreeData/3_26_alternate/tree.lua" part="tree" sha1="be673cd933f1e8d5c7d6180137feee96375bef35" />
<File name="TreeData/3_26_ruthless/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_26_ruthless/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_26_ruthless/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_26_ruthless/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_26_ruthless/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_26_ruthless/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_26_ruthless/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_26_ruthless/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_26_ruthless/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_26_ruthless/mastery-3.png" part="tree" sha1="ba9c16a9b3608bd2c7f82ab2f8c679700a75eea3" />
<File name="TreeData/3_26_ruthless/mastery-active-effect-3.png" part="tree" sha1="dc238fef8a7c69c5b2b41a16008418c390aace25" />
<File name="TreeData/3_26_ruthless/mastery-active-selected-3.png" part="tree" sha1="636f19b9efa0c7d106d24c4c43b93684d5f9bf3d" />
<File name="TreeData/3_26_ruthless/mastery-connected-3.png" part="tree" sha1="6de05de82a4916ca9e492071ae7533c529ac4b60" />
<File name="TreeData/3_26_ruthless/mastery-disabled-3.png" part="tree" sha1="b5f14579abd5a52fc761ba0d013f1a4b2253b611" />
<File name="TreeData/3_26_ruthless/skills-3.jpg" part="tree" sha1="142788c23289a60ca1cbbd9ea8413e030999b068" />
<File name="TreeData/3_26_ruthless/skills-disabled-3.jpg" part="tree" sha1="cc15193961b4a31055eb46b33b27b57bf09b8098" />
<File name="TreeData/3_26_ruthless/sprites.lua" part="tree" sha1="93fd965ee0b2e668eb8277dbc7f5e2233ce94d99" />
<File name="TreeData/3_26_ruthless/tattoo-active-effect-3.png" part="tree" sha1="8d1f8944f2f92f48c42522f1a34b9deea83fdf25" />
<File name="TreeData/3_26_ruthless/tree.lua" part="tree" sha1="e8b8993d61e936461922bc3f62c99cd866673112" />
<File name="TreeData/3_26_ruthless_alternate/ascendancy-3.png" part="tree" sha1="caed47911e769df545a764fd5e81748f02a200c4" />
<File name="TreeData/3_26_ruthless_alternate/ascendancy-background-3.jpg" part="tree" sha1="7c2d1bf35472dcf931a6b60cca7441dde5f5a837" />
<File name="TreeData/3_26_ruthless_alternate/ascendancy-background-3.png" part="tree" sha1="b7ae547eb114a95048bee06578a821f81aba770b" />
<File name="TreeData/3_26_ruthless_alternate/background-3.png" part="tree" sha1="be530e9012afe953967420ef2aab06db68fbf341" />
<File name="TreeData/3_26_ruthless_alternate/frame-3.png" part="tree" sha1="523092448a1cdf8364abd9df20000c23c982d544" />
<File name="TreeData/3_26_ruthless_alternate/group-background-3.png" part="tree" sha1="b0aa020c855beabb2f7c47d00241379b1ec6de0a" />
<File name="TreeData/3_26_ruthless_alternate/jewel-3.png" part="tree" sha1="758ae69e9644926fc8f4b60b45a77a438305d99a" />
<File name="TreeData/3_26_ruthless_alternate/jewel-radius.png" part="tree" sha1="6f10b1a56349d14fba4247cb399f09771ae92be7" />
<File name="TreeData/3_26_ruthless_alternate/line-3.png" part="tree" sha1="2e4698a40a457f13ac69ba2505acaf574efcc1a5" />
<File name="TreeData/3_26_ruthless_alternate/mastery-3.png" part="tree" sha1="ba9c16a9b3608bd2c7f82ab2f8c679700a75eea3" />
<File name="TreeData/3_26_ruthless_alternate/mastery-active-effect-3.png" part="tree" sha1="dc238fef8a7c69c5b2b41a16008418c390aace25" />
<File name="TreeData/3_26_ruthless_alternate/mastery-active-selected-3.png" part="tree" sha1="636f19b9efa0c7d106d24c4c43b93684d5f9bf3d" />
<File name="TreeData/3_26_ruthless_alternate/mastery-connected-3.png" part="tree" sha1="6de05de82a4916ca9e492071ae7533c529ac4b60" />
<File name="TreeData/3_26_ruthless_alternate/mastery-disabled-3.png" part="tree" sha1="b5f14579abd5a52fc761ba0d013f1a4b2253b611" />
<File name="TreeData/3_26_ruthless_alternate/skills-3.jpg" part="tree" sha1="142788c23289a60ca1cbbd9ea8413e030999b068" />
<File name="TreeData/3_26_ruthless_alternate/skills-disabled-3.jpg" part="tree" sha1="cc15193961b4a31055eb46b33b27b57bf09b8098" />
<File name="TreeData/3_26_ruthless_alternate/sprites.lua" part="tree" sha1="93fd965ee0b2e668eb8277dbc7f5e2233ce94d99" />
<File name="TreeData/3_26_ruthless_alternate/tattoo-active-effect-3.png" part="tree" sha1="8d1f8944f2f92f48c42522f1a34b9deea83fdf25" />
<File name="TreeData/3_26_ruthless_alternate/tree.lua" part="tree" sha1="b2f06d98c8eb81fdee7107438f0c6f105cbe0086" />
<File name="TreeData/AmberOil.png" part="tree" sha1="2fd670aeee1c39ae99eef78cc351f9f7fbc091bc" />
<File name="TreeData/AscendancyButton.png" part="tree" sha1="60d0e1334840a6f143b4c3cbe7f0675709701691" />
<File name="TreeData/AscendancyButtonHighlight.png" part="tree" sha1="fcb6cd198a3b85c3b08623591bc0ba6d0ba4b991" />
<File name="TreeData/AscendancyButtonPressed.png" part="tree" sha1="0fd975cf9d1c22276c06e9905cae12c8fff8b417" />
<File name="TreeData/AscendancyFrameLargeAllocated.png" part="tree" sha1="3d13ba17db0f61b20d737c703414ff0263c2a1dc" />
<File name="TreeData/AscendancyFrameLargeCanAllocate.png" part="tree" sha1="e11c24a1cb92489c9f29eb6a48a4927d2cc854f4" />
<File name="TreeData/AscendancyFrameLargeNormal.png" part="tree" sha1="2560b194a15c342ec93ca8cfeba3a719229b48c8" />
<File name="TreeData/AscendancyFrameSmallAllocated.png" part="tree" sha1="6dcd147b904c470af0a66412e7184ad03eba462b" />
<File name="TreeData/AscendancyFrameSmallCanAllocate.png" part="tree" sha1="a67ab7791d2058b4322039f42b4ff49214fbcbb7" />
<File name="TreeData/AscendancyFrameSmallNormal.png" part="tree" sha1="76574b733671962c07d4a6974abc6403ad764ab0" />
<File name="TreeData/AscendancyMiddle.png" part="tree" sha1="fa33df0224c4f48c90f170cbe3c1382a5ec07642" />
<File name="TreeData/AzmeriAscendancyFrameLargeAllocated.png" part="tree" sha1="153ee339b837b7c2e570cb1673e8076ff8f34545" />
<File name="TreeData/AzmeriAscendancyFrameLargeCanAllocate.png" part="tree" sha1="6b8d8de45ec6fa101efeb0e5b3d9111aa6aa8192" />
<File name="TreeData/AzmeriAscendancyFrameLargeNormal.png" part="tree" sha1="9fa77cf0e0080ab1f71503f448b5b6e3d756a51c" />
<File name="TreeData/AzmeriAscendancyFrameSmallAllocated.png" part="tree" sha1="ae7f2d1b88e11f77dccb504d959e71bad90fb339" />
<File name="TreeData/AzmeriAscendancyFrameSmallCanAllocate.png" part="tree" sha1="0673c937dba9041c6345d3ef51cd61387750e1e3" />
<File name="TreeData/AzmeriAscendancyFrameSmallNormal.png" part="tree" sha1="c4327a07f5dd04192b78ca47c2ec8f2271023623" />
<File name="TreeData/AzmeriAscendancyMiddle.png" part="tree" sha1="f7128d54f417967871e1f1f5347c2446aa41d39c" />
<File name="TreeData/AzmeriJewelFrameAllocated.png" part="tree" sha1="0e6ed20722c86cf75064ab6e0937e6082137b629" />
<File name="TreeData/AzmeriJewelFrameCanAllocate.png" part="tree" sha1="bd1c55ae05befb1aa5556a65f9d3262a9d82f4b9" />
<File name="TreeData/AzmeriJewelFrameUnallocated.png" part="tree" sha1="3d04638ddb43350769dc667cad18b0a8be3dabb6" />
<File name="TreeData/AzureOil.png" part="tree" sha1="eec575d9afbc63dfe674e48847cd904b56217da4" />
<File name="TreeData/Background1.png" part="tree" sha1="5ca14dfc325b1875d8fc50676766cbcc8607cee4" />
<File name="TreeData/Background2.png" part="tree" sha1="d42c7cfd18a119280b3b4eb747095f79e9abba15" />
<File name="TreeData/BackgroundDex.png" part="tree" sha1="a62eab7a2bd6e9c55d71b6c3b468e16991788ebf" />
<File name="TreeData/BackgroundDexInt.png" part="tree" sha1="8e4505a50daf80d55ab92dfc482fea03d0efbe9c" />
<File name="TreeData/BackgroundInt.png" part="tree" sha1="1d27eaf60b578247830e3ea4b1c75ad9f6a31cde" />
<File name="TreeData/BackgroundStr.png" part="tree" sha1="5d2fbcff5b012177c7cb3d60e65b0ed0f8496a3e" />
<File name="TreeData/BackgroundStrDex.png" part="tree" sha1="ace742515fb246d5e83a5bdf7f52d1c1e5f1bb0b" />
<File name="TreeData/BackgroundStrInt.png" part="tree" sha1="02e516da646da75ad6d68d391c95f58b28211eb2" />
<File name="TreeData/BlackOil.png" part="tree" sha1="4362c3ffc24fca10756118815105dc8f17e9c459" />
<File name="TreeData/BlightedNotableFrameAllocated.png" part="tree" sha1="623d10bc07da4ab626bb29aa862f59e01c21fe4a" />
<File name="TreeData/BlightedNotableFrameCanAllocate.png" part="tree" sha1="f2e0d3af59c602d1e05d4243b578d910d516da4f" />
<File name="TreeData/BlightedNotableFrameUnallocated.png" part="tree" sha1="d509753cbfd2dad5faeef687e654ca6aff8d8b95" />
<File name="TreeData/centerduelist.png" part="tree" sha1="1c7494f3771b3b9c91a03ffe50c7f018f967c684" />
<File name="TreeData/centermarauder.png" part="tree" sha1="2188a9ed5f122d9284d002dd628f2091bc196841" />
<File name="TreeData/centerranger.png" part="tree" sha1="54afada86d4cf2894af3bcaac9e6ccf509fd54bf" />
<File name="TreeData/centerscion.png" part="tree" sha1="f57437370e64ffc22bc754cddeb9a6a4f4497b41" />
<File name="TreeData/centershadow.png" part="tree" sha1="578e4fa9762261762be2714572edc436e0adddea" />
<File name="TreeData/centertemplar.png" part="tree" sha1="55bf345efacbf3e08a18d2e44e51beffffbb2a95" />
<File name="TreeData/centerwitch.png" part="tree" sha1="d333706ca7a10f998d6b5240c679e598a60edf90" />
<File name="TreeData/CharmSocketActiveDex.png" part="tree" sha1="88186ac7ef35edccc01d809f228ec3e4782bbc0b" />
<File name="TreeData/CharmSocketActiveInt.png" part="tree" sha1="8c751c2452922a399f8e66210e3d08a36ef00549" />
<File name="TreeData/CharmSocketActiveStr.png" part="tree" sha1="d13f319cc3206dcb0cdea13d0f6d1e39be40c86a" />
<File name="TreeData/ClassesAscendant.png" part="tree" sha1="30c010e605c6b5bdc9f22c43330bee360e6bc98b" />
<File name="TreeData/ClassesAssassin.png" part="tree" sha1="680948488f95027f182ea4b7eefd12f66e26e173" />
<File name="TreeData/ClassesBerserker.png" part="tree" sha1="0f2c9b5752ea8d9115d713f79305f2347d5bc943" />
<File name="TreeData/ClassesChampion.png" part="tree" sha1="9065bc7b37deaa3f3bc9fdef8ba2047ea44002e6" />
<File name="TreeData/ClassesChieftain.png" part="tree" sha1="65fad45b4b4ddcb9118ebb9dd63c60f7d0586d3e" />
<File name="TreeData/ClassesDeadeye.png" part="tree" sha1="20be006424044f91d3a7eb8c80fc1b695f033cc9" />
<File name="TreeData/ClassesElementalist.png" part="tree" sha1="8d42b88c7f63f16ed8516234940a9cb6af6d2d65" />
<File name="TreeData/ClassesGladiator.png" part="tree" sha1="4b89078a1b34d204aadd59e1c284bc6b1a3d6271" />
<File name="TreeData/ClassesGuardian.png" part="tree" sha1="9fa535b0c3e6e21b2a18333d6eddcfb323be1cda" />
<File name="TreeData/ClassesHierophant.png" part="tree" sha1="330ea3e4afda54e826a251b9bb6d3c5589551be3" />
<File name="TreeData/ClassesInquisitor.png" part="tree" sha1="a949301f0c852c54c8dce465249b648d4d3ae285" />
<File name="TreeData/ClassesJuggernaut.png" part="tree" sha1="3ac5920d583e885758dc9f0434a3dde91273ccc2" />
<File name="TreeData/ClassesNecromancer.png" part="tree" sha1="50d4b793b1150b54d9805e4c4b68080fc79d1e1e" />
<File name="TreeData/ClassesOccultist.png" part="tree" sha1="c21c3fb8a472454edbb99e3377b90299bd54ebfa" />
<File name="TreeData/ClassesPathfinder.png" part="tree" sha1="c65dd580ac2583737829eac55fe4d9ec552648c1" />
<File name="TreeData/ClassesPrimalist.png" part="tree" sha1="cec4eca4ff4704a24fa459cb7787920038b19f26" />
<File name="TreeData/ClassesRaider.png" part="tree" sha1="f755c1a3d1e47c847ef096bd4ad019c5ef50f880" />
<File name="TreeData/ClassesSaboteur.png" part="tree" sha1="c5cef3aaba22f472fd032b6531ae672722ed9002" />
<File name="TreeData/ClassesSlayer.png" part="tree" sha1="4a245709feb0f5aeca64e3407a4ac76b72cf3163" />
<File name="TreeData/ClassesTrickster.png" part="tree" sha1="66799e65d7c68ec371e45781c44e857c28276bce" />
<File name="TreeData/ClassesWarden.png" part="tree" sha1="847fe86c5671c5839afad84ca0c4d814ef291884" />
<File name="TreeData/ClassesWarlock.png" part="tree" sha1="0a5476c9fbd3e1541b9011dfc76f24ebbc5f24f8" />
<File name="TreeData/ClearOil.png" part="tree" sha1="9319447ffae59ca9dbaf7b40ce130f193c746571" />
<File name="TreeData/CrimsonOil.png" part="tree" sha1="1fb94eb2f65c7b9b5395e2daf6c887f43bd0f4cd" />
<File name="TreeData/EternalEmpireJewelCircle1.png" part="tree" sha1="5ff686f46e7798c11e835a83027039d0c14ba3f4" />
<File name="TreeData/EternalEmpireJewelCircle2.png" part="tree" sha1="578b54ff2208f9387d52e40b78fc533e9978ee97" />
<File name="TreeData/GoldenOil.png" part="tree" sha1="8475b6862fbc2a8b11fff241ff3390b76aba5f8b" />
<File name="TreeData/GroupBackgroundLargeHalfAlt.png" part="tree" sha1="de51eab5094586b2ab5e369b5a845713ceba0149" />
<File name="TreeData/GroupBackgroundMediumAlt.png" part="tree" sha1="fdb250610ea0f6b7d19f6c4a8b55158f43c84fab" />
<File name="TreeData/GroupBackgroundSmallAlt.png" part="tree" sha1="2bcdea282eaa55f2cefdebb3af54cdebd3488221" />
<File name="TreeData/imgPSFadeCorner.png" part="tree" sha1="b74e007cd3c61059f3a4e303c7caf34f15e2cad3" />
<File name="TreeData/imgPSFadeSide.png" part="tree" sha1="e27bb4ab38d3865f8bb7c5dd46f0dcc53a599a26" />
<File name="TreeData/IndigoOil.png" part="tree" sha1="92cba0521ea4eac6fb1b3fc75a0c1d45c6e676c5" />
<File name="TreeData/JewelCircle1.png" part="tree" sha1="ed2b4dfdb469433632e59738efc1319f462a3670" />
<File name="TreeData/JewelCircle1Inverse.png" part="tree" sha1="9cd9f26f4271b99a514e5771bf6f87f6261b5133" />
<File name="TreeData/JewelFrameAllocated.png" part="tree" sha1="d0f946ce6d138909ebb4f1341b29d32c74df7718" />
<File name="TreeData/JewelFrameCanAllocate.png" part="tree" sha1="a8b2f840cdde3a8821ca1790a5109d9abd0e3f32" />
<File name="TreeData/JewelFrameUnallocated.png" part="tree" sha1="aa457e8183c9f805992027512d8879cda5538d72" />
<File name="TreeData/JewelSocketActiveAbyss.png" part="tree" sha1="4f675d3e44ee8f989fb0164a3c6e87c580374c45" />
<File name="TreeData/JewelSocketActiveAbyssAlt.png" part="tree" sha1="f376d0700aa55e12af6a547025f096c39b3d5d48" />
<File name="TreeData/JewelSocketActiveAltBlue.png" part="tree" sha1="e960df28e43119c60b86281d0dd584be9a57e285" />
<File name="TreeData/JewelSocketActiveAltPurple.png" part="tree" sha1="8e4d77dee8048b8da4d9556c7a6c51a69a231670" />
<File name="TreeData/JewelSocketActiveAltRed.png" part="tree" sha1="1aa3d97654fc0c09856d9668aceb1fbc50af8c83" />
<File name="TreeData/JewelSocketActiveBlue.png" part="tree" sha1="39796196dc48f0a5cfd648d6b87631960c165891" />
<File name="TreeData/JewelSocketActiveBlueAlt.png" part="tree" sha1="6a10f1e1eb0400ef81057467fc38cca719b52418" />
<File name="TreeData/JewelSocketActiveGreen.png" part="tree" sha1="c0e4c8192a0593e2174152412c1744897c4dc79b" />
<File name="TreeData/JewelSocketActiveGreenAlt.png" part="tree" sha1="1842721b8ea21b4a591c40be9756d46068f9fdd0" />
<File name="TreeData/JewelSocketActiveLegion.png" part="tree" sha1="78c4efa11be1783af1649f1917f29c30ee82300c" />
<File name="TreeData/JewelSocketActiveLegionAlt.png" part="tree" sha1="02b0f4e8d7a2e1c0038327582099a1667095cfa8" />
<File name="TreeData/JewelSocketActivePrismatic.png" part="tree" sha1="333bbd5ec8e58dbc37958fb5c5cb4cbc70df1cb8" />
<File name="TreeData/JewelSocketActivePrismaticAlt.png" part="tree" sha1="fe83b21f238dd03788a1d7ebff9b572970cf27ee" />
<File name="TreeData/JewelSocketActiveRed.png" part="tree" sha1="32487978b9c0ec456b8a4b8f189c84d3c86ae21c" />
<File name="TreeData/JewelSocketActiveRedAlt.png" part="tree" sha1="9c236bad2d8f7c45d295d59466bf2d01ebbf0c2e" />
<File name="TreeData/JewelSocketActiveTimeless.png" part="tree" sha1="abed5c654cb450aac8ab1c9bef5d1377a7b18d67" />
<File name="TreeData/JewelSocketAltActive.png" part="tree" sha1="3fdaca72ea72173b4f54ad32ddf2d627ed1faefa" />
<File name="TreeData/JewelSocketAltCanAllocate.png" part="tree" sha1="691b66d167a37b9c00392fd047b1949635611527" />
<File name="TreeData/JewelSocketAltNormal.png" part="tree" sha1="6bc256ab46f67b26c5c51aaa30d85bca42baa4d4" />
<File name="TreeData/JewelSocketClusterAltCanAllocate1Large.png" part="tree" sha1="bacfc3363c4266123f6b55e4e701e62590da24b0" />
<File name="TreeData/JewelSocketClusterAltCanAllocate1Medium.png" part="tree" sha1="e9d89e2142ee68d6ec0bd828d508bc1b08777e5e" />
<File name="TreeData/JewelSocketClusterAltCanAllocate1Small.png" part="tree" sha1="3c296d18df70dd1920cf0956e25975fdc8cba5f3" />
<File name="TreeData/JewelSocketClusterAltNormal1Large.png" part="tree" sha1="731b1fa4a776520d342e783fc5934782dbe22090" />
<File name="TreeData/JewelSocketClusterAltNormal1Medium.png" part="tree" sha1="eb1c39beec586c6814c55c289e4164f8256e576e" />
<File name="TreeData/JewelSocketClusterAltNormal1Small.png" part="tree" sha1="6877504dcd6900f7b6218d35ecdab49b818a261d" />
<File name="TreeData/KaruiJewelCircle1.png" part="tree" sha1="662633c5424b325983f3d9ad50ce35e9390c0218" />
<File name="TreeData/KaruiJewelCircle2.png" part="tree" sha1="a25f741e0423354300b4e550e9cd57eb29d1a99f" />
<File name="TreeData/KeystoneFrameAllocated.png" part="tree" sha1="a7ec147315e57e95d8440a14920c852f15c0cdcf" />
<File name="TreeData/KeystoneFrameCanAllocate.png" part="tree" sha1="56bb163714febf13463baf12bd758739a57e6a70" />
<File name="TreeData/KeystoneFrameUnallocated.png" part="tree" sha1="d424ac607ea6c2696b5e27f6a566e47c772072cd" />
<File name="TreeData/legion/skills-additional-3.jpg" part="tree" sha1="b98c0a2b9ac6dd585450789e2b53437e246592bf" />
<File name="TreeData/legion/skills-additional-disabled-3.jpg" part="tree" sha1="988e3d5a1b489fb8ae4eb3647f32fec689c6eddb" />
<File name="TreeData/legion/tree-legion.lua" part="tree" sha1="3b57c9eae4553c66407b8ce4981aca5c06c7ad92" />
<File name="TreeData/LineConnectorActive.png" part="tree" sha1="1c743489dae753c10e9395ca15f6775e49e623a0" />
<File name="TreeData/LineConnectorIntermediate.png" part="tree" sha1="f6a12a47d663a26fa9e51c44c5bee9a906e1af73" />
<File name="TreeData/LineConnectorNormal.png" part="tree" sha1="f2b009c3e735a4a456977f0b06faed633aea1635" />
<File name="TreeData/MarakethJewelCircle1.png" part="tree" sha1="2e6dd08eed2b3f68b14063541f08a0ff95750c46" />
<File name="TreeData/MarakethJewelCircle2.png" part="tree" sha1="af822f164d05c035c4ffa3d5035e4cd6fe67f678" />
<File name="TreeData/NotableFrameAllocated.png" part="tree" sha1="e0c01cd83cc50dd333d11299b29ddc02ff8c20aa" />
<File name="TreeData/NotableFrameCanAllocate.png" part="tree" sha1="87973c184c904a4f7655d12cfd695d13c4108ab0" />
<File name="TreeData/NotableFrameUnallocated.png" part="tree" sha1="b897b879edcb1f0f73ff8609926fc9ff0fa2da5f" />
<File name="TreeData/OpalescentOil.png" part="tree" sha1="ec857841ed5837c87e873de187502d77a77664ea" />
<File name="TreeData/Orbit1Active.png" part="tree" sha1="6c762b8fed697771114fed94c260643f1fda75ea" />
<File name="TreeData/Orbit1Intermediate.png" part="tree" sha1="1fdfa55f70a3404435b70a154813f9daf44af6f0" />
<File name="TreeData/Orbit1Normal.png" part="tree" sha1="315aad48e6886b49d45cc76a8dfd172508d6d737" />
<File name="TreeData/Orbit2Active.png" part="tree" sha1="dc233d911c271982e8cc692492c4a5335edba69a" />
<File name="TreeData/Orbit2Intermediate.png" part="tree" sha1="1ceede85be616351e856108a5e49dc8637daeebe" />
<File name="TreeData/Orbit2Normal.png" part="tree" sha1="dfd66a02f3dae87eae9f245c48978085de45a7ba" />
<File name="TreeData/Orbit3Active.png" part="tree" sha1="c3ca9d3f8892ffe295e952d8e476b5d688dee8ac" />
<File name="TreeData/Orbit3Intermediate.png" part="tree" sha1="1190bd91f89845c8a2bbf7eff15b9f8c8e3e3884" />
<File name="TreeData/Orbit3Normal.png" part="tree" sha1="fba8ad863046297cb982bc96514fc58b99c7d2f0" />
<File name="TreeData/Orbit4Active.png" part="tree" sha1="c5b6faf95cf819bc84e3abb7d212f53210372fa5" />
<File name="TreeData/Orbit4Intermediate.png" part="tree" sha1="ce337f314f0b69fb441d1861e00ac702d2261cfa" />
<File name="TreeData/Orbit4Normal.png" part="tree" sha1="208638cbd1c482d035dc249774d0141328b78d7b" />
<File name="TreeData/Orbit5Active.png" part="tree" sha1="a0fcd97482116b0c0d5321b9f63dbcf77b647e9c" />
<File name="TreeData/Orbit5Intermediate.png" part="tree" sha1="03595348ee1ae534d770419fd8cc59b628d464ba" />
<File name="TreeData/Orbit5Normal.png" part="tree" sha1="f86312e0df861d513562353320da2ab4c5a0fd71" />
<File name="TreeData/Orbit6Active.png" part="tree" sha1="dab85883e0a82bf5f5ca6c09014b2eb003bbebfd" />
<File name="TreeData/Orbit6Intermediate.png" part="tree" sha1="f299091746a297c69d28020b53d854ff91157a93" />
<File name="TreeData/Orbit6Normal.png" part="tree" sha1="58bd59fda0cdc1c7504a6093ff9041080588d654" />
<File name="TreeData/PassiveSkillScreenAscendancyButton.png" part="tree" sha1="570f34a29da650e6d6781890db7ff5d5a8dd18be" />
<File name="TreeData/PassiveSkillScreenAscendancyButtonHighlight.png" part="tree" sha1="c24ff0df6d4a5228dd46d29b49fe1b68d1133e48" />
<File name="TreeData/PassiveSkillScreenAscendancyButtonPressed.png" part="tree" sha1="bfdf7398d89e94ade00ee3a35e12827f2933465b" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameLargeAllocated.png" part="tree" sha1="f7a5a410f5bf598e7d5363604dd8875db062453f" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameLargeCanAllocate.png" part="tree" sha1="15774c60f76ec5c3d390b261abb8d19647fe75d7" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameLargeNormal.png" part="tree" sha1="5c2f1bc140b0fb7afdf78bf8c3bd9e7651cababc" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameSmallAllocated.png" part="tree" sha1="d914bdfc4a1a63daff44bbae550ba8d1fdfefaa4" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameSmallCanAllocate.png" part="tree" sha1="81e9df4424a49c38ab55767434078690e35a0d1c" />
<File name="TreeData/PassiveSkillScreenAscendancyFrameSmallNormal.png" part="tree" sha1="58caea3a42eadf821e2dae5b7ed4e236e07c700f" />
<File name="TreeData/PassiveSkillScreenAscendancyMiddle.png" part="tree" sha1="7bad658a6a0140d747c7f403d73b1fe6b8b3939e" />
<File name="TreeData/PassiveSkillScreenEternalEmpireJewelCircle1.png" part="tree" sha1="176d82b2b3cef255d96233bf0d3cc6f52856a10d" />
<File name="TreeData/PassiveSkillScreenEternalEmpireJewelCircle2.png" part="tree" sha1="4608694066030f98d03f12bb4c0f8637bb67ff50" />
<File name="TreeData/PassiveSkillScreenJewelCircle1.png" part="tree" sha1="61eb7f289f38b87cf92a6ab08110c70e9ea76a22" />
<File name="TreeData/PassiveSkillScreenKaruiJewelCircle1.png" part="tree" sha1="b482fde617eee347a5eaae7f59214374776d18ce" />
<File name="TreeData/PassiveSkillScreenKaruiJewelCircle2.png" part="tree" sha1="6ab37a27f6682d7dc1663d33e0d72cb2be9dc186" />
<File name="TreeData/PassiveSkillScreenMarakethJewelCircle1.png" part="tree" sha1="43146cfe341910d2bc3344335bb941ed051bfc59" />
<File name="TreeData/PassiveSkillScreenMarakethJewelCircle2.png" part="tree" sha1="c374c6df84a3722f1e76736efd4c319663a41c43" />
<File name="TreeData/PassiveSkillScreenTemplarJewelCircle1.png" part="tree" sha1="278c73cb6fc8cf570624495272ef261959b6582f" />
<File name="TreeData/PassiveSkillScreenTemplarJewelCircle2.png" part="tree" sha1="b0ea15b6228a293c152d3fe4a0d087a5ca6a32f8" />
<File name="TreeData/PassiveSkillScreenVaalJewelCircle1.png" part="tree" sha1="4ab002b077e40968738c0cfaef99c409e2fc65a5" />
<File name="TreeData/PassiveSkillScreenVaalJewelCircle2.png" part="tree" sha1="98fe9b58bbd2b17c71baf9e1d769bfe5bc056f99" />
<File name="TreeData/PrismaticOil.png" part="tree" sha1="d9784aa11e251ed4b90505df4581f4efbf077237" />
<File name="TreeData/PSGroupBackground1.png" part="tree" sha1="fddf3f37d9a661a14eb8c00914c9a4b50a0005dd" />
<File name="TreeData/PSGroupBackground2.png" part="tree" sha1="6172580c6a143274487cb1b0fee6fe5d3babf7e3" />
<File name="TreeData/PSGroupBackground3.png" part="tree" sha1="c1921ff01a66d345945cfb4e8562d2878dbf8e95" />
<File name="TreeData/PSLineDeco.png" part="tree" sha1="5585d3d7fd7ac8f946c52111f24f09880b5c2413" />
<File name="TreeData/PSLineDecoHighlighted.png" part="tree" sha1="8e0d7b6c12f27218e8c3a86f96b8390582d2bc63" />
<File name="TreeData/PSPointsFrame.png" part="tree" sha1="276149031e29550b668a195b10fa68b02178211d" />
<File name="TreeData/PSSkillFrame.png" part="tree" sha1="82fbfcd4d9c7b61464614f69aeeb6912712b7dde" />
<File name="TreeData/PSSkillFrameActive.png" part="tree" sha1="e820f2fd0187c7fb5e255b89a53115fd25847831" />
<File name="TreeData/PSSkillFrameHighlighted.png" part="tree" sha1="876508200ac2043ec9af17cc0d34382b990480e9" />
<File name="TreeData/PSStartNodeBackgroundInactive.png" part="tree" sha1="d04c106596d6b7a67d17cdecb1dd6850142ac6cd" />
<File name="TreeData/SepiaOil.png" part="tree" sha1="bdb1e7d716599d5cd1b6fb5f4c919cb7cab24530" />
<File name="TreeData/SilverOil.png" part="tree" sha1="9120b5adf5a4c5e4162798b50e1c4c70735e1288" />
<File name="TreeData/TealOil.png" part="tree" sha1="b520f0814555df5b7f9ac9d2831cace63e4f822e" />
<File name="TreeData/TemplarJewelCircle1.png" part="tree" sha1="610b42ac157bca85247b81a534427f9fa80253c4" />
<File name="TreeData/TemplarJewelCircle2.png" part="tree" sha1="4778a3c3acc8c4d32b8cd677be0e2db7d32bb0f6" />
<File name="TreeData/VaalJewelCircle1.png" part="tree" sha1="a84d7a44d160e1480a3036b547de3ae2153a0c52" />
<File name="TreeData/VaalJewelCircle2.png" part="tree" sha1="facc5d2fea2f0027d09fdb6e4692f9f298aff293" />
<File name="TreeData/VerdantOil.png" part="tree" sha1="97e77b6e96accf440c17a81d622bf629b8c78fe7" />
<File name="TreeData/VioletOil.png" part="tree" sha1="1e9e4f0683a5156c27cb7ddafada8bed877e1c25" />
</PoBVersion>
+301
View File
@@ -0,0 +1,301 @@
#@
-- Path of Building
--
-- Module: Update Check
-- Checks for updates
--
local connectionProtocol, proxyURL = ...
local xml = require("xml")
local sha1 = require("sha1")
local curl = require("lcurl.safe")
local lzip = require("lzip")
local globalRetryLimit = 10
local function downloadFileText(source, file)
for i = 1, 5 do
if i > 1 then
ConPrintf("Retrying... (%d of 5)", i)
end
local text = ""
local easy = curl.easy()
local escapedUrl = source..easy:escape(file)
easy:setopt_url(escapedUrl)
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
if connectionProtocol then
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
end
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
easy:setopt_writefunction(function(data)
text = text..data
return true
end)
local _, error = easy:perform()
easy:close()
if not error then
return text
end
ConPrintf("Download failed (%s)", error:msg())
if globalRetryLimit == 0 or i == 5 then
return nil, error:msg()
end
globalRetryLimit = globalRetryLimit - 1
end
end
local function downloadFile(source, file, outName)
for i = 1, 5 do
if i > 1 then
ConPrintf("Retrying... (%d of 5)", i)
end
local easy = curl.easy()
local escapedUrl = source..easy:escape(file)
easy:setopt_url(escapedUrl)
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
if connectionProtocol then
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
end
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end
local file = io.open(outName, "wb+")
easy:setopt_writefunction(file)
local _, error = easy:perform()
easy:close()
file:close()
if not error then
return true
end
ConPrintf("Download failed (%s)", error:msg())
if globalRetryLimit == 0 or i == 5 then
return nil, error:msg()
end
globalRetryLimit = globalRetryLimit - 1
end
return true
end
ConPrintf("Checking for update...")
-- Use built-in helpers to obtain absolute paths without spawning a shell.
local scriptPath = (GetScriptPath and GetScriptPath()) or "."
local runtimePath = (GetRuntimePath and GetRuntimePath()) or scriptPath
-- Load and process local manifest
local localVer
local localPlatform, localBranch
local localFiles = { }
local localManXML = xml.LoadXMLFile(scriptPath.."/manifest.xml")
local localSource
if localManXML and localManXML[1].elem == "PoBVersion" then
for _, node in ipairs(localManXML[1]) do
if type(node) == "table" then
if node.elem == "Version" then
localVer = node.attrib.number
localPlatform = node.attrib.platform
localBranch = node.attrib.branch
elseif node.elem == "Source" then
if node.attrib.part == "default" then
localSource = node.attrib.url
end
elseif node.elem == "File" then
local fullPath
node.attrib.name = node.attrib.name:gsub("{space}", " ")
fullPath = scriptPath .. "/" .. node.attrib.name
localFiles[node.attrib.name] = { sha1 = node.attrib.sha1, part = node.attrib.part, platform = node.attrib.platform, fullPath = fullPath }
end
end
end
end
if not localVer or not localSource or not localBranch or not next(localFiles) then
ConPrintf("Update check failed: invalid local manifest")
return nil, "Invalid local manifest"
end
localSource = localSource:gsub("{branch}", localBranch)
-- Download and process remote manifest
local remoteVer
local remoteFiles = { }
local remoteSources = { }
local remoteManText, errMsg = downloadFileText(localSource, "manifest.xml")
if not remoteManText then
ConPrintf("Update check failed: couldn't download version manifest")
return nil, "Couldn't download version manifest.\nReason: "..errMsg.."\nCheck your internet connectivity.\nIf you are using a proxy, specify it in Options."
end
local remoteManXML = xml.ParseXML(remoteManText)
if remoteManXML and remoteManXML[1].elem == "PoBVersion" then
for _, node in ipairs(remoteManXML[1]) do
if type(node) == "table" then
if node.elem == "Version" then
remoteVer = node.attrib.number
elseif node.elem == "Source" then
if not remoteSources[node.attrib.part] then
remoteSources[node.attrib.part] = { }
end
remoteSources[node.attrib.part][node.attrib.platform or "any"] = node.attrib.url
elseif node.elem == "File" then
if not node.attrib.platform or node.attrib.platform == localPlatform then
local fullPath
fullPath = scriptPath .. "/" .. node.attrib.name
remoteFiles[node.attrib.name] = { sha1 = node.attrib.sha1, part = node.attrib.part, platform = node.attrib.platform, fullPath = fullPath }
end
end
end
end
end
if not remoteVer or not next(remoteSources) or not next(remoteFiles) then
ConPrintf("Update check failed: invalid remote manifest")
return nil, "Invalid remote manifest"
end
-- Build lists of files to be updated or deleted
local updateFiles = { }
for name, data in pairs(remoteFiles) do
data.name = name
local sanitizedName = name:gsub("{space}", " ")
if (not localFiles[name] or localFiles[name].sha1 ~= data.sha1) and (not localFiles[sanitizedName] or localFiles[sanitizedName].sha1 ~= data.sha1) then
table.insert(updateFiles, data)
elseif localFiles[name] then
local file = io.open(localFiles[name].fullPath, "rb")
if not file then
ConPrintf("Warning: '%s' doesn't exist, it will be re-downloaded", data.name)
table.insert(updateFiles, data)
else
local content = file:read("*a")
file:close()
if data.sha1 ~= sha1(content) and data.sha1 ~= sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Warning: Integrity check on '%s' failed, it will be replaced", data.name)
table.insert(updateFiles, data)
end
end
end
end
local deleteFiles = { }
for name, data in pairs(localFiles) do
data.name = name
local unSanitizedName = name:gsub(" ", "{space}")
if not remoteFiles[name] and not remoteFiles[unSanitizedName] then
table.insert(deleteFiles, data)
end
end
if #updateFiles == 0 and #deleteFiles == 0 then
ConPrintf("No update available.")
return "none"
end
MakeDir("Update")
ConPrintf("Downloading update...")
-- Download changelog
downloadFile(localSource, "changelog.txt", scriptPath.."/changelog.txt")
-- Download files that need updating
local failedFile = false
local zipFiles = { }
for index, data in ipairs(updateFiles) do
if UpdateProgress then
UpdateProgress("Downloading %d/%d", index, #updateFiles)
end
local partSources = remoteSources[data.part]
local source = partSources[localPlatform] or partSources["any"]
source = source:gsub("{branch}", localBranch)
local fileName = scriptPath.."/Update/"..data.name:gsub("[\\/]","{slash}")
data.updateFileName = fileName
local zipName = source:match("/([^/]+%.zip)$")
if zipName then
if not zipFiles[zipName] then
ConPrintf("Downloading %s...", zipName)
local zipFileName = scriptPath.."/Update/"..zipName
downloadFile(source, "", zipFileName)
zipFiles[zipName] = lzip.open(zipFileName)
end
local zip = zipFiles[zipName]
if zip then
local zippedFile = zip:OpenFile(data.name)
if zippedFile then
local file = io.open(fileName, "wb+")
file:write(zippedFile:Read("*a"))
file:close()
zippedFile:Close()
else
ConPrintf("Couldn't extract '%s' from '%s' (extract failed)", data.name, zipName)
end
else
ConPrintf("Couldn't extract '%s' from '%s' (zip open failed)", data.name, zipName)
end
else
local skipDownload
local file = io.open(fileName, "rb")
if file then
local content = file:read("*all")
if data.sha1 == sha1(content) or data.sha1 == sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Using file from previous update attempt '%s'", fileName)
skipDownload = true
end
file:close()
end
if not skipDownload then
ConPrintf("Downloading %s... (%d of %d)", data.name, index, #updateFiles)
downloadFile(source, data.name, fileName)
end
end
local file = io.open(fileName, "rb")
if not file then
failedFile = true
else
local content = file:read("*all")
if data.sha1 ~= sha1(content) and data.sha1 ~= sha1(content:gsub("\n", "\r\n")) then
ConPrintf("Hash mismatch on '%s'", fileName)
failedFile = true
end
file:close()
end
end
for name, zip in pairs(zipFiles) do
zip:Close()
os.remove(scriptPath.."/Update/"..name)
end
if failedFile then
ConPrintf("Update failed: one or more files couldn't be downloaded")
return nil, "One or more files couldn't be downloaded.\nCheck your internet connectivity,\nor try again later."
end
-- Create new manifest
localManXML = { elem = "PoBVersion" }
table.insert(localManXML, { elem = "Version", attrib = { number = remoteVer, platform = localPlatform, branch = localBranch } })
for part, platforms in pairs(remoteSources) do
for platform, url in pairs(platforms) do
table.insert(localManXML, { elem = "Source", attrib = { part = part, platform = platform ~= "any" and platform, url = url } })
end
end
for name, data in pairs(remoteFiles) do
table.insert(localManXML, { elem = "File", attrib = { name = data.name, sha1 = data.sha1, part = data.part, platform = data.platform } })
end
xml.SaveXMLFile(localManXML, scriptPath.."/Update/manifest.xml")
-- Build list of operations to apply the update
local updateMode = "normal"
local ops = { }
for _, data in pairs(updateFiles) do
-- Ensure that the destination path of this file exists
local dirStr = ""
for dir in data.fullPath:gmatch("([^/]*/)") do
dirStr = dirStr .. dir
MakeDir(dirStr)
end
table.insert(ops, 'move "'..data.updateFileName..'" "'..data.fullPath..'"')
end
for _, data in pairs(deleteFiles) do
table.insert(ops, 'delete "'..data.fullPath..'"')
end
table.insert(ops, 'move "'..scriptPath..'/Update/manifest.xml" "'..scriptPath..'/manifest.xml"')
-- Write operations file
local opFile = io.open(scriptPath.."/Update/opFile.txt", "w+")
opFile:write(table.concat(ops, "\n"))
opFile:close()
ConPrintf("Update is ready.")
return updateMode
+934
View File
@@ -0,0 +1,934 @@
<PoBVersion>
<Version number="0.12.2" branch="master" platform="any" />
<Source part="default" url="https://raw.githubusercontent.com/meehl/RustyPathOfBuilding/main/manifest/poe2/" />
<Source part="origin" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/" />
<Source part="runtime" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/runtime/" />
<Source part="program" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/src/" />
<Source part="tree" url="https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/{branch}/src/" />
<File name="changelog.txt" part="origin" sha1="1a60522e403d5d00cf750e81a2ca3bff52f7afce" />
<File name="help.txt" part="origin" sha1="eb788d20352333fad99bcf6092306f0c3bca3122" />
<File name="LICENSE.md" part="origin" sha1="e81bd01e60cdf8646f3308ec71fa0e8e638d544e" />
<File name="Assets/ascendancypassiveheaderleft.png" part="program" sha1="c1c73a71cc742de4f2964da78e9ed8841ab7039d" />
<File name="Assets/ascendancypassiveheadermiddle.png" part="program" sha1="7fdf2e33023dd056dc97aea1ff40326798b18acf" />
<File name="Assets/ascendancypassiveheaderright.png" part="program" sha1="cb86351a2240240752654f72f0178f95d63496cc" />
<File name="Assets/fractureditemsymbol.png" part="program" sha1="54c43aeda91e1e2e4f7928ff942a0cd40da9b0e4" />
<File name="Assets/game_ui_small.png" part="program" sha1="3e3f01a7c21ffe5ee7dfb644e9f3b7188c319d4d" />
<File name="Assets/icon_amulet.png" part="program" sha1="5979958dc0975fea63d57b15ef311ecda56f3fda" />
<File name="Assets/icon_belt.png" part="program" sha1="a6739f6a6d5ebb100ea57732227c2bb568483eb6" />
<File name="Assets/icon_body_armour.png" part="program" sha1="c5237359ed6ea5b81772b1d35029b757c87041cc" />
<File name="Assets/icon_boots.png" part="program" sha1="7e52b33f4c72802cf6b63056abe21e26719b857c" />
<File name="Assets/icon_bow.png" part="program" sha1="c0a5e9c8b8030b0f3f331782a0a161b901be0999" />
<File name="Assets/icon_gloves.png" part="program" sha1="9fe16986f5c2858b40149416e89f036a9e9582a0" />
<File name="Assets/icon_helmet.png" part="program" sha1="eb3271f3e9e94e2523ce2d0b90c6fd2b1c3e0435" />
<File name="Assets/icon_quiver.png" part="program" sha1="719bd6edc05f655ff5c7ec4a047dde34b6006e0e" />
<File name="Assets/icon_ring_left.png" part="program" sha1="01b88d06e8e505af62a776e818b77fb20a8661d6" />
<File name="Assets/icon_ring_right.png" part="program" sha1="dc1ab4a69f7199970a28cac489b0ba9aeeff028b" />
<File name="Assets/icon_shield.png" part="program" sha1="7ed6a0b926e593588daffc9149041cd817ca264c" />
<File name="Assets/icon_shield_swap.png" part="program" sha1="d82df8de7a60827d81007f141db5867eca080f8a" />
<File name="Assets/icon_weapon.png" part="program" sha1="24fd23457f7b609324ad5f5bb8cb576cc4a7c058" />
<File name="Assets/icon_weapon_2.png" part="program" sha1="10a946226cfe1832ff839b77c0d927d4be2bb43c" />
<File name="Assets/icon_weapon_2_swap.png" part="program" sha1="2e0ee90278daa40da9177e0658f2900c49a69127" />
<File name="Assets/icon_weapon_swap.png" part="program" sha1="2fe92098fb38157483928bad3a26c623d4fefae1" />
<File name="Assets/itemsheaderfoilleft.png" part="program" sha1="af947f23c93e750dd8a18701c9fbffbbfed4a86f" />
<File name="Assets/itemsheaderfoilmiddle.png" part="program" sha1="c1bc20f0a70a8ab6aa72643272db0b53ce9b792e" />
<File name="Assets/itemsheaderfoilright.png" part="program" sha1="39e4ca7291ec88481ad2b46465a615cedfe62ada" />
<File name="Assets/itemsheadergemleft.png" part="program" sha1="cac8cfbc1e0701183edc1ef9bb972aacc7b50735" />
<File name="Assets/itemsheadergemmiddle.png" part="program" sha1="09c3b7888a77034848d58c74ac4de23dcbd5b6fd" />
<File name="Assets/itemsheadergemright.png" part="program" sha1="ce879556e4b1d32b75e05419354fa4156b6f53bf" />
<File name="Assets/itemsheadermagicleft.png" part="program" sha1="a6418c0163ae2210b404738c5f7ccd9d74355eff" />
<File name="Assets/itemsheadermagicmiddle.png" part="program" sha1="3494a136711c55522d9cf08c4893373f7877c5c7" />
<File name="Assets/itemsheadermagicright.png" part="program" sha1="55ff3d655cd91571ba89cbe01109516fcd9f971d" />
<File name="Assets/itemsheaderrareleft.png" part="program" sha1="2af93dd7eecceb140446cd37fa770e76a574c8dd" />
<File name="Assets/itemsheaderraremiddle.png" part="program" sha1="219eb4b05089914c2053686b15770c1f2f33be8f" />
<File name="Assets/itemsheaderrareright.png" part="program" sha1="9025ee901a0e0054b7ea3624ebb705e52d1ab816" />
<File name="Assets/itemsheaderuniqueleft.png" part="program" sha1="0b7f65d64b9077672402e303f73c1039e62d4f00" />
<File name="Assets/itemsheaderuniquemiddle.png" part="program" sha1="ad1d3ba627e71a57127dd599a6a8e7c812bc36be" />
<File name="Assets/itemsheaderuniqueright.png" part="program" sha1="7625fcc787be9234c042e066721b012aae01520a" />
<File name="Assets/itemsheaderwhiteleft.png" part="program" sha1="9ab53b15963bf221a44b5638bf318dc6bc1dea79" />
<File name="Assets/itemsheaderwhitemiddle.png" part="program" sha1="80b5cb869801a7ced9f06c22c135dad18a7f095e" />
<File name="Assets/itemsheaderwhiteright.png" part="program" sha1="938c332116cb6aca0bb155f7f7bb232be8f87cc1" />
<File name="Assets/itemsseparatorfoil.png" part="program" sha1="b69de967b90f10e8ec9c88847afd8418ed2b8625" />
<File name="Assets/itemsseparatorgem.png" part="program" sha1="24f8c9de7a8c7d4f7d2562d811b0400e1a9e2ccf" />
<File name="Assets/itemsseparatormagic.png" part="program" sha1="482af9808d5f0b65897e867132a34b33b1df787c" />
<File name="Assets/itemsseparatorrare.png" part="program" sha1="c723885e45a57edc0395b895a8e4562ad6777dc1" />
<File name="Assets/itemsseparatorunique.png" part="program" sha1="5082eccd77c4b39a03eb7bf154e3bfad82dc43a5" />
<File name="Assets/itemsseparatorwhite.png" part="program" sha1="9b03c75998089f3c51228b4a8d16cca15bc1518d" />
<File name="Assets/jewelpassiveheaderleft.png" part="program" sha1="6227a4bce1c14bcf1cb7c2e85f8fda6063c5ef72" />
<File name="Assets/jewelpassiveheadermiddle.png" part="program" sha1="6b03d6db8beb877f69981f75dfff377a92e94fe8" />
<File name="Assets/jewelpassiveheaderright.png" part="program" sha1="44d9b5e58dc98a3a0c07ed4fc1b308df84a6751f" />
<File name="Assets/keystonepassiveheaderleft.png" part="program" sha1="cfc1eeab8e6a2d46c87a6e1c686c329047f2fe68" />
<File name="Assets/keystonepassiveheadermiddle.png" part="program" sha1="3b26e74193615636be4d406d42ef67ee438eeeae" />
<File name="Assets/keystonepassiveheaderright.png" part="program" sha1="9761fe0d5af44bf43f51300ecf0cb19d3afc03e0" />
<File name="Assets/normalpassiveheaderleft.png" part="program" sha1="91e3d2b9f925be28f7fa652556f9a8fc71f91937" />
<File name="Assets/normalpassiveheadermiddle.png" part="program" sha1="717303949d781a60e0bfb9bcc7187da7d1649517" />
<File name="Assets/normalpassiveheaderright.png" part="program" sha1="2e3af754505e96447a9ba7df5cbc79c17757b5d8" />
<File name="Assets/notablepassiveheaderleft.png" part="program" sha1="3c989a4869de0f7cd79dc6b6156c3eef227c20b9" />
<File name="Assets/notablepassiveheadermiddle.png" part="program" sha1="50d700cd2ce5097f746116012ec1192e19a1c3a4" />
<File name="Assets/notablepassiveheaderright.png" part="program" sha1="d62856c69227cb00d3ce9b43b0363a5c0b0f4e1f" />
<File name="Assets/range_guide.png" part="program" sha1="825cef1fe84d30da6e280799f0a885e270807f31" />
<File name="Assets/ring.png" part="program" sha1="6ef89c50f3505dd2c114b3edbcac017ab969d176" />
<File name="Assets/ShadedInnerRing.png" part="program" sha1="6ad9088ebaed6646dbd3d231d563dc9611ba4bc6" />
<File name="Assets/ShadedInnerRingFlipped.png" part="program" sha1="c13f41ef7cbfc14017a10776d21b121f0e558667" />
<File name="Assets/ShadedOuterRing.png" part="program" sha1="988dee6e0cf9906d78015bc1762b1d95983e89cb" />
<File name="Assets/ShadedOuterRingFlipped.png" part="program" sha1="ffffef32179d39d48db697e9c9e07fdf022457f7" />
<File name="Assets/small_ring.png" part="program" sha1="03e2039559d686a7df2d66bd6f92938e7e02da76" />
<File name="Assets/veileditemsymbol.png" part="program" sha1="4a2c99043eece6b53048bed0b4ae179f1c1082ec" />
<File name="Classes/BuildListControl.lua" part="program" sha1="dd5b90a9f901096ed9d88783398ca5060b2419bf" />
<File name="Classes/ButtonControl.lua" part="program" sha1="697870f9f43eee2c804be087849b46849c83153a" />
<File name="Classes/CalcBreakdownControl.lua" part="program" sha1="24988d1410aa34f707ce3e4cc6151d215a8844ea" />
<File name="Classes/CalcSectionControl.lua" part="program" sha1="468063496e5e998ba4f79450df5b70e9ebb06077" />
<File name="Classes/CalcsTab.lua" part="program" sha1="068b8b48ded47c34ab92ae7838eb75cc53608bb6" />
<File name="Classes/CheckBoxControl.lua" part="program" sha1="578b7ad2b1311cd9c09591e61ecfe8b04d5a729d" />
<File name="Classes/ConfigSetListControl.lua" part="program" sha1="dcd4b1ef3e7a19be3c8e551c446c509865dbcedc" />
<File name="Classes/ConfigTab.lua" part="program" sha1="454b363dca7849435d931dc30e20e168161a4101" />
<File name="Classes/Control.lua" part="program" sha1="1e1502ee51ba61006c346e9360131b7d3754b542" />
<File name="Classes/ControlHost.lua" part="program" sha1="8521dcf6c04880f22c2972618e58aa50fbea1be7" />
<File name="Classes/DraggerControl.lua" part="program" sha1="239b2fbc675d4fe9a8fe36a79fe93870ae298bc6" />
<File name="Classes/DropDownControl.lua" part="program" sha1="2aa730f15fa3876b528998fa48006e4ac94f78a0" />
<File name="Classes/EditControl.lua" part="program" sha1="123ec882687fc517145dad2ad91c7e80acdfbb4e" />
<File name="Classes/ExtBuildListControl.lua" part="program" sha1="4d1dedc752e5c979ae0ad3928faaec8b8ea052be" />
<File name="Classes/ExtBuildListProvider.lua" part="program" sha1="79d6bab71c0e0194e7c5b48e6cfb348d85e20263" />
<File name="Classes/FolderListControl.lua" part="program" sha1="b1ac8024c4eb927edd69220bf66c082778de25e6" />
<File name="Classes/GemSelectControl.lua" part="program" sha1="be27c189d7bcc8ce2efde14ff0833f1c09aebb11" />
<File name="Classes/ImportTab.lua" part="program" sha1="86715391f6ac36b1f741d50534623fdd96cbb09d" />
<File name="Classes/Item.lua" part="program" sha1="b0fb77d04923574814ce1f2f66091ab2ee9ad981" />
<File name="Classes/ItemDBControl.lua" part="program" sha1="4ab0a48b37e0ddc1224ce10fc44c6874672663e5" />
<File name="Classes/ItemListControl.lua" part="program" sha1="a1703a75de1235b4947dea6d7454211ba1498e99" />
<File name="Classes/ItemSetListControl.lua" part="program" sha1="443038191a6ba3a17c3ce6683b96ab2797cf5d39" />
<File name="Classes/ItemSlotControl.lua" part="program" sha1="d1cdcace4872db388d9e8fd1a7e8b4a02ae4534f" />
<File name="Classes/ItemsTab.lua" part="program" sha1="cdcc9e5cbadc9fc428b7611737d970f0e6a1560f" />
<File name="Classes/LabelControl.lua" part="program" sha1="b6c56903b054e14c302a5e4e60ed8e91764bc6a0" />
<File name="Classes/ListControl.lua" part="program" sha1="ba5079fe6a1a38bc8c1cf758d42a62a4a7209e84" />
<File name="Classes/MinionListControl.lua" part="program" sha1="791e346838616c40b973509b30a775c23037665b" />
<File name="Classes/MinionSearchListControl.lua" part="program" sha1="3356a7bd34ee93279a5183445ebd435fa6a6cbc5" />
<File name="Classes/ModDB.lua" part="program" sha1="9a5f5fde621cd72b9fefcf6ea0e3a5b3c232ae23" />
<File name="Classes/ModList.lua" part="program" sha1="5c8ee80bc2f279a88b63dd6d9975436e7717e6b1" />
<File name="Classes/ModStore.lua" part="program" sha1="b63b046a34c7afb1e8ff58484e7febb7e0c27d8a" />
<File name="Classes/NotableDBControl.lua" part="program" sha1="00a9b3adc857487a62707aa821319ccf5b876e2e" />
<File name="Classes/NotesTab.lua" part="program" sha1="de067274e65a7d71940caead279c3a1f8d6fce3e" />
<File name="Classes/PartyTab.lua" part="program" sha1="4ee6e648ecfa675f96bef7f74eef394b096a3821" />
<File name="Classes/PassiveMasteryControl.lua" part="program" sha1="d26082d3fa6485b0813c3a988d180208fdd652ef" />
<File name="Classes/PassiveSpec.lua" part="program" sha1="a0afe84afdde4dd85bd554bc6f7d1f0334f9e1c9" />
<File name="Classes/PassiveSpecListControl.lua" part="program" sha1="694d7b088e895348857b97a78babb00d612469f8" />
<File name="Classes/PassiveTree.lua" part="program" sha1="6762241f37666ade5eab4b92b91ae73be27585f9" />
<File name="Classes/PassiveTreeView.lua" part="program" sha1="e9efb06e9ac10ab5b450a2294b58c946983e49ef" />
<File name="Classes/PathControl.lua" part="program" sha1="2107211dc604f4382da52ba757114665ab5862ba" />
<File name="Classes/PoBArchivesProvider.lua" part="program" sha1="c2f3f922c82a48a92faaf125b5207c41eb1a2c5a" />
<File name="Classes/PoEAPI.lua" part="program" sha1="63134541436320c151e7beebcbac66209adf76bc" />
<File name="Classes/PopupDialog.lua" part="program" sha1="f37b60b6589d4ff0c721c2418d78409f2dc69452" />
<File name="Classes/PowerReportListControl.lua" part="program" sha1="9308c76ea2cdf04ff9d00ffd7fa77d0ea7112eb6" />
<File name="Classes/RectangleOutlineControl.lua" part="program" sha1="4da285dbe76549deae46d3835e00c382c59c18b4" />
<File name="Classes/ResizableEditControl.lua" part="program" sha1="1270c263bd762759cc1121c3eeb4906018136e05" />
<File name="Classes/ScrollBarControl.lua" part="program" sha1="58f68ca961c625d3aba4c8946f7894371c74d335" />
<File name="Classes/SearchHost.lua" part="program" sha1="1fd99b9fbd2c9d26e99397cece708771ce2ad0e1" />
<File name="Classes/SectionControl.lua" part="program" sha1="56f40224d0766ed2699b1ff839f79c43fd5cbf44" />
<File name="Classes/SharedItemListControl.lua" part="program" sha1="907f697112a9738028c8a358e996a7ca8766ea1b" />
<File name="Classes/SharedItemSetListControl.lua" part="program" sha1="0925d72eeb17b464b835289bb71e912056bc6565" />
<File name="Classes/SkillListControl.lua" part="program" sha1="ab2999151dadf4a73054fa424aa06ebc1166d099" />
<File name="Classes/SkillSetListControl.lua" part="program" sha1="2694184c7fec8b25a3af11f228b830f55859bc69" />
<File name="Classes/SkillsTab.lua" part="program" sha1="c6cac87059d9483d41ded9371e4681a41fb3ffc2" />
<File name="Classes/SliderControl.lua" part="program" sha1="a668ed8ac5bcc6d12277bd8c406d9d754032861e" />
<File name="Classes/TextListControl.lua" part="program" sha1="08444ee7a89fac97d6727541b0e94b4997c1c7af" />
<File name="Classes/TimelessJewelListControl.lua" part="program" sha1="474caa03d4c6e6d9d5f01a95eaf500f3bacec814" />
<File name="Classes/TimelessJewelSocketControl.lua" part="program" sha1="a47645db39133957917a0d0f090cf4cc70c4f980" />
<File name="Classes/Tooltip.lua" part="program" sha1="98c5fe13147fe8f3aa19870ad692e53f7d7931ee" />
<File name="Classes/TooltipHost.lua" part="program" sha1="c9854fd295d8305b0d2b1a31ac28b44a53ec791d" />
<File name="Classes/TradeQuery.lua" part="program" sha1="25184786e3e4c889b7ea27ac7eb5273d0822bf83" />
<File name="Classes/TradeQueryGenerator.lua" part="program" sha1="71b8b0f9239d28d5baacdd5f152cf477ab167c49" />
<File name="Classes/TradeQueryRateLimiter.lua" part="program" sha1="63673cfc3fcfde93cd8e626d877a744fd5ca537b" />
<File name="Classes/TradeQueryRequests.lua" part="program" sha1="6bc46b3276970192f954754d044b6959c49eb890" />
<File name="Classes/TradeStatWeightMultiplierListControl.lua" part="program" sha1="2d3c11bb563279bffc4f93763a652a6f430ffd59" />
<File name="Classes/TreeTab.lua" part="program" sha1="021fd89d1af4a25fb1f17b833647b66031387ce1" />
<File name="Classes/UndoHandler.lua" part="program" sha1="ce4835c384c834da0de47b0302b1e774c8300c6b" />
<File name="Data/Bases/amulet.lua" part="program" sha1="d8ce370ece475f4c73d22b1fff98e0f3157bd17c" />
<File name="Data/Bases/axe.lua" part="program" sha1="3f0f326c812163f8843cb0a7e1e5b073e32585f8" />
<File name="Data/Bases/belt.lua" part="program" sha1="82e317900f0a7a505a6418b430b08007fc0a51a3" />
<File name="Data/Bases/body.lua" part="program" sha1="2fc2e6eb8d9215e4d8b3db50e8e710883af59ac6" />
<File name="Data/Bases/boots.lua" part="program" sha1="87f1387fe68fe7244394e2e7f187a77bcccfcc30" />
<File name="Data/Bases/bow.lua" part="program" sha1="d71b631cd9750ab4abcb1cf723df2c0cc5f11846" />
<File name="Data/Bases/claw.lua" part="program" sha1="423a4dd50cfb8147c1f802a241c2e81cae030ac7" />
<File name="Data/Bases/crossbow.lua" part="program" sha1="a4cc6fbe6b114bdb6335e8932bfb30f4e5b75dd5" />
<File name="Data/Bases/dagger.lua" part="program" sha1="d978382070b7a66b183ade83c9389a9db5bc5eda" />
<File name="Data/Bases/fishing.lua" part="program" sha1="dee7585897d3d045143c317a066c7bcf100ddee7" />
<File name="Data/Bases/flail.lua" part="program" sha1="25d8866d52b7481c7b7ca129fcf094e57ba2b73a" />
<File name="Data/Bases/flask.lua" part="program" sha1="e68bea125b60a88a801956bcaee9e86195f7d5d3" />
<File name="Data/Bases/focus.lua" part="program" sha1="4aef7a2dffa79a108a467357ce2226019743b47f" />
<File name="Data/Bases/gloves.lua" part="program" sha1="77d0a3cbabb59e772a7010dedb5fdd8f357ba299" />
<File name="Data/Bases/helmet.lua" part="program" sha1="d24459d8b89757f0e30360d7345c28a198f66348" />
<File name="Data/Bases/jewel.lua" part="program" sha1="a67a798d8eb0a2d3e5da9483afbd9e10f0bb3854" />
<File name="Data/Bases/mace.lua" part="program" sha1="13bd5c1975af7fdb8baf43a461336daeeab2a3bb" />
<File name="Data/Bases/quiver.lua" part="program" sha1="fb76005fd58f16c03e4553f0b767b640047f4668" />
<File name="Data/Bases/ring.lua" part="program" sha1="d5572677ddc3c47e75f1c1d711d8a35cbbccf0db" />
<File name="Data/Bases/sceptre.lua" part="program" sha1="ddce6f69845abcc922279e5850c8aee5d33aec84" />
<File name="Data/Bases/shield.lua" part="program" sha1="bd13c2756f025e78d655f135dd5f9f2dd98109ae" />
<File name="Data/Bases/soulcore.lua" part="program" sha1="07829474a87b629386ae303c93d92a8012ce4d74" />
<File name="Data/Bases/spear.lua" part="program" sha1="ba722fcb88492f8f04bece7056f2b3871fcadc4d" />
<File name="Data/Bases/staff.lua" part="program" sha1="111c2a9123c6df90c42883ec37773854b3ec85ad" />
<File name="Data/Bases/sword.lua" part="program" sha1="974c356d466c855e2f0d85d722886baf8f8f56a5" />
<File name="Data/Bases/traptool.lua" part="program" sha1="8309df6922af375bfebdc226ae4b3545357effde" />
<File name="Data/Bases/wand.lua" part="program" sha1="032f0a53a98c72c8143995d287baa853b73570ad" />
<File name="Data/Bosses.lua" part="program" sha1="81591b7eeaeebdf743ae032b8bf41714f2860e70" />
<File name="Data/BossSkills.lua" part="program" sha1="04ba9d9cece737a23af6e455b1c88e9a0e98ee5b" />
<File name="Data/ClusterJewels.lua" part="program" sha1="6d6016ece7faa214aeb8c0ebfabe9e557e153767" />
<File name="Data/Costs.lua" part="program" sha1="e95fe4606505c4a71f243efbd4f1be0448ffd067" />
<File name="Data/Essence.lua" part="program" sha1="5519e64f4f654978f5f3faced4a6e845def7754e" />
<File name="Data/FlavourText.lua" part="program" sha1="5efd007718af0fec5e0d454101adea57936e42ad" />
<File name="Data/Gems.lua" part="program" sha1="8daca6de69c5aed788a0c55fac2e3c80574d7eee" />
<File name="Data/Global.lua" part="program" sha1="035fbf8480ceb1f7fe422a9d388c34fdd09e77e6" />
<File name="Data/Minions.lua" part="program" sha1="8d9ee7118ff32a62b9f82b7c04efcfa91fad1e3c" />
<File name="Data/Misc.lua" part="program" sha1="e2ed8bf9acacfacf19982f57b6b50b7433565d6c" />
<File name="Data/ModCache.lua" part="program" sha1="ca35f8b6d5178fed06c2175d5820f03c2aee57c1" />
<File name="Data/ModCharm.lua" part="program" sha1="73c45fed94f6d7310a203e559670fb259e87362d" />
<File name="Data/ModCorrupted.lua" part="program" sha1="71be0197895218a7ff080382f7b5f41dcbcd3745" />
<File name="Data/ModFlask.lua" part="program" sha1="6ac6cde764a57585c274556a2ee2c6c6bde60de3" />
<File name="Data/ModItem.lua" part="program" sha1="08c11a1020f2b1fec6879486f50b3303556fba6f" />
<File name="Data/ModItemExclusive.lua" part="program" sha1="c5f47cdfe259ad63a2686599b330d0ba37f28603" />
<File name="Data/ModJewel.lua" part="program" sha1="3cc42541eccc867eefc2449e341da2dc5d376fc7" />
<File name="Data/ModMap.lua" part="program" sha1="29edb01606d86bf46267fbe91ad1dd51eef52dae" />
<File name="Data/ModRunes.lua" part="program" sha1="157b65c2a67028d1023ae1ce6bb6e91781c90430" />
<File name="Data/ModScalability.lua" part="program" sha1="59f1352af3eb09d290f006a0f69f1322ff410435" />
<File name="Data/ModVeiled.lua" part="program" sha1="7cbefaddc52d84c59287dea325ef03898f41ecce" />
<File name="Data/QueryMods.lua" part="program" sha1="1ae4d165c669ca76488bd4dca8aa8a8628d4fe7c" />
<File name="Data/QuestRewards.lua" part="program" sha1="799561cc4cb8dc64f0000695f2853814ed61ad07" />
<File name="Data/Rares.lua" part="program" sha1="41078908a7437ede59cba5de05866a7947ff8882" />
<File name="Data/Skills/act_dex.lua" part="program" sha1="e23c8b21e6743f1687f6f6e9f66890b023de6ce4" />
<File name="Data/Skills/act_int.lua" part="program" sha1="2db04c017f0c894f22bf9bef698619a057d466ec" />
<File name="Data/Skills/act_str.lua" part="program" sha1="299a8344d05db2d185fad12483d00ca0239c8356" />
<File name="Data/Skills/minion.lua" part="program" sha1="4251ee2e964784586e581f9f087509ade6eb6e39" />
<File name="Data/Skills/other.lua" part="program" sha1="db114a6775ecf3f2ca6497d4956fa5036ba9df21" />
<File name="Data/Skills/spectre.lua" part="program" sha1="185f4447fa20d7a3c4619691d3a52d1a69291db7" />
<File name="Data/Skills/sup_dex.lua" part="program" sha1="097ede0c58f734eee45f1318da740db1e83c1964" />
<File name="Data/Skills/sup_int.lua" part="program" sha1="a20bf6f72df2bc6c1eda36229a9e2ea7585ec033" />
<File name="Data/Skills/sup_str.lua" part="program" sha1="415f68cee2409edf0e0e09021939b4d834b20107" />
<File name="Data/SkillStatMap.lua" part="program" sha1="65818937d7b07a3b2ffc1811fc7f14cf3c6d48b5" />
<File name="Data/Spectres.lua" part="program" sha1="5181f94b0f6b66eaff7418fb5b97ac4f5035fb3f" />
<File name="Data/StatDescriptions/active_skill_gem_stat_descriptions.lua" part="program" sha1="9193411d82a10a7342e1168ac0b757d70960b23c" />
<File name="Data/StatDescriptions/advanced_mod_stat_descriptions.lua" part="program" sha1="e63ecf3d4d90381e17bfbe481c4fb2ed0fc2c69b" />
<File name="Data/StatDescriptions/gem_stat_descriptions.lua" part="program" sha1="81f12186bb7b18f27f8e261d4cb8b05f8485040f" />
<File name="Data/StatDescriptions/meta_gem_stat_descriptions.lua" part="program" sha1="b99e6286f9c741973d800b925845836e666804c0" />
<File name="Data/StatDescriptions/monster_stat_descriptions.lua" part="program" sha1="d117b7b1df8e67514c6b29d4c7c1219452ace3cf" />
<File name="Data/StatDescriptions/passive_skill_aura_stat_descriptions.lua" part="program" sha1="9ff473e2c4148f88636adebc656c05f8f9faa1da" />
<File name="Data/StatDescriptions/passive_skill_stat_descriptions.lua" part="program" sha1="79fd5e4d513b6a6ea6ec417afa46c458994274b1" />
<File name="Data/StatDescriptions/skill_stat_descriptions.lua" part="program" sha1="591afeff077bd14cbe290eb27acd7314da4ad860" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/add_buff_to_target.lua" part="program" sha1="718ca5770b58395c171f67b7c947aca5157f0942" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/advancing_strike.lua" part="program" sha1="8bda2bfb0eb5cac27b0beecf80263389a217881b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ailment_bearer.lua" part="program" sha1="cb96dadca4972342ff23e31959b1e7c7143d3bc1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/alchemist_boon.lua" part="program" sha1="facf7717fabf13112659f561a2d612202387f620" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ancestral_cry_projectile.lua" part="program" sha1="ed842b6ed72998ba52ecffeebba0400ff6b133d8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ancestral_cry_shockwave.lua" part="program" sha1="55516507135c133418efc5399b0c3f45a46f3668" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ancestral_cry_statset_0.lua" part="program" sha1="8feacb4b416edd3db134aa9d08117b6d26ef880c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ancestral_cry_statset_1.lua" part="program" sha1="f28fcf5d868b87a672436707270ecfe27af4198e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/apply_rimeshield.lua" part="program" sha1="61d846bd20114d72ae9ae647dae15a06bd96c209" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/arc.lua" part="program" sha1="e43dffe485469abef2388c8f7799230aefcdebe2" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/archmage.lua" part="program" sha1="c95b787d81427f562bd935b4935bec1fcb4659e4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/armour_explosion.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/artillery_ballista_projectile.lua" part="program" sha1="b4971ea9079aa7bd66160911655eead14de8ee98" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/attrition.lua" part="program" sha1="0ef1558f21f0ae3330276ccf5d25181c2872fb99" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/aura_crit_against_enemy.lua" part="program" sha1="bf81665ff31232f77b7dadb6001c048201d4c1af" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/awakened_forest.lua" part="program" sha1="0b371ac6f9fa8bc08ffa69ae2d93bf090c60d3bb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ball_lightning.lua" part="program" sha1="e291abe6c15dae554ac29ff5b4e708bf4a275d07" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ball_lightning_statset_0.lua" part="program" sha1="03e5db8f5774ab66f2dfcf8738abef46c43fc22d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ball_lightning_statset_1.lua" part="program" sha1="d59be4dca487f91e93ad90d4fd7d2fb9efeddc1f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ball_lightning_statset_2.lua" part="program" sha1="67d774b5951cad5109e23a6c662f31d10732a04c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ballistic_ice_projectile.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bear_slam.lua" part="program" sha1="712ac7e5ad43579bafcec6b2e3798f25177736fc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/berserk.lua" part="program" sha1="3bbbc9ef58ed05f1aaf932b365cdc232d75cfacf" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bind_spectre.lua" part="program" sha1="09b9bbd7623dbd1fab25b3403a51267d118256e2" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/black_powder_blitz.lua" part="program" sha1="d23af7c381c52b0ed9079a097be3286a9c000ac6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/blazing_cluster_statset_0.lua" part="program" sha1="6330a37832b2f7d994f80673386d8f291d7046ba" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/blazing_cluster_statset_1.lua" part="program" sha1="d741efbc07e8c0548e7b6c0892676f05d6785a81" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/blazing_cluster_statset_2.lua" part="program" sha1="46bf0cd17cd46d105a2928b76135de12d119196c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bleeding_concoction.lua" part="program" sha1="4ff2aab040be9b166708f87a8142195837e6c478" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/blood_boil.lua" part="program" sha1="dbb9060a25fb11bf0f917e7fcabe3a22092e61a7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bombadier_destructive_link.lua" part="program" sha1="c06b584b539d4779c2507c5f34444f46682c672f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bone_blast.lua" part="program" sha1="af3bb111f7e1dcaf44957cd88f2618cb76a3d800" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bone_cone.lua" part="program" sha1="f5d9c206fc87c6a828c66ec36e9e2407a4418f33" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bone_offering.lua" part="program" sha1="8711e73588530b50c9ac64943a0447b9e314243b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bone_spike_statset_0.lua" part="program" sha1="408ddc62b1fff5528c808bd84884f35f23dc5cdc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/bone_spike_statset_1.lua" part="program" sha1="6565d3f180dd6507da2f77129573b2ced7ec1bf9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/boneshatter.lua" part="program" sha1="b3560d6a1b296691f1a57e04e4813417aa9cd43c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/breach_walk.lua" part="program" sha1="22d962c98ad37e58365b87f3473047473eed2623" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/brute_warcry.lua" part="program" sha1="af83a8e7c1c614862cd8088294db509b173ad102" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burning_runes.lua" part="program" sha1="8016e35c7a10e67526051ee700291af39c158708" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_incendiary.lua" part="program" sha1="b6c296dc7946619efd34abba4fed1b3cdae25686" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_permafrost.lua" part="program" sha1="563b689175b82320e0265252d41cd0bb1ca63527" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_piercing.lua" part="program" sha1="94c032a11d8c9788b7882991240c04497afad119" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_piercing_statset_0.lua" part="program" sha1="6714a695dcc9329d6586ef2e92b3434126032f16" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_piercing_statset_1.lua" part="program" sha1="5db8028a2d0dc4b7d0ff1771959ec5bc302b0946" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/burst_shot_stormblast.lua" part="program" sha1="e95df8e4657dca9e509d37018faeb7085cc4e4b8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cast_fire_spell_on_hit.lua" part="program" sha1="49a73ad0c232f961bdd23079a21cca7e5df6c3cd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cast_lightning_spell_on_hit.lua" part="program" sha1="86df3331a121bdaf612a2ef262f244f916255231" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channel_shield_charge.lua" part="program" sha1="1e038e0cf1f4d743ad43279be6190fe9d69a5cea" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channel_stampede_statset_0.lua" part="program" sha1="7644413c6bae0ef548c9c07d9817eb73f647d9d3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channel_stampede_statset_1.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channel_stampede_statset_2.lua" part="program" sha1="238ab837ed0578c4fea430dcb00d865f37452ccb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_slam_statset_0.lua" part="program" sha1="58b4f44609da13a4dd4ba58f6bab8025cda18d11" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_slam_statset_1.lua" part="program" sha1="110c803bf23f1a844c647b9c9207c6109d291607" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_snipe.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_snipe_statset_0.lua" part="program" sha1="320897dccfd1a611b87e97b9bd2788b406d85d71" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_snipe_statset_1.lua" part="program" sha1="d60e0087d1a25fd359a60c577c650604801c333a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_snipe_statset_2.lua" part="program" sha1="d60e0087d1a25fd359a60c577c650604801c333a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/channelled_snipe_statset_3.lua" part="program" sha1="fcdc4841d02d5d7ef27374ee4d6bc4744d0a455a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/chaos_resist_aura.lua" part="program" sha1="85d0912a8859a09605aa66027b006d540a12a93f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/charge_mastery.lua" part="program" sha1="077746665c8dbc7a244ea52f5a4357924d616884" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/charged_staff.lua" part="program" sha1="eb99491073849a0185e62cbcd2d49dbfecbd516c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/charged_staff_shockwave.lua" part="program" sha1="94a88f5c5ba0f240356f9d37718bb937ab08530c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/charged_strike.lua" part="program" sha1="7dad40031abba08e4d91e054e39d543c8c006887" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/chilling_aura.lua" part="program" sha1="dc41d9951a6b9de4cb890b0b1ab38dc33392866a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/circle_of_power.lua" part="program" sha1="39f5684ba05a9b53ef7880aaba3c0c264ec98951" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cluster_grenade.lua" part="program" sha1="2548c205e6735158a80ace61fdf50ceb23f0a6ce" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cluster_grenade_mini.lua" part="program" sha1="4a276f7dffa4acf3e98bde702a20e2c821ceed66" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cold_resist_aura.lua" part="program" sha1="542adf826d6022a8715d96c5112e97e59a1bbc7a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/cold_weakness.lua" part="program" sha1="43dfdcd9f588040a9e2a5aa8394ef4980a368c4c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/combat_frenzy.lua" part="program" sha1="7642ff1f47b1a99cf9c7b1989ccad47acbd8e51d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/comet.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/consecrate.lua" part="program" sha1="8889f033d8274d92d96a5ee535b839f21dfcaef3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/contagion.lua" part="program" sha1="43d9e2093f0c6c22c36835fa602608bfb987ddc4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/convalescence_active.lua" part="program" sha1="221446d6b4046b53a88f2e4b1438e17eb0ff10dd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/corpse_beetles.lua" part="program" sha1="e8e5db478b0ce9b1fcbf5fb6d8ba8cc6200d084b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/corpse_cloud_statset_0.lua" part="program" sha1="2afbd8ad4e31dea10f2988576b8226b662137d99" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/corpse_cloud_statset_1.lua" part="program" sha1="cb4c7be2d7152d88fd823b46f5b3055a7c52d516" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/create_illusion.lua" part="program" sha1="7c72db0d1939274b97f141573a7f9b451bf3d04d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/create_mirage.lua" part="program" sha1="9f9ebc13229a8160629f282f11b7e41f433f8bcd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/create_void_illusion.lua" part="program" sha1="e6e14029c61dc77a5cb00766a460ff354cbe56dc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/dark_effigy_projectile.lua" part="program" sha1="a084374cfd029ed0bca02ca0f62ad7b6dba67ac0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/dark_tempest.lua" part="program" sha1="55505521b0d6e35f9570c5bb5d809a9e1285bec9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/death_from_above.lua" part="program" sha1="f17adc44cb7081119f280b2ef686a5940a1154ad" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/death_storm.lua" part="program" sha1="b2a0678b189c4e5a4a6eb33fe9a5c1f60151051f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/defiance_banner.lua" part="program" sha1="8741a03c9e79402cd0c65d4da716057dd5c2a2f8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/demon_transformation.lua" part="program" sha1="2bb6d3270e91153fafb5541a11e5acc31d091a57" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/despair.lua" part="program" sha1="f55f966d9048d764fe857c1f982e76a4ea445c93" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/detonate_dead.lua" part="program" sha1="d44303cd18a9c927bb242bdbcc17a8e5bc5fa63f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/detonating_arrow.lua" part="program" sha1="fa2658603409749f489ca6fe0838330d2f5c482b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/discipline.lua" part="program" sha1="83547f4da8e10794bfb619dad49b97098b8f3ca5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_explosive_teleport.lua" part="program" sha1="c17589d5ac89483d8d61c6450eb5195bb014b867" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_fire_rune.lua" part="program" sha1="6cdf4d1cd98c2d8d1176add19494dbce1a084dbc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_fire_slice.lua" part="program" sha1="3b1e9da3db9d4672eb42e761bb0c746f078f8d4f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_force_recharge.lua" part="program" sha1="290b9ebc267cf025636a76d04f908f09998f36e4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_ground_burst.lua" part="program" sha1="f463a74e3d263cb95e6a19b5a85ce11ee92d48ad" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_knife_throw.lua" part="program" sha1="6a95678f8d61aab3cd376c0331edab725d4e894b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_mass_fusillade.lua" part="program" sha1="601aab627222aaf1648856c0dcb08789576d234c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_meteor.lua" part="program" sha1="40412f101787f2dfde24d300d85e2aabcd4051a0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/djinn_triggered_wave.lua" part="program" sha1="253b8b13eb44441d695320d079629a81634c6e1d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/doom_blast.lua" part="program" sha1="278d4434cd0b3ef83ec8c8168c24a3a9560aa4c1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/double_slam.lua" part="program" sha1="90a9ff5a0c95b8fc029ec4acdbcf1fb244fddb29" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/dread_banner.lua" part="program" sha1="f79c5c855f20ccd32df214a1640f016e10155d0b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/earthquake_statset_0.lua" part="program" sha1="df68cd832aac4f5620e18e740a13d963581a0dba" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/earthquake_statset_1.lua" part="program" sha1="e72f5bc3670007512a3e1c4e42383676fbb80b71" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/electrocuting_arrow.lua" part="program" sha1="b0c36a255c2b9a12387eb14392404daec8b1ced9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_conflux.lua" part="program" sha1="83d7c32932f5cd9f373abf923c557ed2dd4d4c56" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_power.lua" part="program" sha1="9298fbc513bd12307d97fce70990b2d615ecdad0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_strike_trigger_statset_0.lua" part="program" sha1="e5a1bad6a7762efbdc6bf9d0d6dc4e204878e5c6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_strike_trigger_statset_1.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_strike_trigger_statset_2.lua" part="program" sha1="bb35e77862fcc6f0855241b1ee031f8407ef9c22" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_strike_trigger_statset_3.lua" part="program" sha1="3584d10dfbdf73f73308304211f391c29a4b5462" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/elemental_weakness.lua" part="program" sha1="762fc1a83e2d9b865b98a3989495611f5ba81fc7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/emergency_reload.lua" part="program" sha1="17405fe72ffb05cd21e179bb7259fffef4082379" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/empower_barrage.lua" part="program" sha1="f453100f51e3b731e0b7e2f2e7671fa0af59cf33" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/encase_in_jade.lua" part="program" sha1="8687db04a9d51488372c5fb6684734517a1e2542" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/enfeeble.lua" part="program" sha1="b92e54e27cd04405adb14f477bc79074612c0407" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/entangle_statset_0.lua" part="program" sha1="1b6bd792b4fc2b8edb890206be8cd684de113aa6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/entangle_statset_1.lua" part="program" sha1="f3eed0f1c4d24b2be17b479a04760e873daf0039" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/escape_shot.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/essence_drain.lua" part="program" sha1="bc83f3df7fe4fee9ba825c55147f8ba1795a91b8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/exploding_poison_toad.lua" part="program" sha1="58af422c35185f8c5f9669bb13c7a16c7c74160d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/explosive_concoction.lua" part="program" sha1="1d8f1e01f1ea1e2e63ce8b80896b95ef6cb05384" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/explosive_grenade.lua" part="program" sha1="2759673e32c89638c7ff6835f672b5b7d4f26566" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/exsanguinate.lua" part="program" sha1="a7779e25d08c3faf821628ed0e17012f230ca3dd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/extract_elements_statset_0.lua" part="program" sha1="93814d9762dfb5e6f5ceca50d310b4dd115e4fa9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/extract_elements_statset_1.lua" part="program" sha1="95731d4711609b1a7a8989c2b6ea893a54092964" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/extract_elements_statset_2.lua" part="program" sha1="da2759ec5791a18ef98cb648bb84fae2851c13fd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/extract_elements_statset_3.lua" part="program" sha1="da2759ec5791a18ef98cb648bb84fae2851c13fd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/eye_of_winter_new.lua" part="program" sha1="1b39db1d5af61531669019aebbce34398fff878f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/feast_of_flesh.lua" part="program" sha1="a2d0e3cdf1c4a45f410c237c15491ce72affe458" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_mortar.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_resist_aura.lua" part="program" sha1="d1aad68d193c8cfba37e022ef033d9e80a32bed5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_storm.lua" part="program" sha1="233913a537f210fd858a19f6b7a8edbd2212c8af" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_storm_statset_0.lua" part="program" sha1="1615bd17446099d288a67ba9b0a43ab1d875b128" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_storm_statset_1.lua" part="program" sha1="79c3af6b2fd6dcb0a69f30291114e86e670e0821" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_storm_statset_2.lua" part="program" sha1="79c3af6b2fd6dcb0a69f30291114e86e670e0821" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fire_weakness.lua" part="program" sha1="e7ea43ec522056624904d99d061b81380b885371" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fireball.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/firewall.lua" part="program" sha1="53c335c8125fc617b66976945853b71657af4d58" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/flash_grenade.lua" part="program" sha1="2759673e32c89638c7ff6835f672b5b7d4f26566" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/foresight.lua" part="program" sha1="a16a21b7af1635a6c4228336fd0156fa0c390acc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/forge_hammer_statset_0.lua" part="program" sha1="48684690faae0aa2f19ebdcc1279a5cf4bf9eaf0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/forge_hammer_statset_1.lua" part="program" sha1="f12361d1dee02dbde5bcf48c3088bf0ba1e336d1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/forge_hammer_statset_2.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/freezing_mark.lua" part="program" sha1="e2af1dd2a5a94fe4bcd2b6a0a1bf64b8d2786191" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/freezing_mark_nova.lua" part="program" sha1="cb61d8424110ead20126ee97c11d50bfcf1c6c18" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/freezing_salvo.lua" part="program" sha1="746a09ac5eaa2e10ed131029299d6c27eaef0ed1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/freezing_word.lua" part="program" sha1="c1edc17bb2ebd22e91ec1790bcbba170f60e6b78" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_bolt.lua" part="program" sha1="eab1a52e46b15586f0f740322648ed2a31e0a6dc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_bomb.lua" part="program" sha1="22bec88423b83373ad0d39d9f240760bc68da9d8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_darts_statset_0.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_darts_statset_1.lua" part="program" sha1="a13ec64671825218816a6b73a3d6e75daa7eb0fa" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_darts_statset_2.lua" part="program" sha1="17cf9aa5989046aedbdd3ab0bc1a775f9536badd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_wall_new.lua" part="program" sha1="429245a837099ae6d68bfb15acf1675f23df1377" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_wall_new_statset_0.lua" part="program" sha1="429245a837099ae6d68bfb15acf1675f23df1377" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frost_wall_new_statset_1.lua" part="program" sha1="a9ec127229a93ab1fcc7dffe2532e02aca641f6d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/frostwhirl.lua" part="program" sha1="e6047e1fc7f8eadb01d06ab5063aa530eaa1ed1c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/fulminating_concoction.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gale_strike.lua" part="program" sha1="1965b1c9af59b39ec36df53582a0c4d1e89591e9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/galvanic_field.lua" part="program" sha1="a3b3ebb58e4e90b7cd60029c8d6064837033cd31" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gas_cloud_arrow_statset_0.lua" part="program" sha1="5de28e231c810ca1c80a77ec57a49dc4c13e3283" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gas_cloud_arrow_statset_1.lua" part="program" sha1="f7c587031f6889e4e044687d89abdeb061b62e52" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gas_cloud_arrow_statset_2.lua" part="program" sha1="3d2c396b307c1e4510a9a006311349544c0c25b4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gathering_storm_statset_0.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gathering_storm_statset_1.lua" part="program" sha1="abf2f0f9f523663275bf184fcb14d12e1ab3047d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/gathering_storm_statset_2.lua" part="program" sha1="3a88da9a9d4f8f68af04b70e7fa5315f74cf8452" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/geometry_spell.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ghost_dance.lua" part="program" sha1="21ab366820f2424d2f87fb2693710629c1cfd499" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ghostfuse_arrow.lua" part="program" sha1="bdd3f491db1a8a93c79243c58bb33d80c8cf0400" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/glacial_cascade_attack.lua" part="program" sha1="402bf639b9dc10abe1a5a7310be3635cb018aa4c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/glacial_lance_statset_0.lua" part="program" sha1="58b6df5b3085aad00fc9d9fdef6a9692d02334a2" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/glacial_lance_statset_1.lua" part="program" sha1="84a2aa05bfa9323e0179d6f3edf20a40874c0913" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/greater_fireball.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/grim_feast.lua" part="program" sha1="7aace9e238051406533ef60eb4ab987f498fa274" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hammer_of_ngamahu_statset_0.lua" part="program" sha1="27533246addd8377b18cf2e49e43b52c39a05021" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hammer_of_ngamahu_statset_1.lua" part="program" sha1="f2d4643462b57844d3aec3772d4c42f8939c638f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hammer_of_ngamahu_statset_2.lua" part="program" sha1="a3c4c8fb87176d3a1c6016fecc8822be50b8b9e5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hammer_of_the_gods.lua" part="program" sha1="a3c4c8fb87176d3a1c6016fecc8822be50b8b9e5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hand_of_chayula.lua" part="program" sha1="7b2cc6ac6182ece34f8fdc1cb99bb5206c2108d1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/harvester.lua" part="program" sha1="5e7dd767a9a2f743065358ff34c86f5939f4b437" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/heavy_strike.lua" part="program" sha1="5ac61da078cc914ab01892683f37be0d1fd85473" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_agony.lua" part="program" sha1="40cae0f887ec21ce6a9b81cc1e03428f720ef124" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_ash.lua" part="program" sha1="358feb06772965a6625e338a8c2fc90706bfca56" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_blood.lua" part="program" sha1="f6cd8e64f3100573c2d2af3534213231fb2a9f59" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_ice.lua" part="program" sha1="873748cef7bd11a6d0c3d06089b9a0079bb11883" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_thunder_statset_0.lua" part="program" sha1="8b2c5eb114eec0bb6bb39c8ef0448140a2b6eb9d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/herald_of_thunder_statset_1.lua" part="program" sha1="d7224a7f3ab43b613342f4f7b77459e94e9c2863" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hexblast.lua" part="program" sha1="20a3636174783573f59f52897b0e88b9150276a2" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hunters_mark.lua" part="program" sha1="c0d23d815583a6833683de58b362a5d80ad5a3b2" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/hunters_mark_explosion.lua" part="program" sha1="69b798eed2d61a9fae8658c7f88de25f292d0549" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_ambush_explode.lua" part="program" sha1="d6b7ecb89a8f3d1c6966399d96d9d2ada6703fe3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_ambush_statset_0.lua" part="program" sha1="ba41fe79ecdb25047615a9f745e8f4e504bf101e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_ambush_statset_1.lua" part="program" sha1="9ca9a30a0595c8665434b37253424676378818f5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_ambush_statset_2.lua" part="program" sha1="d4eb3dc03548f63ca8958bf32c281a2a5e720878" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_ambush_statset_3.lua" part="program" sha1="9ca9a30a0595c8665434b37253424676378818f5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_bomb.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_nova.lua" part="program" sha1="0e01dfb086b6b16147af8849de6b692938a5f670" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_nova_statset_0.lua" part="program" sha1="0e01dfb086b6b16147af8849de6b692938a5f670" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_nova_statset_1.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_nova_statset_2.lua" part="program" sha1="0fca71b07d2c793cce3e916cc5e394475cd5d089" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_shot.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ice_storm.lua" part="program" sha1="590fb7eea33a0d6e8d04dfa0aab14fa2a98fb3ac" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/icewalker.lua" part="program" sha1="03f8e86c12f69e4c1bec5c05e7335ca78ac756ab" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/igneous_shield.lua" part="program" sha1="aa6648fa701b023c1bf8fb7a45ac6d16ee98db12" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/igneous_shield_explosion.lua" part="program" sha1="85813bc6b71eac4e26c14562d1d91a7b5246e82a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/incinerate_player_statset_0.lua" part="program" sha1="35d88f035abb0f29d053d2efb4daeabf2437e06e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/incinerate_player_statset_1.lua" part="program" sha1="22c5598cf25750170e8fad9c212c2b07a5c3965f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/infernal_cry.lua" part="program" sha1="d3ab594844175a62cd2ae55fe6cc6f6ed4f143eb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/infernal_cry_corpse_explosion.lua" part="program" sha1="54062849a0b010604070fb57d0568479c2a5358d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/infusing_strike.lua" part="program" sha1="2cfb142aefbb8cc4c08cfa4991d362944bfea3e8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/killing_palm.lua" part="program" sha1="bb87177c8b77ee0e0efcb4c0cc415278c9a3bb45" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/knockback_wave.lua" part="program" sha1="6c1d885b5d64e0cb6542a700b0e53db73d428235" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/leap_slam.lua" part="program" sha1="e318872d413a6da021d1157d9ed569465f4d8a21" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/life_remnants.lua" part="program" sha1="7c9b881a278c4f2d729963caaa0a0ea3363b3f87" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_arrow_statset_0.lua" part="program" sha1="53c89ce092fbc9c6c89e60dd864582ae5a1c21f6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_arrow_statset_1.lua" part="program" sha1="e7ee1bf88d8bf42a5cdb2ad372476575e54c10dc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_bolt.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_burst_statset_0.lua" part="program" sha1="9f1169cdc96a76d72a6bd0cd3c12d44349460f53" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_burst_statset_1.lua" part="program" sha1="2e29220e7ab0c39c9a4dfe357d4cb1a5c671905a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_conduit.lua" part="program" sha1="07592058fe3acae59bc2a6130205fc98d328054b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_resist_aura.lua" part="program" sha1="3332ce514eb64940f28082e8a8feb88842d24c08" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_rod_rain.lua" part="program" sha1="0841de1f5c1785183d0c5427e7fc1ea443c89d55" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lightning_weakness.lua" part="program" sha1="4d717266fee00b312dbb5a07f2518d12ee551eeb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/lingering_mirage.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/living_bomb_player.lua" part="program" sha1="6268458fd3aa68c7ca04cb531ae7e9f091caf6d3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/magnetic_salvo_statset_0.lua" part="program" sha1="bc7ca401679b7f057048316afc625f1373915f9a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/magnetic_salvo_statset_1.lua" part="program" sha1="b88e6ed7a7b9d11efb7992b6888a24383fd828cd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/mana_drain.lua" part="program" sha1="c83bb92be4701b6fd316590d9ed72d15767c6b41" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/mana_remnants.lua" part="program" sha1="6ae975ae3972764d9baa50003ff80c6d215aa1eb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/mana_tempest.lua" part="program" sha1="55505521b0d6e35f9570c5bb5d809a9e1285bec9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/mantra_of_destruction.lua" part="program" sha1="c59c268ae0103e6acdd24343fe913a90edcee5ee" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_arcane_archery.lua" part="program" sha1="44f42d849c4299141461146f693a035c4560d229" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_deadeye_marks.lua" part="program" sha1="fe8603e4f2950bb95bd0d5d56abf24c857826197" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_mantra_of_illusions.lua" part="program" sha1="f57fa305fad35c9e7ce9eac3d275a4d545b6ebac" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_ranged_attack_on_freeze.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_ranged_attack_on_ignite.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/meta_ranged_attack_on_shock.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/molten_blast_statset_0.lua" part="program" sha1="d6629259a409c7df4d9e0849d018cf40f5862221" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/molten_blast_statset_1.lua" part="program" sha1="55f404ec9eefe4580c27c80e6e88794cebb06190" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/multistab_spear.lua" part="program" sha1="3adc9e4f8591506ed2e75463a0ef714322c41061" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/new_new_lightning_strike.lua" part="program" sha1="386552c8be1675cc2d54aa1728af6008a5a680e6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/new_shock_nova.lua" part="program" sha1="a3ce665386a093088cce4fa2c1428644621a78e7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/new_sunder_statset_0.lua" part="program" sha1="8e28d91be4854d75578533eb53964c063bea9c05" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/new_sunder_statset_1.lua" part="program" sha1="13cb6e9319bbaa710a05f19ccc9c4987c5dbaf85" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/oil_grenade.lua" part="program" sha1="784d4d8e7d5a3880e0b776836b4e7667809654b0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/orb_of_storms.lua" part="program" sha1="ca0d7bb0820e98329eb71788d4176b528aca48ba" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/overcharged_spear_statset_0.lua" part="program" sha1="d45ffff6ccba8ea792d98304f5f47eeb24c971f9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/overcharged_spear_statset_1.lua" part="program" sha1="58136545704872d3596200021e7dcacb042476b0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/overcharged_spear_statset_2.lua" part="program" sha1="39d6d6f9e39e0de684eb4c246feb5806d5c701b6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/overcharged_spear_statset_3.lua" part="program" sha1="57a40aaa822e4871e88b3a8110e328a2f1b32e55" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/overwhelming_pressure.lua" part="program" sha1="a4f0156faa786ff9a36b7c2a0b6933707d4c1482" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/pain_offering.lua" part="program" sha1="a0cfd7568b218fd66c42feb78d7e9ff6875e340e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/parry.lua" part="program" sha1="22f8e8c4a9501d78eab87e0a19f23743de29e72c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/plague_bearer_nova.lua" part="program" sha1="3bdd434bc89a9ab8e7540c98a6cfb56caf92b8e7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/plague_burst.lua" part="program" sha1="e6f0026cd601a43c2183067004fe85285e9614bc" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/player_ranged_spear.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poison_burst_arrow.lua" part="program" sha1="358fd47dc19a099d00026c2110c18aaef2e29e65" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poison_vine_arrow_statset_0.lua" part="program" sha1="1ddbc881f8ab57bf27adfc87c17054fa30c914db" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poison_vine_arrow_statset_1.lua" part="program" sha1="aefa9d3dd508308c75b64cc20f2e4c8af5f81f3e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poisonbloom_arrow.lua" part="program" sha1="987cd723a0e10af25d9ddf35026227f3b6b72966" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poisonbloom_arrow_statset_0.lua" part="program" sha1="387c6549ac7b80e5f1c348fb5d2d9500be15bae3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poisonbloom_arrow_statset_1.lua" part="program" sha1="00a9cfcd3cd145705524a8d0b5e7b97088ec1e69" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/poisonous_concoction.lua" part="program" sha1="c822cc5b76551046d492e679666d3cd7a02a4266" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_offering.lua" part="program" sha1="003d6511440354d4b23fca43072412c2311c1bb5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_shot_incendiary.lua" part="program" sha1="0aea46048c2c2bc1d99bf1d24dc2e0ec51a16412" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_shot_permafrost.lua" part="program" sha1="4fac6ee90acab0241b662e1175c908868092dac4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_shot_piercing.lua" part="program" sha1="f78e9a7165a88e6c462aab9f2cd1726be8554972" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_shot_stormblast.lua" part="program" sha1="0aea46048c2c2bc1d99bf1d24dc2e0ec51a16412" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/power_siphon.lua" part="program" sha1="49e5ceb21ed11c2820e8103556c23a0a15e30ca0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/primal_strikes.lua" part="program" sha1="e879823074fd5d7e0ab46ed2bb1506b52e7e6da5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/quarterstaff_frost_burst.lua" part="program" sha1="d0f0239bfa65839daf06fec218ec476e7540dfa5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/raging_spirits.lua" part="program" sha1="3b9898ecee70e15b573c5c6d1c4ef61ff2919de1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rain_of_arrows_new.lua" part="program" sha1="169447e631fcc93634bb35580ae1b363b5e0c7ec" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/raise_zombie.lua" part="program" sha1="96e6558877060a29c9a0bfb4629bf3b78a6ce55c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rake.lua" part="program" sha1="94fafc616acb66ce7f4b47addf3b3ca78d07157c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_incendiary.lua" part="program" sha1="230a1d29b0eb32e3d08028beaf1a362a5343b736" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_permafrost.lua" part="program" sha1="7d8e62c1f91e623c88112658e61d2696488522fb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_piercing.lua" part="program" sha1="dee61f9bc53aeb16835312fe2d67678502879a21" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_requiem.lua" part="program" sha1="7606bcfc842f735822ea34bafe56f384ebb85862" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_requiem_ammo.lua" part="program" sha1="6c55722c9d40cd281a08316494b30b2d4a877ac7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rapid_shot_stormblast.lua" part="program" sha1="1026ea91bbe14bca13219bd454c1a9adc14960ec" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ravenous_swarm.lua" part="program" sha1="66cdc67d05f496c9786df73f51f713ff8a0fa111" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/reap.lua" part="program" sha1="f8be972c3cc7fc0d4f1caf0845b167ccc3395ddf" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/remote_spear_mine_statset_0.lua" part="program" sha1="8404461ee793dedc414c47c2400678fb90ea8655" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/remote_spear_mine_statset_1.lua" part="program" sha1="da2759ec5791a18ef98cb648bb84fae2851c13fd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/remote_spear_mine_statset_2.lua" part="program" sha1="c10944a75225007c89667100fafc1d3c7b9c16f1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/retreating_throw.lua" part="program" sha1="8401b4711e2bd5078851986d524fcec55bb96f06" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ring_of_bone.lua" part="program" sha1="84b28a8180b56a9b61a9ab8092ab229bf58c7627" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/rip_from_time.lua" part="program" sha1="56fdd0bff1554af1a95895d033da80854220ac90" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ripwire_arrow.lua" part="program" sha1="0916e42f5e9dfebb631fd9a4a95b301cfb6d1f44" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ritual_of_power.lua" part="program" sha1="b3b94538a23319f72a141001fc22a925437cea8b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/ritual_sacrifice.lua" part="program" sha1="df9c90f4542fa46c8c22fee832e67de785804534" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/runic_tempering.lua" part="program" sha1="3d6493d1ffa19f123d89b7e763c43f310d118ac5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/sandstorm_swipe.lua" part="program" sha1="6d231255ffb0d232fc8001c00789f099f982c7be" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/scattering_calamity_statset_0.lua" part="program" sha1="95dcdcc469b6c480c304f0a4bce50b0945d8d01f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/scattering_calamity_statset_1.lua" part="program" sha1="8bec6b995fb8f75ec4bc048ebe3116d0a462f4f6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/scavenged_plating.lua" part="program" sha1="ee3b8d0b820e24e6ff76ea19ff2d205c4599df22" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/screaming_devastation.lua" part="program" sha1="c5f141bb6f6865d068e9bac0b256fa0a440daff7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/seismic_cry.lua" part="program" sha1="dd770f08c12da66626e091380f355c85228f5d9a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/serpent_spear_statset_0.lua" part="program" sha1="d60da0a17dbd17661611501d709184f389fe468e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/serpent_spear_statset_1.lua" part="program" sha1="8a3a039ba16bdde8f1cbd7e99a0f28d09b2b1bf4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/serpent_spear_statset_2.lua" part="program" sha1="a76dfe5b478bd96d95c5aa69b35c42974aa6a55a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shard_despoiler.lua" part="program" sha1="7e7680d1bb347e6e42b2828ec57d6a8c75015975" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shatter.lua" part="program" sha1="878141d0904ccd84422773993fee25bf4b0e6361" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shattering_concoction.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shattering_palm.lua" part="program" sha1="9c78804f89c91b877bb7466782bf360be39fbe3d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shearing_bolts.lua" part="program" sha1="beb3eb03e016f0d0e67882eb716cf3c5993072a3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shield_barricade.lua" part="program" sha1="3dac6c34faaec3e7172ac94b46c607528790caee" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shield_block.lua" part="program" sha1="524ec8633205ff204ddd31f2ab923f61f20fa73d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shield_drum.lua" part="program" sha1="56c9d856de212dde32fef16bf43048b731d158f8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shielding_cry.lua" part="program" sha1="3ee1476a05e2b813933aa76686db25bf2490d874" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shielding_cry_shockwave.lua" part="program" sha1="8ccd55df5a909a37be06a05b95da43f584b8d5b8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shock_grenade.lua" part="program" sha1="149f2accd929564a971c0198cb48e37cc9401f91" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/shocking_arrow.lua" part="program" sha1="eccb7a692f46ecd5b94df19065445292df17be90" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/siege_cascade_permafrost.lua" part="program" sha1="8b55d5669ff3a6395009af9eb3b34ec77f0fae47" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/siege_cascade_permafrost_ammo.lua" part="program" sha1="e2e813d199daafa589829cc69fe3134e86554556" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/siege_cascade_piercing.lua" part="program" sha1="6e19427ad8590dcea5200c3f947997cfd211f33c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/siege_cascade_stormblast_statset_0.lua" part="program" sha1="c876066bd3631d218d2400f708933942ac344fba" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/siege_cascade_stormblast_statset_1.lua" part="program" sha1="2a4245d55e713ae1e5bb7cc4078cf120d6352d5e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/sniper_gas_shot_statset_0.lua" part="program" sha1="0c210736bef60a139e54132385f0f72f5faa6a9d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/sniper_gas_shot_statset_1.lua" part="program" sha1="b401363499fe1b5e28ded8d967ba40f6c4620055" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/sniper_gas_shot_statset_2.lua" part="program" sha1="33670c2d154ed65e42e7910cc15936ac528145ee" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/snipers_mark.lua" part="program" sha1="4450998290b71cda32a8307a56efce3e5856697b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/solar_orb_statset_0.lua" part="program" sha1="4fc83d46b81b69d04ccd4f442cad8207ad6bb649" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/solar_orb_statset_1.lua" part="program" sha1="41292481f4da7ae6f9e4d78da999c47eb1ade9fd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/solaris_spear_statset_0.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/solaris_spear_statset_1.lua" part="program" sha1="43375a07ce64305f7d2725a037ad799c946f62a5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/solaris_spear_statset_2.lua" part="program" sha1="b1efca257e2d2a7adc462403c858baa9866d24ce" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/sorcery_ward.lua" part="program" sha1="d5bcadc3a9c1491bf454d6e5780dd571087409cb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/soulrend.lua" part="program" sha1="a7779e25d08c3faf821628ed0e17012f230ca3dd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spark.lua" part="program" sha1="5213082a4c8e675ad445177271fbf1ddd73ee436" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spark_statset_0.lua" part="program" sha1="5213082a4c8e675ad445177271fbf1ddd73ee436" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spark_statset_1.lua" part="program" sha1="d979f80846aa271efa8160563676e4032e234382" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_discharge.lua" part="program" sha1="66f15f83a64f6c9a8af16e22fefedf7f557a81b7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_lightning_warp.lua" part="program" sha1="fe45253775cb37b366e39b18fc1201c515579638" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_storm.lua" part="program" sha1="9db575b95f4cea145955341d8d3c828028279034" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_wall_statset_0.lua" part="program" sha1="9e6846cf5502671da18af49b8710a908a22a76c8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_wall_statset_1.lua" part="program" sha1="159fb597502604c7c5b71c313c5f419049a19097" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spear_wind_vortex.lua" part="program" sha1="0ff7af13ab41538715e2a51e9c53c8770a3419db" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spectral_bell_carried.lua" part="program" sha1="493523c3d163863cb794ba11c174d2b3279e3bae" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spectral_bells.lua" part="program" sha1="ac278d9cd550213d99ee1027ed4b38fb8c5e377c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spike_slam_statset_0.lua" part="program" sha1="62502031ca0e6b0d8da598e149734af40cc8b4af" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spike_slam_statset_1.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/spiral_volley.lua" part="program" sha1="7cf6adb2fcef2a14b7a7f5bcee061a335832e853" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/stomping_ground_shockwave.lua" part="program" sha1="e7fa354ebfb29c965b0c6e8655ddd30cdcf7c96c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/storm_wave.lua" part="program" sha1="ee81a7e7b0b8897052225dcd65723afc2ee35fe6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/summon_infernal_familiar.lua" part="program" sha1="145ab4288f6a9c6244d7d23dbb4c2135e91d2f3d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/summon_meta_totem_slams.lua" part="program" sha1="b22605ebb89f5c25ce15d4c1307d2312ee21392a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/summon_rhoa_mount.lua" part="program" sha1="4f888fab12068d722128f707b066e16e73a1eb40" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/synchronisation_of_pain.lua" part="program" sha1="a0db3072c9f80b1383e12346a4b4612db5e57fe1" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tame_beast.lua" part="program" sha1="fe04de26848afc266757e8475dcbf7d5786e0ec9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/teleport_ball.lua" part="program" sha1="1b848af8e988f74942ca989defd31e41e2e41e92" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/temper_weapon_combustion.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tempest_bell_statset_0.lua" part="program" sha1="d5544cf7de11fd9b8d58c0078c7891455d0fed3f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tempest_bell_statset_1.lua" part="program" sha1="0d3da9052762455fc841097facde83ede9663aa6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tempest_bell_statset_2.lua" part="program" sha1="2a41bc53b9c36d94d3d656d6fb157150fcee7513" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/temporal_chains.lua" part="program" sha1="7c74b8142fccbecd89e9c49cd80dfca053619494" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/temporal_rift.lua" part="program" sha1="222a74462e01ea3f023e3a064f526711b2eb1e42" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/thaumaturgist_mark.lua" part="program" sha1="dd3190ac52bff121ef569b00e8a9470c347d7cee" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/thaumaturgist_mark_nova.lua" part="program" sha1="b2a747071eb99b80052239cb5ce694df1c6185b7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/the_flawed_edict.lua" part="program" sha1="617ec832661384e8df09852dcfc0aa17af3fa800" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/throw_flask_bleed.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/throw_flask_cold.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/throw_flask_fire.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/throw_flask_lightning.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/throw_flask_poison.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/thunderfist_statset_0.lua" part="program" sha1="68da0b1cb1f3d98b1c15179678e6a1a8100ff50b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/thunderfist_statset_1.lua" part="program" sha1="8befa3c3d3d53eb4a775715d36f467f300364782" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/time_of_need.lua" part="program" sha1="58e947ddc3b721d97da125cbc105c22806bb7eb3" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/time_stop.lua" part="program" sha1="a1b536f384f1200793ad7511098fa83b2041b80d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tornado_shot_statset_0.lua" part="program" sha1="fbe856e84577645304d2c854ae315c9eee8c10e5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tornado_shot_statset_1.lua" part="program" sha1="dfb1c9dd0da06d0ed48c14b4add3c05ec5961fff" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/tornado_triggered.lua" part="program" sha1="aefebea316ab03684da04ef008d837459b119aa7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/totem_shockwave_quake.lua" part="program" sha1="56c9d856de212dde32fef16bf43048b731d158f8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/toxic_domain_statset_0.lua" part="program" sha1="d0e57808d364613c74e754d649fd368dd23a0cb7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/toxic_domain_statset_1.lua" part="program" sha1="9a3e5e80b8b2b1e902638b950946f2dc44b76439" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/toxic_grenade_statset_0.lua" part="program" sha1="badb7dd66321dde51b1cfe5ca70bd09733a0e7b0" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/toxic_grenade_statset_1.lua" part="program" sha1="60e696b22072c72551cf1d994ecafef0411918da" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/toxic_grenade_statset_2.lua" part="program" sha1="ae7badf2d7344d8afaa4daf90ae84b1d3cce976b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/trick_shot.lua" part="program" sha1="914c1878e3c0504b181ea38adb89d0c43926aa80" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/trigger_chaos_infusion.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/trigger_elemental_infusion.lua" part="program" sha1="32464ebf8e4618d0971fd0eca06660fe1b2456b9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_battershout_explosion.lua" part="program" sha1="571eb089556ec198db6589739b240529b8e5a37d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_bone_shrapnel.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_briar_patch.lua" part="program" sha1="8594cb78bb5e5996bddc0171fda4c7d1e196dd6f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_caltrops.lua" part="program" sha1="1eb28e58be0265446c62408e590e77f94dd1d3bd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_caltrops_on_dodge.lua" part="program" sha1="d190a34610aeb32e0413537b1ff2b42ab6955c95" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_curse_zone_hazard_explosion.lua" part="program" sha1="62188f963faa2696e3eb5073fb38031460051277" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_elemental_discharge.lua" part="program" sha1="363130623394e87682f0b106e5cd3cc74c8cf09a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_fiery_death.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_fissure_on_landing.lua" part="program" sha1="e7239b495104bd8d3388957e0d12bd3b7fe66c28" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_freezing_word_explosion.lua" part="program" sha1="cb61d8424110ead20126ee97c11d50bfcf1c6c18" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_frozen_vortex.lua" part="program" sha1="afc8314d52ce4b049b6e8eada3307a00608c9757" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_grounding_shocks.lua" part="program" sha1="a26379cc670bd6818f159acff257318efe041b64" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_haemocrystals.lua" part="program" sha1="588b9d58d57152fbd0d79c56cc8acc34e56fe293" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_hatching_elementals.lua" part="program" sha1="cabf16a1e198657c997ee597d92dfac4311138b7" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_living_lightning.lua" part="program" sha1="ae546eed51bf8afe819bd1433cd74c713f1d826a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_mana_flare.lua" part="program" sha1="d5f46fd6e15e69468b0f10222cdd1adb314cd6be" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_pillar_of_flame.lua" part="program" sha1="3b8bcd3a24a2912706ee7c66910de4068c8ed6cd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_shocking_rift.lua" part="program" sha1="12c296876817c117add5102fed222575372eed2e" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_spiked_gauntlets.lua" part="program" sha1="6c67419944aa522cf38f06e54a0a45b2000f6770" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_splinter_explosion.lua" part="program" sha1="940340ba6bb9503dcaf498398e634281c4c647eb" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_support_from_the_grave_ice_fragment.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_support_frozen_spite_ice_fragment.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_titanic_arrows.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_volcanic_eruption.lua" part="program" sha1="2dcaea0643f54e3d3ae77c809cd738ba7b6eab2d" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_wind_dancer.lua" part="program" sha1="389a5c6bf663380065117539eae984c6a814e4d6" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/triggered_winnowing_flame_pillars.lua" part="program" sha1="9fd892fbca6054098e4828ffb5bc8f970b5d4542" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/unleash.lua" part="program" sha1="1677e43fe0f311d67bbe3acf8c67598598362d81" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/valakos_luck.lua" part="program" sha1="bb60eb2a8fd692bdc43f8fa192b4221b17fa0dd5" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vaulting_impact.lua" part="program" sha1="76ecc0e166a7cfd20a1cece613b7c297995c5e26" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vaulting_impact_statset_0.lua" part="program" sha1="be3ac038869263fa3dc6f44865450defe4ea99ab" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vaulting_impact_statset_1.lua" part="program" sha1="e4905f9761f0e907183643eadbbf10afded6fb24" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vile_disruption.lua" part="program" sha1="5f74ddc2ee7e259fdc4111e0e1585c5c4260debd" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vivid_stags.lua" part="program" sha1="5348d88b9291895644f356f0d7146582edf6d637" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/volatile_dead.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/volatile_dead_statset_0.lua" part="program" sha1="b742054c5058e603820653836babb76e2febaf14" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/volatile_dead_statset_1.lua" part="program" sha1="5d0c58559983ed48a3da3492588d57db0e46091f" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/volcanic_fissure.lua" part="program" sha1="a29ca06c05c0395a5adc0426a766aa85deb7ff5b" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/voltaic_mark.lua" part="program" sha1="dd3190ac52bff121ef569b00e8a9470c347d7cee" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/voltaic_mark_nova.lua" part="program" sha1="cb61d8424110ead20126ee97c11d50bfcf1c6c18" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/vulnerability.lua" part="program" sha1="b4029882bd75f71e7e1adb0c63e00582bb648259" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/war_banner.lua" part="program" sha1="306e5c6f6b837dff9164076c278898cc7fad571a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/warding_steel_nova.lua" part="program" sha1="990fdb432a4b0fcfdd41f683e381ccfd85717b5c" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/wind_dancer.lua" part="program" sha1="3eede16bd941cf1ca7b0c37ed03a9e200841cbf8" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/wind_palm.lua" part="program" sha1="608dc9fdd1377bea9c08b0b29b2a7e6130bac526" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/windstorm_lance.lua" part="program" sha1="5fe4c6367d83b3e245a5436755a4cc2532b7b7d9" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/winnowing_flame.lua" part="program" sha1="ab41f3626a5ddc6a411d9914c4f90683cb9b5352" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/witch_hunter_mark.lua" part="program" sha1="ed244dae6e644b2a4a6bfc521ab781a7aa291bf4" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/withering_presence.lua" part="program" sha1="6e7187aaa267c84d48d8cec0c8304adb8f40184a" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/wolf_warcry.lua" part="program" sha1="009e64a970ec47b3c5716545510e85ace560b309" />
<File name="Data/StatDescriptions/Specific_Skill_Stat_Descriptions/wrath_aura.lua" part="program" sha1="f2704638ecc43e15da78506c39d0d2767eff15fb" />
<File name="Data/StatDescriptions/stat_descriptions.lua" part="program" sha1="c4670d4350055911b4b70dd41493638b1f7fd086" />
<File name="Data/StatDescriptions/utility_flask_buff_stat_descriptions.lua" part="program" sha1="165db6bc6a05c8f27e372b022d07d03c6c744b81" />
<File name="Data/TimelessJewelData/LegionPassives.lua" part="program" sha1="eef1e3f5b37de276f19e28e36aa66d3ea29d91d6" />
<File name="Data/TimelessJewelData/LegionTradeIds.lua" part="program" sha1="a852a234591481dcd4c8ddf937fb0f75b69036bb" />
<File name="Data/TimelessJewelData/NodeIndexMapping.lua" part="program" sha1="0590786d62b135bf4a0afea8ec14c446baeda03f" />
<File name="Data/Uniques/amulet.lua" part="program" sha1="7c0e55a52d7cefe280b3ab7c204ae32c21196545" />
<File name="Data/Uniques/axe.lua" part="program" sha1="d6f1880693f105ccb99416fc66894972396cd8a1" />
<File name="Data/Uniques/belt.lua" part="program" sha1="15c2f28e9a911cc1123b13b5a070b5bb66b5946b" />
<File name="Data/Uniques/body.lua" part="program" sha1="9062f7c8be7958441c49e007a63698388397baaf" />
<File name="Data/Uniques/boots.lua" part="program" sha1="6da824c0138fc523db05db1fd08aba00f20f892d" />
<File name="Data/Uniques/bow.lua" part="program" sha1="f2bc1f2691adb84bf0359b219409e5b591d32d52" />
<File name="Data/Uniques/claw.lua" part="program" sha1="bb2ca99f686832ca6416de8afbdffcea22ad225d" />
<File name="Data/Uniques/crossbow.lua" part="program" sha1="875f29ac88fed897d417cd0bb8e6a0398ab8106f" />
<File name="Data/Uniques/dagger.lua" part="program" sha1="42c020324c762a295937551f3f1af53c9b114358" />
<File name="Data/Uniques/fishing.lua" part="program" sha1="75817432db7701b129a2399453166aa3dfbf0779" />
<File name="Data/Uniques/flail.lua" part="program" sha1="ea43920b747ee3ea3051a6d48ad7cb64f915f14e" />
<File name="Data/Uniques/flask.lua" part="program" sha1="b7b6a8db83191d2e3e89ec4ac8e52d7235b66a19" />
<File name="Data/Uniques/focus.lua" part="program" sha1="f9246b9e0fdc2553f71af7212eb38a748c04f6f5" />
<File name="Data/Uniques/gloves.lua" part="program" sha1="1ed0656f0a1c2f056e6023f33d07a70da2fe054f" />
<File name="Data/Uniques/helmet.lua" part="program" sha1="6b30d2985b25669306df526dc0eaafe163a2bd03" />
<File name="Data/Uniques/jewel.lua" part="program" sha1="a0ea15b74e2f94ba2a81f5e97c4376d062adedf9" />
<File name="Data/Uniques/mace.lua" part="program" sha1="6b6be0901a2d980cd326fcbad5c376006d24be1b" />
<File name="Data/Uniques/quiver.lua" part="program" sha1="2e823b3eaa0b31485d32ddfba9a67e6cf0bbdaa1" />
<File name="Data/Uniques/ring.lua" part="program" sha1="1216bc2e13e2d5df2418cccfa2d5eeea85fb61b4" />
<File name="Data/Uniques/sceptre.lua" part="program" sha1="6120d3e9649382378b512751fa986c4fda983798" />
<File name="Data/Uniques/shield.lua" part="program" sha1="613e2a484ea5e456327b56a23d37a48d882afcd7" />
<File name="Data/Uniques/soulcore.lua" part="program" sha1="eb6f53c18be92f26189632dc6602f25a73f85fe1" />
<File name="Data/Uniques/spear.lua" part="program" sha1="e888aaa9ee4391811ec6a6f4cf98a19328510e85" />
<File name="Data/Uniques/Special/Generated.lua" part="program" sha1="c3e7bb275c5168ab198abdc22d296210bfe79bbb" />
<File name="Data/Uniques/Special/New.lua" part="program" sha1="6f179d1e96131b07c33d46d979216fba6d3b4e6c" />
<File name="Data/Uniques/Special/race.lua" part="program" sha1="74cd16a8a7ed4464ed65c027c50f4dbafe879339" />
<File name="Data/Uniques/staff.lua" part="program" sha1="7f6bb645646996e402daeb31c3199c216f9c72d4" />
<File name="Data/Uniques/sword.lua" part="program" sha1="74a524e9989378bee3f973a0d658911bbd76f8db" />
<File name="Data/Uniques/tincture.lua" part="program" sha1="23d7934df6cfd42218d9104410e3c7aeebe24cac" />
<File name="Data/Uniques/traptool.lua" part="program" sha1="270d509148ff296706be7790d3e5f56d70202afa" />
<File name="Data/Uniques/wand.lua" part="program" sha1="76e37e9d20d1beb51f67ef6bdfc7a842769bb51d" />
<File name="Data/WorldAreas.lua" part="program" sha1="dada110456bfd76e04786e2a8816a75d5dc54e0b" />
<File name="GameVersions.lua" part="program" sha1="70ca762c6a8f026104e467b4345a9f2a5f54fb02" />
<File name="Launch.lua" part="program" sha1="5845a1b85e386108d97255f6058b9c822fcb3e16" />
<File name="LaunchServer.lua" part="program" sha1="94c6ba4bc2054e1739f77afcf0be1aece78a7347" />
<File name="Modules/Build.lua" part="program" sha1="e15cb7224582385591e8620a9c725d28b8ed807e" />
<File name="Modules/BuildDisplayStats.lua" part="program" sha1="3c33ee1bc6b7ea96eab67760c4955b2bcaf83640" />
<File name="Modules/BuildList.lua" part="program" sha1="99ac52b6fa77f0d6c9521b6b2f13621bfd7cbb07" />
<File name="Modules/BuildSiteTools.lua" part="program" sha1="c26122f97ec8b09a2af553e8dbc7b196ff46e782" />
<File name="Modules/CalcActiveSkill.lua" part="program" sha1="9f0f5c7cc4e68f0ca198f7d3810831ed5b5fd3ed" />
<File name="Modules/CalcBreakdown.lua" part="program" sha1="7a22c6d1f2ff0af8d8254a0f4895ea43d4b6b740" />
<File name="Modules/CalcDefence.lua" part="program" sha1="2c71a317d700da689f63d3efe2eaada1d01e1406" />
<File name="Modules/CalcMirages.lua" part="program" sha1="64dfcbb7530fc7a69c483348cce0833912e2416f" />
<File name="Modules/CalcOffence.lua" part="program" sha1="2c62d31cd6f73a81ba002d701d2176820732deb6" />
<File name="Modules/CalcPerform.lua" part="program" sha1="5c45b1d1321d4d2f3de44f2202ba25fe0c42d981" />
<File name="Modules/Calcs.lua" part="program" sha1="a6b10a4cd8bc6dad486ca742c4a70451f707b295" />
<File name="Modules/CalcSections.lua" part="program" sha1="b3fe48a7feae68d14f1430936aed404772ecb9d1" />
<File name="Modules/CalcSetup.lua" part="program" sha1="70c591be4db82b732225e12ce761259afd0c2f11" />
<File name="Modules/CalcTools.lua" part="program" sha1="b267879379e9ea29601e805e2d1506264591bb45" />
<File name="Modules/CalcTriggers.lua" part="program" sha1="e4f2cf926ef7f192c126da0a340215d7a572cf7d" />
<File name="Modules/Common.lua" part="program" sha1="80fdee369827474f6bd6e12d90ea8c6bab56a33e" />
<File name="Modules/ConfigOptions.lua" part="program" sha1="b82c4971342c826b8dc8ffcbfef07aa1e87c8faa" />
<File name="Modules/Data.lua" part="program" sha1="dc9a7bb393b034b99d26b49242492d713d320f77" />
<File name="Modules/DataLegionLookUpTableHelper.lua" part="program" sha1="170699925a438275137ba621206800e29f453eb3" />
<File name="Modules/ItemTools.lua" part="program" sha1="44c63fb06069b78012e9ca9be49c3b38a11694a4" />
<File name="Modules/Main.lua" part="program" sha1="c152b1c340ccb60c6fc6a2c145ae0b40b3aaa8ab" />
<File name="Modules/ModParser.lua" part="program" sha1="f002daa40c6dbcb931e6fcde6fa805702dfe9693" />
<File name="Modules/ModTools.lua" part="program" sha1="311df7cede5d9af0953476e49f9002aa1492b12b" />
<File name="Modules/StatDescriber.lua" part="program" sha1="f18538f4b8852eb0631d39ee5c856bc782528529" />
<File name="UpdateApply.lua" part="program" sha1="4dd42f413cb89a963e4ae1b40e214985b909c05b" />
<File name="UpdateCheck.lua" part="default" sha1="2ae35a08c9445d68c4fc92254fcf50c8b780bf72" />
<File name="lua/base64.lua" part="runtime" sha1="18629865eb351e483178b6524fb3935cbc9b8297" />
<File name="lua/dkjson.lua" part="runtime" sha1="d2c9e5433a24b8593886a36cfc267cb05d3bc529" />
<File name="lua/sha1/bit32_ops.lua" part="runtime" sha1="25bc8def626fd8d8bd3d37dcd96808c6b8b00087" />
<File name="lua/sha1/bit_ops.lua" part="runtime" sha1="53ce6b3174386d1e4565ced0c1a7f1b3df3bb83f" />
<File name="lua/sha1/common.lua" part="runtime" sha1="70faf0efa48e6d44c7b8a4279467f0025257b84f" />
<File name="lua/sha1/init.lua" part="runtime" sha1="e23c730650ac2ffe595b4ed2a5f3484225414ebd" />
<File name="lua/sha1/lua53_ops.lua" part="runtime" sha1="b10c732f322358c4112226df61af61f53a21b911" />
<File name="lua/sha1/pure_lua_ops.lua" part="runtime" sha1="0dff15b1cfd171a3572032346613adcf5e9962c2" />
<File name="lua/sha2.lua" part="runtime" sha1="be1204772be5b5cb29f0ba65f1323b08f561bf6b" />
<File name="lua/socket.lua" part="runtime" sha1="d05ae2b3085427cdd8f213d3d7ea4e9a1c446357" />
<File name="lua/xml.lua" part="runtime" sha1="859e09104842f91a4aaa9a4d9fadf667535877e2" />
<File name="TreeData/0_1/ascendancy-background_1500_1500_BC7.dds.zst" part="tree" sha1="fc5111b72c5da72ddfa60149e40aa24235743580" />
<File name="TreeData/0_1/ascendancy-background_4000_4000_BC7.dds.zst" part="tree" sha1="3b55cc6cc196eb4e5fc198e59b131d7f0fcb3c06" />
<File name="TreeData/0_1/background_348_348_BC7.dds.zst" part="tree" sha1="d0ca1a91ddd57a3d8f37902fdb8a93adf0766967" />
<File name="TreeData/0_1/background_1024_1024_BC7.dds.zst" part="tree" sha1="9075f0f0e4db5fedd3ac542cfab37a15de5bcafe" />
<File name="TreeData/0_1/group-background_92_92_BC7.dds.zst" part="tree" sha1="715411b1326fcd5a4bddc2e803db945f5e65a838" />
<File name="TreeData/0_1/group-background_104_104_BC7.dds.zst" part="tree" sha1="3ece257b4bca23cc2420cec7944d1b72f5b464f2" />
<File name="TreeData/0_1/group-background_124_124_BC7.dds.zst" part="tree" sha1="fc01635b062e9924d034422b5db75d666bc8b0b3" />
<File name="TreeData/0_1/group-background_140_140_BC7.dds.zst" part="tree" sha1="141f383ed3e525424e682eec677c18719aec4651" />
<File name="TreeData/0_1/group-background_152_156_BC7.dds.zst" part="tree" sha1="e5c8f23bb08f2e0fc8eef3e86279f352a85914d0" />
<File name="TreeData/0_1/group-background_160_164_BC7.dds.zst" part="tree" sha1="1d3ba32446b154f568fa0c8af1a8b698ab4d621c" />
<File name="TreeData/0_1/group-background_208_208_BC7.dds.zst" part="tree" sha1="13a94e3dff9d68d874551007ff89a3869cfbee09" />
<File name="TreeData/0_1/group-background_216_220_BC7.dds.zst" part="tree" sha1="167d0b705933be7ab096adf52fd9f3a9c7c71503" />
<File name="TreeData/0_1/group-background_220_224_BC7.dds.zst" part="tree" sha1="0f0e60382303c823b1329e854220013b896158be" />
<File name="TreeData/0_1/group-background_280_276_BC7.dds.zst" part="tree" sha1="bb9198a6cacff6bed35d9884efacc2a0e31fe09e" />
<File name="TreeData/0_1/group-background_296_300_BC7.dds.zst" part="tree" sha1="335d5382271e0d9ec09cc9188b1810f4913908d3" />
<File name="TreeData/0_1/group-background_360_360_BC7.dds.zst" part="tree" sha1="bfb8d85cba99f771cdc1b7040eb8dd2d0c73a324" />
<File name="TreeData/0_1/group-background_440_440_BC7.dds.zst" part="tree" sha1="8ff068091fab7172775b44c7a819f5ff922e251c" />
<File name="TreeData/0_1/group-background_468_468_BC7.dds.zst" part="tree" sha1="9c8073a6be6d326a172e976bf584b3d4e72b019c" />
<File name="TreeData/0_1/group-background_488_488_BC7.dds.zst" part="tree" sha1="ce40cebca2c51892c2296b04842273925d736978" />
<File name="TreeData/0_1/group-background_528_528_BC7.dds.zst" part="tree" sha1="0b80c15a639ced3e51e9609de4070d30518086a6" />
<File name="TreeData/0_1/group-background_632_632_BC7.dds.zst" part="tree" sha1="6a01f6b6a3c1fdf03c4d99685d4ef11751eed301" />
<File name="TreeData/0_1/group-background_712_712_BC7.dds.zst" part="tree" sha1="efaca12d4e040aad7d9474118bae15c730c9ce99" />
<File name="TreeData/0_1/group-background_740_376_BC7.dds.zst" part="tree" sha1="833569f99a2f4b9d7dab6165a04a2751578362a4" />
<File name="TreeData/0_1/group-background_756_756_BC7.dds.zst" part="tree" sha1="4693658151e36cdeadfefa1624ac3377a6dfaab7" />
<File name="TreeData/0_1/group-background_952_988_BC7.dds.zst" part="tree" sha1="de711bc6fbcbd383a0b7c436d22afd0caca72d6e" />
<File name="TreeData/0_1/group-background_1000_508_BC7.dds.zst" part="tree" sha1="c243630f8caae501447f772addd2e46c454fd912" />
<File name="TreeData/0_1/jewel-sockets_152_156_BC7.dds.zst" part="tree" sha1="14cbee1366257f9f29c90f439dab8b3bd9844718" />
<File name="TreeData/0_1/jewel-sockets_208_208_BC7.dds.zst" part="tree" sha1="ec025e1e282d6382637d869ea2ad61903f8a385f" />
<File name="TreeData/0_1/legion_64_64_BC1.dds.zst" part="tree" sha1="57780219eb8c0f839ff1954d511983c7c7cae656" />
<File name="TreeData/0_1/legion_128_128_BC1.dds.zst" part="tree" sha1="a8e4aa7b6fbc7e9d1666bd91c9113c804d0d6fa8" />
<File name="TreeData/0_1/legion_564_564_BC7.dds.zst" part="tree" sha1="bb68096499abd163de7727034be292ba4d5d61aa" />
<File name="TreeData/0_1/legion_756_756_BC7.dds.zst" part="tree" sha1="83533c5ac2019314b5365dfb11b97684e2aba6bb" />
<File name="TreeData/0_1/legion_1860_1864_BC7.dds.zst" part="tree" sha1="cd5745e300933fca94b174de6af243d616e22f02" />
<File name="TreeData/0_1/lines_1436_1436_BC7.dds.zst" part="tree" sha1="f39e159b40fafcc9687e37ce6efaf4c4ed4f5455" />
<File name="TreeData/0_1/lines_1940_1940_BC7.dds.zst" part="tree" sha1="8b8d6cf89ca4bda8c0b785f706962d9ab39b9e2b" />
<File name="TreeData/0_1/mastery-active-effect_776_768_BC7.dds.zst" part="tree" sha1="8b9f986fb49df4bbeec38269997e30eaaaef562d" />
<File name="TreeData/0_1/oils_108_108_RGBA.dds.zst" part="tree" sha1="abf58ace0c8b9987d7b2d9b79dc047226c970a50" />
<File name="TreeData/0_1/orbit_active0.png" part="tree" sha1="c17c7c0682240494614ccc3dd183a0ca9aca2cc4" />
<File name="TreeData/0_1/orbit_active1.png" part="tree" sha1="182cf3b511e0c3351c6893008b284fd9cd3b82f8" />
<File name="TreeData/0_1/orbit_active2.png" part="tree" sha1="5fce3cc77cfc325eb495d72529f080941cf0036c" />
<File name="TreeData/0_1/orbit_active3.png" part="tree" sha1="23fa36975a975295f699f4fe69cba286e39f7b1d" />
<File name="TreeData/0_1/orbit_active4.png" part="tree" sha1="efb316bce82e32f1bfc5962557d60a1aa51593bb" />
<File name="TreeData/0_1/orbit_active5.png" part="tree" sha1="2355ac517d5d16dc7fac4be67efc69471f06ff85" />
<File name="TreeData/0_1/orbit_active6.png" part="tree" sha1="2021dde3435b3b9187b4c5384bc6b9af45201c8d" />
<File name="TreeData/0_1/orbit_active7.png" part="tree" sha1="d3bf38c8a19ccf53eaab61201ee7f9cdfde288ed" />
<File name="TreeData/0_1/orbit_active8.png" part="tree" sha1="cf0a2d180dc561a0c514bde64f173728209ee141" />
<File name="TreeData/0_1/orbit_active9.png" part="tree" sha1="25374c4ea9ddef7af2671d85a762242d22763060" />
<File name="TreeData/0_1/orbit_intermediate0.png" part="tree" sha1="e4d2aba19e88a6a70d76248fd3a8dcc31563795d" />
<File name="TreeData/0_1/orbit_intermediate1.png" part="tree" sha1="25cc1b849c7462f346885c56c309ba8c470f5c3b" />
<File name="TreeData/0_1/orbit_intermediate2.png" part="tree" sha1="be81b097e0aac09868d67bba6101dc7a463b65f2" />
<File name="TreeData/0_1/orbit_intermediate3.png" part="tree" sha1="f4fc716133d741c6fd81fa6831a9caf37ace4f3b" />
<File name="TreeData/0_1/orbit_intermediate4.png" part="tree" sha1="b397dd785899c1f4b7083fc33a37c7071037836e" />
<File name="TreeData/0_1/orbit_intermediate5.png" part="tree" sha1="31809aafddec8ef88eaf33b48e564cc8e300ed05" />
<File name="TreeData/0_1/orbit_intermediate6.png" part="tree" sha1="0b41329c5ee3e73756a05c01be7bc6c8c21ecf02" />
<File name="TreeData/0_1/orbit_intermediate7.png" part="tree" sha1="b6d94b7824fa65cd06df24548b49cd4884ec9e51" />
<File name="TreeData/0_1/orbit_intermediate8.png" part="tree" sha1="e56ea575cbffda91aa8f1309edab0a0828a8a3ae" />
<File name="TreeData/0_1/orbit_intermediate9.png" part="tree" sha1="d1eb7291dcc5a1fd6126a19ec07451d45764c6ba" />
<File name="TreeData/0_1/orbit_normal0.png" part="tree" sha1="d4508db82db53063d50750d3ba9d97dad27bd13b" />
<File name="TreeData/0_1/orbit_normal1.png" part="tree" sha1="bca7b52d00475e9e64812caeb8066072c64dd601" />
<File name="TreeData/0_1/orbit_normal2.png" part="tree" sha1="691057a335256406ac324d836ba6a09b05ec00f2" />
<File name="TreeData/0_1/orbit_normal3.png" part="tree" sha1="c45792c111142135c18dcc9d58d3654c88c70687" />
<File name="TreeData/0_1/orbit_normal4.png" part="tree" sha1="64bff9325467cf8266af8112758c64ec4f4ed0fb" />
<File name="TreeData/0_1/orbit_normal5.png" part="tree" sha1="44bd2eafbbeea02171e5e6888aa12cdb34522b53" />
<File name="TreeData/0_1/orbit_normal6.png" part="tree" sha1="e4f3c73cfe00f1c61d7e321c9f1ccb03149bf3d5" />
<File name="TreeData/0_1/orbit_normal7.png" part="tree" sha1="8f9bdd89396d66eb098ac6fa5554d051674dbd41" />
<File name="TreeData/0_1/orbit_normal8.png" part="tree" sha1="88611a0daf1fb9618f022ab651bb44a82232aab6" />
<File name="TreeData/0_1/orbit_normal9.png" part="tree" sha1="a689c028ab279085c65a6d291a124442492dab92" />
<File name="TreeData/0_1/skills-disabled_64_64_BC1.dds.zst" part="tree" sha1="18c50003a0625b57ca29176d618b064784761154" />
<File name="TreeData/0_1/skills-disabled_88_88_BC1.dds.zst" part="tree" sha1="0947e7e4e7c0bd2269e0ba2f2636b6a4fa2ba554" />
<File name="TreeData/0_1/skills-disabled_128_128_BC1.dds.zst" part="tree" sha1="ac5657395821d0d8c412ee3035095bd07f447942" />
<File name="TreeData/0_1/skills-disabled_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_1/skills-disabled_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_1/skills-disabled_232_232_BC1.dds.zst" part="tree" sha1="145b1c78f762a0006b932495eb76124c806d177e" />
<File name="TreeData/0_1/skills_64_64_BC1.dds.zst" part="tree" sha1="ac76db101a5065d160edae968c91b0e254004dfc" />
<File name="TreeData/0_1/skills_88_88_BC1.dds.zst" part="tree" sha1="ce5e6dd789894de188b8caf49b764e83db536ef2" />
<File name="TreeData/0_1/skills_128_128_BC1.dds.zst" part="tree" sha1="eab301f7a00239d798bc4fac706da2294bcf6780" />
<File name="TreeData/0_1/skills_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_1/skills_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_1/skills_232_232_BC1.dds.zst" part="tree" sha1="145b1c78f762a0006b932495eb76124c806d177e" />
<File name="TreeData/0_1/tree.json" part="tree" sha1="d76844f6cb1e2a2ad22928b001d30e5d09770754" />
<File name="TreeData/0_1/tree.lua" part="tree" sha1="45872f4911f48b483b161648fbc380c18f693e64" />
<File name="TreeData/0_2/ascendancy-background_1500_1500_BC7.dds.zst" part="tree" sha1="fbcc756df4f15d209201ed56c01bb31a661433be" />
<File name="TreeData/0_2/ascendancy-background_4000_4000_BC7.dds.zst" part="tree" sha1="b8915444bd4f812207cbbc52d9ab75336da9c9a1" />
<File name="TreeData/0_2/background_1024_1024_BC7.dds.zst" part="tree" sha1="9075f0f0e4db5fedd3ac542cfab37a15de5bcafe" />
<File name="TreeData/0_2/group-background_64_64_BC7.dds.zst" part="tree" sha1="9bcb96b1469b9591efe09053a509d6f51668f2bd" />
<File name="TreeData/0_2/group-background_92_92_BC7.dds.zst" part="tree" sha1="715411b1326fcd5a4bddc2e803db945f5e65a838" />
<File name="TreeData/0_2/group-background_104_104_BC7.dds.zst" part="tree" sha1="3ece257b4bca23cc2420cec7944d1b72f5b464f2" />
<File name="TreeData/0_2/group-background_152_156_BC7.dds.zst" part="tree" sha1="c65f3beeedaed132e8f17477443b23c91553e5a1" />
<File name="TreeData/0_2/group-background_160_164_BC7.dds.zst" part="tree" sha1="1d3ba32446b154f568fa0c8af1a8b698ab4d621c" />
<File name="TreeData/0_2/group-background_208_208_BC7.dds.zst" part="tree" sha1="13a94e3dff9d68d874551007ff89a3869cfbee09" />
<File name="TreeData/0_2/group-background_220_224_BC7.dds.zst" part="tree" sha1="0f0e60382303c823b1329e854220013b896158be" />
<File name="TreeData/0_2/group-background_360_360_BC7.dds.zst" part="tree" sha1="bfb8d85cba99f771cdc1b7040eb8dd2d0c73a324" />
<File name="TreeData/0_2/group-background_440_440_BC7.dds.zst" part="tree" sha1="8ff068091fab7172775b44c7a819f5ff922e251c" />
<File name="TreeData/0_2/group-background_468_468_BC7.dds.zst" part="tree" sha1="9c8073a6be6d326a172e976bf584b3d4e72b019c" />
<File name="TreeData/0_2/group-background_528_528_BC7.dds.zst" part="tree" sha1="0b80c15a639ced3e51e9609de4070d30518086a6" />
<File name="TreeData/0_2/group-background_740_376_BC7.dds.zst" part="tree" sha1="833569f99a2f4b9d7dab6165a04a2751578362a4" />
<File name="TreeData/0_2/group-background_756_756_BC7.dds.zst" part="tree" sha1="4693658151e36cdeadfefa1624ac3377a6dfaab7" />
<File name="TreeData/0_2/group-background_952_988_BC7.dds.zst" part="tree" sha1="de711bc6fbcbd383a0b7c436d22afd0caca72d6e" />
<File name="TreeData/0_2/jewel-sockets_152_156_BC7.dds.zst" part="tree" sha1="14cbee1366257f9f29c90f439dab8b3bd9844718" />
<File name="TreeData/0_2/legion_64_64_BC1.dds.zst" part="tree" sha1="57780219eb8c0f839ff1954d511983c7c7cae656" />
<File name="TreeData/0_2/legion_128_128_BC1.dds.zst" part="tree" sha1="a8e4aa7b6fbc7e9d1666bd91c9113c804d0d6fa8" />
<File name="TreeData/0_2/legion_564_564_BC7.dds.zst" part="tree" sha1="bb68096499abd163de7727034be292ba4d5d61aa" />
<File name="TreeData/0_2/lines_1436_1436_BC7.dds.zst" part="tree" sha1="f39e159b40fafcc9687e37ce6efaf4c4ed4f5455" />
<File name="TreeData/0_2/mastery-active-effect_776_768_BC7.dds.zst" part="tree" sha1="46b7fdc57b6ba33b907292deae40f552d68cee6f" />
<File name="TreeData/0_2/monster-categories_36_36_BC7.dds.zst" part="tree" sha1="9fe139d351cdd3c6022a50fea28641b3e56cca90" />
<File name="TreeData/0_2/oils_108_108_RGBA.dds.zst" part="tree" sha1="abf58ace0c8b9987d7b2d9b79dc047226c970a50" />
<File name="TreeData/0_2/orbit_active0.png" part="tree" sha1="e00ae894f159daaf37b3f1e7e95750e9000ec1a7" />
<File name="TreeData/0_2/orbit_active1.png" part="tree" sha1="06393366d99404c344ba9059a80b60947868d480" />
<File name="TreeData/0_2/orbit_active2.png" part="tree" sha1="34a67550db3f00e7bc8b20eface3818f32086578" />
<File name="TreeData/0_2/orbit_active3.png" part="tree" sha1="62242c60271453033098ee2cf7c3701a133a27bc" />
<File name="TreeData/0_2/orbit_active4.png" part="tree" sha1="754d425ee4cc75813232e93b08a52a9d6f25695b" />
<File name="TreeData/0_2/orbit_active5.png" part="tree" sha1="1caf6508def0cce588b5e9a7ec0c878e98264007" />
<File name="TreeData/0_2/orbit_active6.png" part="tree" sha1="d00d01c0d598370aec7df7b31f5c2f18b3540dd4" />
<File name="TreeData/0_2/orbit_active7.png" part="tree" sha1="868893007ca8f84b84cb160e3402d352baaa7206" />
<File name="TreeData/0_2/orbit_active8.png" part="tree" sha1="6fc4ede4eb379df3ef8dbe7b1e18aa28b5d8dd91" />
<File name="TreeData/0_2/orbit_active9.png" part="tree" sha1="23679dd6d1dd0c39ef30e7be343932226386aeac" />
<File name="TreeData/0_2/orbit_intermediate0.png" part="tree" sha1="685791f48639916879532e23cec393852bc147df" />
<File name="TreeData/0_2/orbit_intermediate1.png" part="tree" sha1="a811fb774d1fa3ead89112dad835f552b4ddc913" />
<File name="TreeData/0_2/orbit_intermediate2.png" part="tree" sha1="ee38ef27cbfc525022a3c3f60dbcbb8dc0beb48c" />
<File name="TreeData/0_2/orbit_intermediate3.png" part="tree" sha1="cf3785f85bccbd3a5afdf77059f9e7ca43dfc313" />
<File name="TreeData/0_2/orbit_intermediate4.png" part="tree" sha1="3af7f8390606e8dc3e56715d3b79a8192b35a131" />
<File name="TreeData/0_2/orbit_intermediate5.png" part="tree" sha1="78385c1958353ca7eb5d90dbf69119cb779d69ec" />
<File name="TreeData/0_2/orbit_intermediate6.png" part="tree" sha1="20bc80d9fce771beb074c533768799b46ce691e8" />
<File name="TreeData/0_2/orbit_intermediate7.png" part="tree" sha1="402689ac9b70b90c1d386f6493e64e28846a91fb" />
<File name="TreeData/0_2/orbit_intermediate8.png" part="tree" sha1="ce86156b98d526e061aff68ca7b220ae65c15f3e" />
<File name="TreeData/0_2/orbit_intermediate9.png" part="tree" sha1="72bce84f422f4f2512cff06f6bc59cced9ca366d" />
<File name="TreeData/0_2/orbit_normal0.png" part="tree" sha1="ec07540c2f3f4884f3ac7c21586603d6718c27fc" />
<File name="TreeData/0_2/orbit_normal1.png" part="tree" sha1="a130efd15258a5c88b45551c69067b614f1f9b8a" />
<File name="TreeData/0_2/orbit_normal2.png" part="tree" sha1="c25d4c2174ccdd69bdf95b2e4030da2f95ea4bde" />
<File name="TreeData/0_2/orbit_normal3.png" part="tree" sha1="69841d23264a9466a80938bc35410a2cb5d4eaba" />
<File name="TreeData/0_2/orbit_normal4.png" part="tree" sha1="1f9b964426a27a587b4ada63a7fa2e1a51cf1c5b" />
<File name="TreeData/0_2/orbit_normal5.png" part="tree" sha1="578391a285727ea688a06f9b765a94c7499f97ac" />
<File name="TreeData/0_2/orbit_normal6.png" part="tree" sha1="2ad8e68f8f73a3b3fc0805ed2a5625d97641ce60" />
<File name="TreeData/0_2/orbit_normal7.png" part="tree" sha1="0ee11795f938aec37d21e177639a4b981bc5985c" />
<File name="TreeData/0_2/orbit_normal8.png" part="tree" sha1="f1f25fc965ad71a21df580fed1af924d42cd5d70" />
<File name="TreeData/0_2/orbit_normal9.png" part="tree" sha1="35b17068d109657d8f55c5ba89d13e461b48c64b" />
<File name="TreeData/0_2/skills-disabled_64_64_BC1.dds.zst" part="tree" sha1="7a7f1f12d3e2f2967071a09eebfbc0327b6e2ae3" />
<File name="TreeData/0_2/skills-disabled_128_128_BC1.dds.zst" part="tree" sha1="c9f6e7c5f904de970eed5c2826631dfffd45d8ba" />
<File name="TreeData/0_2/skills-disabled_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_2/skills-disabled_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_2/skills_64_64_BC1.dds.zst" part="tree" sha1="9f63d697329488e5bd6161f31a7ac3cb204589ca" />
<File name="TreeData/0_2/skills_128_128_BC1.dds.zst" part="tree" sha1="d147c838f7e6efffcaff56b231b844ec71856bc2" />
<File name="TreeData/0_2/skills_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_2/skills_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_2/tree.json" part="tree" sha1="356f7d66cda5151c6652f68b4548d9e93dbb2c78" />
<File name="TreeData/0_2/tree.lua" part="tree" sha1="ade2329a90715e7c11c96319ab6ef7caea72da61" />
<File name="TreeData/0_3/ascendancy-background_1500_1500_BC7.dds.zst" part="tree" sha1="942356d3b86733a3ed51021965654c6897e43ba7" />
<File name="TreeData/0_3/ascendancy-background_4000_4000_BC7.dds.zst" part="tree" sha1="b8915444bd4f812207cbbc52d9ab75336da9c9a1" />
<File name="TreeData/0_3/background_1024_1024_BC7.dds.zst" part="tree" sha1="9075f0f0e4db5fedd3ac542cfab37a15de5bcafe" />
<File name="TreeData/0_3/group-background_92_92_BC7.dds.zst" part="tree" sha1="715411b1326fcd5a4bddc2e803db945f5e65a838" />
<File name="TreeData/0_3/group-background_104_104_BC7.dds.zst" part="tree" sha1="4ae4be6fde8a0e640f6c52442d9f09270068fb4f" />
<File name="TreeData/0_3/group-background_152_156_BC7.dds.zst" part="tree" sha1="89273cc656bca8ede4f9233a24d96cfaf808bcbc" />
<File name="TreeData/0_3/group-background_160_164_BC7.dds.zst" part="tree" sha1="1d3ba32446b154f568fa0c8af1a8b698ab4d621c" />
<File name="TreeData/0_3/group-background_208_208_BC7.dds.zst" part="tree" sha1="3ba15a835072e2ee56099593c5aa1b6f3f6a6561" />
<File name="TreeData/0_3/group-background_220_224_BC7.dds.zst" part="tree" sha1="0f0e60382303c823b1329e854220013b896158be" />
<File name="TreeData/0_3/group-background_360_360_BC7.dds.zst" part="tree" sha1="bfb8d85cba99f771cdc1b7040eb8dd2d0c73a324" />
<File name="TreeData/0_3/group-background_468_468_BC7.dds.zst" part="tree" sha1="9c8073a6be6d326a172e976bf584b3d4e72b019c" />
<File name="TreeData/0_3/group-background_528_528_BC7.dds.zst" part="tree" sha1="0b80c15a639ced3e51e9609de4070d30518086a6" />
<File name="TreeData/0_3/group-background_740_376_BC7.dds.zst" part="tree" sha1="833569f99a2f4b9d7dab6165a04a2751578362a4" />
<File name="TreeData/0_3/jewel-sockets_152_156_BC7.dds.zst" part="tree" sha1="94134ad9b5c6031c789b5dff4bfc6287f87127b6" />
<File name="TreeData/0_3/legion_64_64_BC1.dds.zst" part="tree" sha1="f829d5ae460b3f6130e06524c99cb94ffcc7311e" />
<File name="TreeData/0_3/legion_128_128_BC1.dds.zst" part="tree" sha1="45072083b538e31e25599a605795ad5e16f7c8ec" />
<File name="TreeData/0_3/legion_564_564_BC7.dds.zst" part="tree" sha1="51eb2e9cdae5cdc72749760b5614a1aed91c3d75" />
<File name="TreeData/0_3/legion_1024_1024_BC7.dds.zst" part="tree" sha1="8f7383ff8ec4611a2091372936bb324557b899fa" />
<File name="TreeData/0_3/lines_1436_1436_BC7.dds.zst" part="tree" sha1="f39e159b40fafcc9687e37ce6efaf4c4ed4f5455" />
<File name="TreeData/0_3/mastery-active-effect_776_768_BC7.dds.zst" part="tree" sha1="554e54cc675071896e31c3129a2c151ab1b74493" />
<File name="TreeData/0_3/monster-categories_36_36_BC7.dds.zst" part="tree" sha1="9fe139d351cdd3c6022a50fea28641b3e56cca90" />
<File name="TreeData/0_3/oils_108_108_RGBA.dds.zst" part="tree" sha1="165072670df794c47d1bea366b8ca2787214e4c5" />
<File name="TreeData/0_3/orbit_active0.png" part="tree" sha1="845dc1e9939f56f3c4095832e914a766d37a5bf5" />
<File name="TreeData/0_3/orbit_active1.png" part="tree" sha1="8a52e1df34828dce5780f852ff3a072d20edac89" />
<File name="TreeData/0_3/orbit_active2.png" part="tree" sha1="3ae30986c4e8bc20d557c4b7f12f6548e9d5deeb" />
<File name="TreeData/0_3/orbit_active3.png" part="tree" sha1="5196dd17d9f0f8264f5389bd489a4b496bd86eda" />
<File name="TreeData/0_3/orbit_active4.png" part="tree" sha1="6f1cf66649aeeb1feff20a55cbdf3385327ce2f9" />
<File name="TreeData/0_3/orbit_active5.png" part="tree" sha1="e2bca5da9960c3eb0cc2b7cb0282d213e337ef9d" />
<File name="TreeData/0_3/orbit_active6.png" part="tree" sha1="26a1eb1c4518236975e208d61d9ac611eb769e78" />
<File name="TreeData/0_3/orbit_active7.png" part="tree" sha1="ca013eb3f8acab123864ea7feb35c190c45f730f" />
<File name="TreeData/0_3/orbit_active8.png" part="tree" sha1="dd9883e266ce76b1dc84372cef991375b69702e8" />
<File name="TreeData/0_3/orbit_active9.png" part="tree" sha1="9b269636c0fb00f053a223c6ef70db326d53f583" />
<File name="TreeData/0_3/orbit_intermediate0.png" part="tree" sha1="7078a5a9568569cee03c852f39a030490e5b209d" />
<File name="TreeData/0_3/orbit_intermediate1.png" part="tree" sha1="7263b973f4fc5af686578f7b0bec5ff733b59d61" />
<File name="TreeData/0_3/orbit_intermediate2.png" part="tree" sha1="c46c57faab3fc22fff49bfbabf41237f92822bff" />
<File name="TreeData/0_3/orbit_intermediate3.png" part="tree" sha1="b98e724732710b668429adf94de71b608e6b98b8" />
<File name="TreeData/0_3/orbit_intermediate4.png" part="tree" sha1="65a3ab4d5666df4e451758b3e2bf0293e0ac3298" />
<File name="TreeData/0_3/orbit_intermediate5.png" part="tree" sha1="e54387447ff47c68e9b25d74394ea1c592b6a27c" />
<File name="TreeData/0_3/orbit_intermediate6.png" part="tree" sha1="7d4705c005f26bce62ea62b7bd115be1c00a8c0b" />
<File name="TreeData/0_3/orbit_intermediate7.png" part="tree" sha1="dfa2d4496fba4cfdb9126638b4cfea7a07474bf6" />
<File name="TreeData/0_3/orbit_intermediate8.png" part="tree" sha1="d2cdcbfb4b9c532c3555aa1710a4c91dec55485f" />
<File name="TreeData/0_3/orbit_intermediate9.png" part="tree" sha1="611aa0c7a6a57f01f21fcd31017749d6daf76150" />
<File name="TreeData/0_3/orbit_normal0.png" part="tree" sha1="be3e1f9c7daa279094f0c9dd8a33bc0710fcab35" />
<File name="TreeData/0_3/orbit_normal1.png" part="tree" sha1="aa3698932941201cf1b91000ab4e09ad819cf498" />
<File name="TreeData/0_3/orbit_normal2.png" part="tree" sha1="fee0af1c53cd94860eec7ab1cb137683fe23cfd6" />
<File name="TreeData/0_3/orbit_normal3.png" part="tree" sha1="e5cd7cb23f09125a3c54872d20284fa451e66f5d" />
<File name="TreeData/0_3/orbit_normal4.png" part="tree" sha1="91a1b253a1f53d87e5fdd5455645870fbfc4582d" />
<File name="TreeData/0_3/orbit_normal5.png" part="tree" sha1="7bbcadf5a2b93dd2830e09e9ae194049eb486c83" />
<File name="TreeData/0_3/orbit_normal6.png" part="tree" sha1="1c583126b84b6755e08697b2f9aa4b13babe0617" />
<File name="TreeData/0_3/orbit_normal7.png" part="tree" sha1="c29a33a369e15c7f0efa1be201435fe63b7e4a49" />
<File name="TreeData/0_3/orbit_normal8.png" part="tree" sha1="e5d445c196e8e16692582be1848dc48ea3e9cda8" />
<File name="TreeData/0_3/orbit_normal9.png" part="tree" sha1="33c1aef26bdda33e17bfb4bd1f426c63ef267763" />
<File name="TreeData/0_3/skills-disabled_64_64_BC1.dds.zst" part="tree" sha1="bf590783fec6af27ba2ce34f15c297ac47626e37" />
<File name="TreeData/0_3/skills-disabled_128_128_BC1.dds.zst" part="tree" sha1="c9c00e5b82a8df3094515e6bde1fe0bdf595851f" />
<File name="TreeData/0_3/skills-disabled_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_3/skills-disabled_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_3/skills_64_64_BC1.dds.zst" part="tree" sha1="881df35c9b06c6c13f36963b57e47b033a59df42" />
<File name="TreeData/0_3/skills_128_128_BC1.dds.zst" part="tree" sha1="bdc99642dea06c3f01710aefa67003f4ddcc010c" />
<File name="TreeData/0_3/skills_172_172_BC1.dds.zst" part="tree" sha1="5251feaaaae895998f21b69e16c4772037485763" />
<File name="TreeData/0_3/skills_176_176_BC1.dds.zst" part="tree" sha1="e95984aec764b7c4b1e35b78e92da9d195be6dc0" />
<File name="TreeData/0_3/tree.json" part="tree" sha1="16a40f693a67cc6e34ba8e9098f04652c9607ac5" />
<File name="TreeData/0_3/tree.lua" part="tree" sha1="f28785d218631fdd034576ca6fd88173b1c3562b" />
<File name="TreeData/legion/skills-additional-3.jpg" part="tree" sha1="b98c0a2b9ac6dd585450789e2b53437e246592bf" />
<File name="TreeData/legion/skills-additional-disabled-3.jpg" part="tree" sha1="988e3d5a1b489fb8ae4eb3647f32fec689c6eddb" />
<File name="TreeData/legion/tree-legion.lua" part="tree" sha1="3b57c9eae4553c66407b8ce4981aca5c06c7ad92" />
</PoBVersion>
+83
View File
@@ -0,0 +1,83 @@
import argparse
import hashlib
import urllib.request
import xml.etree.ElementTree as Et
from pathlib import Path
# Downloads the official PoB manifest file and performs the following modifications:
# - set platform and branch
# - add a new 'default' source that points to this repo
# - rename old 'default' source to 'origin'
# - remove win32 libraries and executables
# - remove font files
# - use modified UpdateCheck.lua from this repo, which is compatible with unix paths and disables the 'basic' update mode
repo = "meehl/RustyPathOfBuilding"
def is_font_file(name: str) -> bool:
return name.endswith(".tga") or name.endswith(".tgf")
def is_tar_file(name: str) -> bool:
return name.endswith(".tar") or name.endswith(".tgf")
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--game", choices=["poe1", "poe2"], required=True)
args = parser.parse_args()
if args.game == "poe1":
origin_url = "https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding/master/manifest.xml"
else:
origin_url = "https://raw.githubusercontent.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/master/manifest.xml"
with urllib.request.urlopen(origin_url) as f:
manifest_root = Et.fromstring(f.read().decode("utf-8"))
for child in list(manifest_root):
if child.tag == "Version":
child.set("branch", "master")
child.set("platform", "any")
elif child.tag == "Source":
if child.get("part") == "default":
child.set("part", "origin")
if child.get("platform") is not None:
child.attrib.pop("platform")
elif child.tag == "File":
if child.get("part") == "default":
child.set("part", "origin")
if (
child.get("runtime") is not None
or is_font_file(child.get("name"))
or is_tar_file(child.get("name"))
):
manifest_root.remove(child)
if child.get("name") == "UpdateCheck.lua":
child.set("part", "default")
path = Path(f"../manifest/{args.game}/UpdateCheck.lua")
data = path.read_bytes()
sha1 = hashlib.sha1(data).hexdigest()
child.set("sha1", sha1)
default_source = Et.Element(
"Source",
{
"part": "default",
"url": f"https://raw.githubusercontent.com/{repo}/main/lua/{args.game}/",
},
)
manifest_root.insert(1, default_source)
tree = Et.ElementTree(manifest_root)
Et.indent(tree, "\t")
tree.write(f"./{args.game}/manifest.xml")
if __name__ == "__main__":
main()
+396
View File
@@ -0,0 +1,396 @@
use std::{
fs,
io::{Read, Write, stdout},
path::PathBuf,
time::{SystemTime, UNIX_EPOCH},
};
use anyhow::anyhow;
use directories::UserDirs;
use flate2::{
Compression,
read::{ZlibDecoder, ZlibEncoder},
};
use glob::glob;
use mlua::{
Function, IntoLua, IntoLuaMulti, Lua, MultiValue, Result as LuaResult, String as LuaString,
Table, Value, Variadic,
};
use crate::{
Game,
api::{image_handle::ImageHandle, rendering::PoBString, search_handle::SearchHandle},
context::CONTEXT,
input::{str_as_keycode, str_as_mousebutton},
util::{change_working_directory, get_executable_dir},
};
mod image_handle;
mod rendering;
mod search_handle;
/// Register functions that can be called from lua
pub fn register_globals(lua: &Lua) -> LuaResult<()> {
let globals = lua.globals();
globals.set("SetMainObject", lua.create_function(set_main_object)?)?;
globals.set("SetCallback", lua.create_function(set_custom_callback)?)?;
globals.set("GetCallback", lua.create_function(get_custom_callback)?)?;
globals.set("GetUserPath", lua.create_function(get_user_path)?)?;
globals.set("GetScriptPath", lua.create_function(get_script_path)?)?;
globals.set("GetRuntimePath", lua.create_function(get_runtime_path)?)?;
globals.set("ConPrintf", lua.create_function(console_printf)?)?;
globals.set("ConExecute", lua.create_function(console_execute)?)?;
globals.set("ConClear", lua.create_function(console_clear)?)?;
globals.set("ConPrintTable", lua.create_function(console_print_table)?)?;
globals.set("PCall", lua.create_function(protected_call)?)?;
globals.set("GetTime", lua.create_function(get_time)?)?;
globals.set("MakeDir", lua.create_function(make_dir)?)?;
globals.set("StripEscapes", lua.create_function(strip_escapes)?)?;
globals.set("Inflate", lua.create_function(inflate)?)?;
globals.set("Deflate", lua.create_function(deflate)?)?;
globals.set("NewFileSearch", lua.create_function(new_search_handle)?)?;
globals.set("GetWorkDir", lua.create_function(get_work_dir)?)?;
globals.set("SetWorkDir", lua.create_function(set_work_dir)?)?;
globals.set("Copy", lua.create_function(copy)?)?;
globals.set("Paste", lua.create_function(paste)?)?;
globals.set("GetScreenSize", lua.create_function(get_screen_size)?)?;
globals.set("GetScreenScale", lua.create_function(get_screen_scale)?)?;
globals.set("GetCursorPos", lua.create_function(get_cursor_pos)?)?;
globals.set("IsKeyDown", lua.create_function(is_key_down)?)?;
globals.set("LoadModule", lua.create_function(load_module)?)?;
globals.set("PLoadModule", lua.create_function(protected_load_module)?)?;
globals.set("NewImageHandle", lua.create_function(new_image_handle)?)?;
globals.set("SetWindowTitle", lua.create_function(set_window_title)?)?;
globals.set("Restart", lua.create_function(restart)?)?;
globals.set("OpenURL", lua.create_function(open_url)?)?;
globals.set("RenderInit", lua.create_function(render_init)?)?;
// NOTE: not used by PoB
let get_draw_layer = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
let set_blend_mode = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
let get_async_count = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
let set_cursor_pos = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
let show_cursor = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
let set_clear_color = |_: &Lua, ()| -> LuaResult<()> { unimplemented!() };
globals.set("GetDrawLayer", lua.create_function(get_draw_layer)?)?;
globals.set("SetBlendMode", lua.create_function(set_blend_mode)?)?;
globals.set("GetAsyncCount", lua.create_function(get_async_count)?)?;
globals.set("SetCursorPos", lua.create_function(set_cursor_pos)?)?;
globals.set("ShowCursor", lua.create_function(show_cursor)?)?;
globals.set("SetClearColor", lua.create_function(set_clear_color)?)?;
rendering::register_globals(lua)?;
Ok(())
}
// During initialization, PoB calls `SetMainObject` with a callback table.
// Functions defined in this table are used to call back into Lua from Rust.
// Custom callback functions can be added with `SetCallback` and retrieved
// with `GetCallback`.
const CALLBACK_REGISTRY_NAME: &str = "uicallbacks";
pub fn get_callback(lua: &Lua, name: &str) -> LuaResult<Function> {
let callback_table: Table = lua.named_registry_value(CALLBACK_REGISTRY_NAME)?;
let callback_function: Value = callback_table.get(name)?;
if callback_function.is_function() {
// function defined through `SetCallback`
return Ok(callback_function.as_function().unwrap().clone());
} else {
// look for function in `MainObject`
let main_object: Table = callback_table.get("MainObject")?;
let callback_function: Value = main_object.get(name)?;
if callback_function.is_function() {
// these functions expect `MainObject` as first argument so we bind it here
return callback_function.as_function().unwrap().bind(main_object);
}
}
Err(anyhow::anyhow!("Function '{}' not found", name).into())
}
fn set_main_object(l: &Lua, main_object: Table) -> LuaResult<()> {
let callback_table = l.create_table()?;
callback_table.set("MainObject", main_object)?;
l.set_named_registry_value(CALLBACK_REGISTRY_NAME, callback_table)?;
Ok(())
}
fn set_custom_callback(l: &Lua, (name, func): (String, Function)) -> LuaResult<()> {
let callback_table: Table = l.named_registry_value(CALLBACK_REGISTRY_NAME)?;
callback_table.set(name, func)?;
Ok(())
}
fn get_custom_callback(l: &Lua, name: String) -> LuaResult<Function> {
let callback_table: Table = l.named_registry_value(CALLBACK_REGISTRY_NAME)?;
let callback_function: Function = callback_table.get(name)?;
Ok(callback_function)
}
fn get_user_path(_: &Lua, _: ()) -> LuaResult<anyhow::Result<PathBuf>> {
let user_dirs = match UserDirs::new() {
Some(user_dirs) => user_dirs,
None => return Ok(Err(anyhow!("Failed to retrieve user's home directory"))),
};
match user_dirs.document_dir() {
Some(docs_dir) => Ok(Ok(docs_dir.canonicalize().unwrap())),
None => Ok(Err(anyhow!(
"Failed to retrieve user's documents directory"
))),
}
}
// parent directory of Launch.lua script
fn get_script_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
Ok(Game::script_dir())
}
// parent directory of executable
fn get_runtime_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
match get_executable_dir() {
Ok(exe_path) => Ok(exe_path),
Err(_) => Ok(PathBuf::new()),
}
}
fn console_printf(l: &Lua, (fmt, args): (String, MultiValue)) -> LuaResult<()> {
// uses lua's builtin string.format function
let string_module: Table = l.globals().get("string")?;
let format_func: Function = string_module.get("format")?;
let formatted_string = format_func.call::<String>((fmt, args))?;
println!("{formatted_string}");
Ok(())
}
fn console_execute(_l: &Lua, _cmd: String) -> LuaResult<()> {
Ok(())
}
fn console_clear(_l: &Lua, _: ()) -> LuaResult<()> {
Ok(())
}
fn print_table(table: &Table, indent: usize, recursive: bool) -> LuaResult<()> {
let mut lock = stdout().lock();
writeln!(lock, "{{")?;
for pair in table.pairs::<Value, Value>() {
let inner_ind = indent + 2;
let (key, value) = pair?;
if key.is_string() {
write!(lock, "{0:>1$}\"{2}\" = ", "", inner_ind, key.to_string()?,)?;
} else {
write!(lock, "{0:>1$}{2} = ", "", inner_ind, key.to_string()?,)?;
}
if value.is_table() {
if recursive {
print_table(value.as_table().unwrap(), indent + 2, recursive)?;
} else {
writeln!(lock, "{}", value.to_string()?)?;
}
} else if value.is_string() {
writeln!(lock, "\"{}\"", value.to_string()?)?;
} else {
writeln!(lock, "{}", value.to_string()?)?;
}
}
writeln!(lock, "{0:>1$}}}", "", indent)?;
Ok(())
}
fn console_print_table(_l: &Lua, (table, no_recursive): (Table, Option<bool>)) -> LuaResult<()> {
print_table(&table, 0, !no_recursive.unwrap_or(true))?;
Ok(())
}
fn protected_call(l: &Lua, (func, args): (Function, MultiValue)) -> LuaResult<MultiValue> {
match func.call::<MultiValue>(args) {
// callers expect first return value to be Nil on success
Ok(return_values) => Ok(std::iter::once(Value::Nil).chain(return_values).collect()),
// otherwise it is set to error message.
Err(err) => Ok(err.to_string().into_lua_multi(l)?),
}
}
fn get_time(_l: &Lua, _: ()) -> LuaResult<u128> {
Ok(SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis())
}
fn make_dir(l: &Lua, path: String) -> LuaResult<MultiValue> {
match fs::create_dir_all(path) {
// callers expect first return value to be true on success
Ok(_) => Ok(Value::Boolean(true).into_lua_multi(l)?),
// otherwise it is set to Nil and second return value is set to error msg
Err(err) => Ok((Value::Nil, err.to_string()).into_lua_multi(l)?),
}
}
fn strip_escapes(_: &Lua, text: String) -> LuaResult<String> {
Ok(PoBString(&text).strip_escapes())
}
fn inflate(l: &Lua, compressed: LuaString) -> LuaResult<MultiValue> {
let compressed_bytes = &compressed.as_bytes()[..];
// prevent decompression of input larger than 128MiB
if compressed_bytes.len() > (128 << 20) {
return Ok((Value::Nil, "Input larger than 128 MiB")
.into_lua_multi(l)
.unwrap());
}
let mut decoder = ZlibDecoder::new(compressed_bytes);
let mut decompressed = String::new();
match decoder.read_to_string(&mut decompressed) {
Ok(_) => Ok(decompressed.into_lua_multi(l).unwrap()),
Err(e) => Ok((Value::Nil, e.to_string()).into_lua_multi(l).unwrap()),
}
}
fn deflate(l: &Lua, uncompressed: LuaString) -> LuaResult<MultiValue> {
let uncompressed_bytes = &uncompressed.as_bytes()[..];
// prevent compression of input larger than 128MiB
if uncompressed_bytes.len() > (128 << 20) {
return Ok((Value::Nil, "Input larger than 128 MiB")
.into_lua_multi(l)
.unwrap());
}
let mut encoder = ZlibEncoder::new(uncompressed_bytes, Compression::fast());
let mut compressed = String::new();
match encoder.read_to_string(&mut compressed) {
Ok(_) => Ok(compressed.into_lua_multi(l).unwrap()),
Err(e) => Ok((Value::Nil, e.to_string()).into_lua_multi(l).unwrap()),
}
}
fn new_search_handle(
l: &Lua,
(pattern, find_directories): (String, Option<bool>),
) -> LuaResult<Value> {
if let Ok(paths) = glob(&pattern) {
let directories_only = find_directories.is_some_and(|x| x);
let mut handle = SearchHandle::new(paths, directories_only);
// try to get the first result
handle.next();
// only return a handle if at least one file/directory is found
if handle.current.is_some() {
return handle.into_lua(l);
}
};
Ok(Value::Nil)
}
fn get_work_dir(_: &Lua, _: ()) -> LuaResult<PathBuf> {
Ok(CONTEXT.with_borrow(|ctx| ctx.current_working_dir().to_path_buf()))
}
// NOTE: unused
fn set_work_dir(_: &Lua, path: String) -> LuaResult<()> {
CONTEXT.with_borrow_mut(|ctx| ctx.set_current_working_dir(path.into()));
Ok(())
}
fn copy(_: &Lua, text: String) -> LuaResult<()> {
CONTEXT.with_borrow_mut(|ctx| {
ctx.clipboard
.set_text(text)
.map_err(|e| anyhow::anyhow!("{}", e))
})?;
Ok(())
}
fn paste(_: &Lua, _: ()) -> LuaResult<String> {
let text = CONTEXT.with_borrow_mut(|ctx| {
ctx.clipboard
.get_text()
.map_err(|e| anyhow::anyhow!("{}", e))
})?;
Ok(text)
}
// NOTE: needs to return physical size if this MR gets merged:
// https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/pull/1420
fn get_screen_size(_: &Lua, _: ()) -> LuaResult<(u32, u32)> {
let size = CONTEXT.with_borrow(|ctx| ctx.screen_size_logical());
Ok((size.width, size.height))
}
fn get_screen_scale(_: &Lua, _: ()) -> LuaResult<f32> {
Ok(CONTEXT.with_borrow(|ctx| ctx.pixels_per_point() as f32))
}
fn get_cursor_pos(_: &Lua, _: ()) -> LuaResult<(u32, u32)> {
let pos = CONTEXT.with_borrow(|ctx| ctx.mouse_pos_logical());
Ok((pos.x as u32, pos.y as u32))
}
fn is_key_down(_: &Lua, key_name: String) -> LuaResult<bool> {
if let Some(code) = str_as_keycode(&key_name) {
Ok(CONTEXT.with_borrow(|ctx| ctx.input_state.key_pressed(code)))
} else if let Some(button) = str_as_mousebutton(&key_name) {
Ok(CONTEXT.with_borrow(|ctx| ctx.input_state.mouse_pressed(button)))
} else {
Ok(false)
}
}
fn load_module(l: &Lua, (name, args): (String, MultiValue)) -> LuaResult<MultiValue> {
let mut module_path = Game::script_dir().join(name);
if module_path.extension().is_none() {
module_path.set_extension("lua");
}
change_working_directory(Game::script_dir().as_path())?;
let result = l.load(module_path).call::<MultiValue>(args);
CONTEXT.with_borrow(|ctx| change_working_directory(ctx.current_working_dir()))?;
result
}
fn protected_load_module(l: &Lua, (name, args): (String, MultiValue)) -> LuaResult<MultiValue> {
let mut module_path = Game::script_dir().join(name);
if module_path.extension().is_none() {
module_path.set_extension("lua");
}
change_working_directory(Game::script_dir().as_path())?;
let result = match l.load(module_path).call::<MultiValue>(args) {
// on success, callers expect a Nil followed by return values
Ok(res) => Ok(std::iter::once(Value::Nil).chain(res).collect()),
// otherwise it is set to error message.
Err(err) => Ok(err.to_string().into_lua_multi(l)?),
};
CONTEXT.with_borrow(|ctx| change_working_directory(ctx.current_working_dir()))?;
result
}
fn new_image_handle(_: &Lua, _: ()) -> LuaResult<ImageHandle> {
Ok(ImageHandle::Unloaded)
}
fn set_window_title(_: &Lua, title: String) -> LuaResult<()> {
CONTEXT.with_borrow(|ctx| ctx.set_window_title(&title));
Ok(())
}
fn restart(_: &Lua, _: ()) -> LuaResult<()> {
CONTEXT.with_borrow_mut(|ctx| ctx.needs_restart = true);
Ok(())
}
fn open_url(l: &Lua, url: String) -> LuaResult<MultiValue> {
match open::that(url) {
Ok(_) => Ok(().into_lua_multi(l)?),
Err(_) => Ok("Unable to open url!".into_lua_multi(l)?),
}
}
fn render_init(_: &Lua, _features: Variadic<String>) -> LuaResult<()> {
Ok(())
}
+94
View File
@@ -0,0 +1,94 @@
use mlua::{MultiValue, UserData};
use crate::{
context::CONTEXT,
renderer::textures::{TextureHandle, TextureOptions},
};
#[derive(Clone)]
pub enum ImageHandle {
Loaded(TextureHandle),
Unloaded,
}
impl UserData for ImageHandle {
fn add_methods<M: mlua::UserDataMethods<Self>>(methods: &mut M) {
methods.add_method_mut(
"Load",
|_, this, (image_path, flags): (String, MultiValue)| {
let mut is_async = false;
let mut options = TextureOptions::LINEAR_REPEAT;
for flag in flags.iter() {
if let Some(flag) = flag.as_string() {
match flag.to_string_lossy().as_str() {
"CLAMP" => options.wrap_mode = wgpu::AddressMode::ClampToEdge,
"NEAREST" => options.magnification = wgpu::FilterMode::Nearest,
"ASYNC" => is_async = true,
"MIPMAP" => options.generate_mipmaps = true,
_ => {}
}
}
}
match this {
// replace image data if already allocated
ImageHandle::Loaded(texture_handle) => {
CONTEXT.with_borrow(|ctx| {
// in case of error, stay loaded with current texture
let _ = ctx.texture_manager.update_texture(
texture_handle.id(),
image_path,
options,
is_async,
);
});
}
// create new texture handle
ImageHandle::Unloaded => {
CONTEXT.with_borrow(|ctx| {
if let Ok(handle) = ctx
.texture_manager
.load_texture(image_path, options, is_async)
{
*this = ImageHandle::Loaded(handle);
}
});
}
}
Ok(())
},
);
methods.add_method_mut("Unload", |_, this, ()| {
match this {
ImageHandle::Loaded(_) => {
// dropping the handle frees the texture
*this = ImageHandle::Unloaded;
}
ImageHandle::Unloaded => {}
}
Ok(())
});
methods.add_method("IsValid", |_, this, ()| {
Ok(matches!(this, ImageHandle::Loaded(_)))
});
methods.add_method("IsLoading", |_, this, ()| match &this {
ImageHandle::Loaded(texture_handle) => {
let size = texture_handle.size();
Ok(size[0] == 0)
}
ImageHandle::Unloaded => Ok(true),
});
methods.add_method("ImageSize", |_, this, ()| match &this {
ImageHandle::Loaded(texture_handle) => {
let size = texture_handle.size();
Ok((size[0], size[1]))
}
ImageHandle::Unloaded => Ok((0, 0)),
});
}
}
+621
View File
@@ -0,0 +1,621 @@
use crate::{
api::image_handle::ImageHandle,
color::Srgba,
context::CONTEXT,
dpi::Uv,
fonts::{Alignment, LayoutJob},
math::{Point, Quad, Rect, Size},
};
use core::ffi::{c_int, c_void};
use mlua::{
LightUserData, Lua, Result as LuaResult, UserDataRefMut, Value,
ffi::{self},
};
use regex::Regex;
use std::sync::LazyLock;
pub fn register_globals(lua: &Lua) -> LuaResult<()> {
let globals = lua.globals();
// rendering functions
// NOTE: unfortunately, mlua's conversion of function arguments adds a lot of
// overhead. this is very noticeable for the draw functions which can be called
// thousands of times per frame. C functions are used to get raw access to
// the lua stack without the overhead.
unsafe { globals.set("SetDrawColor", lua.create_c_function(set_draw_color)?)? };
unsafe { globals.set("SetViewport", lua.create_c_function(set_viewport)?)? };
unsafe {
globals.set("SetDrawLayer", lua.create_c_function(set_draw_layer)?)?;
}
unsafe { globals.set("DrawImage", lua.create_c_function(draw_image)?)? };
unsafe { globals.set("DrawImageQuad", lua.create_c_function(draw_image_quad)?)? };
unsafe {
globals.set("DrawString", lua.create_c_function(draw_string)?)?;
}
unsafe {
globals.set("DrawStringWidth", lua.create_c_function(get_string_width)?)?;
}
globals.set(
"DrawStringCursorIndex",
lua.create_function_mut(get_index_at_cur)?,
)?;
// NOTE: mlua wraps UserData in a special way to maintain safety guarantees.
// This wrapper is not exposed by mlua, making it difficult to access the
// underlying user data from within C functions.
// This is a helper function that unwraps an ImageHandle and returns a pointer to it
// See: https://github.com/mlua-rs/mlua/discussions/545#discussioncomment-12530475
let get_img_handle = lua.create_function(|_, mut ud: UserDataRefMut<ImageHandle>| {
let vec: *mut ImageHandle = &mut *ud;
Ok(Value::LightUserData(LightUserData(vec as *mut c_void)))
})?;
lua.set_named_registry_value("get_img_handle", get_img_handle)?;
Ok(())
}
macro_rules! str_from_stack {
($s:ident, $i:expr) => {
unsafe {
let mut size = 0;
let data = ffi::luaL_checklstring($s, $i, &mut size);
let bytes = std::slice::from_raw_parts(data as *const u8, size);
std::str::from_utf8_unchecked(bytes)
}
};
}
macro_rules! f32_from_stack {
($s:ident, $i:expr) => {
unsafe { ffi::luaL_checknumber($s, $i) } as f32
};
}
macro_rules! i32_from_stack {
($s:ident, $i:expr) => {
unsafe { ffi::luaL_checkinteger($s, $i) } as i32
};
}
macro_rules! img_handle_from_stack {
($s:ident, $i:expr) => {
unsafe {
match ffi::lua_type($s, $i) {
ffi::LUA_TNIL => None,
ffi::LUA_TUSERDATA => {
let img_handle = lua_toimghandle($s, $i);
if !img_handle.is_null() {
if let ImageHandle::Loaded(ref handle) = *img_handle {
Some(handle.id())
} else {
None
}
} else {
None
}
}
t => panic!("Expected Nil or ImageHandle, got {:?}", t),
}
}
};
}
unsafe extern "C" fn lua_toimghandle(state: *mut ffi::lua_State, idx: c_int) -> *mut ImageHandle {
unsafe {
let idx = ffi::lua_absindex(state, idx);
ffi::lua_getfield(state, ffi::LUA_REGISTRYINDEX, c"get_img_handle".as_ptr());
ffi::lua_pushvalue(state, idx);
let img_handle = match ffi::lua_pcall(state, 1, 1, 0) {
ffi::LUA_OK => ffi::lua_touserdata(state, -1) as *mut ImageHandle,
_ => std::ptr::null_mut(),
};
ffi::lua_pop(state, 1);
img_handle
}
}
unsafe extern "C-unwind" fn set_draw_color(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("set_draw_color");
let nargs = unsafe { ffi::lua_gettop(state) };
match nargs {
// escape_code
1 => {
let esc_str = str_from_stack!(state, -nargs);
let color = Srgba::from_escape_code(esc_str);
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_color(color));
}
// rgb
3 => {
let r = f32_from_stack!(state, -nargs);
let g = f32_from_stack!(state, -nargs + 1);
let b = f32_from_stack!(state, -nargs + 2);
let color = Srgba::new_f32(r, g, b, 1.0);
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_color(color));
}
// rgba
4 => {
let r = f32_from_stack!(state, -nargs);
let g = f32_from_stack!(state, -nargs + 1);
let b = f32_from_stack!(state, -nargs + 2);
let a = f32_from_stack!(state, -nargs + 3);
let color = Srgba::new_f32(r, g, b, a);
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_color(color));
}
_ => panic!("Unexpected number of arguments"),
};
0
}
unsafe extern "C-unwind" fn set_viewport(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("set_viewport");
let nargs = unsafe { ffi::lua_gettop(state) };
match nargs {
0 => CONTEXT.with_borrow_mut(|ctx| ctx.reset_viewport()),
4 => {
let x = f32_from_stack!(state, -nargs);
let y = f32_from_stack!(state, -nargs + 1);
let w = f32_from_stack!(state, -nargs + 2);
let h = f32_from_stack!(state, -nargs + 3);
let rect = Rect::from_origin_and_size(Point::new(x, y), Size::new(w, h));
CONTEXT.with_borrow_mut(|ctx| ctx.set_viewport(rect));
}
_ => panic!("Unexpected number of arguments"),
};
0
}
unsafe extern "C-unwind" fn set_draw_layer(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("set_draw_layer");
let nargs = unsafe { ffi::lua_gettop(state) };
match nargs {
1 => {
let layer = i32_from_stack!(state, -nargs);
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_layer(layer, 0));
}
2 => {
let layer = match unsafe { ffi::lua_type(state, -nargs) } {
ffi::LUA_TNIL => None,
ffi::LUA_TNUMBER => {
let layer = i32_from_stack!(state, -nargs);
Some(layer)
}
t => panic!("Expected Nil or Number, got {:?}", t),
};
let sublayer = i32_from_stack!(state, -nargs + 1);
if let Some(layer) = layer {
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_layer(layer, sublayer));
} else {
CONTEXT.with_borrow_mut(|ctx| ctx.set_draw_sublayer(sublayer));
}
}
_ => panic!("Unexpected number of arguments"),
};
0
}
unsafe extern "C-unwind" fn draw_image(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("draw_image");
let nargs = unsafe { ffi::lua_gettop(state) };
if !matches!(nargs, 5 | 6 | 7 | 9 | 10 | 11) {
panic!("Unexpected number of arguments");
}
#[allow(clippy::manual_range_patterns)]
let parse_uv = matches!(nargs, 9 | 10 | 11);
let parse_layer_idx = matches!(nargs, 6 | 7 | 10 | 11);
let texture_id = img_handle_from_stack!(state, -nargs);
// left, top, width, height
let x = f32_from_stack!(state, -nargs + 1);
let y = f32_from_stack!(state, -nargs + 2);
let w = f32_from_stack!(state, -nargs + 3);
let h = f32_from_stack!(state, -nargs + 4);
let rect = Rect::from_origin_and_size(Point::new(x, y), Size::new(w, h));
// u1, v1, u2, v2
let mut i = 5;
let uv = if parse_uv {
let u1 = f32_from_stack!(state, -nargs + i);
let v1 = f32_from_stack!(state, -nargs + i + 1);
let u2 = f32_from_stack!(state, -nargs + i + 2);
let v2 = f32_from_stack!(state, -nargs + i + 3);
i += 4;
Rect::new(Point::new(u1, v1), Point::new(u2, v2))
} else {
Rect::default_uv()
};
let layer_idx = if parse_layer_idx {
let layer_idx = i32_from_stack!(state, -nargs + i);
(layer_idx - 1) as u32
} else {
0
};
CONTEXT.with_borrow_mut(|ctx| ctx.draw_rect(texture_id, rect, uv, layer_idx));
0
}
unsafe extern "C-unwind" fn draw_image_quad(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("draw_image_quad", format!("args: {:?}", args));
let nargs = unsafe { ffi::lua_gettop(state) };
if !matches!(nargs, 9 | 10 | 11 | 17 | 18 | 19) {
panic!("Unexpected number of arguments");
}
#[allow(clippy::manual_range_patterns)]
let parse_uv = matches!(nargs, 17 | 18 | 19);
let parse_layer_idx = matches!(nargs, 10 | 11 | 18 | 19);
let texture_id = img_handle_from_stack!(state, -nargs);
// x1, y1, x2, y2, ...
let x1 = f32_from_stack!(state, -nargs + 1);
let y1 = f32_from_stack!(state, -nargs + 2);
let x2 = f32_from_stack!(state, -nargs + 3);
let y2 = f32_from_stack!(state, -nargs + 4);
let x3 = f32_from_stack!(state, -nargs + 5);
let y3 = f32_from_stack!(state, -nargs + 6);
let x4 = f32_from_stack!(state, -nargs + 7);
let y4 = f32_from_stack!(state, -nargs + 8);
let quad = Quad::new(
Point::new(x1, y1),
Point::new(x2, y2),
Point::new(x3, y3),
Point::new(x4, y4),
);
// u1, v1, u2, v2, ...
let mut i = 9;
let uv = if parse_uv {
let u1 = f32_from_stack!(state, -nargs + i);
let v1 = f32_from_stack!(state, -nargs + i + 1);
let u2 = f32_from_stack!(state, -nargs + i + 2);
let v2 = f32_from_stack!(state, -nargs + i + 3);
let u3 = f32_from_stack!(state, -nargs + i + 4);
let v3 = f32_from_stack!(state, -nargs + i + 5);
let u4 = f32_from_stack!(state, -nargs + i + 6);
let v4 = f32_from_stack!(state, -nargs + i + 7);
i += 8;
Quad::new(
Point::new(u1, v1),
Point::new(u2, v2),
Point::new(u3, v3),
Point::new(u4, v4),
)
} else {
Quad::default_uv()
};
let layer_idx = if parse_layer_idx {
let layer_idx = i32_from_stack!(state, -nargs + i);
(layer_idx - 1) as u32
} else {
0
};
CONTEXT.with_borrow_mut(|ctx| ctx.draw_quad(texture_id, quad, uv, layer_idx));
0
}
unsafe extern "C-unwind" fn draw_string(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("draw_string");
let nargs = unsafe { ffi::lua_gettop(state) };
let x = f32_from_stack!(state, -nargs);
let y = f32_from_stack!(state, -nargs + 1);
let alignment = str_from_stack!(state, -nargs + 2);
let line_height = i32_from_stack!(state, -nargs + 3);
let font_type = str_from_stack!(state, -nargs + 4);
let text = str_from_stack!(state, -nargs + 5);
let alignment = match alignment.parse::<PoBTextAlignment>() {
Ok(alignment) => alignment,
Err(_) => panic!("Invalid alignment"),
};
let font_type = match font_type.parse::<PoBFontType>() {
Ok(font_type) => font_type,
Err(_) => panic!("Invalid font type"),
};
let mut position = Point::new(x, y);
let mut is_absolute_position = false;
CONTEXT.with_borrow_mut(|ctx| {
// the position needs to be adjusted for some alignments to match PoBs behavior
let screen_size = ctx.screen_size_logical();
let halign = match alignment {
PoBTextAlignment::Left => Alignment::Min,
PoBTextAlignment::Center => {
position.x += screen_size.width as f32 / 2.0;
is_absolute_position = true;
Alignment::Center
}
PoBTextAlignment::Right => {
position.x = screen_size.width as f32 - position.x;
is_absolute_position = true;
Alignment::Max
}
PoBTextAlignment::CenterX => Alignment::Center,
PoBTextAlignment::RightX => Alignment::Max,
};
let current_draw_color = ctx.get_draw_color();
let job = build_layout_job(
text,
current_draw_color,
font_type,
line_height,
Some(halign),
);
// NOTE: color escape codes modify the current draw color.
// set current draw color to color of last segment to match PoB's behavior
if let Some(last_segment) = job.segments.last() {
ctx.set_draw_color(last_segment.color);
}
ctx.draw_text(position, job, is_absolute_position);
});
0
}
unsafe extern "C-unwind" fn get_string_width(state: *mut ffi::lua_State) -> c_int {
//profiling::scope!("get_string_width");
let nargs = unsafe { ffi::lua_gettop(state) };
let line_height = i32_from_stack!(state, -nargs);
let font_type = str_from_stack!(state, -nargs + 1);
let text = str_from_stack!(state, -nargs + 2);
let font_type = match font_type.parse::<PoBFontType>() {
Ok(font_type) => font_type,
Err(_) => panic!("Invalid font type"),
};
let job = build_layout_job(text, Srgba::WHITE, font_type, line_height, None);
let width = CONTEXT.with_borrow_mut(|ctx| ctx.get_text_width(job));
unsafe { ffi::lua_pushnumber(state, width as f64) };
1
}
fn get_index_at_cur(
_: &Lua,
(line_height, font_type, text, cur_x, cur_y): (i32, String, String, f32, f32),
) -> LuaResult<usize> {
//profiling::scope!("get_char_index_at_cur");
let font_type = font_type.parse::<PoBFontType>()?;
let job = build_layout_job(&text, Srgba::WHITE, font_type, line_height, None);
let index =
CONTEXT.with_borrow_mut(|ctx| ctx.get_text_index_at_cursor(job, Point::new(cur_x, cur_y)));
// convert to lua's 1-based indexing
Ok(index + 1)
}
pub static ESCAPE_STR_REGEX: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"\^(?<idx>[0-9])|\^[x|X](?<hex>[0-9A-Fa-f]{6})").unwrap());
fn build_layout_job<'a>(
text: &'a str,
current_color: Srgba,
font_type: PoBFontType,
line_height: i32,
alignment: Option<Alignment>,
) -> LayoutJob<'a> {
let mut font_weight = None;
let font_family = match font_type {
PoBFontType::Fixed => parley::GenericFamily::Monospace,
PoBFontType::Var => parley::GenericFamily::SansSerif,
PoBFontType::VarBold => {
font_weight = Some(700.0);
parley::GenericFamily::SansSerif
}
};
// TODO: check how PoB determines font size
let font_size = (line_height - 2).clamp(11, 32) as f32;
let mut job = LayoutJob::new(
font_family,
font_size,
line_height as f32,
alignment,
font_weight,
);
for (color, segment) in PoBString(text).into_iter() {
job.append(segment, color.unwrap_or(current_color));
}
job
}
// PoB strings can contain escape codes that affect the color of subsequent text
pub struct PoBString<'a>(pub &'a str);
impl<'a> PoBString<'a> {
pub fn strip_escapes(&self) -> String {
ESCAPE_STR_REGEX.replace_all(self.0, "").to_string()
}
}
type ColoredSegment<'a> = (Option<Srgba>, &'a str);
impl<'a> IntoIterator for PoBString<'a> {
type Item = ColoredSegment<'a>;
type IntoIter = PoBStringSegmentIterator<'a>;
fn into_iter(self) -> Self::IntoIter {
PoBStringSegmentIterator::new(self.0)
}
}
// Iterates over colored segments
pub struct PoBStringSegmentIterator<'a> {
haystack: &'a str,
captures: std::iter::Peekable<regex::CaptureMatches<'static, 'a>>,
is_first: bool,
is_done: bool,
}
impl<'a> PoBStringSegmentIterator<'a> {
fn new(haystack: &'a str) -> Self {
let captures = ESCAPE_STR_REGEX.captures_iter(haystack).peekable();
Self {
haystack,
captures,
is_first: true,
is_done: false,
}
}
}
impl<'a> Iterator for PoBStringSegmentIterator<'a> {
type Item = ColoredSegment<'a>;
fn next(&mut self) -> Option<Self::Item> {
let is_first = core::mem::replace(&mut self.is_first, false);
match self.captures.peek() {
Some(capture) => {
let code_start = capture.get(0).unwrap().start();
let code_end = capture.get(0).unwrap().end();
// string didn't start with an escape code.
// return text up to first code without color.
if is_first && code_start > 0 {
return Some((None, &self.haystack[..code_start]));
}
let escape_str = capture.get(0).unwrap().as_str();
let color = Some(Srgba::from_escape_code(escape_str));
let _ = self.captures.next(); // pop current code to peek the next one
match self.captures.peek() {
Some(next_code) => {
// found another escape code. return text up the next code
let next_code_start = next_code.get(0).unwrap().start();
Some((color, &self.haystack[code_end..next_code_start]))
}
None => {
// no additional escape codes found. return rest of string
self.is_done = true;
Some((color, &self.haystack[code_end..]))
}
}
}
None => {
if self.is_done {
None
} else {
// string doesn't contain any escape codes.
// return entire string without color
self.is_done = true;
Some((None, self.haystack))
}
}
}
}
}
// PoB's text alignment is weird
#[derive(Clone, Copy, Debug)]
enum PoBTextAlignment {
// left-aligned, x coordinate describes top-left corner
Left,
// centered in screen space, x coordinate describes offset of text center
// from screen center. positive values of x move text to right, negative to left.
Center,
// right-aligned in screen space, x coordinate describes distance from right edge
// of text to right edge of screen. positive values move text further to left.
Right,
// makes text centered around position, i.e. position.x = horizontal center of text
CenterX,
// makes text right-aligned to position, i.e. position.x = right edge of text
RightX,
}
impl std::str::FromStr for PoBTextAlignment {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"LEFT" => Ok(Self::Left),
"CENTER" => Ok(Self::Center),
"RIGHT" => Ok(Self::Right),
"CENTER_X" => Ok(Self::CenterX),
"RIGHT_X" => Ok(Self::RightX),
_ => Err(anyhow::anyhow!(
"'{}' is not a valid TextFontType variant",
s
)),
}
}
}
#[derive(Clone, Copy, Debug)]
enum PoBFontType {
Fixed,
Var,
VarBold,
}
impl std::str::FromStr for PoBFontType {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"FIXED" => Ok(Self::Fixed),
"VAR" => Ok(Self::Var),
"VAR BOLD" => Ok(Self::VarBold),
_ => Err(anyhow::anyhow!(
"'{}' is not a valid TextFontType variant",
s
)),
}
}
}
impl Srgba {
fn from_escape_code(escape_str: &str) -> Srgba {
if let Some(caps) = ESCAPE_STR_REGEX.captures(escape_str) {
if let Some(idx) = caps.name("idx") {
return match idx.as_str() {
"0" => Srgba::from_rgb(0, 0, 0), //black
"1" => Srgba::from_rgb(255, 0, 0), //red
"2" => Srgba::from_rgb(0, 255, 0), //green
"3" => Srgba::from_rgb(0, 0, 255), //blue
"4" => Srgba::from_rgb(255, 255, 0), //yellow
"5" => Srgba::from_rgb(255, 0, 255), //purple
"6" => Srgba::from_rgb(0, 255, 255), //aqua
"7" => Srgba::from_rgb(255, 255, 255), //white
"8" => Srgba::from_rgb(178, 178, 178), //gray
"9" => Srgba::from_rgb(102, 102, 102), //dark gray
_ => unreachable!(),
};
}
if let Some(hex) = caps.name("hex")
&& let Ok(hex_color) = Srgba::from_hex(hex.as_str())
{
return hex_color;
}
}
Srgba::WHITE
}
}
+69
View File
@@ -0,0 +1,69 @@
use std::fs;
use std::path::{Path, PathBuf};
use std::time::SystemTime;
use glob::Paths;
use mlua::{IntoLua, UserData};
pub struct SearchHandle {
paths: Paths,
// only yield directories if true, otherwise only files
directories_only: bool,
pub current: Option<PathBuf>,
}
impl SearchHandle {
pub fn new(paths: Paths, directories_only: bool) -> Self {
Self {
paths,
directories_only,
current: None,
}
}
// sets current to the next file/directory if it exists and doesn't cause errors,
// otherwise None
pub fn next(&mut self) {
self.current = self
.paths
.find(|candidate| {
candidate
.as_ref()
.is_ok_and(|c| c.is_dir() == self.directories_only)
})
.transpose()
.ok()
.flatten();
}
}
impl UserData for SearchHandle {
fn add_methods<M: mlua::UserDataMethods<Self>>(methods: &mut M) {
methods.add_method_mut("NextFile", |_, this, ()| {
this.next();
Ok(this.current.is_some())
});
methods.add_method_mut("GetFileName", |l, this, ()| {
Ok(this.current.as_ref().unwrap().file_name().into_lua(l))
});
methods.add_method("GetFileSize", |_, this, ()| match &this.current {
Some(path) => match fs::metadata(path) {
Ok(metadata) => Ok(metadata.len()),
Err(_) => Ok(0),
},
None => Ok(0),
});
methods.add_method("GetFileModifiedTime", |_, this, ()| match &this.current {
Some(path) => get_time_modified(path).map_or(Ok(0), Ok),
None => Ok(0),
});
}
}
fn get_time_modified<P: AsRef<Path>>(path: P) -> anyhow::Result<u64> {
let metadata = fs::metadata(path)?;
let modified_time = metadata.modified()?;
let duration_since_epoch = modified_time.duration_since(SystemTime::UNIX_EPOCH)?;
let seconds_since_epoch = duration_since_epoch.as_secs();
Ok(seconds_since_epoch)
}
+188
View File
@@ -0,0 +1,188 @@
use std::sync::Arc;
use anyhow::Result;
use winit::{
application::ApplicationHandler,
dpi::PhysicalPosition,
event::*,
event_loop::ActiveEventLoop,
keyboard::{ModifiersState, PhysicalKey},
window::Window,
};
use crate::{
context::{CONTEXT, FrameOutput},
gfx::GraphicsContext,
input::{keycode_as_str, mousebutton_as_str},
lua::LuaInstance,
};
pub struct App {
gfx_context: Option<GraphicsContext>,
lua_instance: LuaInstance,
}
impl App {
pub fn new() -> Result<Self> {
let lua_instance = LuaInstance::new()?;
Ok(Self {
gfx_context: None,
lua_instance,
})
}
fn frame(&mut self) -> FrameOutput {
// Handle restart requests
if CONTEXT.with_borrow(|ctx| ctx.needs_restart) {
match self.lua_instance.restart() {
Ok(_) => CONTEXT.with_borrow_mut(|ctx| ctx.needs_restart = false),
Err(e) => panic!("Error occused while restarting lua instance: {}", e),
}
};
self.lua_instance.handle_subscripts();
// Clear data from previous frame and prepare for new one
CONTEXT.with_borrow_mut(|ctx| ctx.begin_frame());
// Call back into lua and tell it to draw a frame
self.lua_instance.on_frame().unwrap();
// End frame and get outupts
CONTEXT.with_borrow_mut(|ctx| ctx.end_frame())
}
}
impl ApplicationHandler<GraphicsContext> for App {
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
let window = match event_loop.create_window(Window::default_attributes()) {
Ok(window) => Arc::new(window),
Err(err) => {
log::error!("{err}");
event_loop.exit();
return;
}
};
CONTEXT.with_borrow_mut(|ctx| ctx.set_window(Arc::clone(&window)));
self.gfx_context = match pollster::block_on(GraphicsContext::new(window)) {
Ok(gfx) => Some(gfx),
Err(err) => {
log::error!("{err}");
event_loop.exit();
return;
}
}
}
fn window_event(
&mut self,
event_loop: &ActiveEventLoop,
_window_id: winit::window::WindowId,
event: WindowEvent,
) {
CONTEXT.with_borrow_mut(|ctx| ctx.on_window_event(&event));
match event {
WindowEvent::CloseRequested => {
self.lua_instance.on_exit().unwrap();
event_loop.exit()
}
WindowEvent::Resized(size) => {
if let Some(ref mut gfx) = self.gfx_context {
gfx.resize(size.width, size.height);
CONTEXT.with_borrow_mut(|ctx| ctx.force_render = true)
}
}
WindowEvent::RedrawRequested => {
profiling::scope!("RedrawRequested");
let FrameOutput { render_job } = self.frame();
if let Some(ref mut gfx) = self.gfx_context {
match gfx.render(render_job) {
Ok(_) => {}
// Reconfigure the surface if it's lost or outdated
Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => {
let size = gfx.window.inner_size();
gfx.resize(size.width, size.height);
CONTEXT.with_borrow_mut(|ctx| ctx.force_render = true)
}
Err(err) => {
log::error!("Unable to render: {err}");
}
}
}
profiling::finish_frame!();
}
WindowEvent::KeyboardInput {
event:
KeyEvent {
physical_key: PhysicalKey::Code(code),
state,
text,
..
},
..
} => {
// Only call OnChar if no modifier key except SHIFT is pressed.
// This prevents 'v' from getting inserted into a text field
// when 'CTRL + v' is used to paste.
if state.is_pressed()
&& CONTEXT.with_borrow(|ctx| {
ctx.input_state
.modifiers()
.difference(ModifiersState::SHIFT)
.is_empty()
})
&& let Some(text) = text
{
self.lua_instance.on_char(&text).unwrap();
}
if let Some(key_string) = keycode_as_str(code) {
match state {
ElementState::Pressed => {
self.lua_instance.on_key_down(&key_string, false).unwrap();
}
ElementState::Released => {
self.lua_instance.on_key_up(&key_string).unwrap();
}
}
}
}
WindowEvent::MouseInput { state, button, .. } => {
if let Some(button_string) = mousebutton_as_str(button) {
match state {
ElementState::Pressed => {
let is_double_click = CONTEXT
.with_borrow_mut(|ctx| ctx.input_state.is_double_click(button));
self.lua_instance
.on_key_down(&button_string, is_double_click)
.unwrap();
}
ElementState::Released => {
self.lua_instance.on_key_up(&button_string).unwrap();
}
}
}
}
WindowEvent::MouseWheel { delta, .. } => {
let vertical_scroll_amount = match delta {
MouseScrollDelta::LineDelta(_, y) => y as f64,
MouseScrollDelta::PixelDelta(PhysicalPosition { y, .. }) => y,
};
if vertical_scroll_amount > 0.0 {
self.lua_instance.on_key_up("WHEELUP").unwrap();
} else if vertical_scroll_amount < 0.0 {
self.lua_instance.on_key_up("WHEELDOWN").unwrap();
}
}
_ => {}
}
}
}
+41
View File
@@ -0,0 +1,41 @@
use clap::Parser;
use clap::ValueEnum;
use directories::BaseDirs;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct Args {
#[arg(value_enum)]
pub game: Game,
pub build_path: Option<String>,
}
#[derive(Debug, Clone, ValueEnum)]
pub enum Game {
#[value(name = "poe1")]
Poe1,
#[value(name = "poe2")]
Poe2,
}
static GAME_CONFIG: std::sync::OnceLock<Game> = std::sync::OnceLock::new();
impl Game {
pub fn init(game: Game) {
GAME_CONFIG.set(game).expect("Game should be uninitialized");
}
pub fn current() -> &'static Game {
GAME_CONFIG.get().expect("Game should be initialized")
}
pub fn script_dir() -> PathBuf {
let directory_name = match Self::current() {
Game::Poe1 => "PathOfBuilding1",
Game::Poe2 => "PathOfBuilding2",
};
BaseDirs::new().unwrap().data_dir().join(directory_name)
}
}
+74
View File
@@ -0,0 +1,74 @@
/// `sRGB` color with _unmultiplied alpha_.
#[repr(C)]
#[repr(align(4))]
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, bytemuck::Pod, bytemuck::Zeroable)]
pub struct Srgba(pub [u8; 4]);
impl Srgba {
pub const WHITE: Self = Self::from_rgb(255, 255, 255);
pub const TRANSPARENT: Self = Self::new(0, 0, 0, 0);
#[inline]
pub const fn new(r: u8, g: u8, b: u8, a: u8) -> Self {
Self([r, g, b, a])
}
#[inline]
pub const fn new_f32(r: f32, g: f32, b: f32, a: f32) -> Self {
Self([f32_to_u8(r), f32_to_u8(g), f32_to_u8(b), f32_to_u8(a)])
}
#[inline]
pub const fn from_rgb(r: u8, g: u8, b: u8) -> Self {
Self([r, g, b, 255])
}
#[inline]
pub fn from_hex<T: AsRef<str>>(hex: T) -> anyhow::Result<Self> {
let hex = hex.as_ref();
let hex = hex.strip_prefix("#").unwrap_or(hex);
match hex.len() {
// RGB shorthand form, e.g. #FC0 -> #FFCC00
3 => {
let [m, l] = u16::from_str_radix(hex, 16)?.to_be_bytes();
let (r, g, b) = (m & 0x0F, (l & 0xF0) >> 4, l & 0x0F);
Ok(Self::from_rgb((r << 4) | r, (g << 4) | g, (b << 4) | b))
}
// RGBA shorthand form, e.g. #FC0F -> #FFCC00FF
4 => {
let [m, l] = u16::from_str_radix(hex, 16)?.to_be_bytes();
let (r, g, b, a) = ((m & 0xF0) >> 4, m & 0xF, (l & 0xF0) >> 4, l & 0x0F);
Ok(Self::new(
(r << 4) | r,
(g << 4) | g,
(b << 4) | b,
(a << 4) | a,
))
}
// RRGGBB
6 => {
let [_, r, g, b] = u32::from_str_radix(hex, 16)?.to_be_bytes();
Ok(Self::from_rgb(r, g, b))
}
// RRGGBBAA
8 => {
let [r, g, b, a] = u32::from_str_radix(hex, 16)?.to_be_bytes();
Ok(Self::new(r, g, b, a))
}
_ => Err(anyhow::anyhow!("Unexpected length of hex string")),
}
}
}
impl From<Srgba> for image::Rgba<u8> {
fn from(value: Srgba) -> Self {
Self(value.0)
}
}
/// f32 [0.0, 1.0] -> u8 [0, 255]
#[inline(always)]
const fn f32_to_u8(c: f32) -> u8 {
((c * 255.0) + 0.5) as u8
}
+249
View File
@@ -0,0 +1,249 @@
use crate::{
Game,
color::Srgba,
dpi::{
ConvertToLogical, LogicalPoint, LogicalQuad, LogicalRect, LogicalSize, NormalizedQuad,
NormalizedRect, PhysicalRect, PhysicalSize,
},
fonts::{Fonts, LayoutJob},
input::InputState,
layers::Layers,
renderer::{
mesh::ClippedMesh,
primitives::{QuadPrimitive, QuadTexture, RectPrimitive, RectTexture, TextPrimitive},
tessellator::Tessellator,
textures::{TextureId, TexturesDelta, WrappedTextureManager},
},
util::{calculate_hash, change_working_directory},
};
use arboard::Clipboard;
use std::{
cell::RefCell,
path::{Path, PathBuf},
sync::Arc,
};
use winit::{event::WindowEvent, window::Window};
// NOTE: This looks ugly but i haven't found a better way to do it yet.
// The C functions used for rendering need a way to access the context.
// They can't be defined as closures like all other lua callback functions
// and we can't change their arguments. The only way for them to access
// something outside their scope is to have some kind of static variable.
thread_local! {
pub static CONTEXT: RefCell<Context> = RefCell::new(Context::new());
}
pub struct Context {
window: Option<Arc<Window>>,
screen_size: PhysicalSize<u32>,
pixels_per_point: f32,
pub input_state: InputState,
pub clipboard: Clipboard,
pub texture_manager: WrappedTextureManager,
tessellator: Tessellator,
fonts: Fonts,
layers: Layers,
current_draw_color: Srgba,
previous_layers_hash: u64,
current_working_dir: PathBuf,
pub needs_restart: bool,
pub force_render: bool,
}
impl Context {
pub fn new() -> Self {
Self {
window: None,
screen_size: PhysicalSize::new(0, 0),
pixels_per_point: 1.0,
input_state: InputState::default(),
clipboard: Clipboard::new().unwrap(),
texture_manager: WrappedTextureManager::new(),
tessellator: Tessellator::default(),
fonts: Fonts::new(),
layers: Layers::new(),
current_draw_color: Srgba::WHITE,
previous_layers_hash: 0,
current_working_dir: Game::script_dir().clone(),
needs_restart: false,
force_render: false,
}
}
pub fn begin_frame(&mut self) {
profiling::scope!("begin_frame");
self.fonts.begin_frame();
self.layers.reset();
self.reset_viewport();
}
pub fn end_frame(&mut self) -> FrameOutput {
profiling::scope!("end_frame");
let font_atlas_size = self.fonts.font_atlas().size();
if let Some(font_image_delta) = self.fonts.font_atlas_delta() {
self.texture_manager.update_font_texture(font_image_delta);
}
let textures_delta = self.texture_manager.take_delta();
// Skip rendering this frame if identical to last one and no textures changed
let layers_hash = calculate_hash(&self.layers);
let elide_frame = layers_hash == self.previous_layers_hash && textures_delta.is_empty();
let render_job = if elide_frame && !self.force_render {
RenderJob::Skip
} else {
self.force_render = false;
self.previous_layers_hash = layers_hash;
let primitives = self.layers.consume_layers();
let meshes = self
.tessellator
.convert_clipped_primitives(primitives, font_atlas_size);
RenderJob::Render {
meshes,
textures_delta,
}
};
FrameOutput { render_job }
}
pub fn on_window_event(&mut self, event: &WindowEvent) {
match event {
WindowEvent::Resized(size) => {
self.screen_size = PhysicalSize::new(size.width, size.height);
}
WindowEvent::ScaleFactorChanged { scale_factor, .. } => {
self.pixels_per_point = *scale_factor as f32;
}
_ => {}
}
self.input_state.on_window_event(event);
}
pub fn screen_size_logical(&self) -> LogicalSize<u32> {
self.screen_size.to_logical(self.pixels_per_point)
}
pub fn mouse_pos_logical(&self) -> LogicalPoint<f32> {
self.input_state
.mouse_pos()
.to_logical(self.pixels_per_point)
}
pub fn pixels_per_point(&self) -> f32 {
self.pixels_per_point
}
pub fn current_working_dir(&self) -> &Path {
&self.current_working_dir
}
pub fn set_current_working_dir(&mut self, path: PathBuf) {
if change_working_directory(&path).is_ok() {
self.current_working_dir = path;
}
}
pub fn set_window(&mut self, window: Arc<Window>) {
self.window = Some(window);
}
pub fn set_window_title(&self, title: &str) {
if let Some(ref window) = self.window {
window.set_title(title);
}
}
}
pub enum RenderJob {
Render {
meshes: Vec<ClippedMesh>,
textures_delta: TexturesDelta,
},
Skip,
}
pub struct FrameOutput {
pub render_job: RenderJob,
}
impl Context {
pub fn set_draw_layer(&mut self, layer: i32, sublayer: i32) {
self.layers.set_draw_layer(layer, sublayer);
}
pub fn set_draw_sublayer(&mut self, sublayer: i32) {
self.layers.set_draw_sublayer(sublayer);
}
pub fn set_viewport(&mut self, viewport: LogicalRect<f32>) {
self.layers.set_viewport(viewport);
}
pub fn reset_viewport(&mut self) {
let viewport = PhysicalRect::from_size(self.screen_size);
self.layers
.set_viewport(viewport.to_logical(self.pixels_per_point));
}
pub fn set_draw_color(&mut self, color: Srgba) {
self.current_draw_color = color;
}
pub fn get_draw_color(&self) -> Srgba {
self.current_draw_color
}
pub fn draw_rect(
&mut self,
texture_id: Option<TextureId>,
rect: LogicalRect<f32>,
uv: NormalizedRect,
layer_idx: u32,
) {
let texture = texture_id.map(|id| RectTexture::new(id, uv, layer_idx));
let primitive = RectPrimitive::new(rect, self.current_draw_color, texture);
self.layers.add_rect(primitive);
}
pub fn draw_quad(
&mut self,
texture_id: Option<TextureId>,
quad: LogicalQuad<f32>,
uv: NormalizedQuad,
layer_idx: u32,
) {
let texture = texture_id.map(|id| QuadTexture::new(id, uv, layer_idx));
let primitive = QuadPrimitive::new(quad, self.current_draw_color, texture);
self.layers.add_quad(primitive);
}
pub fn draw_text(
&mut self,
position: LogicalPoint<f32>,
job: LayoutJob,
is_absolute_position: bool,
) {
let layout = self.fonts.layout(job, self.pixels_per_point as f32);
let primitive = TextPrimitive::new(position, layout);
self.layers.add_text(primitive, is_absolute_position);
}
/// Width of laid out text
pub fn get_text_width(&mut self, job: LayoutJob) -> i32 {
let layout = self.fonts.layout(job, self.pixels_per_point as f32);
layout.width() as i32
}
/// Text index based on where cursor is positioned within text
pub fn get_text_index_at_cursor(&mut self, job: LayoutJob, cursor: LogicalPoint<f32>) -> usize {
let layout = self.fonts.layout(job, self.pixels_per_point as f32);
layout.cursor_index(cursor)
}
}
+185
View File
@@ -0,0 +1,185 @@
use crate::math::{Point, Quad, Rect, Size, Vector};
use core::f32;
use num_traits::{Float, NumCast, ToPrimitive};
pub struct LogicalScreenSpace;
pub struct PhysicalScreenSpace;
pub struct Normalized;
pub type LogicalPoint<T> = Point<T, LogicalScreenSpace>;
pub type LogicalVector<T> = Vector<T, LogicalScreenSpace>;
pub type LogicalSize<T> = Size<T, LogicalScreenSpace>;
pub type LogicalRect<T> = Rect<T, LogicalScreenSpace>;
pub type LogicalQuad<T> = Quad<T, LogicalScreenSpace>;
pub type PhysicalPoint<T> = Point<T, PhysicalScreenSpace>;
pub type PhysicalVector<T> = Vector<T, PhysicalScreenSpace>;
pub type PhysicalSize<T> = Size<T, PhysicalScreenSpace>;
pub type PhysicalRect<T> = Rect<T, PhysicalScreenSpace>;
pub type NormalizedPoint = Point<f32, Normalized>;
pub type NormalizedRect = Rect<f32, Normalized>;
pub type NormalizedQuad = Quad<f32, Normalized>;
pub trait Normalize<T, U> {
type Output<F>;
fn normalize<F: Float>(&self, size: Size<T, U>) -> Self::Output<F>;
}
impl<T, U> Normalize<T, U> for Point<T, U>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = Point<V, Normalized>;
#[inline]
fn normalize<F: Float>(&self, size: Size<T, U>) -> Self::Output<F> {
Point::new(
F::from(self.x).unwrap() / F::from(size.width).unwrap(),
F::from(self.y).unwrap() / F::from(size.height).unwrap(),
)
}
}
impl<T, U> Normalize<T, U> for Rect<T, U>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = Rect<V, Normalized>;
#[inline]
fn normalize<F: Float>(&self, size: Size<T, U>) -> Self::Output<F> {
Rect::new(self.min.normalize(size), self.max.normalize(size))
}
}
pub trait ConvertToLogical {
type Output<V>;
fn to_logical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V>;
}
pub trait ConvertToPhysical {
type Output<V>;
fn to_physical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V>;
}
#[inline]
pub fn validate_scale_factor<F: Float>(scale_factor: F) -> bool {
scale_factor.is_sign_positive() && scale_factor.is_normal()
}
impl<T> ConvertToLogical for PhysicalPoint<T>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = LogicalPoint<V>;
#[inline]
fn to_logical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V> {
assert!(validate_scale_factor(scale_factor));
let x = F::from(self.x).unwrap() / scale_factor;
let y = F::from(self.y).unwrap() / scale_factor;
LogicalPoint::new(x, y).cast()
}
}
impl<T> ConvertToLogical for PhysicalSize<T>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = LogicalSize<V>;
#[inline]
fn to_logical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V> {
assert!(validate_scale_factor(scale_factor));
let width = F::from(self.width).unwrap() / scale_factor;
let height = F::from(self.height).unwrap() / scale_factor;
LogicalSize::new(width, height).cast()
}
}
impl<T> ConvertToLogical for PhysicalRect<T>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = LogicalRect<V>;
#[inline]
fn to_logical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V> {
assert!(validate_scale_factor(scale_factor));
let min = self.min.to_logical(scale_factor);
let max = self.max.to_logical(scale_factor);
LogicalRect::new(min, max)
}
}
impl<T> ConvertToPhysical for LogicalPoint<T>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = PhysicalPoint<V>;
#[inline]
fn to_physical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V> {
assert!(validate_scale_factor(scale_factor));
let x = F::from(self.x).unwrap() * scale_factor;
let y = F::from(self.y).unwrap() * scale_factor;
PhysicalPoint::new(x, y).cast()
}
}
impl<T> ConvertToPhysical for LogicalRect<T>
where
T: Copy + std::ops::Div<Output = T> + ToPrimitive,
{
type Output<V> = PhysicalRect<V>;
#[inline]
fn to_physical<V: NumCast, F: Float>(&self, scale_factor: F) -> Self::Output<V> {
assert!(validate_scale_factor(scale_factor));
let min = self.min.to_physical(scale_factor);
let max = self.max.to_physical(scale_factor);
PhysicalRect::new(min, max)
}
}
pub trait Uv {
fn default_uv() -> Self;
fn white_uv() -> Self;
}
impl Uv for NormalizedPoint {
#[inline]
fn default_uv() -> Self {
Self::zero()
}
#[inline]
fn white_uv() -> Self {
Self::zero()
}
}
impl Uv for NormalizedRect {
#[inline]
fn default_uv() -> Self {
Self::from_size(Size::new(1.0, 1.0))
}
#[inline]
fn white_uv() -> Self {
Self::zero()
}
}
impl Uv for NormalizedQuad {
#[inline]
fn default_uv() -> Self {
Self::from_size(Size::new(1.0, 1.0))
}
#[inline]
fn white_uv() -> Self {
Self::zero()
}
}
+339
View File
@@ -0,0 +1,339 @@
use crate::{
color::Srgba,
dpi::LogicalVector,
fonts::{
atlas::FontAtlas, glyph_key::SubpixelBin, layout::LayoutRow, rasterizer::GlyphRasterizer,
},
renderer::image::ImageDelta,
util::calculate_hash,
};
use ordered_float::OrderedFloat;
use parley::{
FontContext, FontWeight, GenericFamily, LayoutContext, StyleProperty, TextStyle, fontique::Blob,
};
use std::sync::Arc;
pub use atlas::FontAtlasSize;
pub use layout::{Alignment, Layout, LayoutJob};
mod atlas;
mod glyph_key;
mod layout;
mod rasterizer;
pub const BITSTREAM_VERA_SANS_MONO: &[u8] = include_bytes!("../fonts/VeraMono.ttf");
pub const LIBERATION_SANS: &[u8] = include_bytes!("../fonts/LiberationSans-Regular.ttf");
pub const LIBERATION_SANS_BOLD: &[u8] = include_bytes!("../fonts/LiberationSans-Bold.ttf");
pub struct FontData {
data: std::borrow::Cow<'static, [u8]>,
}
impl FontData {
pub fn from_static(font_data: &'static [u8]) -> Self {
Self {
data: std::borrow::Cow::Borrowed(font_data),
}
}
}
impl AsRef<[u8]> for FontData {
fn as_ref(&self) -> &[u8] {
self.data.as_ref()
}
}
pub struct FontDefinition {
pub generic_families: Vec<GenericFamily>,
pub data: Arc<FontData>,
}
pub struct Fonts {
font_definitions: Vec<FontDefinition>,
font_context: FontContext,
layout_context: LayoutContext<Srgba>,
atlas: FontAtlas,
glyph_rasterizer: GlyphRasterizer,
layout_cache: LayoutCache,
}
impl Fonts {
pub fn new() -> Self {
// add fonts used by PoB
let font_definitions = vec![
FontDefinition {
generic_families: vec![GenericFamily::Monospace],
data: Arc::new(FontData::from_static(BITSTREAM_VERA_SANS_MONO)),
},
FontDefinition {
generic_families: vec![GenericFamily::SansSerif],
data: Arc::new(FontData::from_static(LIBERATION_SANS)),
},
FontDefinition {
generic_families: vec![GenericFamily::SansSerif],
data: Arc::new(FontData::from_static(LIBERATION_SANS_BOLD)),
},
];
let mut fonts = Self {
font_definitions,
font_context: FontContext::new(),
layout_context: LayoutContext::new(),
atlas: FontAtlas::new(1024),
glyph_rasterizer: GlyphRasterizer::new(),
layout_cache: LayoutCache::default(),
};
fonts.register_fonts();
fonts.preload_common_characters(14.0);
fonts.preload_common_characters(16.0);
fonts
}
fn register_fonts(&mut self) {
for definition in &self.font_definitions {
let blob = Blob::new(Arc::new(definition.data.data.clone()));
let registered_fonts = self.font_context.collection.register_fonts(blob, None);
for generic_family in &definition.generic_families {
self.font_context
.collection
.append_generic_families(*generic_family, registered_fonts.iter().map(|f| f.0));
}
}
}
/// Needs to be called at beginning of each frame.
pub fn begin_frame(&mut self) {
// recreate atlas when it becomes too full or overflowed
if self.atlas.capacity() > 0.9 {
self.clear_atlas();
}
self.layout_cache.flush();
}
/// Gets changes to the font atlas texture since last call.
pub fn font_atlas_delta(&mut self) -> Option<ImageDelta> {
self.atlas.take_delta()
}
pub fn preload_common_characters(&mut self, font_size: f32) {
const ASCII_PRINTABLE_START: u8 = 32;
const ASCII_PRINTABLE_END: u8 = 126;
let mut common_chars =
String::with_capacity((ASCII_PRINTABLE_END - ASCII_PRINTABLE_START + 1) as usize);
for c in ASCII_PRINTABLE_START..=ASCII_PRINTABLE_END {
common_chars.push(c as char);
}
self.preload_text(&common_chars, font_size, GenericFamily::Monospace, None);
self.preload_text(&common_chars, font_size, GenericFamily::SansSerif, None);
self.preload_text(
&common_chars,
font_size,
GenericFamily::SansSerif,
Some(FontWeight::BOLD),
);
}
fn preload_text(
&mut self,
text: &str,
font_size: f32,
generic_family: GenericFamily,
font_weight: Option<FontWeight>,
) {
profiling::scope!("preload_text");
let style = TextStyle {
font_stack: parley::FontStack::Single(parley::FontFamily::Generic(generic_family)),
font_weight: font_weight.unwrap_or(FontWeight::NORMAL),
font_size,
..Default::default()
};
let mut builder =
self.layout_context
.tree_builder(&mut self.font_context, 1.0, true, &style);
builder.push_text(text);
let (mut layout, _) = builder.build();
layout.break_all_lines(None);
for line in layout.lines() {
for item in line.items() {
let parley::PositionedLayoutItem::GlyphRun(run) = item else {
continue;
};
for horizontal_offset in SubpixelBin::<4>::BIN_OFFSETS {
self.glyph_rasterizer
.rasterize_glyph_run(
&mut self.atlas,
&run,
LogicalVector::new(horizontal_offset, 0.0),
1.0,
)
.for_each(|_| {});
}
}
}
}
pub fn font_atlas(&self) -> &FontAtlas {
&self.atlas
}
pub fn layout(&mut self, job: LayoutJob, pixels_per_point: f32) -> Arc<Layout> {
let hash = calculate_hash(&(&job, OrderedFloat(pixels_per_point)));
if let Some(cached_layout) = self.layout_cache.get(hash) {
return cached_layout;
}
let default_style = TextStyle::default();
let style = TextStyle {
font_stack: parley::FontStack::Single(parley::FontFamily::Generic(job.font_family)),
font_size: job.font_size.into(),
line_height: parley::LineHeight::Absolute(job.line_height.into()),
font_weight: job
.font_weight
.map(|w| parley::FontWeight::new(w.into()))
.unwrap_or(default_style.font_weight),
..default_style
};
let mut builder = self.layout_context.tree_builder(
&mut self.font_context,
1.0,
// TODO: quantize true or false?
true,
&style,
);
for segment in job.segments {
let brush_style = StyleProperty::Brush(segment.color);
builder.push_style_modification_span(&[brush_style]);
builder.push_text(segment.text);
builder.pop_style_span();
}
let (mut parley_layout, _) = builder.build();
parley_layout.break_all_lines(None);
// extra offset applied to each glyph to get position relative to layout origin
let mut glyph_offset = LogicalVector::new(0.0, 0.0);
if let Some(alignment) = job.alignment {
let alignment = match alignment {
Alignment::Min => parley::Alignment::Start,
Alignment::Center => {
glyph_offset.x += -parley_layout.full_width() * 0.5;
parley::Alignment::Center
}
Alignment::Max => {
glyph_offset.x += -parley_layout.full_width();
parley::Alignment::End
}
};
parley_layout.align(None, alignment, parley::AlignmentOptions::default());
}
let mut layout_rows = Vec::new();
let mut num_of_vertices = 0;
let mut num_of_indices = 0;
for line in parley_layout.lines() {
let mut layout_row = LayoutRow::default();
for item in line.items() {
let parley::PositionedLayoutItem::GlyphRun(run) = item else {
continue;
};
for rasterized_glyph in self.glyph_rasterizer.rasterize_glyph_run(
&mut self.atlas,
&run,
glyph_offset,
pixels_per_point,
) {
let Some(glyph) = rasterized_glyph else {
continue;
};
layout_row.glyphs.push(glyph);
num_of_vertices += 4;
num_of_indices += 6;
}
}
if !layout_row.glyphs.is_empty() {
layout_rows.push(layout_row);
}
}
let layout = Arc::new(Layout {
job_hash: hash,
parley_layout,
rows: layout_rows,
num_of_vertices,
num_of_indices,
});
self.layout_cache.insert(hash, Arc::clone(&layout));
layout
}
/// Clear atlas and invalidate caches depend on atlas state
fn clear_atlas(&mut self) {
self.atlas.clear();
self.glyph_rasterizer.clear();
self.layout_cache.clear();
}
}
struct CachedLayout {
generation: u32,
layout: Arc<Layout>,
}
#[derive(Default)]
struct LayoutCache {
current_generation: u32,
cache: nohash_hasher::IntMap<u64, CachedLayout>,
}
impl LayoutCache {
fn get(&mut self, hash: u64) -> Option<Arc<Layout>> {
match self.cache.entry(hash) {
std::collections::hash_map::Entry::Occupied(entry) => {
let cached = entry.into_mut();
cached.generation = self.current_generation;
Some(Arc::clone(&cached.layout))
}
std::collections::hash_map::Entry::Vacant(_) => None,
}
}
fn insert(&mut self, hash: u64, layout: Arc<Layout>) {
self.cache.insert(
hash,
CachedLayout {
generation: self.current_generation,
layout,
},
);
}
/// Removes unused layouts
pub fn flush(&mut self) {
self.cache
.retain(|_key, cached| cached.generation == self.current_generation);
self.current_generation = self.current_generation.wrapping_add(1);
}
pub fn clear(&mut self) {
self.cache.clear();
}
}
+137
View File
@@ -0,0 +1,137 @@
use crate::{
color::Srgba,
math::{Point, Rect, Size},
renderer::{
image::{ImageData, ImageDelta},
textures::TextureOptions,
},
};
use image::{GenericImage, RgbaImage, SubImage, imageops};
pub struct FontAtlasSpace;
pub type FontAtlasPoint = Point<u32, FontAtlasSpace>;
pub type FontAtlasSize = Size<u32, FontAtlasSpace>;
pub type FontAtlasRect = Rect<u32, FontAtlasSpace>;
pub struct FontAtlas {
// max width/height of atlas texture
max_texture_side: u32,
image: RgbaImage,
// position of next allocation
cursor: FontAtlasPoint,
current_row_height: u32,
// atlas has been altered and needs to be reuploaded to the GPU
// TODO: only mark changed region as dirty and perform partial texture update
dirty: bool,
// atlas has overflowed and needs to be recreated
overflowed: bool,
}
impl FontAtlas {
pub fn new(max_texture_side: u32) -> Self {
// start out with maximum width and let height grow as needed
let width = max_texture_side;
let initial_height = 256;
let mut atlas = Self {
max_texture_side,
image: RgbaImage::new(width, initial_height),
cursor: FontAtlasPoint::zero(),
current_row_height: 0,
dirty: false,
overflowed: false,
};
atlas.initialize();
atlas
}
fn initialize(&mut self) {
// Puts white pixel at (0, 0).
// NOTE: Rendering a solid color shape is done by setting the texture to
// the font atlas and sampling the white pixel at (0, 0).
let mut sub_image = self.allocate(FontAtlasSize::new(1, 1));
sub_image.put_pixel(0, 0, Srgba::WHITE.into());
}
// TODO: use an actual bin packing algorithm for tighter packing
/// Returns a mutable view into the atlas of given size.
pub fn allocate(&mut self, size: FontAtlasSize) -> SubImage<&mut RgbaImage> {
const PADDING: u32 = 1;
if self.cursor.x + size.width > self.image.width() {
self.cursor.x = 0;
self.cursor.y += self.current_row_height + PADDING;
self.current_row_height = 0;
}
self.current_row_height = self.current_row_height.max(size.height);
let required_atlas_height = self.cursor.y + self.current_row_height;
if required_atlas_height > self.max_texture_side {
log::warn!("font atlas overflowed!");
// start overwriting old glyphs
self.cursor = Point::new(0, self.image.height() / 3);
// setting this flag causes atlas to be recreated next frame
self.overflowed = true;
} else if required_atlas_height > self.image().height() {
// increase height
let mut new_height = self.image.height();
while new_height < required_atlas_height {
new_height *= 2;
}
self.image = extend_image_height(&self.image, new_height, Srgba::TRANSPARENT);
}
let pos = self.cursor;
self.cursor.x += size.width + PADDING;
self.dirty = true;
self.image.sub_image(pos.x, pos.y, size.width, size.height)
}
pub fn take_delta(&mut self) -> Option<ImageDelta> {
let dirty = std::mem::replace(&mut self.dirty, false);
if dirty {
Some(ImageDelta::new(
ImageData::from(self.image.clone()),
TextureOptions::LINEAR,
))
} else {
None
}
}
pub fn capacity(&self) -> f32 {
if self.overflowed {
1.0
} else {
(self.cursor.y + self.current_row_height) as f32 / self.max_texture_side as f32
}
}
pub fn clear(&mut self) {
self.image.fill(0);
self.cursor = FontAtlasPoint::zero();
self.current_row_height = 0;
self.dirty = false;
self.overflowed = false;
self.initialize();
}
pub fn image(&self) -> &RgbaImage {
&self.image
}
pub fn size(&self) -> FontAtlasSize {
FontAtlasSize::new(self.image.width(), self.image.height())
}
}
fn extend_image_height(image: &RgbaImage, new_height: u32, fill_color: Srgba) -> RgbaImage {
let width = image.width();
let mut extended_image = RgbaImage::from_pixel(width, new_height, fill_color.into());
imageops::overlay(&mut extended_image, image, 0, 0);
extended_image
}
+83
View File
@@ -0,0 +1,83 @@
use ordered_float::OrderedFloat;
use parley::Glyph;
use crate::{dpi::PhysicalPoint, fonts::rasterizer::StyleId};
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct GlyphKey {
glyph_id: swash::GlyphId,
style_id: StyleId,
x_bin: SubpixelBin<4>,
pixels_per_point: OrderedFloat<f32>,
}
impl GlyphKey {
pub fn from_glyph(
glyph: &Glyph,
style_id: StyleId,
pixels_per_point: f32,
) -> (Self, PhysicalPoint<i32>) {
// Use subpixel binning for x coordinate
let (x, x_bin) = SubpixelBin::<4>::new(glyph.x * pixels_per_point);
// No binning for y coordinate, just rounding
let y = (glyph.y * pixels_per_point).round() as i32;
let glyph_pos = PhysicalPoint::new(x, y);
(
Self {
glyph_id: glyph.id as u16,
style_id,
x_bin,
pixels_per_point: OrderedFloat(pixels_per_point),
},
glyph_pos,
)
}
pub fn get_fractional_offset(&self) -> swash::zeno::Vector {
swash::zeno::Vector::new(self.x_bin.as_float(), 0.0)
}
}
/// Grouping of fractional offsets into discrete bins for cache optimization
/// Bins have size 1/N and are centered around (1/N) * i with i in {0, 1, 2, ...}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SubpixelBin<const NUM_OF_BINS: usize>(usize);
impl<const NUM_OF_BINS: usize> SubpixelBin<NUM_OF_BINS> {
pub const BIN_OFFSETS: [f32; NUM_OF_BINS] = {
let mut out = [0.0; NUM_OF_BINS];
let mut i = 0;
while i < NUM_OF_BINS {
out[i] = i as f32 * 1.0 / NUM_OF_BINS as f32;
i += 1;
}
out
};
pub fn new(position: f32) -> (i32, Self) {
let half_bin_width = 1.0 / (NUM_OF_BINS as f32 * 2.0);
let new_position = (position + half_bin_width).floor() as i32;
let scaled_pos = ((position - position.floor()) * NUM_OF_BINS as f32).round() as usize;
let bin = scaled_pos.rem_euclid(NUM_OF_BINS);
(new_position, Self(bin))
}
pub const fn as_float(&self) -> f32 {
self.0 as f32 / NUM_OF_BINS as f32
}
}
#[test]
fn test_subpixel_bins() {
assert_eq!(SubpixelBin::<4>::new(3.14), (3, SubpixelBin(1)));
assert_eq!(SubpixelBin::<4>::new(0.11), (0, SubpixelBin(0)));
assert_eq!(SubpixelBin::<4>::new(-0.8), (-1, SubpixelBin(1)));
assert_eq!(SubpixelBin::<2>::new(0.24), (0, SubpixelBin(0)));
assert_eq!(SubpixelBin::<2>::new(0.26), (0, SubpixelBin(1)));
assert_eq!(SubpixelBin::<2>::new(0.76), (1, SubpixelBin(0)));
assert_eq!(SubpixelBin::<2>::new(-0.76), (-1, SubpixelBin(0)));
assert_eq!(SubpixelBin::<2>::new(-0.25), (0, SubpixelBin(0)));
}
+80
View File
@@ -0,0 +1,80 @@
use crate::{color::Srgba, dpi::LogicalPoint, fonts::rasterizer::RasterizedGlyph};
use ordered_float::OrderedFloat;
use parley::GenericFamily;
#[derive(Copy, Clone, Debug, Hash)]
pub enum Alignment {
Min,
Center,
Max,
}
#[derive(Clone, Debug, Hash)]
pub struct LayoutSegment<'s> {
pub text: &'s str,
pub color: Srgba,
}
#[derive(Clone, Debug, Hash)]
pub struct LayoutJob<'s> {
pub segments: Vec<LayoutSegment<'s>>,
pub font_family: GenericFamily,
pub font_size: OrderedFloat<f32>,
pub line_height: OrderedFloat<f32>,
pub alignment: Option<Alignment>,
pub font_weight: Option<OrderedFloat<f32>>,
}
impl<'s> LayoutJob<'s> {
pub fn new(
font_family: GenericFamily,
font_size: f32,
line_height: f32,
alignment: Option<Alignment>,
font_weight: Option<f32>,
) -> Self {
Self {
segments: Vec::new(),
font_family,
font_size: font_size.into(),
line_height: line_height.into(),
alignment,
font_weight: font_weight.map(OrderedFloat),
}
}
pub fn append(&mut self, text: &'s str, color: Srgba) {
self.segments.push(LayoutSegment { text, color });
}
}
#[derive(Default)]
pub struct LayoutRow {
pub glyphs: Vec<RasterizedGlyph>,
}
pub struct Layout {
pub job_hash: u64,
pub parley_layout: parley::Layout<Srgba>,
pub rows: Vec<LayoutRow>,
pub num_of_vertices: usize,
pub num_of_indices: usize,
}
impl Layout {
pub fn width(&self) -> f32 {
self.parley_layout.full_width()
}
/// Returns text index at cursor position
pub fn cursor_index(&self, cursor: LogicalPoint<f32>) -> usize {
let cursor = parley::Cursor::from_point(&self.parley_layout, cursor.x, cursor.y);
cursor.index()
}
}
impl std::hash::Hash for Layout {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.job_hash.hash(state);
}
}
+253
View File
@@ -0,0 +1,253 @@
use crate::{
color::Srgba,
dpi::{
ConvertToLogical, LogicalRect, LogicalVector, PhysicalPoint, PhysicalRect, PhysicalVector,
},
fonts::{
atlas::{FontAtlas, FontAtlasRect},
glyph_key::GlyphKey,
},
math::{Point, Size},
};
use ahash::HashMap;
use image::GenericImage;
use ordered_float::OrderedFloat;
use parley::{FontData, GlyphRun};
use std::borrow::Cow;
type FontBlobId = u64;
type FontIndex = u32;
type SwashFontOffset = u32;
pub type StyleId = u32;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct StyleKey<'a> {
font_blob_id: FontBlobId,
font_size: OrderedFloat<f32>,
normalized_coords: Cow<'a, [i16]>,
}
impl<'a> StyleKey<'a> {
fn new(font_blob_id: FontBlobId, font_size: f32, normalized_coords: &'a [i16]) -> Self {
Self {
font_blob_id,
font_size: font_size.into(),
normalized_coords: Cow::Borrowed(normalized_coords),
}
}
fn to_static(&self) -> StyleKey<'static> {
StyleKey {
normalized_coords: self.normalized_coords.clone().into_owned().into(),
..*self
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct CachedGlyph {
// absolute uv rect within font atlas
pub uv: FontAtlasRect,
// offset from top/left to baseline
pub baseline_offset: PhysicalVector<i32>,
}
pub struct RasterizedGlyph {
// NOTE: this is relative to the layout origin
pub rect: LogicalRect<f32>,
pub uv: FontAtlasRect,
pub color: Srgba,
}
impl RasterizedGlyph {
fn from_cached(
cached: CachedGlyph,
position: PhysicalPoint<i32>,
color: Srgba,
pixels_per_point: f32,
) -> Self {
let glyph_rect = PhysicalRect::from_origin_and_size(
position + cached.baseline_offset,
cached.uv.cast_unit().cast().size(),
);
RasterizedGlyph {
rect: glyph_rect.to_logical(pixels_per_point),
uv: cached.uv,
color,
}
}
}
pub struct GlyphRasterizer {
scale_context: swash::scale::ScaleContext,
swash_keys: HashMap<(FontBlobId, FontIndex), (SwashFontOffset, swash::CacheKey)>,
// Style properties (font, size, etc.) are the same for each glyph run and don't
// need to be part of each glyph key. Instead, associate each style with its own
// ID and include that in the glyph key.
style_ids: HashMap<StyleKey<'static>, StyleId>,
next_style_id: StyleId,
cached_glyphs: HashMap<GlyphKey, Option<CachedGlyph>>,
// scratch image buffer used to write bitmap data into
scratch: swash::scale::image::Image,
}
impl GlyphRasterizer {
pub fn new() -> Self {
Self {
scale_context: swash::scale::ScaleContext::new(),
swash_keys: Default::default(),
style_ids: Default::default(),
next_style_id: 0,
cached_glyphs: Default::default(),
scratch: Default::default(),
}
}
pub fn clear(&mut self) {
self.swash_keys.clear();
self.style_ids.clear();
self.next_style_id = 0;
self.cached_glyphs.clear();
}
/// Gets a swash::FontRef from FontData
fn get_font_ref<'a>(&mut self, font: &'a FontData) -> swash::FontRef<'a> {
let font_blob_id = font.data.id();
let (swash_offset, swash_key) = *self
.swash_keys
.entry((font_blob_id, font.index))
.or_insert_with(|| {
let font_ref =
swash::FontRef::from_index(font.data.data(), font.index as usize).unwrap();
(font_ref.offset, font_ref.key)
});
swash::FontRef {
data: font.data.data(),
offset: swash_offset,
key: swash_key,
}
}
fn get_style_id(
&mut self,
font_data: &FontData,
font_size: f32,
norm_coords: &[i16],
) -> StyleId {
let style_key = StyleKey::new(font_data.data.id(), font_size, norm_coords);
match self.style_ids.get(&style_key) {
Some(key) => *key,
None => *self
.style_ids
.entry(style_key.to_static())
.or_insert_with(|| {
let id = self.next_style_id;
self.next_style_id += 1;
id
}),
}
}
/// Rasterizes glyph run and returns the placement and UV for each glyph.
/// Can return `None` if glyph doesn't take up any space (e.g. whitespace).
pub fn rasterize_glyph_run<'slf: 'run, 'run, 'atlas>(
&'slf mut self,
atlas: &'atlas mut FontAtlas,
glyph_run: &'run GlyphRun<'_, Srgba>,
// additional offset relative to layout origin
glyph_offset: LogicalVector<f32>,
pixels_per_point: f32,
) -> impl Iterator<Item = Option<RasterizedGlyph>> + use<'slf, 'run, 'atlas> {
let run = glyph_run.run();
let color = glyph_run.style().brush;
let font_size = run.font_size() * pixels_per_point;
let normalized_coords = run.normalized_coords();
let font_ref = self.get_font_ref(run.font());
let style_id = self.get_style_id(run.font(), font_size, normalized_coords);
let mut scaler = self
.scale_context
.builder(font_ref)
.size(font_size)
.normalized_coords(normalized_coords)
.hint(true)
.build();
let image = &mut self.scratch;
let cached_glyphs = &mut self.cached_glyphs;
glyph_run.positioned_glyphs().map(move |mut glyph| {
glyph.x += glyph_offset.x;
glyph.y += glyph_offset.y;
let (glyph_key, glyph_pos) = GlyphKey::from_glyph(&glyph, style_id, pixels_per_point);
if let Some(cached_glyph) = cached_glyphs.get(&glyph_key) {
return cached_glyph.map(|cached| {
RasterizedGlyph::from_cached(cached, glyph_pos, color, pixels_per_point)
});
}
let fract_offset = glyph_key.get_fractional_offset();
image.clear();
let did_render = swash::scale::Render::new(&[
swash::scale::Source::ColorOutline(0),
swash::scale::Source::ColorBitmap(swash::scale::StrikeWith::BestFit),
swash::scale::Source::Outline,
])
.format(swash::zeno::Format::Alpha)
.offset(fract_offset)
.render_into(&mut scaler, glyph.id as u16, image);
if !did_render || image.placement.width == 0 || image.placement.height == 0 {
cached_glyphs.insert(glyph_key, None);
return None;
};
let atlas_region = write_to_atlas(image, atlas);
let cached_glyph = CachedGlyph {
uv: atlas_region,
baseline_offset: PhysicalVector::new(image.placement.left, -image.placement.top),
};
cached_glyphs.insert(glyph_key, Some(cached_glyph));
Some(RasterizedGlyph::from_cached(
cached_glyph,
glyph_pos,
color,
pixels_per_point,
))
})
}
}
/// Writes rasterized glyph to atlas and returns region it wrote into
fn write_to_atlas(image: &swash::scale::image::Image, atlas: &mut FontAtlas) -> FontAtlasRect {
let mut atlas_region = atlas.allocate(Size::new(image.placement.width, image.placement.height));
match image.content {
swash::scale::image::Content::Mask => {
let mut i = 0;
for y in 0..image.placement.height {
for x in 0..image.placement.width {
let a = image.data[i];
// SAFETY: allocated atlas region and swash image have the same size
unsafe {
atlas_region.unsafe_put_pixel(x, y, Srgba::new(255, 255, 255, a).into())
};
i += 1;
}
}
}
_ => unreachable!(),
};
FontAtlasRect::from_origin_and_size(
Point::new(atlas_region.offsets().0, atlas_region.offsets().1),
Size::new(image.placement.width, image.placement.height),
)
}
+257
View File
@@ -0,0 +1,257 @@
use crate::{context::RenderJob, dpi::PhysicalSize, renderer::Renderer};
use std::sync::Arc;
use wgpu::{Texture, TextureFormat, TextureView};
use winit::window::Window;
pub struct GraphicsContext {
surface: wgpu::Surface<'static>,
device: wgpu::Device,
queue: wgpu::Queue,
config: wgpu::SurfaceConfiguration,
is_surface_configured: bool,
renderer: Renderer,
blit_texture: wgpu::Texture,
blit_texture_view: wgpu::TextureView,
texture_blitter: wgpu::util::TextureBlitter,
pub window: Arc<Window>,
}
impl GraphicsContext {
pub async fn new(window: Arc<Window>) -> anyhow::Result<Self> {
let size = window.inner_size();
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
backends: wgpu::Backends::PRIMARY,
..Default::default()
});
let surface = instance.create_surface(Arc::clone(&window)).unwrap();
let adapter = instance
.request_adapter(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::default(),
compatible_surface: Some(&surface),
force_fallback_adapter: false,
})
.await?;
let required_features = wgpu::Features::TEXTURE_COMPRESSION_BC;
let required_limits = wgpu::Limits {
max_texture_array_layers: 512,
..Default::default()
};
if !adapter.features().contains(required_features) {
anyhow::bail!(
"Unsupported features were requested: {}",
required_features - adapter.features()
);
}
let mut failed_limit = Vec::new();
required_limits.check_limits_with_fail_fn(
&adapter.limits(),
false,
|name, requested, allowed| {
failed_limit.push((name, requested, allowed));
},
);
if let Some((name, requested, allowed)) = failed_limit.pop() {
anyhow::bail!(
"Requested limit '{name}' value {requested} is better than allowed {allowed}!"
)
}
let (device, queue) = adapter
.request_device(&wgpu::DeviceDescriptor {
label: None,
required_features,
required_limits,
memory_hints: Default::default(),
trace: wgpu::Trace::Off,
experimental_features: Default::default(),
})
.await?;
let surface_caps = surface.get_capabilities(&adapter);
// NOTE: PoB incorrectly performs mixing and blending in sRGB space.
// To get a similar visual outcome, we need to do the same.
// Select a non-sRGB format so that no automatic linear -> sRGB conversion
// is performed.
let surface_format = surface_caps
.formats
.iter()
.find(|f| !f.is_srgb())
.copied()
.unwrap_or(surface_caps.formats[0]);
let config = wgpu::SurfaceConfiguration {
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
format: surface_format,
width: size.width,
height: size.height,
//present_mode: surface_caps.present_modes[0],
present_mode: wgpu::PresentMode::Fifo,
alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![],
desired_maximum_frame_latency: 2,
};
let (blit_texture, blit_texture_view) =
create_blit_texture(&device, config.width, config.height, config.format);
let texture_blitter = wgpu::util::TextureBlitter::new(&device, config.format);
let renderer = Renderer::new(&device, config.format, None);
Ok(Self {
surface,
device,
queue,
config,
is_surface_configured: false,
renderer,
blit_texture,
blit_texture_view,
texture_blitter,
window,
})
}
pub fn resize(&mut self, width: u32, height: u32) {
if width > 0 && height > 0 {
self.config.width = width;
self.config.height = height;
self.surface.configure(&self.device, &self.config);
self.is_surface_configured = true;
(self.blit_texture, self.blit_texture_view) =
create_blit_texture(&self.device, width, height, self.config.format);
}
}
pub fn render(&mut self, render_job: RenderJob) -> Result<(), wgpu::SurfaceError> {
profiling::scope!("render");
self.window.request_redraw();
if !self.is_surface_configured {
return Ok(());
}
let output = self.surface.get_current_texture()?;
let suboptimal = output.suboptimal;
let surface_view = output
.texture
.create_view(&wgpu::TextureViewDescriptor::default());
let mut encoder = self
.device
.create_command_encoder(&wgpu::CommandEncoderDescriptor {
label: Some("Render Encoder"),
});
// If render_job is [`RenderJob::Skip`], skip rendering and just
// blit the texture of the previous frame onto the surface texture.
if let RenderJob::Render {
meshes,
textures_delta,
} = render_job
{
let screen_size = PhysicalSize::new(self.config.width, self.config.height);
let pixels_per_point = self.window.as_ref().scale_factor() as f32;
// upload new textures
self.renderer
.update_textures(&self.device, &self.queue, &textures_delta);
// upload vertex, index, and uniform buffers
self.renderer.update_buffers(
&self.device,
&self.queue,
&meshes,
screen_size,
pixels_per_point,
);
let rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: &self.blit_texture_view,
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color {
r: 0.0,
g: 0.0,
b: 0.0,
a: 1.0,
}),
store: wgpu::StoreOp::Store,
},
depth_slice: None,
})],
depth_stencil_attachment: None,
timestamp_writes: None,
label: Some("main render pass"),
occlusion_query_set: None,
});
self.renderer.render(
&mut rpass.forget_lifetime(),
&meshes,
screen_size,
pixels_per_point,
);
self.renderer.free_textures(&textures_delta)
}
{
profiling::scope!("blit");
self.texture_blitter.copy(
&self.device,
&mut encoder,
&self.blit_texture_view,
&surface_view,
);
}
self.queue.submit(std::iter::once(encoder.finish()));
output.present();
if suboptimal {
Err(wgpu::SurfaceError::Outdated)
} else {
Ok(())
}
}
}
fn create_blit_texture(
device: &wgpu::Device,
width: u32,
height: u32,
format: TextureFormat,
) -> (Texture, TextureView) {
let blit_texture = device.create_texture(&wgpu::TextureDescriptor {
label: Some("Blit Texture"),
size: wgpu::Extent3d {
width,
height,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING,
view_formats: &[],
});
let blit_texture_view = blit_texture.create_view(&wgpu::TextureViewDescriptor::default());
(blit_texture, blit_texture_view)
}
+295
View File
@@ -0,0 +1,295 @@
use crate::dpi::PhysicalPoint;
use ahash::{HashMap, HashSet};
use std::time::{Duration, Instant};
use winit::{
event::{KeyEvent, MouseButton, WindowEvent},
keyboard::{KeyCode, ModifiersState, PhysicalKey},
};
#[derive(Default)]
pub struct InputState {
key_modifiers: ModifiersState,
keys_pressed: HashSet<KeyCode>,
mouse_pressed: HashSet<MouseButton>,
mouse_last_pressed: HashMap<MouseButton, Instant>,
cursor_pos: PhysicalPoint<f32>,
}
impl InputState {
pub fn key_pressed(&self, code: KeyCode) -> bool {
self.keys_pressed.contains(&code)
}
pub fn mouse_pressed(&self, button: MouseButton) -> bool {
self.mouse_pressed.contains(&button)
}
pub fn mouse_pos(&self) -> PhysicalPoint<f32> {
self.cursor_pos
}
pub fn modifiers(&self) -> ModifiersState {
self.key_modifiers
}
pub fn on_window_event(&mut self, event: &WindowEvent) {
match event {
WindowEvent::ModifiersChanged(modifiers) => {
self.key_modifiers = modifiers.state();
}
WindowEvent::CursorMoved { position, .. } => {
self.cursor_pos = PhysicalPoint::new(position.x as f32, position.y as f32);
}
WindowEvent::KeyboardInput {
event:
KeyEvent {
physical_key: PhysicalKey::Code(code),
state,
..
},
..
} => {
if state.is_pressed() {
self.keys_pressed.insert(*code);
} else {
self.keys_pressed.remove(code);
}
}
WindowEvent::MouseInput { state, button, .. } => {
if state.is_pressed() {
self.mouse_pressed.insert(*button);
} else {
self.mouse_pressed.remove(button);
}
}
_ => {}
}
}
pub fn is_double_click(&mut self, button: MouseButton) -> bool {
let now = Instant::now();
let last = self.mouse_last_pressed.entry(button);
match last {
std::collections::hash_map::Entry::Occupied(mut occupied_entry) => {
let last = occupied_entry.insert(now);
now.duration_since(last) < Duration::from_millis(400)
}
std::collections::hash_map::Entry::Vacant(vacant_entry) => {
vacant_entry.insert(now);
false
}
}
}
}
pub fn str_as_keycode(s: &str) -> Option<KeyCode> {
Some(match s.to_uppercase().as_str() {
// Letters
"A" => KeyCode::KeyA,
"B" => KeyCode::KeyB,
"C" => KeyCode::KeyC,
"D" => KeyCode::KeyD,
"E" => KeyCode::KeyE,
"F" => KeyCode::KeyF,
"G" => KeyCode::KeyG,
"H" => KeyCode::KeyH,
"I" => KeyCode::KeyI,
"J" => KeyCode::KeyJ,
"K" => KeyCode::KeyK,
"L" => KeyCode::KeyL,
"M" => KeyCode::KeyM,
"N" => KeyCode::KeyN,
"O" => KeyCode::KeyO,
"P" => KeyCode::KeyP,
"Q" => KeyCode::KeyQ,
"R" => KeyCode::KeyR,
"S" => KeyCode::KeyS,
"T" => KeyCode::KeyT,
"U" => KeyCode::KeyU,
"V" => KeyCode::KeyV,
"W" => KeyCode::KeyW,
"X" => KeyCode::KeyX,
"Y" => KeyCode::KeyY,
"Z" => KeyCode::KeyZ,
// Digits
"0" => KeyCode::Digit0,
"1" => KeyCode::Digit1,
"2" => KeyCode::Digit2,
"3" => KeyCode::Digit3,
"4" => KeyCode::Digit4,
"5" => KeyCode::Digit5,
"6" => KeyCode::Digit6,
"7" => KeyCode::Digit7,
"8" => KeyCode::Digit8,
"9" => KeyCode::Digit9,
// Modifiers
"SHIFT" => KeyCode::ShiftLeft,
"CTRL" => KeyCode::ControlLeft,
"ALT" => KeyCode::AltLeft,
// F Keys
"F1" => KeyCode::F1,
"F2" => KeyCode::F2,
"F3" => KeyCode::F3,
"F4" => KeyCode::F4,
"F5" => KeyCode::F5,
"F6" => KeyCode::F6,
"F7" => KeyCode::F7,
"F8" => KeyCode::F8,
"F9" => KeyCode::F9,
"F10" => KeyCode::F10,
"F11" => KeyCode::F11,
"F12" => KeyCode::F12,
// Rest
" " => KeyCode::Space,
"BACK" => KeyCode::Backspace,
"TAB" => KeyCode::Tab,
"RETURN" => KeyCode::Enter,
"ESCAPE" => KeyCode::Escape,
"PAUSE" => KeyCode::Pause,
"PAGEUP" => KeyCode::PageUp,
"PAGEDOWN" => KeyCode::PageDown,
"END" => KeyCode::End,
"HOME" => KeyCode::Home,
"PRINTSCREEN" => KeyCode::PrintScreen,
"INSERT" => KeyCode::Insert,
"DELETE" => KeyCode::Delete,
"UP" => KeyCode::ArrowUp,
"DOWN" => KeyCode::ArrowDown,
"LEFT" => KeyCode::ArrowLeft,
"RIGHT" => KeyCode::ArrowRight,
"NUMLOCK" => KeyCode::NumLock,
"SCROLL" => KeyCode::ScrollLock,
_ => return None,
})
}
pub fn keycode_as_str(code: KeyCode) -> Option<String> {
Some(
match code {
// Letters
KeyCode::KeyA => "a",
KeyCode::KeyB => "b",
KeyCode::KeyC => "c",
KeyCode::KeyD => "d",
KeyCode::KeyE => "e",
KeyCode::KeyF => "f",
KeyCode::KeyG => "g",
KeyCode::KeyH => "h",
KeyCode::KeyI => "i",
KeyCode::KeyJ => "j",
KeyCode::KeyK => "k",
KeyCode::KeyL => "l",
KeyCode::KeyM => "m",
KeyCode::KeyN => "n",
KeyCode::KeyO => "o",
KeyCode::KeyP => "p",
KeyCode::KeyQ => "q",
KeyCode::KeyR => "r",
KeyCode::KeyS => "s",
KeyCode::KeyT => "t",
KeyCode::KeyU => "u",
KeyCode::KeyV => "v",
KeyCode::KeyW => "w",
KeyCode::KeyX => "x",
KeyCode::KeyY => "y",
KeyCode::KeyZ => "z",
// Digits
KeyCode::Digit0 => "0",
KeyCode::Digit1 => "1",
KeyCode::Digit2 => "2",
KeyCode::Digit3 => "3",
KeyCode::Digit4 => "4",
KeyCode::Digit5 => "5",
KeyCode::Digit6 => "6",
KeyCode::Digit7 => "7",
KeyCode::Digit8 => "8",
KeyCode::Digit9 => "9",
// Modifiers
KeyCode::ShiftLeft => "SHIFT",
KeyCode::ControlLeft => "CTRL",
KeyCode::AltLeft => "ALT",
// F Keys
KeyCode::F1 => "F1",
KeyCode::F2 => "F2",
KeyCode::F3 => "F3",
KeyCode::F4 => "F4",
KeyCode::F5 => "F5",
KeyCode::F6 => "F6",
KeyCode::F7 => "F7",
KeyCode::F8 => "F8",
KeyCode::F9 => "F9",
KeyCode::F10 => "F10",
KeyCode::F11 => "F11",
KeyCode::F12 => "F12",
// Rest
KeyCode::Space => " ",
KeyCode::Backspace => "BACK",
KeyCode::Tab => "TAB",
KeyCode::Enter => "RETURN",
KeyCode::Escape => "ESCAPE",
KeyCode::Pause => "PAUSE",
KeyCode::PageUp => "PAGEUP",
KeyCode::PageDown => "PAGEDOWN",
KeyCode::End => "END",
KeyCode::Home => "HOME",
KeyCode::PrintScreen => "PRINTSCREEN",
KeyCode::Insert => "INSERT",
KeyCode::Delete => "DELETE",
KeyCode::ArrowUp => "UP",
KeyCode::ArrowDown => "DOWN",
KeyCode::ArrowLeft => "LEFT",
KeyCode::ArrowRight => "RIGHT",
KeyCode::NumLock => "NUMLOCK",
KeyCode::ScrollLock => "SCROLL",
KeyCode::Equal => "+", // This is what PoB does
KeyCode::Minus => "-",
KeyCode::Comma => ",",
KeyCode::Period => ".",
KeyCode::Slash => "/",
KeyCode::NumpadAdd => "+",
KeyCode::NumpadSubtract => "-",
KeyCode::NumpadEnter => "RETURN",
KeyCode::Numpad0 => "0",
_ => return None,
}
.to_string(),
)
}
pub fn str_as_mousebutton(s: &str) -> Option<MouseButton> {
Some(match s.to_uppercase().as_str() {
"LEFTBUTTON" => MouseButton::Left,
"RIGHTBUTTON" => MouseButton::Right,
"MIDDLEBUTTON" => MouseButton::Middle,
"MOUSE4" => MouseButton::Back,
"MOUSE5" => MouseButton::Forward,
_ => return None,
})
}
pub fn mousebutton_as_str(button: MouseButton) -> Option<String> {
Some(
match button {
MouseButton::Left => "LEFTBUTTON",
MouseButton::Right => "RIGHTBUTTON",
MouseButton::Middle => "MIDDLEBUTTON",
MouseButton::Back => "MOUSE4",
MouseButton::Forward => "MOUSE5",
_ => return None,
}
.to_string(),
)
}
+135
View File
@@ -0,0 +1,135 @@
use crate::args::Game;
use anyhow::bail;
use flate2::read::GzDecoder;
use std::{
fs::{self},
io::copy,
path::{Path, PathBuf},
};
const REPO_NAME: &str = "meehl/RustyPathOfBuilding";
pub fn run_installer() -> anyhow::Result<()> {
let script_dir = Game::script_dir();
// run installer iff Launch.lua doesn't exist, meaning this is likely the first run
if script_dir.join("Launch.lua").exists() {
return Ok(());
}
download_path_of_building(script_dir.as_path())?;
replace_manifest(script_dir.as_path())?;
Ok(())
}
/// Download latest release of Path of Building
fn download_path_of_building<P: AsRef<Path>>(target_dir: P) -> anyhow::Result<()> {
log::info!("Downloading latest release of Path of Building...");
let repo = match Game::current() {
Game::Poe1 => "PathOfBuildingCommunity/PathOfBuilding",
Game::Poe2 => "PathOfBuildingCommunity/PathOfBuilding-PoE2",
};
let url = format!(
"https://github.com/{}/archive/refs/heads/master.tar.gz",
repo
);
let response = ureq::get(url).call()?;
let body_reader = response.into_body().into_reader();
let gz_decoder = GzDecoder::new(body_reader);
let mut archive = tar::Archive::new(gz_decoder);
for file in archive.entries()? {
let mut file = file?;
let file_path = file.path()?;
let components: Vec<_> = file_path.components().collect();
let target_path = match components.len() {
0..=1 => None,
// put these into target_dir/
2 => {
let filename = components[1].as_os_str();
if filename == "manifest.xml"
|| filename == "help.txt"
|| filename == "changelog.txt"
|| filename == "LICENSE.md"
{
Some(target_dir.as_ref().join(filename))
} else {
None
}
}
// put lua runtime files into target_dir/lua/
3.. => {
if components[1].as_os_str() == "src"
|| (components[1].as_os_str() == "runtime"
&& components[2].as_os_str() == "lua")
{
Some(
target_dir
.as_ref()
.join(components[2..].iter().collect::<PathBuf>()),
)
} else {
None
}
}
};
// create needed directories and extract
if let Some(target_path) = target_path {
if let Some(parent) = target_path.parent() {
fs::create_dir_all(parent)?;
}
file.unpack(&target_path)?;
}
}
Ok(())
}
/// Replace manifest and UpdateCheck with RustyPathOfBuilding's modified versions
/// This is needed to make updating work without writing our own update system.
fn replace_manifest<P: AsRef<Path>>(target_dir: P) -> anyhow::Result<()> {
log::info!("Replacing manifest...");
let game_path = match Game::current() {
Game::Poe1 => "lua/poe1",
Game::Poe2 => "lua/poe2",
};
// Download on overwrite files
download_file(
&format!(
"https://raw.githubusercontent.com/{REPO_NAME}/master/{}/{}",
game_path, "manifest.xml"
),
target_dir.as_ref().join("manifest.xml"),
)?;
download_file(
&format!(
"https://raw.githubusercontent.com/{REPO_NAME}/master/{}/{}",
game_path, "UpdateCheck.lua"
),
target_dir.as_ref().join("UpdateCheck.lua"),
)?;
Ok(())
}
fn download_file<P: AsRef<Path>>(url: &str, file_path: P) -> anyhow::Result<()> {
let response = ureq::get(url).call()?;
if response.status().is_success() {
let body = response.into_body();
let mut file = fs::File::create(file_path)?;
copy(&mut body.into_reader(), &mut file)?;
Ok(())
} else {
bail!("Unable to download: {}", url);
}
}
+102
View File
@@ -0,0 +1,102 @@
use std::collections::BTreeMap;
use crate::{
dpi::LogicalRect,
math::Rect,
renderer::primitives::{
ClippedPrimitive, DrawPrimitive, QuadPrimitive, RectPrimitive, TextPrimitive,
},
};
/// Holds the draw primitives for each layer.
///
/// Adding a primitive places it in currently set layer. Positions are interpreted as being relative to
/// the current viewport. They are translated into absolute positions (screen positions) and
/// clipped by the viewport.
pub struct Layers {
layers: BTreeMap<(i32, i32), Vec<ClippedPrimitive>>,
current_layer: (i32, i32),
viewport: LogicalRect<f32>,
}
impl Layers {
pub fn new() -> Self {
Self {
layers: Default::default(),
current_layer: (0, 0),
viewport: Rect::zero(),
}
}
pub fn reset(&mut self) {
self.current_layer = (0, 0);
self.layers.clear();
}
/// Consume primitives and return an iterator over them in drawing order.
pub fn consume_layers(&mut self) -> impl Iterator<Item = ClippedPrimitive> {
let layers = std::mem::take(&mut self.layers);
layers.into_values().flatten()
}
pub fn set_viewport(&mut self, viewport: LogicalRect<f32>) {
self.viewport = viewport;
}
pub fn set_draw_layer(&mut self, layer: i32, sublayer: i32) {
self.current_layer = (layer, sublayer);
}
pub fn set_draw_sublayer(&mut self, sublayer: i32) {
self.set_draw_layer(self.current_layer.0, sublayer);
}
pub fn add_rect(&mut self, mut rect: RectPrimitive) {
rect.translate(self.viewport.min.to_vector());
let clipped_primitive = ClippedPrimitive {
clip_rect: self.viewport,
primitive: DrawPrimitive::Rect(rect),
};
self.push(clipped_primitive);
}
pub fn add_quad(&mut self, mut quad: QuadPrimitive) {
quad.translate(self.viewport.min.to_vector());
let clipped_primitive = ClippedPrimitive {
clip_rect: self.viewport,
primitive: DrawPrimitive::Quad(quad),
};
self.push(clipped_primitive);
}
pub fn add_text(&mut self, mut text: TextPrimitive, is_absolute_position: bool) {
if !is_absolute_position {
text.translate(self.viewport.min.to_vector());
};
let clipped_primitive = ClippedPrimitive {
clip_rect: self.viewport,
primitive: DrawPrimitive::Text(text),
};
self.push(clipped_primitive);
}
#[inline]
fn push(&mut self, clipped_primitive: ClippedPrimitive) {
self.layers
.entry(self.current_layer)
.or_default()
.push(clipped_primitive);
}
}
impl std::hash::Hash for Layers {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.layers.hash(state);
}
}
+157
View File
@@ -0,0 +1,157 @@
use std::{cell::RefCell, rc::Rc};
use clap::Parser;
use mlua::{Lua, Result as LuaResult, Table};
use crate::{
Game,
api::{self, get_callback},
args::Args,
subscript::{NativeMultiValue, SubscriptManager, SubscriptResult, register_subscript_globals},
util::{change_working_directory, get_executable_dir},
};
pub struct LuaInstance {
lua: Lua,
subscript_manager: Rc<RefCell<SubscriptManager>>,
}
impl LuaInstance {
pub fn new() -> anyhow::Result<Self> {
let subscript_manager = Rc::new(RefCell::new(SubscriptManager::new()));
let lua = Self::create_lua_state()?;
register_subscript_globals(&lua, &subscript_manager)?;
let instance = Self {
lua,
subscript_manager,
};
instance.init()?;
Ok(instance)
}
fn create_lua_state() -> LuaResult<Lua> {
// SAFETY: use `unsafe_new` to allow loading of C modules
let lua = unsafe { Lua::unsafe_new() };
// expose build arg to lua
let args = Args::parse();
let args_table = lua.create_sequence_from(std::iter::once(args.build_path))?;
lua.globals().set("arg", args_table)?;
// add ./lua to package.path and package.cpath
Self::register_package_paths(&lua)?;
// register callbacks
api::register_globals(&lua)?;
Ok(lua)
}
pub fn init(&self) -> LuaResult<()> {
let script_dir = Game::script_dir();
change_working_directory(script_dir.as_path())?;
self.load(script_dir.join("Launch.lua")).exec()?;
self.on_init()?;
Ok(())
}
pub fn restart(&mut self) -> LuaResult<()> {
self.lua = Self::create_lua_state()?;
register_subscript_globals(&self.lua, &self.subscript_manager)?;
self.init()?;
Ok(())
}
/// Run functions for subscripts and handle their completion/failure.
pub fn handle_subscripts(&self) {
let subscript_events = self.subscript_manager.borrow_mut().process(self);
// Handle finished/errored subscripts.
for event in subscript_events {
match event {
SubscriptResult::SubscriptFinished { id, return_values } => {
self.on_sub_finished(id, return_values).unwrap();
}
SubscriptResult::SubscriptError { id, error } => {
self.on_sub_error(id, &error).unwrap();
}
}
}
}
fn on_init(&self) -> LuaResult<()> {
let on_init = get_callback(&self.lua, "OnInit")?;
on_init.call::<()>(())
}
pub fn on_frame(&self) -> LuaResult<()> {
profiling::scope!("on_frame");
let on_frame = get_callback(&self.lua, "OnFrame")?;
on_frame.call::<()>(())
}
pub fn on_char(&self, ch: &str) -> LuaResult<()> {
let on_char = get_callback(&self.lua, "OnChar")?;
on_char.call::<()>(ch)
}
pub fn on_key_down(&self, key: &str, is_double_click: bool) -> LuaResult<()> {
let on_key_down = get_callback(&self.lua, "OnKeyDown")?;
on_key_down.call::<()>((key, is_double_click))
}
pub fn on_key_up(&self, key: &str) -> LuaResult<()> {
let on_key_up = get_callback(&self.lua, "OnKeyUp")?;
on_key_up.call::<()>(key)
}
pub fn on_sub_finished(&self, id: u64, return_values: NativeMultiValue) -> LuaResult<()> {
let on_sub_finished = get_callback(&self.lua, "OnSubFinished")?;
on_sub_finished.call::<()>((id, return_values))
}
pub fn on_sub_error(&self, id: u64, error: &str) -> LuaResult<()> {
let on_sub_error = get_callback(&self.lua, "OnSubError")?;
on_sub_error.call::<()>((id, error))
}
pub fn on_exit(&self) -> LuaResult<()> {
let on_exit = get_callback(&self.lua, "OnExit")?;
on_exit.call::<()>(())
}
pub fn register_package_paths(lua: &Lua) -> LuaResult<()> {
let script_dir = Game::script_dir();
let package: Table = lua.globals().get("package")?;
let mut package_path: String = package.get("path")?;
package_path.push(';');
package_path.push_str(script_dir.join("lua/?.lua").to_str().unwrap());
package_path.push(';');
package_path.push_str(script_dir.join("lua/?/init.lua").to_str().unwrap());
package.set("path", package_path)?;
let mut package_cpath: String = package.get("cpath")?;
let exe_dir = get_executable_dir()?;
package_cpath.push(';');
#[cfg(target_os = "linux")]
package_cpath.push_str(exe_dir.join("lua/?.so").to_str().unwrap());
#[cfg(target_os = "windows")]
package_cpath.push_str(exe_dir.join("lua/?.dll").to_str().unwrap());
package.set("cpath", package_cpath)?;
Ok(())
}
}
impl std::ops::Deref for LuaInstance {
type Target = Lua;
fn deref(&self) -> &Self::Target {
&self.lua
}
}
+49
View File
@@ -0,0 +1,49 @@
use crate::app::App;
use crate::args::{Args, Game};
use crate::installer::run_installer;
use clap::Parser;
use winit::event_loop::EventLoop;
mod api;
mod app;
mod args;
mod color;
mod context;
mod dpi;
mod fonts;
mod gfx;
mod input;
mod installer;
mod layers;
mod lua;
mod math;
mod renderer;
mod subscript;
mod util;
mod worker_pool;
fn main() -> anyhow::Result<()> {
profiling::register_thread!("Main Thread");
env_logger::init();
#[cfg(feature = "profile-with-puffin")]
let _puffin_server = {
let server_addr = format!("127.0.0.1:{}", puffin_http::DEFAULT_PORT);
let server = puffin_http::Server::new(&server_addr).unwrap();
eprintln!("Serving profiling data on {server_addr}. Run `puffin_viewer` to view it.");
profiling::puffin::set_scopes_on(true);
server
};
let args = Args::parse();
Game::init(args.game);
run_installer()?;
let mut app = App::new()?;
let event_loop = EventLoop::with_user_event().build()?;
event_loop.run_app(&mut app)?;
Ok(())
}
+39
View File
@@ -0,0 +1,39 @@
pub use euclid::Box2D as Rect;
pub use euclid::Point2D as Point;
pub use euclid::Size2D as Size;
pub use euclid::Vector2D as Vector;
pub use quad::Quad;
mod quad;
pub trait Corners<T, U> {
fn top_left(&self) -> Point<T, U>;
fn top_right(&self) -> Point<T, U>;
fn bottom_left(&self) -> Point<T, U>;
fn bottom_right(&self) -> Point<T, U>;
}
impl<T, U> Corners<T, U> for Rect<T, U>
where
T: Copy,
{
#[inline]
fn top_left(&self) -> Point<T, U> {
self.min
}
#[inline]
fn top_right(&self) -> Point<T, U> {
Point::new(self.max.x, self.min.y)
}
#[inline]
fn bottom_left(&self) -> Point<T, U> {
Point::new(self.min.x, self.max.y)
}
#[inline]
fn bottom_right(&self) -> Point<T, U> {
self.max
}
}
+123
View File
@@ -0,0 +1,123 @@
use crate::math::{Point, Size, Vector};
use bytemuck::{Pod, Zeroable};
use euclid::num::Zero;
use std::fmt;
use std::hash::Hash;
use std::ops::Add;
#[repr(C)]
pub struct Quad<T, U> {
pub p0: Point<T, U>,
pub p1: Point<T, U>,
pub p2: Point<T, U>,
pub p3: Point<T, U>,
}
impl<T: Copy, U> Copy for Quad<T, U> {}
impl<T: Clone, U> Clone for Quad<T, U> {
fn clone(&self) -> Self {
Self {
p0: self.p0.clone(),
p1: self.p1.clone(),
p2: self.p2.clone(),
p3: self.p3.clone(),
}
}
}
impl<T, U> Eq for Quad<T, U> where T: Eq {}
impl<T, U> PartialEq for Quad<T, U>
where
T: PartialEq,
{
fn eq(&self, other: &Self) -> bool {
self.p0 == other.p0 && self.p1 == other.p1 && self.p2 == other.p2 && self.p3 == other.p3
}
}
impl<T: fmt::Debug, U> fmt::Debug for Quad<T, U> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Quad")
.field(&self.p0)
.field(&self.p1)
.field(&self.p2)
.field(&self.p3)
.finish()
}
}
impl<T: Default, U> Default for Quad<T, U> {
fn default() -> Self {
Self::new(
Default::default(),
Default::default(),
Default::default(),
Default::default(),
)
}
}
impl<T, U> Hash for Quad<T, U>
where
T: Hash,
{
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
self.p0.hash(state);
self.p1.hash(state);
self.p2.hash(state);
self.p3.hash(state);
}
}
// SAFETY: PhantomData in Point is zero-sized and repr(C) guarantees consistent layout
unsafe impl<T: Zeroable, U> Zeroable for Quad<T, U> {}
unsafe impl<T: Pod, U: 'static> Pod for Quad<T, U> {}
impl<T, U> Quad<T, U> {
#[inline]
pub const fn new(p0: Point<T, U>, p1: Point<T, U>, p2: Point<T, U>, p3: Point<T, U>) -> Self {
Self { p0, p1, p2, p3 }
}
}
impl<T, U> Quad<T, U>
where
T: Copy,
{
/// Creates a `Quad` of the given size, at offset zero.
#[inline]
pub fn from_size(size: Size<T, U>) -> Self
where
T: Zero,
{
Quad {
p0: Point::zero(),
p1: Point::new(size.width, Zero::zero()),
p2: Point::new(size.width, size.height),
p3: Point::new(Zero::zero(), size.height),
}
}
}
impl<T, U> Quad<T, U>
where
T: Zero,
{
/// Constructor, setting all points to zero.
pub fn zero() -> Self {
Quad::new(Point::zero(), Point::zero(), Point::zero(), Point::zero())
}
}
impl<T, U> Quad<T, U>
where
T: Copy + Add<T, Output = T>,
{
/// Returns the same quad, translated by a vector.
#[inline]
pub fn translate(&self, by: Vector<T, U>) -> Self {
Self::new(self.p0 + by, self.p1 + by, self.p2 + by, self.p3 + by)
}
}
+635
View File
@@ -0,0 +1,635 @@
use crate::{
dpi::{ConvertToLogical, ConvertToPhysical, LogicalSize, PhysicalRect, PhysicalSize},
math::Point,
renderer::{
image::ImageData,
mesh::{ClippedMesh, Vertex},
textures::{TextureId, TextureOptions, TexturesDelta},
},
};
use ahash::HashMap;
use std::{borrow::Cow, num::NonZeroU64, ops::Range};
use wgpu::util::DeviceExt;
pub mod image;
pub mod mesh;
mod mipmap;
pub mod primitives;
pub mod tessellator;
pub mod textures;
#[derive(Debug)]
struct Texture {
texture: wgpu::Texture,
bind_group: wgpu::BindGroup,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, bytemuck::Pod, bytemuck::Zeroable)]
struct Globals {
screen_size: LogicalSize<f32>,
}
pub struct Renderer {
pipeline: wgpu::RenderPipeline,
index_buffer: SlicedBuffer,
vertex_buffer: SlicedBuffer,
globals_buffer: wgpu::Buffer,
previous_globals: Globals,
globals_bind_group: wgpu::BindGroup,
texture_bind_group_layout: wgpu::BindGroupLayout,
textures: HashMap<TextureId, Texture>,
samplers: HashMap<TextureOptions, wgpu::Sampler>,
}
impl Renderer {
pub fn new(
device: &wgpu::Device,
output_color_format: wgpu::TextureFormat,
output_depth_format: Option<wgpu::TextureFormat>,
) -> Self {
let shader_module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("main_shader_module"),
source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("renderer/main.wgsl"))),
});
let uniform_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: Some("globals_uniform_buffer"),
contents: bytemuck::cast_slice(&[Globals {
screen_size: LogicalSize::zero(),
}]),
usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST,
});
let globals_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("globals_uniform_bind_group_layout"),
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::VERTEX | wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Buffer {
has_dynamic_offset: false,
min_binding_size: NonZeroU64::new(std::mem::size_of::<Globals>() as _),
ty: wgpu::BufferBindingType::Uniform,
},
count: None,
}],
});
let globals_bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("globals_uniform_bind_group"),
layout: &globals_bind_group_layout,
entries: &[wgpu::BindGroupEntry {
binding: 0,
resource: wgpu::BindingResource::Buffer(wgpu::BufferBinding {
buffer: &uniform_buffer,
offset: 0,
size: None,
}),
}],
});
let texture_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("texture_bind_group_layout"),
entries: &[
wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Texture {
multisampled: false,
sample_type: wgpu::TextureSampleType::Float { filterable: true },
view_dimension: wgpu::TextureViewDimension::D2Array,
},
count: None,
},
wgpu::BindGroupLayoutEntry {
binding: 1,
visibility: wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering),
count: None,
},
],
});
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("pipeline_layout"),
bind_group_layouts: &[&globals_bind_group_layout, &texture_bind_group_layout],
push_constant_ranges: &[],
});
let depth_stencil = output_depth_format.map(|format| wgpu::DepthStencilState {
format,
depth_write_enabled: false,
depth_compare: wgpu::CompareFunction::Always,
stencil: wgpu::StencilState::default(),
bias: wgpu::DepthBiasState::default(),
});
let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: Some("render_pipeline"),
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
entry_point: Some("vs_main"),
module: &shader_module,
buffers: &[wgpu::VertexBufferLayout {
// 4x f32, 2x u32 -> 6 * 4 bytes
array_stride: 6 * 4,
step_mode: wgpu::VertexStepMode::Vertex,
// 0: vec2 position
// 1: vec2 texture coordinates
// 2: uint color
// 3: uint layer_idx
attributes: &wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x2, 2 => Uint32, 3 => Uint32],
}],
compilation_options: wgpu::PipelineCompilationOptions::default()
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
unclipped_depth: false,
conservative: false,
cull_mode: None,
front_face: wgpu::FrontFace::default(),
polygon_mode: wgpu::PolygonMode::default(),
strip_index_format: None,
},
depth_stencil,
multisample: wgpu::MultisampleState {
alpha_to_coverage_enabled: false,
count: 1,
mask: !0,
},
fragment: Some(wgpu::FragmentState {
module: &shader_module,
entry_point: Some("fs_main"),
targets: &[Some(wgpu::ColorTargetState {
format: output_color_format,
blend: Some(wgpu::BlendState::ALPHA_BLENDING),
write_mask: wgpu::ColorWrites::ALL,
})],
compilation_options: wgpu::PipelineCompilationOptions::default()
}),
multiview: None,
cache: None,
});
let vertex_buffer = SlicedBuffer::new(
device,
wgpu::BufferUsages::VERTEX,
NonZeroU64::new(2048).expect("2048 is non-zero"),
NonZeroU64::new(std::mem::size_of::<Vertex>() as u64)
.expect("size of vertex is non-zero"),
);
let index_buffer = SlicedBuffer::new(
device,
wgpu::BufferUsages::INDEX,
NonZeroU64::new(2048 * 3).expect("2048 * 3 is non-zero"),
NonZeroU64::new(std::mem::size_of::<u32>() as u64).expect("size of u32 is non-zero"),
);
Self {
pipeline,
vertex_buffer,
index_buffer,
globals_buffer: uniform_buffer,
previous_globals: Globals {
screen_size: LogicalSize::zero(),
},
globals_bind_group,
texture_bind_group_layout,
textures: HashMap::default(),
samplers: HashMap::default(),
}
}
pub fn render(
&self,
render_pass: &mut wgpu::RenderPass<'static>,
paint_jobs: &[ClippedMesh],
screen_size: PhysicalSize<u32>,
pixels_per_point: f32,
) {
profiling::scope!("render");
let screen_rect = PhysicalRect::from_origin_and_size(Point::zero(), screen_size);
let mut index_buffer_slices = self.index_buffer.slices.iter();
let mut vertex_buffer_slices = self.vertex_buffer.slices.iter();
render_pass.set_viewport(
0.0,
0.0,
screen_size.width as f32,
screen_size.height as f32,
0.0,
1.0,
);
render_pass.set_pipeline(&self.pipeline);
render_pass.set_bind_group(0, &self.globals_bind_group, &[]);
for ClippedMesh { clip_rect, mesh } in paint_jobs {
let phys_clip_rect = clip_rect.to_physical::<f32, _>(pixels_per_point).round();
let scissor = phys_clip_rect
// NOTE: can't cast to u32 directly because negative values cause a panic
.cast::<i32>()
.intersection(&screen_rect.to_i32())
.map(|s| s.to_u32());
let Some(scissor) = scissor else {
index_buffer_slices.next().unwrap();
vertex_buffer_slices.next().unwrap();
continue;
};
render_pass.set_scissor_rect(
scissor.min.x,
scissor.min.y,
scissor.width(),
scissor.height(),
);
let index_buffer_slice = index_buffer_slices.next().unwrap();
let vertex_buffer_slice = vertex_buffer_slices.next().unwrap();
if let Some(Texture { bind_group, .. }) = self.textures.get(&mesh.texture_id) {
render_pass.set_bind_group(1, bind_group, &[]);
render_pass.set_index_buffer(
self.index_buffer
.buffer
.slice(index_buffer_slice.start as u64..index_buffer_slice.end as u64),
wgpu::IndexFormat::Uint32,
);
render_pass.set_vertex_buffer(
0,
self.vertex_buffer
.buffer
.slice(vertex_buffer_slice.start as u64..vertex_buffer_slice.end as u64),
);
render_pass.draw_indexed(0..mesh.indices.len() as u32, 0, 0..1);
} else {
log::warn!("Missing texture: {:?}", mesh.texture_id);
}
}
render_pass.set_scissor_rect(0, 0, screen_size.width, screen_size.height);
}
/// Uploads texture data.
/// Needs to be called before [`Self::render`].
pub fn update_textures(
&mut self,
device: &wgpu::Device,
queue: &wgpu::Queue,
textures_delta: &TexturesDelta,
) {
profiling::scope!("update_textures");
for (id, image_delta) in &textures_delta.update {
let ImageData {
format,
width,
height,
array_layers,
mipmap_count,
data_order,
ref bytes,
} = image_delta.image;
let size = wgpu::Extent3d {
width,
height,
depth_or_array_layers: array_layers,
};
// only generate mipmaps for uncompressed images that don't already have mipmaps
let gen_mipmaps = image_delta.options.generate_mipmaps
&& mipmap_count.get() == 1
&& !format.is_compressed();
let mip_level_count = if gen_mipmaps {
size.max_mips(wgpu::TextureDimension::D2)
} else {
mipmap_count.get()
};
let label_str = format!("texture_{id:?}");
let label = Some(label_str.as_str());
let texture = create_texture_with_data(
device,
queue,
&wgpu::TextureDescriptor {
label,
size,
mip_level_count,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST,
view_formats: &[format.add_srgb_suffix()],
},
data_order.into(),
bytes,
gen_mipmaps,
);
if gen_mipmaps {
mipmap::generate_mipmap_chain(queue, &texture, bytes);
}
let texture_view = texture.create_view(&wgpu::TextureViewDescriptor {
dimension: Some(wgpu::TextureViewDimension::D2Array),
..Default::default()
});
let sampler = self
.samplers
.entry(image_delta.options)
.or_insert_with(|| create_sampler(image_delta.options, device));
let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label,
layout: &self.texture_bind_group_layout,
entries: &[
wgpu::BindGroupEntry {
binding: 0,
resource: wgpu::BindingResource::TextureView(&texture_view),
},
wgpu::BindGroupEntry {
binding: 1,
resource: wgpu::BindingResource::Sampler(sampler),
},
],
});
self.textures.insert(
*id,
Texture {
texture,
bind_group,
},
);
}
}
pub fn free_textures(&mut self, textures_delta: &TexturesDelta) {
profiling::scope!("free_textures");
for id in &textures_delta.free {
if let Some(texture) = self.textures.remove(id) {
texture.texture.destroy();
}
}
}
/// Updates the vertex, index, and uniform buffers.
/// Needs to be called before [`Self::render`].
pub fn update_buffers(
&mut self,
device: &wgpu::Device,
queue: &wgpu::Queue,
paint_jobs: &[ClippedMesh],
screen_size: PhysicalSize<u32>,
pixels_per_point: f32,
) {
profiling::scope!("update_buffers");
let uniform_buffer_content = Globals {
screen_size: screen_size.to_logical(pixels_per_point),
};
// update globals uniform buffer
if uniform_buffer_content != self.previous_globals {
queue.write_buffer(
&self.globals_buffer,
0,
bytemuck::cast_slice(&[uniform_buffer_content]),
);
self.previous_globals = uniform_buffer_content;
}
// count how many vertices & indices need to be rendered
let (vertex_count, index_count) = {
paint_jobs.iter().fold((0, 0), |acc, clipped_mesh| {
(
acc.0 + clipped_mesh.mesh.vertices.len(),
acc.1 + clipped_mesh.mesh.indices.len(),
)
})
};
// update index and vertex buffers
if index_count > 0 && vertex_count > 0 {
self.index_buffer.slices.clear();
self.vertex_buffer.slices.clear();
let mut staging_index_buffer = self.index_buffer.create_staging_buffer(
device,
queue,
NonZeroU64::new(index_count as u64).expect("index_count > 0"),
);
let mut staging_vertex_buffer = self.vertex_buffer.create_staging_buffer(
device,
queue,
NonZeroU64::new(vertex_count as u64).expect("vertex_count > 0"),
);
let mut index_offset = 0;
let mut vertex_offset = 0;
for ClippedMesh { mesh, .. } in paint_jobs {
{
let size = mesh.indices.len() * std::mem::size_of::<u32>();
let slice = index_offset..(index_offset + size);
staging_index_buffer[slice.clone()]
.copy_from_slice(bytemuck::cast_slice(&mesh.indices));
self.index_buffer.slices.push(slice);
index_offset += size;
}
{
let size = mesh.vertices.len() * std::mem::size_of::<Vertex>();
let slice = vertex_offset..(vertex_offset + size);
staging_vertex_buffer[slice.clone()]
.copy_from_slice(bytemuck::cast_slice(&mesh.vertices));
self.vertex_buffer.slices.push(slice);
vertex_offset += size;
}
}
}
}
}
struct SlicedBuffer {
buffer: wgpu::Buffer,
slices: Vec<Range<usize>>,
size: wgpu::BufferSize,
usage: wgpu::BufferUsages,
stride: NonZeroU64,
}
impl SlicedBuffer {
fn new(
device: &wgpu::Device,
usage: wgpu::BufferUsages,
start_capacity: NonZeroU64,
stride: NonZeroU64,
) -> Self {
let size = start_capacity.checked_mul(stride).unwrap();
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
usage: usage | wgpu::BufferUsages::COPY_DST,
size: size.get(),
mapped_at_creation: false,
});
Self {
buffer,
slices: Vec::with_capacity(64),
size,
usage,
stride,
}
}
fn create_staging_buffer(
&mut self,
device: &wgpu::Device,
queue: &wgpu::Queue,
required_capacity: NonZeroU64,
) -> wgpu::QueueWriteBufferView {
let required_size = required_capacity.checked_mul(self.stride).unwrap();
// resize buffer to required size
if self.size < required_size {
self.buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
usage: self.usage | wgpu::BufferUsages::COPY_DST,
size: required_size.get(),
mapped_at_creation: false,
});
self.size = required_size;
}
let staging_buffer = queue.write_buffer_with(&self.buffer, 0, required_size);
let Some(staging_buffer) = staging_buffer else {
panic!("Failed to create staging buffer!");
};
staging_buffer
}
}
fn create_sampler(options: TextureOptions, device: &wgpu::Device) -> wgpu::Sampler {
let TextureOptions {
magnification,
minification,
wrap_mode,
mipmap_mode,
..
} = options;
device.create_sampler(&wgpu::SamplerDescriptor {
label: Some(&format!(
"sampler (mag: {magnification:?}, min {minification:?})"
)),
mag_filter: magnification,
min_filter: minification,
address_mode_u: wrap_mode,
address_mode_v: wrap_mode,
mipmap_filter: mipmap_mode,
..Default::default()
})
}
/// Adapted from `wgpu::Device::create_texture_with_data`.
/// Doesn't upload any data for mip level > 0 if skip_mipmaps is true.
fn create_texture_with_data(
device: &wgpu::Device,
queue: &wgpu::Queue,
desc: &wgpu::TextureDescriptor<'_>,
order: wgpu::wgt::TextureDataOrder,
data: &[u8],
skip_mipmaps: bool,
) -> wgpu::Texture {
// Implicitly add the COPY_DST usage
let mut desc = desc.to_owned();
desc.usage |= wgpu::TextureUsages::COPY_DST;
let texture = device.create_texture(&desc);
// Will return None only if it's a combined depth-stencil format
// If so, default to 4, validation will fail later anyway since the depth or stencil
// aspect needs to be written to individually
let block_size = desc.format.block_copy_size(None).unwrap_or(4);
let (block_width, block_height) = desc.format.block_dimensions();
let layer_iterations = desc.array_layer_count();
let outer_iteration;
let inner_iteration;
match order {
wgpu::wgt::TextureDataOrder::LayerMajor => {
outer_iteration = layer_iterations;
inner_iteration = desc.mip_level_count;
}
wgpu::wgt::TextureDataOrder::MipMajor => {
outer_iteration = desc.mip_level_count;
inner_iteration = layer_iterations;
}
}
let mut binary_offset = 0;
for outer in 0..outer_iteration {
for inner in 0..inner_iteration {
let (layer, mip) = match order {
wgpu::wgt::TextureDataOrder::LayerMajor => (outer, inner),
wgpu::wgt::TextureDataOrder::MipMajor => (inner, outer),
};
let mut mip_size = desc.mip_level_size(mip).unwrap();
// copying layers separately
if desc.dimension != wgpu::wgt::TextureDimension::D3 {
mip_size.depth_or_array_layers = 1;
}
// When uploading mips of compressed textures and the mip is supposed to be
// a size that isn't a multiple of the block size, the mip needs to be uploaded
// as its "physical size" which is the size rounded up to the nearest block size.
let mip_physical = mip_size.physical_size(desc.format);
// All these calculations are performed on the physical size as that's the
// data that exists in the buffer.
let width_blocks = mip_physical.width / block_width;
let height_blocks = mip_physical.height / block_height;
let bytes_per_row = width_blocks * block_size;
let data_size = bytes_per_row * height_blocks * mip_size.depth_or_array_layers;
let end_offset = binary_offset + data_size as usize;
if mip == 0 || !skip_mipmaps {
queue.write_texture(
wgpu::TexelCopyTextureInfo {
texture: &texture,
mip_level: mip,
origin: wgpu::Origin3d {
x: 0,
y: 0,
z: layer,
},
aspect: wgpu::wgt::TextureAspect::All,
},
&data[binary_offset..end_offset],
wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some(bytes_per_row),
rows_per_image: Some(height_blocks),
},
mip_physical,
);
}
binary_offset = end_offset;
}
}
texture
}
+171
View File
@@ -0,0 +1,171 @@
use crate::{color::Srgba, renderer::textures::TextureOptions};
use image::{DynamicImage, RgbaImage};
use std::{io::Read, num::NonZeroU32, path::Path};
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ImageDelta {
pub image: ImageData,
pub options: TextureOptions,
}
impl ImageDelta {
pub fn new<I: Into<ImageData>>(image: I, options: TextureOptions) -> Self {
Self {
image: image.into(),
options,
}
}
}
/// Order in which data is laid out.
/// Doesn't matter for data with a single layer and no mipmaps.
#[derive(Clone, Copy, Default, Debug, PartialEq, Eq, Hash)]
pub enum DataOrder {
/// Data is laid out as: `[Layer0Mip0, Layer0Mip1, Layer0Mip2, Layer1Mip0, Layer1Mip1, ...]`
/// Used by dds files.
#[default]
LayerMajor,
/// Data is laid out as: `[Layer0Mip0, Layer1Mip0, Layer2Mip0, Layer0Mip1, Layer1Mip1, ...]`
/// Used by ktx and ktx2 files.
#[allow(dead_code)]
MipMajor,
}
impl From<DataOrder> for wgpu::wgt::TextureDataOrder {
fn from(value: DataOrder) -> Self {
match value {
DataOrder::LayerMajor => Self::LayerMajor,
DataOrder::MipMajor => Self::MipMajor,
}
}
}
#[derive(Clone, PartialEq, Eq)]
pub struct ImageData {
pub format: wgpu::TextureFormat,
pub width: u32,
pub height: u32,
pub array_layers: u32,
pub mipmap_count: NonZeroU32,
pub data_order: DataOrder,
pub bytes: Vec<u8>,
}
impl ImageData {
pub fn from_solid_color(dimensions: [usize; 2], color: Srgba) -> Self {
let width = dimensions[0] as u32;
let height = dimensions[1] as u32;
Self {
format: wgpu::TextureFormat::Rgba8Unorm,
width,
height,
array_layers: 1,
mipmap_count: NonZeroU32::new(1).expect("1 is non-zero"),
data_order: Default::default(),
bytes: RgbaImage::from_pixel(width, height, color.0.into()).into_raw(),
}
}
}
impl From<DynamicImage> for ImageData {
fn from(image: DynamicImage) -> Self {
Self {
format: wgpu::TextureFormat::Rgba8Unorm,
width: image.width(),
height: image.height(),
array_layers: 1,
mipmap_count: NonZeroU32::new(1).expect("1 is non-zero"),
data_order: Default::default(),
bytes: image.to_rgba8().into_raw(),
}
}
}
impl From<RgbaImage> for ImageData {
fn from(image: RgbaImage) -> Self {
Self {
format: wgpu::TextureFormat::Rgba8Unorm,
width: image.width(),
height: image.height(),
array_layers: 1,
mipmap_count: NonZeroU32::new(1).expect("1 is non-zero"),
data_order: Default::default(),
bytes: image.into_raw(),
}
}
}
impl std::fmt::Debug for ImageData {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("ImageData")
.field("format", &self.format)
.field("width", &self.width)
.field("height", &self.height)
.field("array_layers", &self.array_layers)
.field("mipmap_count", &self.mipmap_count)
.finish()
}
}
// TODO: clean this up
pub fn load_image_file<P: AsRef<Path>>(path: P) -> anyhow::Result<ImageData> {
// PoB2 assumes a case insensitive filesystem is used. This can lead to some
// files not being found on case sensitive systems.
// As a workaround, try using a lower-cased path if the original path doesn't
// exist.
let path = if path.as_ref().exists() {
path.as_ref().to_owned()
} else {
let mut path = path.as_ref().to_owned();
let lowercase_filename = path.file_name().unwrap().to_ascii_lowercase();
path.set_file_name(lowercase_filename);
path
};
// special handling for compressed dds files
if path.extension().and_then(|s| s.to_str()) == Some("zst")
&& path
.file_stem()
.and_then(|s| s.to_str())
.map(|s| s.ends_with(".dds"))
.unwrap_or(false)
{
let f = std::fs::File::open(&path)?;
let file_len = f.metadata().ok().map(|m| m.len());
let mut zstd_decoder = zstd::Decoder::new(f)?;
let parse_option = dds::header::ParseOptions::new_permissive(file_len);
let header = dds::header::Header::read(&mut zstd_decoder, &parse_option)?;
let dxgi_format = dds::Format::from_header(&header)?;
// zstd_decoder will now be at start of pixel data
let non_data_len = dds::header::Header::MAGIC.len() + header.byte_len();
let data_len = file_len.and_then(|l| (l as usize).checked_sub(non_data_len));
let mut pixel_data = Vec::with_capacity(data_len.unwrap_or(0));
zstd_decoder.read_to_end(&mut pixel_data)?;
let format = match dxgi_format {
dds::Format::BC1_UNORM => wgpu::TextureFormat::Bc1RgbaUnorm,
dds::Format::BC2_UNORM => wgpu::TextureFormat::Bc2RgbaUnorm,
dds::Format::BC3_UNORM => wgpu::TextureFormat::Bc3RgbaUnorm,
dds::Format::BC7_UNORM => wgpu::TextureFormat::Bc7RgbaUnorm,
dds::Format::R8G8B8A8_UNORM => wgpu::TextureFormat::Rgba8Unorm,
_ => anyhow::bail!("Unsupported dxgi format"),
};
let image_data = ImageData {
format,
width: header.width(),
height: header.height(),
array_layers: header.array_size(),
mipmap_count: header.mipmap_count(),
data_order: DataOrder::LayerMajor,
bytes: pixel_data,
};
return Ok(image_data);
}
// let image crate deal with other file types
let image = image::ImageReader::open(&path)?.decode()?;
Ok(image.into())
}
+62
View File
@@ -0,0 +1,62 @@
// Vertex shader bindings
struct VertexOutput {
@location(0) tex_coord: vec2<f32>,
@location(1) color: vec4<f32>, // linear
@location(2) layer_idx: u32,
@builtin(position) position: vec4<f32>,
};
struct Globals {
screen_size: vec2<f32>,
};
@group(0) @binding(0) var<uniform> r_globals: Globals;
// [u8; 4] as u32 -> [f32; 4]
fn unpack_color(color: u32) -> vec4<f32> {
return vec4<f32>(
f32(color & 255u),
f32((color >> 8u) & 255u),
f32((color >> 16u) & 255u),
f32((color >> 24u) & 255u),
) / 255.0;
}
fn position_from_screen(screen_pos: vec2<f32>) -> vec4<f32> {
return vec4<f32>(
2.0 * screen_pos.x / r_globals.screen_size.x - 1.0,
1.0 - 2.0 * screen_pos.y / r_globals.screen_size.y,
0.0,
1.0,
);
}
@vertex
fn vs_main(
@location(0) a_pos: vec2<f32>,
@location(1) a_tex_coord: vec2<f32>,
@location(2) a_color: u32, // non-linear
@location(3) a_layer_idx: u32,
) -> VertexOutput {
var out: VertexOutput;
out.tex_coord = a_tex_coord;
out.layer_idx = a_layer_idx;
out.color = unpack_color(a_color);
out.position = position_from_screen(a_pos);
return out;
}
@group(1) @binding(0) var r_tex_color: texture_2d_array<f32>;
@group(1) @binding(1) var r_tex_sampler: sampler;
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
// NOTE: PoB incorrectly performs mixing and blending in sRGB space.
// To get a similar visual result, we need to do the same.
// Vertex colors, texture samples, and the output color are all in sRGB.
// Texture formats and output surface formats are selected such that no automatic
// conversion between linear <-> sRGB is performed.
let tex_color = textureSample(r_tex_color, r_tex_sampler, in.tex_coord, in.layer_idx);
var out_color = in.color * tex_color;
return out_color;
}
+119
View File
@@ -0,0 +1,119 @@
use crate::{
color::Srgba,
dpi::{
LogicalPoint, LogicalQuad, LogicalRect, NormalizedPoint, NormalizedQuad, NormalizedRect,
},
math::Corners,
renderer::textures::TextureId,
};
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq, bytemuck::Pod, bytemuck::Zeroable)]
pub struct Vertex {
pub pos: LogicalPoint<f32>,
pub uv: NormalizedPoint,
pub color: Srgba,
// TODO: layer_idx is the same for all vertices. use a uniform buffer
// and bind it along with the texture. move into Mesh or make part of
// TextureId (change into tuple)
pub layer_idx: u32,
}
#[derive(Clone, Debug, Default)]
pub struct Mesh {
pub vertices: Vec<Vertex>,
pub indices: Vec<u32>,
pub texture_id: TextureId,
}
impl Mesh {
#[inline]
pub fn add_rect(
&mut self,
rect: LogicalRect<f32>,
uv: NormalizedRect,
color: Srgba,
layer_idx: u32,
) {
let i = self.vertices.len() as u32;
self.indices
.extend_from_slice(&[i, i + 1, i + 3, i + 1, i + 2, i + 3]);
self.vertices.extend_from_slice(&[
Vertex {
pos: rect.top_left(),
uv: uv.top_left(),
color,
layer_idx,
},
Vertex {
pos: rect.top_right(),
uv: uv.top_right(),
color,
layer_idx,
},
Vertex {
pos: rect.bottom_right(),
uv: uv.bottom_right(),
color,
layer_idx,
},
Vertex {
pos: rect.bottom_left(),
uv: uv.bottom_left(),
color,
layer_idx,
},
]);
}
#[inline]
pub fn add_quad(
&mut self,
quad: LogicalQuad<f32>,
uv: NormalizedQuad,
color: Srgba,
layer_idx: u32,
) {
let i = self.vertices.len() as u32;
self.indices
.extend_from_slice(&[i, i + 1, i + 3, i + 1, i + 2, i + 3]);
self.vertices.extend_from_slice(&[
Vertex {
pos: quad.p0,
uv: uv.p0,
color,
layer_idx,
},
Vertex {
pos: quad.p1,
uv: uv.p1,
color,
layer_idx,
},
Vertex {
pos: quad.p2,
uv: uv.p2,
color,
layer_idx,
},
Vertex {
pos: quad.p3,
uv: uv.p3,
color,
layer_idx,
},
]);
}
pub fn is_empty(&self) -> bool {
self.vertices.is_empty() && self.indices.is_empty()
}
}
pub struct ClippedMesh {
// Only parts of the mesh that intersect with this will be rendered
pub clip_rect: LogicalRect<f32>,
pub mesh: Mesh,
}
+99
View File
@@ -0,0 +1,99 @@
/// Generate entire mipmap chain for all layers starting from mip level 0 image data.
/// Assumes data to contain one mip level 0 image for each layer in RGBA format.
pub fn generate_mipmap_chain(queue: &wgpu::Queue, texture: &wgpu::Texture, data: &[u8]) {
assert!(!texture.format().is_compressed());
assert!(texture.format().components() == 4);
let size = texture.size();
let block_size = texture.format().block_copy_size(None).unwrap_or(4);
let data_size = (size.width * size.height * block_size) as usize;
let srgb_mapper = fast_image_resize::create_srgb_mapper();
let mut data_offset = 0;
for layer in 0..texture.depth_or_array_layers() {
let bytes = data[data_offset..data_size].to_owned();
let mut src_image = fast_image_resize::images::Image::from_vec_u8(
size.width,
size.height,
bytes,
fast_image_resize::PixelType::U8x4,
)
.unwrap();
for mip in 1..texture.mip_level_count() {
let mut target_size = size.mip_level_size(mip, wgpu::TextureDimension::D2);
target_size.depth_or_array_layers = 1; // copying layers separately
// intermediate buffer that stores linear source image data in a higher
// bit depth to avoid loss of information
let mut linear_src_image = fast_image_resize::images::Image::new(
src_image.width(),
src_image.height(),
fast_image_resize::PixelType::U16x4,
);
// convert from sRGB space into linear space
// resizing needs to be performed in linear space to get the correct visual result
srgb_mapper
.forward_map(&src_image, &mut linear_src_image)
.unwrap();
let mut dst_image = fast_image_resize::images::Image::new(
target_size.width,
target_size.height,
fast_image_resize::PixelType::U8x4,
);
let mut linear_dst_image = fast_image_resize::images::Image::new(
dst_image.width(),
dst_image.height(),
fast_image_resize::PixelType::U16x4,
);
let mut resizer = fast_image_resize::Resizer::new();
resizer
.resize(
&linear_src_image,
&mut linear_dst_image,
Some(&fast_image_resize::ResizeOptions {
algorithm: fast_image_resize::ResizeAlg::Convolution(
fast_image_resize::FilterType::Bilinear,
),
cropping: fast_image_resize::SrcCropping::None,
mul_div_alpha: true,
}),
)
.unwrap();
// texture needs to be in sRGB, so map back from resized linear image
srgb_mapper
.backward_map(&linear_dst_image, &mut dst_image)
.unwrap();
queue.write_texture(
wgpu::TexelCopyTextureInfo {
texture,
mip_level: mip,
origin: wgpu::Origin3d {
x: 0,
y: 0,
z: layer,
},
aspect: wgpu::wgt::TextureAspect::All,
},
dst_image.buffer(),
wgpu::TexelCopyBufferLayout {
offset: 0,
bytes_per_row: Some(block_size * target_size.width),
rows_per_image: None,
},
target_size,
);
src_image = dst_image;
}
data_offset += data_size;
}
}
+192
View File
@@ -0,0 +1,192 @@
use crate::{
color::Srgba,
dpi::{LogicalPoint, LogicalQuad, LogicalRect, LogicalVector, NormalizedQuad, NormalizedRect},
fonts::Layout,
math::Point,
renderer::textures::TextureId,
};
use ordered_float::OrderedFloat;
use std::{
hash::{Hash, Hasher},
sync::Arc,
};
#[derive(Clone)]
pub struct ClippedPrimitive {
pub clip_rect: LogicalRect<f32>,
pub primitive: DrawPrimitive,
}
impl Hash for ClippedPrimitive {
fn hash<H: Hasher>(&self, state: &mut H) {
hash_pos(&self.clip_rect.min, state);
hash_pos(&self.clip_rect.max, state);
self.primitive.hash(state);
}
}
#[derive(Clone, Hash)]
pub enum DrawPrimitive {
Rect(RectPrimitive),
Quad(QuadPrimitive),
Text(TextPrimitive),
}
impl DrawPrimitive {
pub fn texture_id(&self) -> TextureId {
match self {
DrawPrimitive::Rect(rect_primitive) => rect_primitive
.texture
.map_or_else(TextureId::default, |tex| tex.texture_id),
DrawPrimitive::Quad(quad_primitive) => quad_primitive
.texture
.map_or_else(TextureId::default, |tex| tex.texture_id),
_ => TextureId::default(),
}
}
}
#[derive(Clone, Copy)]
pub struct RectPrimitive {
pub rect: LogicalRect<f32>,
pub color: Srgba,
pub texture: Option<RectTexture>,
}
impl RectPrimitive {
pub fn new(rect: LogicalRect<f32>, color: Srgba, texture: Option<RectTexture>) -> Self {
Self {
rect,
color,
texture,
}
}
pub fn translate(&mut self, direction: LogicalVector<f32>) {
self.rect = self.rect.translate(direction);
}
}
impl Hash for RectPrimitive {
fn hash<H: Hasher>(&self, state: &mut H) {
hash_pos(&self.rect.min, state);
hash_pos(&self.rect.max, state);
self.color.hash(state);
self.texture.hash(state);
}
}
#[derive(Clone, Copy)]
pub struct RectTexture {
pub texture_id: TextureId,
pub uv: NormalizedRect,
pub layer_idx: u32,
}
impl RectTexture {
pub fn new(texture_id: TextureId, uv: NormalizedRect, layer_idx: u32) -> Self {
Self {
texture_id,
uv,
layer_idx,
}
}
}
impl Hash for RectTexture {
fn hash<H: Hasher>(&self, state: &mut H) {
self.texture_id.hash(state);
hash_pos(&self.uv.min, state);
hash_pos(&self.uv.max, state);
self.layer_idx.hash(state);
}
}
#[derive(Clone, Copy)]
pub struct QuadPrimitive {
pub quad: LogicalQuad<f32>,
pub color: Srgba,
pub texture: Option<QuadTexture>,
}
impl QuadPrimitive {
pub fn new(quad: LogicalQuad<f32>, color: Srgba, texture: Option<QuadTexture>) -> Self {
Self {
quad,
color,
texture,
}
}
pub fn translate(&mut self, direction: LogicalVector<f32>) {
self.quad = self.quad.translate(direction);
}
}
impl Hash for QuadPrimitive {
fn hash<H: Hasher>(&self, state: &mut H) {
hash_pos(&self.quad.p0, state);
hash_pos(&self.quad.p1, state);
hash_pos(&self.quad.p2, state);
hash_pos(&self.quad.p3, state);
self.color.hash(state);
self.texture.hash(state);
}
}
#[derive(Clone, Copy)]
pub struct QuadTexture {
pub texture_id: TextureId,
pub uv: NormalizedQuad,
pub layer_idx: u32,
}
impl QuadTexture {
pub fn new(texture_id: TextureId, uv: NormalizedQuad, layer_idx: u32) -> Self {
Self {
texture_id,
uv,
layer_idx,
}
}
}
impl Hash for QuadTexture {
fn hash<H: Hasher>(&self, state: &mut H) {
self.texture_id.hash(state);
hash_pos(&self.uv.p0, state);
hash_pos(&self.uv.p1, state);
hash_pos(&self.uv.p2, state);
hash_pos(&self.uv.p3, state);
self.layer_idx.hash(state);
}
}
#[derive(Clone)]
pub struct TextPrimitive {
pub pos: LogicalPoint<f32>,
pub layout: Arc<Layout>,
}
impl TextPrimitive {
pub fn new(pos: LogicalPoint<f32>, layout: Arc<Layout>) -> Self {
Self { pos, layout }
}
#[inline(always)]
pub fn translate(&mut self, direction: LogicalVector<f32>) {
self.pos += direction;
}
}
impl Hash for TextPrimitive {
fn hash<H: Hasher>(&self, state: &mut H) {
hash_pos(&self.pos, state);
self.layout.hash(state);
}
}
fn hash_pos<H: Hasher, U>(pos: &Point<f32, U>, state: &mut H) {
OrderedFloat(pos.x).hash(state);
OrderedFloat(pos.x).hash(state);
}
+161
View File
@@ -0,0 +1,161 @@
use crate::{
dpi::{Normalize, NormalizedQuad, NormalizedRect, Uv},
fonts::FontAtlasSize,
renderer::{
mesh::{ClippedMesh, Mesh},
primitives::{
ClippedPrimitive, DrawPrimitive, QuadPrimitive, QuadTexture, RectPrimitive,
RectTexture, TextPrimitive,
},
textures::TextureId,
},
};
/// Converts [`DrawPrimitive`]s into [`Mesh`]es.
#[derive(Default)]
pub struct Tessellator {
last_clipped_meshes_size: usize,
}
impl Tessellator {
pub fn convert_clipped_primitives(
&mut self,
clipped_primitives: impl Iterator<Item = ClippedPrimitive>,
font_atlas_size: FontAtlasSize,
) -> Vec<ClippedMesh> {
profiling::scope!("convert_primitives");
let mut clipped_meshes = Vec::with_capacity(self.last_clipped_meshes_size);
for clipped_primitive in clipped_primitives {
self.convert_clipped_primitive(clipped_primitive, font_atlas_size, &mut clipped_meshes);
}
self.last_clipped_meshes_size = clipped_meshes.len();
clipped_meshes
}
pub fn convert_clipped_primitive(
&mut self,
clipped_primitive: ClippedPrimitive,
font_atlas_size: FontAtlasSize,
out_clipped_meshes: &mut Vec<ClippedMesh>,
) {
let ClippedPrimitive {
clip_rect,
primitive,
} = clipped_primitive;
if clip_rect.is_empty() {
return;
}
let start_new_mesh = match out_clipped_meshes.last() {
None => true,
Some(last_clipped_mesh) => {
// append to previous mesh if clip_rect and texture_id match.
// otherwise, start a new mesh.
!(last_clipped_mesh.clip_rect == clip_rect
&& last_clipped_mesh.mesh.texture_id == primitive.texture_id())
}
};
if start_new_mesh {
out_clipped_meshes.push(ClippedMesh {
clip_rect,
mesh: Mesh::default(),
});
}
let last_clipped_mesh = out_clipped_meshes.last_mut().unwrap();
match primitive {
DrawPrimitive::Rect(rect_primitive) => {
self.convert_rect_primitive(rect_primitive, &mut last_clipped_mesh.mesh)
}
DrawPrimitive::Quad(quad_primitive) => {
self.convert_quad_primitive(quad_primitive, &mut last_clipped_mesh.mesh)
}
DrawPrimitive::Text(text_primitive) => self.convert_text_primitive(
text_primitive,
font_atlas_size,
&mut last_clipped_mesh.mesh,
),
}
// This can be empty if a new mesh was started but the conversion from a text primitive
// didn't add any vertices. Our renderer doesn't support empty meshes so remove it
if last_clipped_mesh.mesh.is_empty() {
out_clipped_meshes.pop();
}
}
fn convert_rect_primitive(&self, rect_primitive: RectPrimitive, out: &mut Mesh) {
let RectPrimitive {
rect,
color,
texture,
} = rect_primitive;
let (texture_id, uv, layer_idx) = match texture {
Some(RectTexture {
texture_id,
uv,
layer_idx,
}) => (texture_id, uv, layer_idx),
None => (TextureId::default(), NormalizedRect::white_uv(), 0),
};
out.add_rect(rect, uv, color, layer_idx);
out.texture_id = texture_id;
}
fn convert_quad_primitive(&self, quad_primitive: QuadPrimitive, out: &mut Mesh) {
let QuadPrimitive {
quad,
color,
texture,
} = quad_primitive;
let (texture_id, uv, layer_idx) = match texture {
Some(QuadTexture {
texture_id,
uv,
layer_idx,
}) => (texture_id, uv, layer_idx),
None => (TextureId::default(), NormalizedQuad::white_uv(), 0),
};
out.add_quad(quad, uv, color, layer_idx);
out.texture_id = texture_id;
}
fn convert_text_primitive(
&self,
text_primitive: TextPrimitive,
font_atlas_size: FontAtlasSize,
out: &mut Mesh,
) {
let TextPrimitive {
pos: layout_pos,
layout,
} = text_primitive;
if layout.rows.is_empty() {
return;
}
out.vertices.reserve(layout.num_of_vertices);
out.indices.reserve(layout.num_of_indices);
// TODO: align to pixel grid?
for row in &layout.rows {
for glyph in &row.glyphs {
let rect = glyph.rect.translate(layout_pos.to_vector());
let normalized_uv = glyph.uv.normalize(font_atlas_size);
out.add_rect(rect, normalized_uv, glyph.color, 0);
}
}
}
}
+329
View File
@@ -0,0 +1,329 @@
use std::{
collections::hash_map::Entry,
path::Path,
sync::{Arc, RwLock},
};
use ahash::HashMap;
use anyhow::bail;
use crate::{
color::Srgba,
renderer::image::{ImageData, ImageDelta, load_image_file},
worker_pool::WorkerPool,
};
pub type TextureId = u64;
pub struct TextureHandle {
tex_mngr: Arc<RwLock<TextureManager>>,
id: TextureId,
}
impl TextureHandle {
pub fn new(tex_mngr: Arc<RwLock<TextureManager>>, id: TextureId) -> Self {
Self { tex_mngr, id }
}
pub fn id(&self) -> TextureId {
self.id
}
pub fn size(&self) -> [usize; 2] {
self.tex_mngr
.read()
.unwrap()
.get_meta_data(self.id)
.map_or([0, 0], |tex| tex.size)
}
}
impl Drop for TextureHandle {
fn drop(&mut self) {
self.tex_mngr.write().unwrap().free(self.id);
}
}
impl Clone for TextureHandle {
fn clone(&self) -> Self {
self.tex_mngr.write().unwrap().retain(self.id);
Self {
tex_mngr: Arc::clone(&self.tex_mngr),
id: self.id,
}
}
}
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct TexturesDelta {
pub update: Vec<(TextureId, ImageDelta)>,
pub free: Vec<TextureId>,
}
impl TexturesDelta {
pub fn is_empty(&self) -> bool {
self.update.is_empty() && self.free.is_empty()
}
}
/// Metadata about an allocated texture.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct TextureMetaData {
pub name: String,
pub size: [usize; 2],
/// Texture is freed when this reaches zero
retain_count: usize,
pub options: TextureOptions,
}
#[derive(Default)]
pub struct TextureManager {
next_id: u64,
meta_data: HashMap<TextureId, TextureMetaData>,
delta: TexturesDelta,
}
impl TextureManager {
/// Allocates a new Texture.
pub fn alloc(&mut self, name: String, image: ImageData, options: TextureOptions) -> TextureId {
let id = self.next_id;
self.next_id += 1;
self.meta_data.entry(id).or_insert_with(|| TextureMetaData {
name,
size: [image.width as usize, image.height as usize],
retain_count: 1,
options,
});
self.delta
.update
.push((id, ImageDelta::new(image, options)));
id
}
/// Reserves a new TextureId for later assignment.
pub fn reserve(&mut self, name: String, options: TextureOptions) -> TextureId {
let id = self.next_id;
self.next_id += 1;
self.meta_data.entry(id).or_insert_with(|| TextureMetaData {
name,
size: [0, 0],
retain_count: 1,
options,
});
id
}
/// Assigns a new image to an existing texture.
pub fn set(&mut self, id: TextureId, delta: ImageDelta) {
if let Some(meta_data) = self.meta_data.get_mut(&id) {
meta_data.size = [delta.image.width as usize, delta.image.height as usize];
// discard all old enqueued deltas
self.delta.update.retain(|(x, _)| x != &id);
self.delta.update.push((id, delta));
} else {
debug_assert!(false, "Tried setting texture {id:?} which is not allocated");
}
}
/// Frees an existing texture.
pub fn free(&mut self, id: TextureId) {
if let Entry::Occupied(mut entry) = self.meta_data.entry(id) {
let meta = entry.get_mut();
meta.retain_count -= 1;
if meta.retain_count == 0 {
entry.remove();
self.delta.free.push(id);
}
} else {
debug_assert!(false, "Tried freeing texture {id:?} which is not allocated");
}
}
/// Increase the retain-count of the given texture.
///
/// [`Self::free`] must be called an additional time for each time [`Self::retain`] is called,
pub fn retain(&mut self, id: TextureId) {
if let Some(meta) = self.meta_data.get_mut(&id) {
meta.retain_count += 1;
} else {
debug_assert!(
false,
"Tried retaining texture {id:?} which is not allocated",
);
}
}
/// Get metadata about a specific texture.
pub fn get_meta_data(&self, id: TextureId) -> Option<&TextureMetaData> {
self.meta_data.get(&id)
}
/// Take and reset changes since last frame.
pub fn take_delta(&mut self) -> TexturesDelta {
std::mem::take(&mut self.delta)
}
}
pub struct WrappedTextureManager {
manager: Arc<RwLock<TextureManager>>,
worker_pool: WorkerPool,
}
impl WrappedTextureManager {
pub fn new() -> Self {
let manager = Arc::new(RwLock::new(TextureManager::default()));
// allocate default texture (id: 0) for font atlas
manager.write().unwrap().alloc(
"font_atlas_texture".into(),
ImageData::from_solid_color([0, 0], Srgba::TRANSPARENT),
TextureOptions::default(),
);
Self {
manager,
worker_pool: WorkerPool::new(4),
}
}
#[inline]
pub fn update_font_texture(&self, delta: ImageDelta) {
self.manager
.write()
.unwrap()
.set(TextureId::default(), delta);
}
#[inline]
pub fn take_delta(&self) -> TexturesDelta {
self.manager.write().unwrap().take_delta()
}
pub fn load_texture(
&self,
image_path: String,
options: TextureOptions,
is_async: bool,
) -> anyhow::Result<TextureHandle> {
let manager = Arc::clone(&self.manager);
let handle = if is_async {
let id = manager
.write()
.unwrap()
.reserve(image_path.clone(), options);
// load image in background worker
let mngr_clone = Arc::clone(&manager);
self.worker_pool
.execute(move || match load_image_file(Path::new(&image_path)) {
Ok(image) => {
mngr_clone
.write()
.unwrap()
.set(id, ImageDelta::new(image, options));
}
Err(e) => log::warn!("Unable to load image fron {}: {}", &image_path, e),
});
TextureHandle::new(manager, id)
} else {
match load_image_file(Path::new(&image_path)) {
Ok(image) => {
let id = manager.write().unwrap().alloc(image_path, image, options);
TextureHandle::new(manager, id)
}
Err(e) => {
log::warn!("Unable to load image fron {}: {}", &image_path, e);
bail!(e);
}
}
};
Ok(handle)
}
pub fn update_texture(
&self,
texture_id: TextureId,
image_path: String,
options: TextureOptions,
is_async: bool,
) -> anyhow::Result<()> {
if is_async {
let mngr_clone = Arc::clone(&self.manager);
self.worker_pool
.execute(move || match load_image_file(Path::new(&image_path)) {
Ok(image) => {
mngr_clone
.write()
.unwrap()
.set(texture_id, ImageDelta::new(image, options));
}
Err(e) => log::warn!("Unable to load image fron {}: {}", &image_path, e),
});
} else {
match load_image_file(Path::new(&image_path)) {
Ok(image) => {
self.manager
.write()
.unwrap()
.set(texture_id, ImageDelta::new(image, options));
}
Err(e) => {
log::warn!("Unable to load image fron {}: {}", &image_path, e);
bail!(e);
}
}
}
Ok(())
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct TextureOptions {
pub magnification: wgpu::FilterMode,
pub minification: wgpu::FilterMode,
pub wrap_mode: wgpu::AddressMode,
pub mipmap_mode: wgpu::FilterMode,
pub generate_mipmaps: bool,
}
impl TextureOptions {
pub const LINEAR_REPEAT: Self = Self {
magnification: wgpu::FilterMode::Linear,
minification: wgpu::FilterMode::Linear,
wrap_mode: wgpu::AddressMode::Repeat,
mipmap_mode: wgpu::FilterMode::Linear,
generate_mipmaps: false,
};
pub const LINEAR: Self = Self {
magnification: wgpu::FilterMode::Linear,
minification: wgpu::FilterMode::Linear,
wrap_mode: wgpu::AddressMode::ClampToEdge,
mipmap_mode: wgpu::FilterMode::Linear,
generate_mipmaps: false,
};
}
impl Default for TextureOptions {
fn default() -> Self {
Self::LINEAR
}
}
impl std::hash::Hash for TextureOptions {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.magnification.hash(state);
self.minification.hash(state);
self.wrap_mode.hash(state);
self.mipmap_mode.hash(state);
}
}
+358
View File
@@ -0,0 +1,358 @@
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::mpsc::{Receiver, Sender, TryRecvError};
use std::{collections::VecDeque, sync::mpsc::channel, thread::JoinHandle};
use anyhow::{Result, anyhow};
use mlua::{Function, IntoLuaMulti, Lua, Value};
use mlua::{Integer, MultiValue, Number, Result as LuaResult};
use crate::api::get_callback;
use crate::lua::LuaInstance;
#[derive(Debug)]
pub enum SubscriptResult {
SubscriptFinished {
id: u64,
return_values: NativeMultiValue,
},
SubscriptError {
id: u64,
error: String,
},
}
pub struct SubscriptManager {
current_id: u64,
scripts: Vec<Subscript>,
}
impl SubscriptManager {
pub fn new() -> Self {
Self {
current_id: 0,
scripts: Vec::new(),
}
}
pub fn push(
&mut self,
script_text: String,
blocking_calls: Vec<String>,
nonblocking_calls: Vec<String>,
arguments: NativeMultiValue,
) -> u64 {
let id = self.current_id;
self.current_id += 1;
let subscript = Subscript::new(
id,
script_text,
blocking_calls,
nonblocking_calls,
arguments,
);
self.scripts.push(subscript);
id
}
pub fn process(&mut self, lua: &LuaInstance) -> Vec<SubscriptResult> {
let mut results = vec![];
self.scripts.retain_mut(|subscript| {
subscript.handle_calls(lua);
if let Some(event) = subscript.try_join() {
results.push(event);
// subscript has finished or errored, remove it
false
} else {
// subscript has not finished yet, keep it
true
}
});
results
}
}
enum SubscriptCall {
Blocking {
function_name: String,
arguments: NativeMultiValue,
// used to send return values of function back to thread
return_values_sender: Sender<Result<NativeMultiValue>>,
},
NonBlocking {
function_name: String,
arguments: NativeMultiValue,
},
}
pub struct Subscript {
id: u64,
handle: Option<JoinHandle<anyhow::Result<NativeMultiValue>>>,
receiver: Receiver<SubscriptCall>,
}
// Subscripts are lua scripts that are executed in their own instance on a separate thread.
//
// When a subscript needs to call a function defined in the main instance, a `SubscriptCall` message is send over a channel. At the beginning of each frame, the main thread checks for messages and executes the requested function with the provided arguments on behalf of the subscript.
// For `BlockingCall`, the main thread sends the return values of the function back to the subscript which is waiting on them.
// For `NonBlockingCall`, the subscript doesn't wait on any return values and keeps executing the script after sending the message.
// Subscripts are required to explicitly specify the names of all (non)-blocking function calls that appear in the script.
impl Subscript {
pub fn new(
id: u64,
script_text: String,
blocking_calls: Vec<String>,
nonblocking_calls: Vec<String>,
arguments: NativeMultiValue,
) -> Self {
let (tx, rx) = channel();
let handle = std::thread::spawn(move || {
profiling::register_thread!(format!("Subscript {} Thread", id));
// unsafe required to load C modules (curl)
let lua = unsafe { Lua::unsafe_new() };
// add ./lua to package.path and package.cpath
LuaInstance::register_package_paths(&lua)?;
for function_name in blocking_calls {
let thread_tx = tx.clone();
lua.globals().set(
function_name.clone(),
lua.create_function(move |_, args: MultiValue| {
let (tx_return, rx_return) = channel();
thread_tx
.send(SubscriptCall::Blocking {
function_name: function_name.clone(),
arguments: args.try_into()?,
return_values_sender: tx_return,
})
.unwrap();
// this blocks until we receive return values
let return_values = rx_return.recv().map_err(|e| anyhow!("{}", e))??;
Ok(return_values)
})?,
)?;
}
for function_name in nonblocking_calls {
let thread_tx = tx.clone();
lua.globals().set(
function_name.clone(),
lua.create_function(move |_, args: MultiValue| {
thread_tx
.send(SubscriptCall::NonBlocking {
function_name: function_name.clone(),
arguments: args.try_into()?,
})
.map_err(|e| anyhow!("{}", e))?;
Ok(())
})?,
)?;
}
let result = lua.load(script_text).call::<MultiValue>(arguments)?;
result.try_into()
});
Self {
id,
handle: Some(handle),
receiver: rx,
}
}
fn handle_calls(&mut self, lua: &Lua) {
match self.receiver.try_recv() {
Ok(SubscriptCall::Blocking {
function_name,
arguments,
return_values_sender,
}) => {
let func: Result<Function, _> = get_callback(lua, "OnSubCall");
match func {
Ok(func) => {
match func.call::<MultiValue>((function_name, arguments)) {
Ok(return_values) => {
// send return values back to thread
let _ = return_values_sender.send(return_values.try_into());
}
// function returned error, forward it to thread
Err(err) => {
let _ = return_values_sender.send(Err(err.into()));
}
}
}
// function not found
Err(err) => {
let _ = return_values_sender.send(Err(err.into()));
}
}
}
Ok(SubscriptCall::NonBlocking {
function_name,
arguments,
}) => {
let func: Result<Function, _> = get_callback(lua, "OnSubCall");
if let Ok(func) = func {
// we can ignore return values for non-blocking calls
let _ = func.call::<()>((function_name, arguments));
}
}
// ignore disconnects. potential errors are handled during thread join
Err(TryRecvError::Disconnected) => {}
// no outstanding calls from thread
Err(TryRecvError::Empty) => {}
}
}
fn try_join(&mut self) -> Option<SubscriptResult> {
if self
.handle
.as_ref()
.map(|h| h.is_finished())
.unwrap_or(false)
{
let event = match self.handle.take().unwrap().join() {
Ok(Ok(return_values)) => SubscriptResult::SubscriptFinished {
id: self.id,
return_values,
},
Ok(Err(err)) => SubscriptResult::SubscriptError {
id: self.id,
error: err.to_string(),
},
// the thread panicked
Err(_) => SubscriptResult::SubscriptError {
id: self.id,
error: String::from("Subscript thread panicked!"),
},
};
Some(event)
} else {
None
}
}
}
pub fn register_subscript_globals(
lua: &Lua,
subscripts: &Rc<RefCell<SubscriptManager>>,
) -> LuaResult<()> {
let globals = lua.globals();
// ssID = LaunchSubScript("<scriptText>", "<funcList>", "<subList>"[, ...])
let subscripts_clone = Rc::clone(subscripts);
let launch_sub_script = move |_: &Lua,
(script_text, func_list, sub_list, args): (
String,
String,
String,
MultiValue,
)| {
let blocking_calls = func_list
.split(',')
.map(|s| s.trim())
.filter(|&s| !s.is_empty())
.map(String::from)
.collect();
let nonblocking_calls = sub_list
.split(',')
.map(|s| s.trim())
.filter(|&s| !s.is_empty())
.map(String::from)
.collect();
let arguments = args.try_into()?;
let subscript_id = subscripts_clone.borrow_mut().push(
script_text,
blocking_calls,
nonblocking_calls,
arguments,
);
Ok(subscript_id)
};
let subscripts_clone = Rc::clone(subscripts);
let is_subscript_running = move |_: &Lua, subscript_id: u64| {
Ok(subscripts_clone
.borrow()
.scripts
.iter()
.any(|ss| ss.id == subscript_id))
};
let abort_subscript = |_: &Lua, _subscript_id: u64| -> LuaResult<()> { unimplemented!() };
globals.set(
"LaunchSubScript",
lua.create_function_mut(launch_sub_script)?,
)?;
globals.set(
"IsSubScriptRunning",
lua.create_function(is_subscript_running)?,
)?;
globals.set("IsSubScriptRunning", lua.create_function(abort_subscript)?)?;
Ok(())
}
// used to move arguments and return values between lua instances
// some lua values are associated with their instance and using them with another
// instance is not allowed.
#[derive(Debug)]
pub struct NativeMultiValue(VecDeque<NativeValue>);
#[derive(Debug)]
pub enum NativeValue {
Nil,
Number(Number),
Integer(Integer),
Boolean(bool),
// Lua strings may not be valid UTF-8, so store Vec<u8> instead
String(Vec<u8>),
}
impl TryFrom<MultiValue> for NativeMultiValue {
type Error = anyhow::Error;
fn try_from(values: MultiValue) -> Result<Self, Self::Error> {
let native = values
.iter()
.map(|v| match v.type_name() {
"nil" => Ok(NativeValue::Nil),
"boolean" => Ok(NativeValue::Boolean(v.as_boolean().unwrap())),
"number" => Ok(NativeValue::Number(v.as_number().unwrap())),
"integer" => Ok(NativeValue::Integer(v.as_integer().unwrap())),
"string" => Ok(NativeValue::String(
v.as_string().unwrap().as_bytes().to_vec(),
)),
_ => Err(anyhow!("Unsupported value type")),
})
.collect::<Result<VecDeque<_>, _>>()?;
Ok(NativeMultiValue(native))
}
}
impl IntoLuaMulti for NativeMultiValue {
fn into_lua_multi(self, lua: &Lua) -> mlua::Result<MultiValue> {
let values = self
.0
.iter()
.map(|v| match v {
NativeValue::Nil => Ok(Value::Nil),
NativeValue::Boolean(b) => Ok(Value::Boolean(*b)),
NativeValue::Number(n) => Ok(Value::Number(*n)),
NativeValue::Integer(n) => Ok(Value::Integer(*n)),
NativeValue::String(s) => lua.create_string(s).map(Value::String),
})
.collect::<Result<Vec<_>, _>>()?;
Ok(MultiValue::from_vec(values))
}
}
+29
View File
@@ -0,0 +1,29 @@
use std::{
env,
hash::{Hash, Hasher},
path::{Path, PathBuf},
};
use ahash::AHasher;
pub fn get_executable_dir() -> anyhow::Result<PathBuf> {
let exe_path = env::current_exe()?;
let exe_parent_dir = exe_path.parent().unwrap().canonicalize()?;
Ok(exe_parent_dir)
}
pub fn change_working_directory<P: AsRef<Path>>(path: P) -> anyhow::Result<()> {
env::set_current_dir(path.as_ref()).map_err(|e| {
anyhow::anyhow!(
"Failed to change working directory {:?}: {}",
path.as_ref(),
e
)
})
}
pub fn calculate_hash<T: Hash>(t: &T) -> u64 {
let mut state = AHasher::default();
t.hash(&mut state);
state.finish()
}
+76
View File
@@ -0,0 +1,76 @@
use std::{
sync::{Arc, Mutex, mpsc},
thread,
};
type Job = Box<dyn FnOnce() + Send + 'static>;
pub struct WorkerPool {
workers: Vec<Worker>,
sender: Option<mpsc::Sender<Job>>,
}
impl WorkerPool {
pub fn new(size: usize) -> Self {
assert!(size > 0);
let (tx, rx) = mpsc::channel();
let rx = Arc::new(Mutex::new(rx));
let mut workers = Vec::with_capacity(size);
for id in 0..size {
workers.push(Worker::new(id, rx.clone()));
}
Self {
workers,
sender: Some(tx),
}
}
pub fn execute<F>(&self, f: F)
where
F: FnOnce() + Send + 'static,
{
let job = Box::new(f);
self.sender.as_ref().unwrap().send(job).unwrap();
}
}
impl Drop for WorkerPool {
fn drop(&mut self) {
drop(self.sender.take());
for worker in &mut self.workers {
if let Some(thread) = worker.thread.take() {
thread.join().unwrap();
}
}
}
}
struct Worker {
_id: usize,
thread: Option<thread::JoinHandle<()>>,
}
impl Worker {
fn new(id: usize, receiver: Arc<Mutex<mpsc::Receiver<Job>>>) -> Self {
let thread = thread::spawn(move || {
loop {
let message = receiver.lock().unwrap().recv();
match message {
Ok(job) => job(),
Err(_) => break,
}
}
});
Self {
_id: id,
thread: Some(thread),
}
}
}