This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code adapted from https://github.com/python-pillow/Pillow/issues/4644 to resolve an issue | |
# described in https://github.com/python-pillow/Pillow/issues/4640 | |
# | |
# There is a known issue with the Pillow library that messes up GIF transparency by replacing the | |
# transparent pixels with black pixels (among other issues) when the GIF is saved using PIL.Image.save(). | |
# This code works around the issue and allows us to properly generate transparent GIFs. | |
from typing import Tuple, List, Union | |
from collections import defaultdict | |
from random import randrange |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Collections.Generic; | |
using HarmonyLib; | |
using XRL.Core; | |
using XRL.World.Parts; | |
using UnityEngine; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
character inventory module | |
========================== | |
Requirements: allow specifying an item list, quantity for each item, and whether each item is equipped. Then parse those items/details and output the HTML. | |
For example, the module call might look like this: | |
{{#invoke:Inventory | FormatInventory | powered exoskeleton~1~yes`overloaded laser pistol~2~yes`plastifier jerkin~1~no }} | |
Maybe there's a nicer way to format the input string instead of using ~ and ` delimiters, but I'm not sure. Or maybe it could be split into two modules (one for the wrapper HTML, and one for individual items). Feel free to do whatever makes the most sense! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* QUD COLORS AND FONTS | |
* ==================== | |
*/ | |
:root { | |
--qud-color-y: #ffffff; | |
--qud-color-y-dark: #b1c9c3; | |
--qud-color-r: #d74200; | |
--qud-color-r-dark: #a64a2e; | |
--qud-color-o: #e99f10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qud look: Maximum depth >> 3 | |
======================================= | |
<div class="qud-box-wrapper {{#ifeq: | |
{{{bordercolor|}}}| y |white-border| | |
}}"><div class="qud-box"><span class="qud-box-header"> | |
{{Qud text|&y | |
{{{title| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScreenBuffer scrapBuffer = ScreenBuffer.GetScrapBuffer2(true); //copy the scrapbuffer | |
TileMaker tileMaker = new TileMaker("Great Magma Crab"); //you can pass a GameObject or a blueprint string to the TileMaker | |
tileMaker.WriteTileToBuffer(scrapBuffer, 10, 20); //enter x,y coordinates where you want to draw the tile on screen | |
Popup._TextConsole.DrawBuffer(scrapBuffer, null, false); //draw the scrapbuffer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"AccomplishmentAdded" | |
"ActivateFabricateFromSelf" | |
"ActivateSkyshroud" | |
"AddedToInventory" | |
"AddFood" | |
"AddWater" | |
"AdjustWeaponScore" | |
"AfterCriticalHit" | |
"AfterLookedAt" | |
"AfterMoved" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string a2 = "NPC"; | |
if (this.Property.ContainsKey("Role")) | |
{ | |
a2 = this.Property["Role"]; | |
} | |
if (a2 == "Minion" && (statistic.Name == "Strength" || statistic.Name == "Agility" || statistic.Name == "Toughness" || statistic.Name == "Willpower" || statistic.Name == "Intelligence" || statistic.Name == "Ego")) | |
{ | |
statistic.Boost--; | |
} | |
int num2 = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string a2 = "NPC"; | |
if (this.Property.ContainsKey("Role")) | |
{ | |
a2 = this.Property["Role"]; | |
} | |
if (a2 == "Minion" && (statistic.Name == "Strength" || statistic.Name == "Agility" || statistic.Name == "Toughness" || statistic.Name == "Willpower" || statistic.Name == "Intelligence" || statistic.Name == "Ego")) | |
{ | |
statistic.Boost--; | |
} | |
int num2 = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//EnchantmentFrameworkAPI.h (Shared by both dlls) | |
struct EnchantmentFrameworkInterface | |
{ | |
enum { kInterfaceVersion = 1 }; | |
UInt32 version; | |
std::vector<EnchantmentItem*> (* GetAllCraftedEnchantments)(); //get all player-created persistent enchantments | |
bool (* GetCraftedEnchantmentParents)(EnchantmentItem* customEnchantment, std::vector<EnchantmentItem*> &baseList); //get base enchantments that were originally combined to craft this custom enchantment | |
}; |