2using System.Collections.Generic;
163 public virtual bool CanStack => owner.category.maxStack > 1;
237 return owner.c_lockLv == 0;
323 return owner.rarity <
Rarity.Artifact;
505 return "switch_on_electricity";
519 return "torch_unlit";
521 return "switch_off_electricity";
737 Vector3 vector2 =
item.Position();
768 for (
int i = 0; i < 50; i++)
770 Point point = list.RandomItem();
771 if (point.
IsValid && (func ==
null || func(point)) && (accessChara ==
null || accessChara.HasAccess(point)))
791 Room room = center.cell.room;
812 if (!p.cell.HasBlock || p.cell.HasFence)
814 listRadiusPoints.Add(p.Copy());
819 listRadiusPoints.Add(p.Copy());
882 string @ref = row.GetTextArray(
"name2")[1];
883 string ref2 = row.GetTextArray(
"name2")[0];
886 cc.
Talk(
"offer", @ref, ref2);
908 cc.depression.Mod(100);
922 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
927 num2 = num / 4 * 3 - 1;
929 if (num <= num2 && cc.
IsPC)
932 cc.
Say(
"openLockFail2");
936 if (thing !=
null && !flag)
943 cc.
Say(
"lockpick_success", cc, owner);
944 int num3 = 100 + num2 * 10;
956 cc.
Say(
"openLockFail");
958 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
959 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
980 int a2 = Mathf.Clamp(20 *
tool.material.hardness /
material.hardness, 10, 150);
982 int num = (int)Mathf.Clamp(20L * (
long)(owner.c_lockLv + 20) / cc.
STR, 5f, 50f);
989 DamageRandomProperty(cc);
993 cc.
Say(
"pry_success", cc, owner);
1025 else if (thing.
Num > 1)
1033 cc.
Say(
"pry_damage", cc, thing);
1042 owner.c_lockedHard =
false;
1043 owner.c_priceAdd = 0;
1049 owner.isLostProperty =
false;
1119 if (c.
held != owner)
1138 if (CanUse(owner.
Chara))
1192 if (Electricity != 0)
1194 EClass._zone.dirtyElectricity =
true;
1195 if (Electricity > 0)
1197 EClass._zone.electricity += Electricity;
1207 OnInstall(byPlayer);
1212 if (Electricity != 0)
1216 Toggle(on:
false, silent:
true);
1218 EClass._zone.dirtyElectricity =
true;
1219 if (Electricity > 0)
1221 EClass._zone.electricity -= Electricity;
1244 Toggle(on:
false, silent:
true);
1246 else if (AutoToggle)
1254 Toggle(on, silent:
true);
1258 public virtual void Toggle(
bool on,
bool silent =
false)
1260 if (owner.
isOn == on)
1264 if (Electricity < 0)
1274 owner.
Say(
"notEnoughElectricity", owner);
1276 owner.
PlaySound(
"electricity_insufficient");
1280 EClass._zone.electricity += Electricity;
1284 EClass._zone.electricity -= Electricity;
1288 PlayToggleEffect(silent);
1295 bool isOn = owner.
isOn;
1308 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1309 owner.
PlaySound(
"Material/leather_drop");
1321 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1353 Toggle(!owner.
isOn);
1360 Toggle(!owner.
isOn);
1375 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1384 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1413 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1425 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1427 return owner.c_charges >= FuelCost * num;
1432 return GetFuelValue(s) > 0;
1437 return GetFuelValue(t) > 0;
1446 return GetFuelValue(t.
id);
1453 if (
id ==
"battery")
1487 if (FindFuel(refuel:
false))
1489 FindFuel(refuel:
true);
1491 bool FindFuel(
bool refuel)
1497 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1506 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1507 num -= GetFuelValue(
item) * num2;
1510 Refuel(
item.Split(num2));
1543 t.SetActive(enable:
true);
1548 t.SetActive(enable:
true);
1553 t.SetActive(owner.
Num > 1);
1564 int rawDeadLine = 0;
1578 if (remainingHours > 0)
1580 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1592 return Emo2.restock;
1600 return Emo2.blessing;
1602 return Emo2.restock;
1621 owner.isRestocking =
true;
1633 Add(
"book_exp", 10, 0);
1638 if (c_copyContainer ==
null)
1650 thing2.isStolen =
false;
1651 thing2.isCopy =
true;
1652 thing2.c_priceFix = 0;
1662 num6 = (1000 + owner.c_invest * 100) / (thing2.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1663 int[] array =
new int[3] { 704, 703, 702 };
1664 foreach (
int ele
in array)
1666 if (thing2.HasElement(ele))
1677 if (num6 > 1 && thing2.trait.CanStack)
1679 thing2.SetNum(num6);
1705 AddCassette(10,
null, 999);
1706 AddCassette(15,
null, 999);
1707 AddCassette(17,
null, 999);
1708 AddCassette(29,
null, 999);
1709 AddCassette(40,
null, 999);
1710 AddCassette(46,
null, 999);
1711 AddCassette(47,
null, 999);
1712 AddCassette(52,
null, 999);
1713 AddCassette(54,
null, 999);
1714 AddCassette(59,
null, 999);
1715 AddCassette(65,
null, 999);
1716 AddCassette(109,
"debt", 0);
1717 AddCassette(110,
"curry", 999);
1720 AddCassette(122,
null, 999);
1721 AddCassette(123,
null, 999);
1729 Add(
"deed_wedding", 1, 0);
1730 Add(
"deed_divorce", 1, 0);
1731 Add(
"deed_lostring", 1, 0);
1732 Add(
"license_illumination", 1, 0);
1733 Add(
"license_void", 1, 0);
1734 Add(
"license_adv", 1, 0);
1738 for (
int num9 = 0; num9 < 30; num9++)
1747 Add(
"tool_talisman", 1, 0);
1748 Add(
"camera", 1, 0);
1751 Add(
"unicorn_horn", 1, 0);
1752 Add(
"core_user", 1, 0);
1753 Add(
"generator_hamster1", 1, 0);
1754 Add(
"generator_hamster2", 1, 0);
1755 Add(
"generator_solar", 1, 0);
1756 Add(
"generator_wind", 1, 0);
1764 Add(
"censored_item", 1, 0);
1778 Add(
"hammer_garokk", 1, 0);
1782 Add(
"water_jure", 1, 0);
1788 string[] array2 =
new string[11]
1790 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1793 foreach (
string id2
in array2)
1797 Add(
"cloud", 99, 0);
1798 Add(
"scroll_alias", 99, 0);
1799 Add(
"scroll_biography", 99, 0);
1801 Add(
"statue_lulu", 1, 0);
1802 Add(
"statue_jure", 1, 0);
1803 Add(
"statue_ehe", 1, 0);
1813 for (
int num10 = 0; num10 <
EClass.
rnd(3) + 1; num10++)
1817 for (
int num11 = 0; num11 <
EClass.
rnd(3) + 1; num11++)
1824 Add(
"board_map", 1, 0);
1825 Add(
"board_build", 1, 0);
1826 Add(
"book_resident", 1, 0);
1827 Add(
"board_party", 1, 0);
1828 Add(
"board_party2", 1, 0);
1829 Add(
"book_roster", 1, 0);
1843 Add(
"board_home", 1, 0);
1844 Add(
"board_resident", 1, 0);
1849 Add(
"board_expedition", 1, 0);
1850 Add(
"mailpost", 1, 0);
1851 Add(
"record", 1, 0);
1854 Add(
"wagon1", 1, 0);
1855 Add(
"wagon_big", 1, 0);
1856 Add(
"wagon_big2", 1, 0);
1857 Add(
"wagon_big3", 1, 0);
1858 Add(
"wagon_big4", 1, 0);
1859 Add(
"wagon_big5", 1, 0);
1860 Add(
"teleporter", 1, 0);
1861 Add(
"teleporter2", 1, 0);
1862 Add(
"recharger", 1, 0);
1863 Add(
"machine_gene2", 1, 0);
1880 Add(
"drawing_paper", 10, 0);
1881 Add(
"drawing_paper2", 10, 0);
1882 Add(
"stethoscope", 1, 0);
1883 Add(
"whip_love", 1, 0);
1884 Add(
"whip_interest", 1, 0);
1885 Add(
"syringe_blood", 20, 0);
1888 Add(
"chest_tax", 1, 0);
1894 Add(
"flyer", 1, 0).SetNum(99);
1899 bool num7 = owner.id ==
"big_sister";
1903 Add(
"littleball", 10, 0);
1914 for (
int m = 0; m < 20; m++)
1924 for (
int n = 0; n < 10; n++)
1932 for (
int num8 = 0; num8 < 30; num8++)
1938 Add(
"candle9", 1, -1);
1939 Add(
"candle9", 1, -1);
1940 Add(
"candle9", 1, -1);
1941 Add(
"candle8", 1, 0);
1942 Add(
"candle8b", 1, 0);
1943 Add(
"candle8c", 1, 0);
1950 Add(
"chest_tax", 1, 0);
1952 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
1955 Add(
"pillow_ehekatl", 1, 0);
1956 Add(
"grave_dagger1", 1, 0);
1957 Add(
"grave_dagger2", 1, 0);
1973 for (
int l = 0; l < 5; l++)
1977 thing3.c_priceFix = 1000;
1983 NoRestockId(
"hammer_garokk", 3, 0);
1984 NoRestockId(
"sword_dragon", 1, 0);
1985 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
1986 NoRestockId(
"point_stick", 1, 0);
1987 Add(
"point_stick", 1, 0).SetReplica(on:
true);
1988 NoRestockId(
"blunt_bonehammer", 1, 0);
1989 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
1990 NoRestockId(
"pole_gunlance", 1, 0);
1991 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
1992 NoRestockId(
"sword_muramasa", 1, 0);
1993 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
1994 NoRestockId(
"sword_forgetmenot", 1, 0);
1995 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
1996 NoRestockId(
"dagger_fish", 1, 0);
1997 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
1998 NoRestockId(
"sword_zephir", 1, 0);
1999 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
2000 Add(
"ribbon", 1, 0);
2001 Add(
"helm_sage", 1, 0);
2002 NoRestockId(
"wear_swim_danger", 1, 0);
2003 NoRestockId(
"wear_swim_danger", 1, 1);
2004 Add(
"diary_sister", 1, 0);
2005 Add(
"diary_catsister", 1, 0);
2006 Add(
"diary_lady", 1, 0);
2007 Add(
"1165", 1, 0).SetNum(5);
2009 Add(
"1282", 1, 0).SetNum(5);
2010 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
2011 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
2012 Add(
"bill_tax", 1, 0).c_bill = 1;
2013 Add(
"bill_tax", 1, 0).c_bill = 1;
2014 Add(
"bill_tax", 1, 0).c_bill = 1;
2016 Add(
"container_magic", 1, 0);
2017 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
2018 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
2019 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
2020 Add(
"wrench_tent_elec", 1, 0);
2021 Add(
"wrench_tent_soil", 1, 0);
2022 Add(
"wrench_tent_seabed", 1, 0);
2023 Add(
"wrench_bed", 1, 0).SetNum(20);
2024 Add(
"wrench_storage", 1, 0).SetNum(10);
2025 Add(
"wrench_fridge", 1, 0).SetNum(1);
2026 Add(
"wrench_extend_v", 1, 0).SetNum(2);
2027 Add(
"wrench_extend_h", 1, 0).SetNum(2);
2032 float num2 = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
2053 num2 = Mathf.Min(num2, num3);
2054 for (
int j = 0; (float)j < num2; j++)
2062 Thing thing = CreateStock();
2067 bool tryStack =
true;
2072 t.AddThing(thing, tryStack);
2085 for (
int k = 0; k < array2.Length; k++)
2087 if (array2[k] ==
ShopType.ToString())
2104 for (
int num14 = 1; num14 <= 22; num14++)
2112 int num15 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2115 Add(
"syringe_gene", num15, 0);
2116 Add(
"diary_little", 1, 0);
2120 Add(
"syringe_heaven", num15 / 5, 0);
2123 Add(
"medal", 10, 0);
2124 Add(
"ticket_fortune", 10, 0);
2128 Add(
"tool_talisman", 1, 0);
2139 Add(
"ecomark", 5, 0);
2140 Add(
"whip_egg", 1, 0);
2141 Add(
"helm_chef", 1, 0);
2142 Add(
"hammer_strip", 1, 0);
2143 Add(
"brush_strip", 1, 0);
2145 Add(
"plat", 100, 0);
2150 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2151 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2169 Add(
"holyFeather", 1, 0);
2178 Add(
"ticket_massage", 1, 0);
2179 Add(
"ticket_armpillow", 1, 0);
2180 Add(
"ticket_champagne", 1, 0);
2182 for (
int num12 = 0; num12 < 3; num12++)
2190 TreasureType.Map =>
"chest_treasure",
2191 TreasureType.BossNefia =>
"chest_boss",
2194 thing6.c_lockedHard =
true;
2195 thing6.c_lockLv = num13;
2196 thing6.c_priceAdd = 2000 + num13 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2197 thing6.c_revealLock =
true;
2210 for (
int num16 = 0; num16 < (EClass.debug.enable ? 3 : 3); num16++)
2254 Add(
"lockpick", 1, 0);
2257 Add(
"lockpick", 1, 0);
2263 thing12.c_idBacker = 0;
2267 if (thing12.
Num == 1)
2275 if (thing12.
IsFood && owner.
id ==
"rodwyn")
2283 thing12.noSell =
true;
2287 thing12.isStolen =
true;
2291 thing12.c_IDTState = 0;
2295 thing12.c_priceFix = -70;
2299 thing12.c_priceFix = 200;
2303 thing12.c_IDTState = 5;
2311 if (t.things.Count <= t.things.GridSize)
2315 int num17 = t.things.width * 10;
2316 if (t.things.Count > num17)
2318 int num18 = t.things.Count - num17;
2319 for (
int num19 = 0; num19 < num18; num19++)
2321 t.things.LastItem().Destroy();
2324 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2325 Thing Add(
string id,
int a,
int idSkin)
2329 thing9.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing9.
source.skins.Length + 1) : idSkin);
2332 void AddAdvWeek(
int i)
2335 thing7.c_priceFix = -90;
2338 void AddCassette(
int idCas,
string idQuest,
int phase)
2349 void NoRestock(
Thing _t)
2351 string text = owner.
id;
2354 text = text +
"_skin" + _t.
idSkin;
2357 if (hashSet ==
null)
2359 hashSet =
new HashSet<string>();
2369 void NoRestockId(
string _id,
int num,
int idSkin)
2372 thing8.idSkin = idSkin;
2388 return FromFilter(
"shop_generalExotic");
2392 return Create(
"wear_swim");
2396 return Create(
"panty");
2400 return Create(
"234");
2402 return FromFilter(
"shop_drink");
2404 return FromFilter(
"shop_furniture");
2406 return FromFilter(
"shop_book");
2408 return FromFilter(
"shop_magic");
2420 Thing thing3 =
null;
2421 for (
int i = 0; i < 1000; i++)
2423 thing3 = FromFilter(
"shop_healer");
2426 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2433 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2439 else if (thing3.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2454 return Create(
"milk");
2458 return Create(
"book_plan");
2460 return FromFilter(
"shop_weapon");
2464 return Create(
"mod_ranged");
2466 return FromFilter(
"shop_gun");
2485 return FromFilter(
"shop_blackmarket");
2488 return FromFilter(
"shop_drink");
2490 return FromFilter(
"shop_booze");
2492 return FromFilter(
"shop_fruit");
2496 return Create(
"bait");
2500 return Create(
"fishingRod");
2502 return FromFilter(
"shop_fish");
2506 return Create(
"seasoning");
2508 return FromFilter(
"shop_meat");
2512 return Create(
"dough");
2514 return FromFilter(
"shop_bread");
2518 return Create(
"dough");
2520 return FromFilter(
"shop_sweet");
2524 return Create(
"seasoning");
2526 return Create(
"693");
2530 return Create(
"seasoning");
2532 return FromFilter(
"shop_food");
2534 return FromFilter(
"shop_drug");
2538 if (loytelMartLv >= 1)
2542 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2558 return Create(
"1165");
2564 switch ((from _s in row.
thing.ToCharArray()
2566 select _s).RandomItem())
2578 return FromFilter(
"shop_junk");
2582 return FromFilter(
"shop_junk");
2584 return FromFilter(
"shop_souvenir");
2590 return Create(
"firework_launcher");
2592 return Create(
"firework");
2596 if (IsFestival(
"olvina"))
2598 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2600 if (IsFestival(
"yowyn"))
2602 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2604 if (IsFestival(
"noyel"))
2606 return Create(
new string[13]
2608 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2609 "xmas_ball",
"xmas_ball",
"xmas_string"
2615 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2619 return FromFilter(
"shop_junk");
2621 return FromFilter(
"shop_souvenir");
2625 if (IsFestival(
"kapul"))
2627 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2629 if (IsFestival(
"yowyn"))
2631 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2633 if (IsFestival(
"noyel"))
2635 return Create(
new string[1] {
"1069" }.RandomItem());
2637 if (IsFestival(
"olvina"))
2639 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2644 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2646 return FromFilter(
"shop_lamp");
2650 return Create(
"lockpick");
2652 return FromFilter(
"shop_general");
2654 Thing Create(
string s)
2658 Thing FromFilter(
string s)
2662 static bool IsFestival(
string id)
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
int GetInt(int id, int? defaultInt=null)
void SetInt(int id, int value=0)
static void SetRarity(Rarity q=Rarity.Normal)
static void SetNormalRarity(bool fixedMat=false)
void PlayAnime(AnimeID id, bool force)
void RemoveExtra(string id)
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
ElementContainerCard elements
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
SourceMaterial.Row material
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Card MakeRefFrom(string id)
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Thing AddThing(string id, int lv=-1)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
void ModCharge(int a, bool destroy=false)
void PlaySoundDrop(bool spatial=true)
virtual CardRow sourceCard
void ModExp(string alias, int a)
void PlayAnime(AnimeID id, bool force=false)
SourceCategory.Row category
bool HasElement(int ele, bool includeNagative=false)
void Say(string lang, string ref1=null, string ref2=null)
override bool IsAliveInCurrentZone
bool TryHoldCard(Card t, int num=-1, bool pickHeld=false)
static Thing MakeLoveLunch(Chara c)
static void MakeDish(Thing food, int lv, Chara crafter=null, int seed=-1)
static Thing GenerateGene(Chara c, Type? type=null)
int GetRaw(int offsetHours=0)
string GetText(TextFormat format)
int GetRemainingHours(int rawDeadLine)
static SourceManager sources
static int rndSeed(int a, int seed)
static BaseGameScreen screen
static int rndHalf(int a)
static GameSetting setting
Element SetBase(string alias, int v, int potential=0)
override bool IsCurrentZone
override bool IsCurrentZone
static GuildMerchant Merchant
static LayerDragGrid Create(InvOwnerDraglet owner, bool refuelFromLayerDragGrid=false)
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
static SourceMaterial.Row GetRandomMaterial(int lv, string group=null, bool tryLevelMatTier=false)
static SourceMaterial.Row GetRandomMaterialFromCategory(int lv, string cat, SourceMaterial.Row fallback)
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
void Add(Point point, float tile=0f, float color=0f)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Dictionary< string, HashSet< string > > noRestocks
ref Vector3 Position(int height)
List< Card > ListCards(bool includeMasked=false)
void RefreshNeighborTiles()
bool IsCompleted(string id)
static void SetBaseSeed(int a=-1)
static void SetSeed(int a=-1)
static List< RecipeSource > list
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
string GetText(string id="name", bool returnNull=false)
static SpawnList Get(string id, string parent=null, CardFilter filter=null)
CardRow Select(int lv=-1, int levelRange=-1)
static void GetAchievement(ID_Achievement id)
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
void DestroyAll(Func< Thing, bool > funcExclude=null)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
static Thing CreateRune(int ele, int v, bool free=false)
static Thing CreatePotion(int ele, int num=1)
static Thing CreateFromFilter(string id, int lv=-1)
static Thing CreateMap(string idSource=null, int lv=-1)
static Thing CreatePerfume(int ele, int num=1)
static Thing CreateRedBook(string id, int num=1)
static void CreateTreasureContent(Thing t, int lv, TreasureType type, bool clearContent)
static Thing CreateCassette(int id)
static Thing CreateSpellbook(string alias, int num=1)
static Thing CreatePlan(int ele)
static Thing CreateRecipe(string id)
static Thing CreateSkillbook(int ele, int num=1)
static Thing CreateFromCategory(string idCat, int lv=-1)
static Thing CreateScroll(int ele, int num=1)
static Thing CreateRod(int ele, int charge=-1)
static Thing Create(string id, int idMat=-1, int lv=-1)
virtual bool IsBlockSight
static Thing MakeRandomSeed(bool enc=false)
static void LevelSeed(Thing t, SourceObj.Row obj, int num)
static Thing MakeSeed(string id, PlantData plant=null)
static void SetZone(Zone zone, Thing t)
virtual string LangBarter
virtual void OnImportMap()
virtual bool RequireFullStackCheck
virtual bool OnUse(Chara c, Card tg)
virtual bool CanExtendBuild
virtual TileMode tileMode
void OfferProcess(Chara cc)
virtual bool IsBlockSight
virtual bool HoldAsDefaultInteraction
virtual int GetActDuration(Chara c)
virtual bool CanBeAttacked
virtual bool CanBeHallucinated
virtual void SetMainText(UIText t, bool hotitem)
virtual bool CanUse(Chara c)
virtual bool ShouldRefreshTile
virtual bool ShowChildrenNumber
virtual List< Point > ListPoints(Point center=null, bool onlyPassable=true)
virtual CopyShopType CopyShop
virtual void OnChangePlaceState(PlaceState state)
virtual RenderData GetRenderData()
virtual Recipe GetRecipe()
virtual void OnSetCardGrid(ButtonGrid b)
virtual string IDInvStyle
virtual string IdSoundToggleOff
virtual HotItem GetHotItem()
int GetSortVal(UIList.SortMode m)
virtual bool Contains(RecipeSource r)
virtual void OnEquip(Chara c, bool onSetOwner)
virtual void OnTickHeld()
virtual void WriteNote(UINote n, bool identified)
int GetParamInt(int i, int def)
virtual void OnSteppedOut(Chara c)
virtual bool TryProgress(AIProgress p)
virtual bool CanBeDisassembled
virtual int OriginalElectricity
virtual void OnRead(Chara c)
virtual bool IgnoreLastStackHeight
Point GetRandomPoint(Func< Point, bool > func=null, Chara accessChara=null)
virtual void OnInstall(bool byPlayer)
virtual bool CanChangeHeight
virtual void TrySetAct(ActPlan p)
virtual bool CanSearchContent
virtual bool CanChildDecay(Card c)
virtual void TrySetHeldAct(ActPlan p)
virtual string IdSoundToggleOn
virtual void OnThrowGround(Chara c, Point p)
virtual bool CanStackTo(Thing to)
virtual string ReqHarvest
virtual bool IgnoreOnSteppedWhenMoving
virtual bool CanBeDestroyed
virtual bool CanRead(Chara c)
virtual bool AlwaysHideOnLowWall
virtual bool CanCook(Card c)
virtual string IdNoRestock
virtual bool CanBuildInTown
virtual void SetOwner(Card _owner)
virtual bool OnChildDecay(Card c, bool firstDecay)
virtual void OnRenderTile(Point point, HitResult result, int dir)
string GetTextRestock(string lang, bool pet)
virtual void OnOpenDoor(Chara c)
virtual LockOpenState TryOpenLock(Chara cc, bool msgFail=true)
virtual bool CanOpenContainer
virtual void TrySetToggleAct(ActPlan p)
virtual TileType tileType
virtual void PlayToggleEffect(bool silent)
virtual bool CanUse(Chara c, Card tg)
virtual bool CanUseRoomRadius
virtual bool CanCopy(Thing t)
virtual bool UseDummyTile
virtual void OnUnequip(Chara c)
virtual int DecaySpeedChild
virtual Sprite GetRefSprite()
virtual bool CanChangeAffinity
virtual bool IsOnlyUsableByPc
virtual bool RemoveGlobalOnBanish
virtual void OnAddedToZone()
virtual void Toggle(bool on, bool silent=false)
string GetParam(int i, string def=null)
virtual void OnUnsetCurrentItem()
virtual void OnRenderExtra(RenderParam p)
void DamageRandomProperty(Chara cc)
virtual bool CanEat(Chara c)
virtual Recipe GetBuildModeRecipe()
virtual int CostRerollShop
virtual void OnSimulateHour(VirtualDate date)
int GetFuelValue(Thing t)
virtual bool OnUse(Chara c, Point p)
virtual bool IsThrowMainAction
virtual bool InvertHeldSprite
virtual bool CanBeHeldAsFurniture
string TextNextRestockPet
virtual bool IsChangeFloorHeight
virtual void OnStepped(Chara c)
virtual bool CanBeTeleported
virtual string GetHoverText()
virtual void RefreshRenderer()
virtual bool CanUse(Chara c, Point p)
virtual bool CanOffer(Card tg)
virtual bool DisableAutoCombat
virtual void OnCreate(int lv)
virtual ? Color ColorExtra
virtual void OnBarter(bool reroll=false)
virtual void OnSetCurrentItem()
virtual TraitRadiusType radiusType
virtual bool CanCopyInBlueprint
virtual bool OnUse(Chara c)
int GetFuelValue(string id)
virtual SourcePref GetPref()
void TryRefuel(int dest, List< Thing > excludes)
virtual void OnLockOpen(Chara cc)
virtual bool CanBeShipped
virtual void OnUninstall()
static List< Point > listRadiusPoints
virtual void OnSetOwner()
virtual bool CanBuiltAt(Point p)
virtual bool CanUseContent
virtual bool IsNightOnlyLight
virtual void OnDrink(Chara c)
virtual bool UseLightColor
virtual void OnRemovedFromZone()
virtual bool ShouldTryRefreshRoom
virtual bool CanBlend(Thing t)
virtual Emo2 GetHeldEmo(Chara c)
virtual bool CanBeDropped
virtual void OnCrafted(Recipe recipe, List< Thing > ings)
bool IsFuelEnough(int num=1, List< Thing > excludes=null, bool tryRefuel=true)
virtual bool CanBeSmashedToDeath
virtual bool LevelAsQuality
virtual void OnEat(Chara c)
virtual Action GetHealAction(Chara c)
virtual int IdleUseChance
static TraitSelfFactory SelfFactory
virtual bool ShowContextOnPick
virtual SourceElement.Row GetRefElement()
virtual LockOpenState TryPryOpenLock(Chara cc, bool msgFail=true)
virtual bool IdleUse(Chara c, int dist)
virtual void OnEnterScreen()
virtual bool IsSpecialContainer
virtual bool ShowFuelWindow
virtual void SetName(ref string s)
virtual bool CanBeOnlyBuiltInHome
virtual void SetParams(params string[] s)
virtual int CompareTo(Card b)
virtual bool CanDrink(Chara c)
virtual int InstallBottomPriority
virtual bool CanOnlyCarry
void Install(bool byPlayer)
virtual bool AllowCriminal
virtual void OnBlend(Thing t, Chara c)