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";
747 Vector3 vector2 =
item.Position();
764 list.
Add(
"invRead", 110, delegate
778 EClass.player.EndTurn();
784 list.
Add(
"invDrink", 130, delegate
794 list.
Add(
"invFood", 140, delegate
805 list.
Add(
"invBlend", 150, delegate
815 list.
Add(
"changeName", 200, delegate
853 for (
int i = 0; i < 50; i++)
855 Point point = list.RandomItem();
856 if (point.
IsValid && (func ==
null || func(point)) && (accessChara ==
null || accessChara.HasAccess(point)))
864 public virtual List<Point>
ListPoints(
Point center =
null,
bool onlyPassable =
true,
bool allowChara =
true)
876 Room room = center.cell.room;
900 if (radiusType == TraitRadiusType.Farm)
902 if (!p.cell.HasBlock || p.cell.HasFence)
904 listRadiusPoints.Add(p.Copy());
909 listRadiusPoints.Add(p.Copy());
973 string @ref = row.GetTextArray(
"name2")[1];
974 string ref2 = row.GetTextArray(
"name2")[0];
977 cc.
Talk(
"offer", @ref, ref2);
981 if (CanOffer(cc,
item))
996 if (CanOffer(cc,
item))
999 cc.depression.Mod(100);
1013 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
1018 num2 = num / 4 * 3 - 1;
1020 if (num <= num2 && cc.
IsPC)
1023 cc.
Say(
"openLockFail2");
1027 if (thing !=
null && !flag)
1034 cc.
Say(
"lockpick_success", cc, owner);
1035 int num3 = 100 + num2 * 10;
1047 cc.
Say(
"openLockFail");
1049 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
1050 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
1071 int a = Mathf.Clamp(20 *
tool.material.hardness /
material.hardness, 10, 150);
1073 int num = (int)Mathf.Clamp(20L * (
long)(owner.c_lockLv + 20) / cc.
STR, 5f, 50f);
1080 DamageRandomProperty(cc);
1084 cc.
Say(
"pry_success", cc, owner);
1116 else if (thing.
Num > 1)
1124 cc.
Say(
"pry_damage", cc, thing);
1133 owner.c_lockedHard =
false;
1134 owner.c_priceAdd = 0;
1140 owner.isLostProperty =
false;
1210 if (c.
held != owner)
1229 if (CanUse(owner.
Chara))
1283 if (Electricity != 0)
1285 EClass._zone.dirtyElectricity =
true;
1286 if (Electricity > 0)
1288 EClass._zone.electricity += Electricity;
1298 OnInstall(byPlayer);
1303 if (Electricity != 0)
1307 Toggle(on:
false, silent:
true);
1309 EClass._zone.dirtyElectricity =
true;
1310 if (Electricity > 0)
1312 EClass._zone.electricity -= Electricity;
1335 Toggle(on:
false, silent:
true);
1337 else if (AutoToggle)
1345 Toggle(flag, silent:
true);
1349 public virtual void Toggle(
bool on,
bool silent =
false)
1351 if (owner.
isOn == on)
1355 if (Electricity < 0)
1365 owner.
Say(
"notEnoughElectricity", owner);
1367 owner.
PlaySound(
"electricity_insufficient");
1371 EClass._zone.electricity += Electricity;
1375 EClass._zone.electricity -= Electricity;
1379 PlayToggleEffect(silent);
1386 bool isOn = owner.
isOn;
1399 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1400 owner.
PlaySound(
"Material/leather_drop");
1412 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1444 Toggle(!owner.
isOn);
1451 Toggle(!owner.
isOn);
1466 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1475 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1504 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1516 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1518 return owner.c_charges >= FuelCost * num;
1523 return GetFuelValue(s) > 0;
1528 return GetFuelValue(t) > 0;
1537 return GetFuelValue(t.
id);
1544 if (
id ==
"battery")
1578 if (FindFuel(refuel:
false))
1580 FindFuel(refuel:
true);
1582 bool FindFuel(
bool refuel)
1588 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1597 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1598 num -= GetFuelValue(
item) * num2;
1601 Refuel(
item.Split(num2));
1634 t.SetActive(enable:
true);
1639 t.SetActive(enable:
true);
1644 t.SetActive(owner.
Num > 1);
1655 int rawDeadLine = 0;
1669 if (remainingHours > 0)
1671 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1683 return Emo2.restock;
1691 return Emo2.blessing;
1693 return Emo2.restock;
1712 owner.isRestocking =
true;
1724 Add(
"book_exp", 10, 0);
1729 if (c_copyContainer ==
null)
1741 thing6.isStolen =
false;
1742 thing6.isCopy =
true;
1743 thing6.c_priceFix = 0;
1753 num12 = (1000 + owner.c_invest * 100) / (thing6.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1754 int[] array =
new int[3] { 704, 703, 702 };
1755 foreach (
int ele
in array)
1757 if (thing6.HasElement(ele))
1768 if (num12 > 1 && thing6.trait.CanStack)
1770 thing6.SetNum(num12);
1796 AddCassette(10,
null, 999);
1797 AddCassette(15,
null, 999);
1798 AddCassette(17,
null, 999);
1799 AddCassette(29,
null, 999);
1800 AddCassette(40,
null, 999);
1801 AddCassette(46,
null, 999);
1802 AddCassette(47,
null, 999);
1803 AddCassette(52,
null, 999);
1804 AddCassette(54,
null, 999);
1805 AddCassette(59,
null, 999);
1806 AddCassette(65,
null, 999);
1807 AddCassette(109,
"debt", 0);
1808 AddCassette(110,
"curry", 999);
1811 AddCassette(122,
null, 999);
1812 AddCassette(123,
null, 999);
1820 Add(
"deed_wedding", 1, 0);
1821 Add(
"deed_divorce", 1, 0);
1822 Add(
"deed_lostring", 1, 0);
1823 Add(
"license_illumination", 1, 0);
1824 Add(
"license_void", 1, 0);
1825 Add(
"license_adv", 1, 0);
1829 for (
int num5 = 0; num5 < 30; num5++)
1838 Add(
"tool_talisman", 1, 0);
1839 Add(
"camera", 1, 0);
1842 Add(
"unicorn_horn", 1, 0);
1843 Add(
"core_user", 1, 0);
1844 Add(
"generator_hamster1", 1, 0);
1845 Add(
"generator_hamster2", 1, 0);
1846 Add(
"generator_solar", 1, 0);
1847 Add(
"generator_wind", 1, 0);
1855 Add(
"censored_item", 1, 0);
1869 Thing thing5 = Add(
"scrubber", 1, 0);
1870 thing5.rarity =
Rarity.Legendary;
1875 Add(
"hammer_garokk", 1, 0);
1879 Add(
"water_jure", 1, 0);
1885 string[] array2 =
new string[11]
1887 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1890 foreach (
string id in array2)
1894 Add(
"cloud", 99, 0);
1895 Add(
"scroll_alias", 99, 0);
1896 Add(
"scroll_biography", 99, 0);
1898 Add(
"statue_lulu", 1, 0);
1899 Add(
"statue_jure", 1, 0);
1900 Add(
"statue_ehe", 1, 0);
1911 for (
int num14 = 0; num14 <
EClass.
rnd(3) + 1; num14++)
1915 for (
int num15 = 0; num15 <
EClass.
rnd(3) + 1; num15++)
1922 Add(
"board_map", 1, 0);
1923 Add(
"board_build", 1, 0);
1924 Add(
"book_resident", 1, 0);
1925 Add(
"board_party", 1, 0);
1926 Add(
"board_party2", 1, 0);
1927 Add(
"book_roster", 1, 0);
1941 Add(
"board_home", 1, 0);
1942 Add(
"board_resident", 1, 0);
1947 Add(
"board_expedition", 1, 0);
1948 Add(
"mailpost", 1, 0);
1949 Add(
"record", 1, 0);
1952 Add(
"wagon1", 1, 0);
1953 Add(
"wagon_big", 1, 0);
1954 Add(
"wagon_big2", 1, 0);
1955 Add(
"wagon_big3", 1, 0);
1956 Add(
"wagon_big4", 1, 0);
1957 Add(
"wagon_big5", 1, 0);
1958 Add(
"teleporter", 1, 0);
1959 Add(
"teleporter2", 1, 0);
1960 Add(
"recharger", 1, 0);
1961 Add(
"machine_gene2", 1, 0);
1978 Add(
"drawing_paper", 10, 0);
1979 Add(
"drawing_paper2", 10, 0);
1980 Add(
"stethoscope", 1, 0);
1981 Add(
"whip_love", 1, 0);
1982 Add(
"whip_interest", 1, 0);
1983 Add(
"syringe_blood", 20, 0);
1986 Add(
"chest_tax", 1, 0);
1992 Add(
"flyer", 1, 0).SetNum(99);
1997 bool num7 = owner.id ==
"big_sister";
2001 Add(
"littleball", 10, 0);
2012 for (
int num8 = 0; num8 < 20; num8++)
2022 for (
int num9 = 0; num9 < 10; num9++)
2030 for (
int num10 = 0; num10 < 30; num10++)
2036 Add(
"candle9", 1, -1);
2037 Add(
"candle9", 1, -1);
2038 Add(
"candle9", 1, -1);
2039 Add(
"candle8", 1, 0);
2040 Add(
"candle8b", 1, 0);
2041 Add(
"candle8c", 1, 0);
2048 Add(
"chest_tax", 1, 0);
2050 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
2053 Add(
"pillow_ehekatl", 1, 0);
2054 Add(
"grave_dagger1", 1, 0);
2055 Add(
"grave_dagger2", 1, 0);
2071 for (
int num6 = 0; num6 < 5; num6++)
2075 thing2.c_priceFix = 1000;
2081 NoRestockId(
"hammer_garokk", 3, 0);
2082 NoRestockId(
"sword_dragon", 1, 0);
2083 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
2084 NoRestockId(
"point_stick", 1, 0);
2085 Add(
"point_stick", 1, 0).SetReplica(on:
true);
2086 NoRestockId(
"blunt_bonehammer", 1, 0);
2087 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
2088 NoRestockId(
"pole_gunlance", 1, 0);
2089 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
2090 NoRestockId(
"sword_muramasa", 1, 0);
2091 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
2092 NoRestockId(
"sword_forgetmenot", 1, 0);
2093 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
2094 NoRestockId(
"dagger_fish", 1, 0);
2095 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
2096 NoRestockId(
"sword_zephir", 1, 0);
2097 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
2098 Add(
"bed_shiawase", 1, 0).SetReplica(on:
true);
2099 Add(
"ribbon", 1, 0);
2100 Add(
"helm_sage", 1, 0);
2101 NoRestockId(
"wear_swim_danger", 1, 0);
2102 NoRestockId(
"wear_swim_danger", 1, 1);
2103 Add(
"diary_sister", 1, 0);
2104 Add(
"diary_catsister", 1, 0);
2105 Add(
"diary_lady", 1, 0);
2106 Add(
"1165", 1, 0).SetNum(5);
2108 Add(
"1282", 1, 0).SetNum(5);
2109 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
2110 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
2111 Add(
"bill_tax", 1, 0).c_bill = 1;
2112 Add(
"bill_tax", 1, 0).c_bill = 1;
2113 Add(
"bill_tax", 1, 0).c_bill = 1;
2115 Add(
"container_magic", 1, 0);
2116 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
2117 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
2118 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
2119 Add(
"wrench_tent_elec", 1, 0);
2120 Add(
"wrench_tent_soil", 1, 0);
2121 Add(
"wrench_tent_seabed", 1, 0);
2122 Add(
"wrench_bed", 1, 0).SetNum(20);
2123 Add(
"wrench_storage", 1, 0).SetNum(10);
2124 Add(
"wrench_fridge", 1, 0).SetNum(1);
2125 Add(
"wrench_extend_v", 1, 0).SetNum(2);
2126 Add(
"wrench_extend_h", 1, 0).SetNum(2);
2131 if (!owner.
GetStr(
"merchant_override").IsEmpty())
2135 float num = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
2156 num = Mathf.Min(num, num2);
2157 for (
int num3 = 0; (float)num3 < num; num3++)
2165 Thing thing = CreateStock();
2170 bool tryStack =
true;
2175 t.AddThing(thing, tryStack);
2181 string str = owner.
GetStr(
"merchant_override");
2184 foreach (
Thing item3
in ModUtil.GenerateMerchantStock(owner, str))
2197 for (
int num13 = 0; num13 < array2.Length; num13++)
2199 if (array2[num13] == text)
2216 for (
int num18 = 1; num18 <= 25; num18++)
2224 int num19 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2227 Add(
"syringe_gene", num19, 0);
2228 Add(
"diary_little", 1, 0);
2232 Add(
"syringe_heaven", num19 / 5, 0);
2235 Add(
"medal", 10, 0);
2236 Add(
"ticket_fortune", 10, 0);
2240 Add(
"tool_talisman", 1, 0);
2251 Add(
"ecomark", 5, 0);
2252 Add(
"whip_egg", 1, 0);
2253 Add(
"helm_chef", 1, 0);
2254 Add(
"hammer_strip", 1, 0);
2255 Add(
"brush_strip", 1, 0);
2257 Add(
"plat", 100, 0);
2262 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2263 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2281 Add(
"holyFeather", 1, 0);
2290 Add(
"ticket_massage", 1, 0);
2291 Add(
"ticket_armpillow", 1, 0);
2292 Add(
"ticket_champagne", 1, 0);
2294 for (
int num16 = 0; num16 < 3; num16++)
2302 TreasureType.Map =>
"chest_treasure",
2303 TreasureType.BossNefia =>
"chest_boss",
2306 thing7.c_lockedHard =
true;
2307 thing7.c_lockLv = num17;
2308 thing7.c_priceAdd = 2000 + num17 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2309 thing7.c_revealLock =
true;
2322 for (
int num20 = 0; num20 < (EClass.debug.enable ? 3 : 3); num20++)
2366 Add(
"lockpick", 1, 0);
2369 Add(
"lockpick", 1, 0);
2375 thing11.c_idBacker = 0;
2379 if (thing11.
Num == 1)
2387 if (thing11.
IsFood && owner.
id ==
"rodwyn")
2395 thing11.noSell =
true;
2399 thing11.isStolen =
true;
2403 thing11.c_IDTState = 0;
2407 thing11.c_priceFix = -70;
2411 thing11.c_priceFix = 200;
2415 thing11.c_IDTState = 5;
2423 if (t.things.Count <= t.things.GridSize)
2427 int num21 = t.things.width * 10;
2428 if (t.things.Count > num21)
2430 int num22 = t.things.Count - num21;
2431 for (
int num23 = 0; num23 < num22; num23++)
2433 t.things.LastItem().Destroy();
2436 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2437 Thing Add(
string id2,
int a,
int idSkin)
2441 thing8.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing8.
source.skins.Length + 1) : idSkin);
2444 void AddAdvWeek(
int i)
2447 thing8.c_priceFix = -90;
2450 void AddCassette(
int idCas,
string idQuest,
int phase)
2461 void NoRestock(
Thing _t)
2463 string text2 = owner.
id;
2466 text2 = text2 +
"_skin" + _t.
idSkin;
2469 if (hashSet ==
null)
2471 hashSet =
new HashSet<string>();
2481 void NoRestockId(
string _id,
int num24,
int idSkin)
2484 thing8.idSkin = idSkin;
2500 return FromFilter(
"shop_generalExotic");
2504 return Create(
"wear_swim");
2508 return Create(
"panty");
2512 return Create(
"234");
2514 return FromFilter(
"shop_drink");
2516 return FromFilter(
"shop_furniture");
2518 return FromFilter(
"shop_book");
2520 return FromFilter(
"shop_magic");
2533 return Create(
"saddle");
2537 return Create(
"saddle_waist");
2542 Thing thing2 =
null;
2543 for (
int num = 0; num < 1000; num++)
2545 thing2 = FromFilter(
"shop_healer");
2548 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2555 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2561 else if (thing2.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2576 return Create(
"_milk");
2580 return Create(
"book_plan");
2582 return FromFilter(
"shop_weapon");
2586 return Create(
"mod_ranged");
2588 return FromFilter(
"shop_gun");
2607 return FromFilter(
"shop_blackmarket");
2610 return FromFilter(
"shop_drink");
2612 return FromFilter(
"shop_booze");
2614 return FromFilter(
"shop_fruit");
2618 return Create(
"bait");
2622 return Create(
"fishingRod");
2624 return FromFilter(
"shop_fish");
2628 return Create(
"seasoning");
2630 return FromFilter(
"shop_meat");
2634 return Create(
"dough");
2636 return FromFilter(
"shop_bread");
2640 return Create(
"dough");
2644 return Create(
"cream");
2646 return FromFilter(
"shop_sweet");
2650 return Create(
"seasoning");
2652 return Create(
"693");
2656 return Create(
"seasoning");
2658 return FromFilter(
"shop_food");
2660 return FromFilter(
"shop_drug");
2664 if (loytelMartLv >= 1)
2668 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2684 return Create(
"1165");
2690 switch ((from _s in row.
thing.ToCharArray()
2692 select _s).RandomItem())
2704 return FromFilter(
"shop_junk");
2708 return FromFilter(
"shop_junk");
2710 return FromFilter(
"shop_souvenir");
2716 return Create(
"firework_launcher");
2718 return Create(
"firework");
2722 if (IsFestival(
"olvina"))
2724 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2726 if (IsFestival(
"yowyn"))
2728 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2730 if (IsFestival(
"noyel"))
2732 return Create(
new string[13]
2734 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2735 "xmas_ball",
"xmas_ball",
"xmas_string"
2741 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2745 return FromFilter(
"shop_junk");
2747 return FromFilter(
"shop_souvenir");
2751 if (IsFestival(
"kapul"))
2753 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2755 if (IsFestival(
"yowyn"))
2757 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2759 if (IsFestival(
"noyel"))
2761 return Create(
new string[1] {
"1069" }.RandomItem());
2763 if (IsFestival(
"olvina"))
2765 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2770 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2772 return FromFilter(
"shop_lamp");
2776 return Create(
"lockpick");
2778 return FromFilter(
"shop_general");
2780 Thing Create(
string s)
2784 Thing FromFilter(
string s)
2788 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)
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)
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 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 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 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)