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;
507 return "switch_on_electricity";
521 return "torch_unlit";
523 return "switch_off_electricity";
751 Vector3 vector2 =
item.Position();
768 list.
Add(
"invRead", 110, delegate
782 EClass.player.EndTurn();
788 list.
Add(
"invDrink", 130, delegate
798 list.
Add(
"invFood", 140, delegate
809 list.
Add(
"invBlend", 150, delegate
819 list.
Add(
"changeName", 200, delegate
857 for (
int i = 0; i < 50; i++)
859 Point point = list.RandomItem();
860 if (point.
IsValid && (func ==
null || func(point)) && (accessChara ==
null || accessChara.HasAccess(point)))
868 public virtual List<Point>
ListPoints(
Point center =
null,
bool onlyPassable =
true,
bool allowChara =
true)
880 Room room = center.cell.room;
904 if (radiusType == TraitRadiusType.Farm)
906 if (!p.cell.HasBlock || p.cell.HasFence)
908 listRadiusPoints.Add(p.Copy());
913 listRadiusPoints.Add(p.Copy());
977 string @ref = row.GetTextArray(
"name2")[1];
978 string ref2 = row.GetTextArray(
"name2")[0];
981 cc.
Talk(
"offer", @ref, ref2);
985 if (CanOffer(cc,
item))
1000 if (CanOffer(cc,
item))
1003 cc.depression.Mod(100);
1017 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
1022 num2 = num / 4 * 3 - 1;
1024 if (num <= num2 && cc.
IsPC)
1027 cc.
Say(
"openLockFail2");
1031 if (thing !=
null && !flag)
1038 cc.
Say(
"lockpick_success", cc, owner);
1039 int num3 = 100 + num2 * 10;
1051 cc.
Say(
"openLockFail");
1053 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
1054 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
1075 int a = Mathf.Clamp(20 *
tool.material.hardness /
material.hardness, 10, 150);
1077 int num = (int)Mathf.Clamp(20L * (
long)(owner.c_lockLv + 20) / cc.
STR, 5f, 50f);
1084 DamageRandomProperty(cc);
1088 cc.
Say(
"pry_success", cc, owner);
1120 else if (thing.
Num > 1)
1128 cc.
Say(
"pry_damage", cc, thing);
1137 owner.c_lockedHard =
false;
1138 owner.c_priceAdd = 0;
1144 owner.isLostProperty =
false;
1214 if (c.
held != owner)
1233 if (CanUse(owner.
Chara))
1291 if (Electricity != 0)
1293 EClass._zone.dirtyElectricity =
true;
1294 if (Electricity > 0)
1296 EClass._zone.electricity += Electricity;
1306 OnInstall(byPlayer);
1311 if (Electricity != 0)
1315 Toggle(on:
false, silent:
true);
1317 EClass._zone.dirtyElectricity =
true;
1318 if (Electricity > 0)
1320 EClass._zone.electricity -= Electricity;
1347 Toggle(on:
false, silent:
true);
1349 else if (AutoToggle)
1357 Toggle(flag, silent:
true);
1361 public virtual void Toggle(
bool on,
bool silent =
false)
1363 if (owner.
isOn == on)
1367 if (Electricity < 0)
1377 owner.
Say(
"notEnoughElectricity", owner);
1379 owner.
PlaySound(
"electricity_insufficient");
1383 EClass._zone.electricity += Electricity;
1387 EClass._zone.electricity -= Electricity;
1391 PlayToggleEffect(silent);
1398 bool isOn = owner.
isOn;
1411 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1412 owner.
PlaySound(
"Material/leather_drop");
1424 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1456 Toggle(!owner.
isOn);
1463 Toggle(!owner.
isOn);
1478 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1487 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1516 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1528 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1530 return owner.c_charges >= FuelCost * num;
1535 return GetFuelValue(s) > 0;
1540 return GetFuelValue(t) > 0;
1549 return GetFuelValue(t.
id);
1556 if (
id ==
"battery")
1590 if (FindFuel(refuel:
false))
1592 FindFuel(refuel:
true);
1594 bool FindFuel(
bool refuel)
1600 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1609 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1610 num -= GetFuelValue(
item) * num2;
1613 Refuel(
item.Split(num2));
1646 t.SetActive(enable:
true);
1651 t.SetActive(enable:
true);
1656 t.SetActive(owner.
Num > 1);
1667 int rawDeadLine = 0;
1681 if (remainingHours > 0)
1683 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1695 return Emo2.restock;
1703 return Emo2.blessing;
1705 return Emo2.restock;
1724 owner.isRestocking =
true;
1736 Add(
"book_exp", 10, 0);
1741 if (c_copyContainer ==
null)
1753 thing7.isStolen =
false;
1754 thing7.isCopy =
true;
1755 thing7.c_priceFix = 0;
1765 num15 = (1000 + owner.c_invest * 100) / (thing7.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1766 int[] array2 =
new int[3] { 704, 703, 702 };
1767 foreach (
int ele
in array2)
1769 if (thing7.HasElement(ele))
1780 if (num15 > 1 && thing7.trait.CanStack)
1782 thing7.SetNum(num15);
1808 AddCassette(10,
null, 999);
1809 AddCassette(15,
null, 999);
1810 AddCassette(17,
null, 999);
1811 AddCassette(29,
null, 999);
1812 AddCassette(40,
null, 999);
1813 AddCassette(46,
null, 999);
1814 AddCassette(47,
null, 999);
1815 AddCassette(52,
null, 999);
1816 AddCassette(54,
null, 999);
1817 AddCassette(59,
null, 999);
1818 AddCassette(65,
null, 999);
1819 AddCassette(109,
"debt", 0);
1820 AddCassette(110,
"curry", 999);
1823 AddCassette(122,
null, 999);
1824 AddCassette(123,
null, 999);
1832 Add(
"deed_wedding", 1, 0);
1833 Add(
"deed_divorce", 1, 0);
1834 Add(
"deed_lostring", 1, 0);
1835 Add(
"license_illumination", 1, 0);
1836 Add(
"license_void", 1, 0);
1837 Add(
"license_adv", 1, 0);
1841 for (
int num7 = 0; num7 < 30; num7++)
1850 Add(
"tool_talisman", 1, 0);
1851 Add(
"camera", 1, 0);
1854 Add(
"unicorn_horn", 1, 0);
1855 Add(
"core_user", 1, 0);
1856 Add(
"generator_hamster1", 1, 0);
1857 Add(
"generator_hamster2", 1, 0);
1858 Add(
"generator_solar", 1, 0);
1859 Add(
"generator_wind", 1, 0);
1867 Add(
"censored_item", 1, 0);
1881 Thing thing6 = Add(
"scrubber", 1, 0);
1882 thing6.rarity =
Rarity.Legendary;
1887 Add(
"hammer_garokk", 1, 0);
1891 Add(
"water_jure", 1, 0);
1897 string[] array =
new string[11]
1899 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1902 foreach (
string id in array)
1906 Add(
"cloud", 99, 0);
1907 Add(
"scroll_alias", 99, 0);
1908 Add(
"scroll_biography", 99, 0);
1910 Add(
"statue_lulu", 1, 0);
1911 Add(
"statue_jure", 1, 0);
1912 Add(
"statue_ehe", 1, 0);
1923 for (
int num5 = 0; num5 <
EClass.
rnd(3) + 1; num5++)
1927 for (
int num6 = 0; num6 <
EClass.
rnd(3) + 1; num6++)
1934 Add(
"board_map", 1, 0);
1935 Add(
"board_build", 1, 0);
1936 Add(
"book_resident", 1, 0);
1937 Add(
"board_party", 1, 0);
1938 Add(
"board_party2", 1, 0);
1939 Add(
"book_roster", 1, 0);
1953 Add(
"board_home", 1, 0);
1954 Add(
"board_resident", 1, 0);
1959 Add(
"board_expedition", 1, 0);
1960 Add(
"mailpost", 1, 0);
1961 Add(
"record", 1, 0);
1964 Add(
"wagon1", 1, 0);
1965 Add(
"wagon_big", 1, 0);
1966 Add(
"wagon_big2", 1, 0);
1967 Add(
"wagon_big3", 1, 0);
1968 Add(
"wagon_big4", 1, 0);
1969 Add(
"wagon_big5", 1, 0);
1970 Add(
"teleporter", 1, 0);
1971 Add(
"teleporter2", 1, 0);
1972 Add(
"recharger", 1, 0);
1973 Add(
"machine_gene2", 1, 0);
1990 Add(
"drawing_paper", 10, 0);
1991 Add(
"drawing_paper2", 10, 0);
1992 Add(
"stethoscope", 1, 0);
1993 Add(
"whip_love", 1, 0);
1994 Add(
"whip_interest", 1, 0);
1995 Add(
"syringe_blood", 20, 0);
1998 Add(
"chest_tax", 1, 0);
2004 Add(
"flyer", 1, 0).SetNum(99);
2009 bool num10 = owner.id ==
"big_sister";
2013 Add(
"littleball", 10, 0);
2024 for (
int num11 = 0; num11 < 20; num11++)
2034 for (
int num12 = 0; num12 < 10; num12++)
2042 for (
int num13 = 0; num13 < 30; num13++)
2048 Add(
"candle9", 1, -1);
2049 Add(
"candle9", 1, -1);
2050 Add(
"candle9", 1, -1);
2051 Add(
"candle8", 1, 0);
2052 Add(
"candle8b", 1, 0);
2053 Add(
"candle8c", 1, 0);
2060 Add(
"chest_tax", 1, 0);
2062 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
2065 Add(
"pillow_ehekatl", 1, 0);
2066 Add(
"grave_dagger1", 1, 0);
2067 Add(
"grave_dagger2", 1, 0);
2083 for (
int num9 = 0; num9 < 5; num9++)
2087 thing3.c_priceFix = 1000;
2094 Add(
"1282", 1, 0).SetNum(5);
2104 if (IsNoRestockExist(thing2))
2106 thing2.c_idRefName =
"sorin";
2118 NoRestockId(
"hammer_garokk", 3, 0);
2119 NoRestockId(
"sword_dragon", 1, 0);
2120 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
2121 NoRestockId(
"point_stick", 1, 0);
2122 Add(
"point_stick", 1, 0).SetReplica(on:
true);
2123 NoRestockId(
"blunt_bonehammer", 1, 0);
2124 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
2125 NoRestockId(
"pole_gunlance", 1, 0);
2126 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
2127 NoRestockId(
"sword_muramasa", 1, 0);
2128 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
2129 NoRestockId(
"sword_forgetmenot", 1, 0);
2130 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
2131 NoRestockId(
"dagger_fish", 1, 0);
2132 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
2133 NoRestockId(
"sword_zephir", 1, 0);
2134 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
2135 Add(
"bed_shiawase", 1, 0).SetReplica(on:
true);
2136 Add(
"ribbon", 1, 0);
2137 Add(
"helm_sage", 1, 0);
2138 NoRestockId(
"wear_swim_danger", 1, 0);
2139 NoRestockId(
"wear_swim_danger", 1, 1);
2140 Add(
"diary_sister", 1, 0);
2141 Add(
"diary_catsister", 1, 0);
2142 Add(
"diary_lady", 1, 0);
2143 Add(
"1165", 1, 0).SetNum(5);
2145 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
2146 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
2147 Add(
"bill_tax", 1, 0).c_bill = 1;
2148 Add(
"bill_tax", 1, 0).c_bill = 1;
2149 Add(
"bill_tax", 1, 0).c_bill = 1;
2150 Add(
"container_magic", 1, 0);
2151 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
2152 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
2153 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
2154 Add(
"wrench_tent_elec", 1, 0);
2155 Add(
"wrench_tent_soil", 1, 0);
2156 Add(
"wrench_tent_seabed", 1, 0);
2157 Add(
"wrench_bed", 1, 0).SetNum(20);
2158 Add(
"wrench_storage", 1, 0).SetNum(10);
2159 Add(
"wrench_fridge", 1, 0).SetNum(1);
2160 Add(
"wrench_extend_v", 1, 0).SetNum(2);
2161 Add(
"wrench_extend_h", 1, 0).SetNum(2);
2165 if (!owner.
GetStr(
"merchant_override").IsEmpty())
2169 float num = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
2190 num = Mathf.Min(num, num2);
2191 for (
int num3 = 0; (float)num3 < num; num3++)
2199 Thing thing = CreateStock();
2204 bool tryStack =
true;
2209 t.AddThing(thing, tryStack);
2215 string str = owner.
GetStr(
"merchant_override");
2218 foreach (
Thing item3
in ModUtil.GenerateMerchantStock(owner, str))
2231 for (
int num8 = 0; num8 < array.Length; num8++)
2233 if (array[num8] == text)
2250 for (
int num18 = 1; num18 <= 25; num18++)
2258 int num19 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2261 Add(
"syringe_gene", num19, 0);
2262 Add(
"diary_little", 1, 0);
2266 Add(
"syringe_heaven", num19 / 5, 0);
2269 Add(
"medal", 10, 0);
2270 Add(
"ticket_fortune", 10, 0);
2274 Add(
"tool_talisman", 1, 0);
2285 Add(
"ecomark", 5, 0);
2286 Add(
"whip_egg", 1, 0);
2287 Add(
"helm_chef", 1, 0);
2288 Add(
"hammer_strip", 1, 0);
2289 Add(
"brush_strip", 1, 0);
2291 Add(
"plat", 100, 0);
2296 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2297 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2315 Add(
"holyFeather", 1, 0);
2324 Add(
"ticket_massage", 1, 0);
2325 Add(
"ticket_armpillow", 1, 0);
2326 Add(
"ticket_champagne", 1, 0);
2328 for (
int num16 = 0; num16 < 3; num16++)
2336 TreasureType.Map =>
"chest_treasure",
2337 TreasureType.BossNefia =>
"chest_boss",
2340 thing8.c_lockedHard =
true;
2341 thing8.c_lockLv = num17;
2342 thing8.c_priceAdd = 2000 + num17 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2343 thing8.c_revealLock =
true;
2356 for (
int num20 = 0; num20 < (EClass.debug.enable ? 3 : 3); num20++)
2403 Add(
"lockpick", 1, 0);
2406 Add(
"lockpick", 1, 0);
2412 thing12.c_idBacker = 0;
2416 if (thing12.
Num == 1)
2424 if (thing12.
IsFood && owner.
id ==
"rodwyn")
2432 thing12.noSell =
true;
2436 thing12.isStolen =
true;
2440 thing12.c_IDTState = 0;
2444 thing12.c_priceFix = -70;
2448 thing12.c_priceFix = 200;
2452 thing12.c_IDTState = 5;
2460 if (t.things.Count <= t.things.GridSize)
2464 int num21 = t.things.width * 10;
2465 if (t.things.Count > num21)
2467 int num22 = t.things.Count - num21;
2468 for (
int num23 = 0; num23 < num22; num23++)
2470 t.things.LastItem().Destroy();
2473 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2474 Thing Add(
string id2,
int a,
int idSkin)
2478 thing9.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing9.
source.skins.Length + 1) : idSkin);
2481 void AddAdvWeek(
int i)
2484 thing9.c_priceFix = -90;
2487 void AddCassette(
int idCas,
string idQuest,
int phase)
2498 bool IsNoRestockExist(
Thing _t)
2500 if (t.things.Find(_t.
id) !=
null)
2505 if (hashSet !=
null)
2511 void NoRestock(
Thing _t)
2513 string text2 = owner.
id;
2516 text2 = text2 +
"_skin" + _t.
idSkin;
2519 if (hashSet ==
null)
2521 hashSet =
new HashSet<string>();
2531 void NoRestockId(
string _id,
int num24,
int idSkin)
2534 thing9.idSkin = idSkin;
2550 return FromFilter(
"shop_generalExotic");
2554 return Create(
"wear_swim");
2558 return Create(
"panty");
2562 return Create(
"234");
2564 return FromFilter(
"shop_drink");
2566 return FromFilter(
"shop_furniture");
2568 return FromFilter(
"shop_book");
2570 return FromFilter(
"shop_magic");
2583 return Create(
"saddle");
2587 return Create(
"saddle_waist");
2592 Thing thing2 =
null;
2593 for (
int num = 0; num < 1000; num++)
2595 thing2 = FromFilter(
"shop_healer");
2598 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2605 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2611 else if (thing2.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2626 return Create(
"_milk");
2630 return Create(
"book_plan");
2632 return FromFilter(
"shop_weapon");
2636 return Create(
"mod_ranged");
2638 return FromFilter(
"shop_gun");
2657 return FromFilter(
"shop_blackmarket");
2660 return FromFilter(
"shop_drink");
2662 return FromFilter(
"shop_booze");
2664 return FromFilter(
"shop_fruit");
2668 return Create(
"bait");
2672 return Create(
"fishingRod");
2674 return FromFilter(
"shop_fish");
2678 return Create(
"seasoning");
2680 return FromFilter(
"shop_meat");
2684 return Create(
"dough");
2686 return FromFilter(
"shop_bread");
2690 return Create(
"dough");
2694 return Create(
"cream");
2696 return FromFilter(
"shop_sweet");
2700 return Create(
"seasoning");
2702 return Create(
"693");
2706 return Create(
"seasoning");
2708 return FromFilter(
"shop_food");
2710 return FromFilter(
"shop_drug");
2714 if (loytelMartLv >= 1)
2718 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2734 return Create(
"1165");
2740 switch ((from _s in row.
thing.ToCharArray()
2742 select _s).RandomItem())
2754 return FromFilter(
"shop_junk");
2758 return FromFilter(
"shop_junk");
2760 return FromFilter(
"shop_souvenir");
2766 return Create(
"firework_launcher");
2768 return Create(
"firework");
2772 if (IsFestival(
"olvina"))
2774 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2776 if (IsFestival(
"yowyn"))
2778 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2780 if (IsFestival(
"noyel"))
2782 return Create(
new string[13]
2784 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2785 "xmas_ball",
"xmas_ball",
"xmas_string"
2791 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2795 return FromFilter(
"shop_junk");
2797 return FromFilter(
"shop_souvenir");
2801 if (IsFestival(
"kapul"))
2803 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2805 if (IsFestival(
"yowyn"))
2807 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2809 if (IsFestival(
"noyel"))
2811 return Create(
new string[1] {
"1069" }.RandomItem());
2813 if (IsFestival(
"olvina"))
2815 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2820 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2822 return FromFilter(
"shop_lamp");
2826 return Create(
"lockpick");
2828 return FromFilter(
"shop_general");
2830 Thing Create(
string s)
2834 Thing FromFilter(
string s)
2838 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)
static void SetRarity(Rarity q=Rarity.Normal)
static void SetNormalRarity(bool fixedMat=false)
GlobalCharaList globalCharas
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)
void SetInt(string id, int value=0)
Card MakeRefFrom(string id)
Thing AddThing(string id, int lv=-1)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
string GetStr(string id, string defaultStr=null)
void ModCharge(int a, bool destroy=false)
void PlaySoundDrop(bool spatial=true)
virtual CardRow sourceCard
void ModExp(string alias, int a)
Thing Add(string id, int num=1, int lv=1)
void PlayAnime(AnimeID id, bool force=false)
SourceCategory.Row category
int GetInt(string id, int? defaultInt=null)
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)
override bool IsPCFaction
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 Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
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 LayerChara Instance
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)
override int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
virtual bool IsBlockSight
static Thing MakeSeed(string idSource)
static Thing MakeRandomSeed(bool enc=false)
static void LevelSeed(Thing t, SourceObj.Row obj, int num)
static void SetZone(Zone zone, Thing t)
virtual string LangBarter
virtual void OnImportMap()
virtual bool RequireFullStackCheck
virtual bool CanOffer(Chara cc, Card tg)
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 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 void PositionFix(ref Vector3 v)
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 bool UsePositionFix
virtual int CostRerollShop
virtual void OnSimulateHour(VirtualDate date)
int GetFuelValue(Thing t)
virtual bool OnUse(Chara c, Point p)
virtual bool IsThrowMainAction
virtual void OnListInteraction(InvOwner.ListInteraction list, ButtonGrid b, bool context)
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 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 List< Point > ListPoints(Point center=null, bool onlyPassable=true, bool allowChara=true)
virtual SourceElement.Row GetRefElement()
virtual CurrencyType CurrencyRerollShop
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)