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;
509 return "switch_on_electricity";
523 return "torch_unlit";
525 return "switch_off_electricity";
753 Vector3 vector2 =
item.Position();
770 list.
Add(
"invRead", 110, delegate
784 EClass.player.EndTurn();
790 list.
Add(
"invDrink", 130, delegate
800 list.
Add(
"invFood", 140, delegate
811 list.
Add(
"invBlend", 150, delegate
821 list.
Add(
"changeName", 200, delegate
859 for (
int i = 0; i < 50; i++)
861 Point point = list.RandomItem();
862 if (point.
IsValid && (func ==
null || func(point)) && (accessChara ==
null || accessChara.HasAccess(point)))
870 public virtual List<Point>
ListPoints(
Point center =
null,
bool onlyPassable =
true,
bool allowChara =
true)
882 Room room = center.cell.room;
906 if (radiusType == TraitRadiusType.Farm)
908 if (!p.cell.HasBlock || p.cell.HasFence)
910 listRadiusPoints.Add(p.Copy());
915 listRadiusPoints.Add(p.Copy());
979 string @ref = row.GetTextArray(
"name2")[1];
980 string ref2 = row.GetTextArray(
"name2")[0];
983 cc.
Talk(
"offer", @ref, ref2);
987 if (CanOffer(cc,
item))
1002 if (CanOffer(cc,
item))
1005 cc.depression.Mod(100);
1019 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
1024 num2 = num / 4 * 3 - 1;
1026 if (num <= num2 && cc.
IsPC)
1029 cc.
Say(
"openLockFail2");
1033 if (thing !=
null && !flag)
1040 cc.
Say(
"lockpick_success", cc, owner);
1041 int num3 = 100 + num2 * 10;
1053 cc.
Say(
"openLockFail");
1055 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
1056 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
1077 int a = Mathf.Clamp(20 *
tool.material.hardness /
material.hardness, 10, 150);
1079 int num = (int)Mathf.Clamp(20L * (
long)(owner.c_lockLv + 20) / cc.
STR, 5f, 50f);
1086 DamageRandomProperty(cc);
1090 cc.
Say(
"pry_success", cc, owner);
1122 else if (thing.
Num > 1)
1130 cc.
Say(
"pry_damage", cc, thing);
1139 owner.c_lockedHard =
false;
1140 owner.c_priceAdd = 0;
1146 owner.isLostProperty =
false;
1216 if (c.
held != owner)
1235 if (CanUse(owner.
Chara))
1293 if (Electricity != 0)
1295 EClass._zone.dirtyElectricity =
true;
1296 if (Electricity > 0)
1298 EClass._zone.electricity += Electricity;
1308 OnInstall(byPlayer);
1313 if (Electricity != 0)
1317 Toggle(on:
false, silent:
true);
1319 EClass._zone.dirtyElectricity =
true;
1320 if (Electricity > 0)
1322 EClass._zone.electricity -= Electricity;
1349 Toggle(on:
false, silent:
true);
1351 else if (AutoToggle)
1359 Toggle(flag, silent:
true);
1363 public virtual void Toggle(
bool on,
bool silent =
false)
1365 if (owner.
isOn == on)
1369 if (Electricity < 0)
1379 owner.
Say(
"notEnoughElectricity", owner);
1381 owner.
PlaySound(
"electricity_insufficient");
1385 EClass._zone.electricity += Electricity;
1389 EClass._zone.electricity -= Electricity;
1393 PlayToggleEffect(silent);
1400 bool isOn = owner.
isOn;
1413 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1414 owner.
PlaySound(
"Material/leather_drop");
1426 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1458 Toggle(!owner.
isOn);
1465 Toggle(!owner.
isOn);
1480 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1489 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1518 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1530 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1532 return owner.c_charges >= FuelCost * num;
1537 return GetFuelValue(s) > 0;
1542 return GetFuelValue(t) > 0;
1551 return GetFuelValue(t.
id);
1558 if (
id ==
"battery")
1592 if (FindFuel(refuel:
false))
1594 FindFuel(refuel:
true);
1596 bool FindFuel(
bool refuel)
1602 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1611 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1612 num -= GetFuelValue(
item) * num2;
1615 Refuel(
item.Split(num2));
1648 t.SetActive(enable:
true);
1653 t.SetActive(enable:
true);
1658 t.SetActive(owner.
Num > 1);
1669 int rawDeadLine = 0;
1683 if (remainingHours > 0)
1685 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1697 return Emo2.restock;
1705 return Emo2.blessing;
1707 return Emo2.restock;
1726 owner.isRestocking =
true;
1738 Add(
"book_exp", 10, 0);
1743 if (c_copyContainer ==
null)
1755 thing7.isStolen =
false;
1756 thing7.isCopy =
true;
1757 thing7.c_priceFix = 0;
1767 num15 = (1000 + owner.c_invest * 100) / (thing7.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1768 int[] array2 =
new int[3] { 704, 703, 702 };
1769 foreach (
int ele
in array2)
1771 if (thing7.HasElement(ele))
1782 if (num15 > 1 && thing7.trait.CanStack)
1784 thing7.SetNum(num15);
1810 AddCassette(10,
null, 999);
1811 AddCassette(15,
null, 999);
1812 AddCassette(17,
null, 999);
1813 AddCassette(29,
null, 999);
1814 AddCassette(40,
null, 999);
1815 AddCassette(46,
null, 999);
1816 AddCassette(47,
null, 999);
1817 AddCassette(52,
null, 999);
1818 AddCassette(54,
null, 999);
1819 AddCassette(59,
null, 999);
1820 AddCassette(65,
null, 999);
1821 AddCassette(109,
"debt", 0);
1822 AddCassette(110,
"curry", 999);
1825 AddCassette(122,
null, 999);
1826 AddCassette(123,
null, 999);
1834 Add(
"deed_wedding", 1, 0);
1835 Add(
"deed_divorce", 1, 0);
1836 Add(
"deed_lostring", 1, 0);
1837 Add(
"license_illumination", 1, 0);
1838 Add(
"license_void", 1, 0);
1839 Add(
"license_adv", 1, 0);
1843 for (
int num7 = 0; num7 < 30; num7++)
1852 Add(
"tool_talisman", 1, 0);
1853 Add(
"camera", 1, 0);
1856 Add(
"unicorn_horn", 1, 0);
1857 Add(
"core_user", 1, 0);
1858 Add(
"generator_hamster1", 1, 0);
1859 Add(
"generator_hamster2", 1, 0);
1860 Add(
"generator_solar", 1, 0);
1861 Add(
"generator_wind", 1, 0);
1869 Add(
"censored_item", 1, 0);
1885 Thing thing6 = Add(
"scrubber", 1, 0);
1886 thing6.rarity =
Rarity.Legendary;
1892 Add(
"hammer_garokk", 1, 0);
1896 Add(
"water_jure", 1, 0);
1902 string[] array =
new string[11]
1904 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1907 foreach (
string id in array)
1911 Add(
"cloud", 99, 0);
1912 Add(
"scroll_alias", 99, 0);
1913 Add(
"scroll_biography", 99, 0);
1915 Add(
"statue_lulu", 1, 0);
1916 Add(
"statue_jure", 1, 0);
1917 Add(
"statue_ehe", 1, 0);
1928 for (
int num5 = 0; num5 <
EClass.
rnd(3) + 1; num5++)
1932 for (
int num6 = 0; num6 <
EClass.
rnd(3) + 1; num6++)
1939 Add(
"board_map", 1, 0);
1940 Add(
"board_build", 1, 0);
1941 Add(
"book_resident", 1, 0);
1942 Add(
"board_party", 1, 0);
1943 Add(
"board_party2", 1, 0);
1944 Add(
"book_roster", 1, 0);
1958 Add(
"board_home", 1, 0);
1959 Add(
"board_resident", 1, 0);
1964 Add(
"board_expedition", 1, 0);
1965 Add(
"mailpost", 1, 0);
1966 Add(
"record", 1, 0);
1969 Add(
"wagon1", 1, 0);
1970 Add(
"wagon_big", 1, 0);
1971 Add(
"wagon_big2", 1, 0);
1972 Add(
"wagon_big3", 1, 0);
1973 Add(
"wagon_big4", 1, 0);
1974 Add(
"wagon_big5", 1, 0);
1975 Add(
"teleporter", 1, 0);
1976 Add(
"teleporter2", 1, 0);
1977 Add(
"recharger", 1, 0);
1978 Add(
"machine_gene2", 1, 0);
1995 Add(
"drawing_paper", 10, 0);
1996 Add(
"drawing_paper2", 10, 0);
1997 Add(
"stethoscope", 1, 0);
1998 Add(
"whip_love", 1, 0);
1999 Add(
"whip_interest", 1, 0);
2000 Add(
"syringe_blood", 20, 0);
2003 Add(
"chest_tax", 1, 0);
2009 Add(
"flyer", 1, 0).SetNum(99);
2014 bool num10 = owner.id ==
"big_sister";
2018 Add(
"littleball", 10, 0);
2029 for (
int num11 = 0; num11 < 20; num11++)
2039 for (
int num12 = 0; num12 < 10; num12++)
2047 for (
int num13 = 0; num13 < 30; num13++)
2053 Add(
"candle9", 1, -1);
2054 Add(
"candle9", 1, -1);
2055 Add(
"candle9", 1, -1);
2056 Add(
"candle8", 1, 0);
2057 Add(
"candle8b", 1, 0);
2058 Add(
"candle8c", 1, 0);
2065 Add(
"chest_tax", 1, 0);
2067 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
2070 AddCassette(127,
null, 999);
2071 Add(
"pillow_ehekatl", 1, 0);
2072 Add(
"grave_dagger1", 1, 0);
2073 Add(
"grave_dagger2", 1, 0);
2089 for (
int num9 = 0; num9 < 5; num9++)
2093 thing3.c_priceFix = 1000;
2100 Add(
"1282", 1, 0).SetNum(5);
2110 if (IsNoRestockExist(thing2))
2112 thing2.c_idRefName =
"sorin";
2124 NoRestockId(
"hammer_garokk", 3, 0);
2125 NoRestockId(
"sword_dragon", 1, 0);
2126 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
2127 NoRestockId(
"point_stick", 1, 0);
2128 Add(
"point_stick", 1, 0).SetReplica(on:
true);
2129 NoRestockId(
"blunt_bonehammer", 1, 0);
2130 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
2131 NoRestockId(
"pole_gunlance", 1, 0);
2132 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
2133 NoRestockId(
"sword_muramasa", 1, 0);
2134 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
2135 NoRestockId(
"sword_forgetmenot", 1, 0);
2136 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
2137 NoRestockId(
"dagger_fish", 1, 0);
2138 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
2139 NoRestockId(
"sword_zephir", 1, 0);
2140 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
2141 Add(
"bed_shiawase", 1, 0).SetReplica(on:
true);
2142 Add(
"ribbon", 1, 0);
2143 Add(
"helm_sage", 1, 0);
2144 NoRestockId(
"wear_swim_danger", 1, 0);
2145 NoRestockId(
"wear_swim_danger", 1, 1);
2146 Add(
"diary_sister", 1, 0);
2147 Add(
"diary_catsister", 1, 0);
2148 Add(
"diary_lady", 1, 0);
2149 Add(
"1165", 1, 0).SetNum(5);
2151 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
2152 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
2153 Add(
"bill_tax", 1, 0).c_bill = 1;
2154 Add(
"bill_tax", 1, 0).c_bill = 1;
2155 Add(
"bill_tax", 1, 0).c_bill = 1;
2156 Add(
"container_magic", 1, 0);
2157 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
2158 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
2159 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
2160 Add(
"wrench_tent_elec", 1, 0);
2161 Add(
"wrench_tent_soil", 1, 0);
2162 Add(
"wrench_tent_seabed", 1, 0);
2163 Add(
"wrench_bed", 1, 0).SetNum(20);
2164 Add(
"wrench_storage", 1, 0).SetNum(10);
2165 Add(
"wrench_fridge", 1, 0).SetNum(1);
2166 Add(
"wrench_extend_v", 1, 0).SetNum(2);
2167 Add(
"wrench_extend_h", 1, 0).SetNum(2);
2171 if (!owner.
GetStr(
"merchant_override").IsEmpty())
2175 float num = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
2196 num = Mathf.Min(num, num2);
2197 for (
int num3 = 0; (float)num3 < num; num3++)
2205 Thing thing = CreateStock();
2210 bool tryStack =
true;
2215 t.AddThing(thing, tryStack);
2221 string str = owner.
GetStr(
"merchant_override");
2224 foreach (
Thing item3
in ModUtil.GenerateMerchantStock(owner, str))
2237 for (
int num8 = 0; num8 < array.Length; num8++)
2239 if (array[num8] == text)
2256 for (
int num18 = 1; num18 <= 27; num18++)
2264 int num19 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2267 Add(
"syringe_gene", num19, 0);
2268 Add(
"diary_little", 1, 0);
2272 Add(
"syringe_heaven", num19 / 5, 0);
2275 Add(
"medal", 10, 0);
2276 Add(
"ticket_fortune", 10, 0);
2280 Add(
"tool_talisman", 1, 0);
2291 Add(
"ecomark", 5, 0);
2292 Add(
"whip_egg", 1, 0);
2293 Add(
"helm_chef", 1, 0);
2294 Add(
"hammer_strip", 1, 0);
2295 Add(
"brush_strip", 1, 0);
2297 Add(
"plat", 100, 0);
2302 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2303 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2321 Add(
"holyFeather", 1, 0);
2330 Add(
"ticket_massage", 1, 0);
2331 Add(
"ticket_armpillow", 1, 0);
2332 Add(
"ticket_champagne", 1, 0);
2334 for (
int num16 = 0; num16 < 3; num16++)
2342 TreasureType.Map =>
"chest_treasure",
2343 TreasureType.BossNefia =>
"chest_boss",
2346 thing8.c_lockedHard =
true;
2347 thing8.c_lockLv = num17;
2348 thing8.c_priceAdd = 2000 + num17 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2349 thing8.c_revealLock =
true;
2362 for (
int num20 = 0; num20 < (EClass.debug.enable ? 3 : 3); num20++)
2409 Add(
"lockpick", 1, 0);
2412 Add(
"lockpick", 1, 0);
2418 thing12.c_idBacker = 0;
2422 if (thing12.
Num == 1)
2430 if (thing12.
IsFood && owner.
id ==
"rodwyn")
2438 thing12.noSell =
true;
2442 thing12.isStolen =
true;
2446 thing12.c_IDTState = 0;
2450 thing12.c_priceFix = -70;
2454 thing12.c_priceFix = 200;
2458 thing12.c_IDTState = 5;
2466 if (t.things.Count <= t.things.GridSize)
2470 int num21 = t.things.width * 10;
2471 if (t.things.Count > num21)
2473 int num22 = t.things.Count - num21;
2474 for (
int num23 = 0; num23 < num22; num23++)
2476 t.things.LastItem().Destroy();
2479 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2480 Thing Add(
string id2,
int a,
int idSkin)
2484 thing9.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing9.
source.skins.Length + 1) : idSkin);
2487 void AddAdvWeek(
int i)
2490 thing9.c_priceFix = -90;
2493 void AddCassette(
int idCas,
string idQuest,
int phase)
2504 bool IsNoRestockExist(
Thing _t)
2506 if (t.things.Find(_t.
id) !=
null)
2511 if (hashSet !=
null)
2517 void NoRestock(
Thing _t)
2519 string text2 = owner.
id;
2522 text2 = text2 +
"_skin" + _t.
idSkin;
2525 if (hashSet ==
null)
2527 hashSet =
new HashSet<string>();
2537 void NoRestockId(
string _id,
int num24,
int idSkin)
2540 thing9.idSkin = idSkin;
2556 return FromFilter(
"shop_generalExotic");
2560 return Create(
"wear_swim");
2564 return Create(
"panty");
2568 return Create(
"234");
2570 return FromFilter(
"shop_drink");
2572 return FromFilter(
"shop_furniture");
2574 return FromFilter(
"shop_book");
2576 return FromFilter(
"shop_magic");
2589 return Create(
"saddle");
2593 return Create(
"saddle_waist");
2598 Thing thing2 =
null;
2599 for (
int num = 0; num < 1000; num++)
2601 thing2 = FromFilter(
"shop_healer");
2604 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2611 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2617 else if (thing2.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2632 return Create(
"_milk");
2636 return Create(
"book_plan");
2638 return FromFilter(
"shop_weapon");
2642 return Create(
"mod_ranged");
2644 return FromFilter(
"shop_gun");
2663 return FromFilter(
"shop_blackmarket");
2666 return FromFilter(
"shop_drink");
2668 return FromFilter(
"shop_booze");
2670 return FromFilter(
"shop_fruit");
2674 return Create(
"bait");
2678 return Create(
"fishingRod");
2680 return FromFilter(
"shop_fish");
2684 return Create(
"seasoning");
2686 return FromFilter(
"shop_meat");
2690 return Create(
"dough");
2692 return FromFilter(
"shop_bread");
2696 return Create(
"dough");
2700 return Create(
"cream");
2702 return FromFilter(
"shop_sweet");
2706 return Create(
"seasoning");
2708 return Create(
"693");
2712 return Create(
"seasoning");
2714 return FromFilter(
"shop_food");
2716 return FromFilter(
"shop_drug");
2720 if (loytelMartLv >= 1)
2724 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2740 return Create(
"1165");
2746 switch ((from _s in row.
thing.ToCharArray()
2748 select _s).RandomItem())
2760 return FromFilter(
"shop_junk");
2764 return FromFilter(
"shop_junk");
2766 return FromFilter(
"shop_souvenir");
2772 return Create(
"firework_launcher");
2774 return Create(
"firework");
2778 if (IsFestival(
"olvina"))
2780 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2782 if (IsFestival(
"yowyn"))
2784 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2786 if (IsFestival(
"noyel"))
2788 return Create(
new string[13]
2790 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2791 "xmas_ball",
"xmas_ball",
"xmas_string"
2797 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2801 return FromFilter(
"shop_junk");
2803 return FromFilter(
"shop_souvenir");
2807 if (IsFestival(
"kapul"))
2809 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2811 if (IsFestival(
"yowyn"))
2813 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2815 if (IsFestival(
"noyel"))
2817 return Create(
new string[1] {
"1069" }.RandomItem());
2819 if (IsFestival(
"olvina"))
2821 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2826 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2828 return FromFilter(
"shop_lamp");
2832 return Create(
"lockpick");
2834 return FromFilter(
"shop_general");
2836 Thing Create(
string s)
2840 Thing FromFilter(
string s)
2844 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 string LangRefText
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)