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)))
876 Room room = center.cell.room;
897 if (!p.cell.HasBlock || p.cell.HasFence)
899 listRadiusPoints.Add(p.Copy());
904 listRadiusPoints.Add(p.Copy());
967 string @ref = row.GetTextArray(
"name2")[1];
968 string ref2 = row.GetTextArray(
"name2")[0];
971 cc.
Talk(
"offer", @ref, ref2);
993 cc.depression.Mod(100);
1007 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
1012 num2 = num / 4 * 3 - 1;
1014 if (num <= num2 && cc.
IsPC)
1017 cc.
Say(
"openLockFail2");
1021 if (thing !=
null && !flag)
1028 cc.
Say(
"lockpick_success", cc, owner);
1029 int num3 = 100 + num2 * 10;
1041 cc.
Say(
"openLockFail");
1043 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
1044 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
1065 int a2 = Mathf.Clamp(20 *
tool.material.hardness /
material.hardness, 10, 150);
1067 int num = (int)Mathf.Clamp(20L * (
long)(owner.c_lockLv + 20) / cc.
STR, 5f, 50f);
1074 DamageRandomProperty(cc);
1078 cc.
Say(
"pry_success", cc, owner);
1110 else if (thing.
Num > 1)
1118 cc.
Say(
"pry_damage", cc, thing);
1127 owner.c_lockedHard =
false;
1128 owner.c_priceAdd = 0;
1134 owner.isLostProperty =
false;
1204 if (c.
held != owner)
1223 if (CanUse(owner.
Chara))
1277 if (Electricity != 0)
1279 EClass._zone.dirtyElectricity =
true;
1280 if (Electricity > 0)
1282 EClass._zone.electricity += Electricity;
1292 OnInstall(byPlayer);
1297 if (Electricity != 0)
1301 Toggle(on:
false, silent:
true);
1303 EClass._zone.dirtyElectricity =
true;
1304 if (Electricity > 0)
1306 EClass._zone.electricity -= Electricity;
1329 Toggle(on:
false, silent:
true);
1331 else if (AutoToggle)
1339 Toggle(on, silent:
true);
1343 public virtual void Toggle(
bool on,
bool silent =
false)
1345 if (owner.
isOn == on)
1349 if (Electricity < 0)
1359 owner.
Say(
"notEnoughElectricity", owner);
1361 owner.
PlaySound(
"electricity_insufficient");
1365 EClass._zone.electricity += Electricity;
1369 EClass._zone.electricity -= Electricity;
1373 PlayToggleEffect(silent);
1380 bool isOn = owner.
isOn;
1393 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1394 owner.
PlaySound(
"Material/leather_drop");
1406 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1438 Toggle(!owner.
isOn);
1445 Toggle(!owner.
isOn);
1460 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1469 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1498 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1510 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1512 return owner.c_charges >= FuelCost * num;
1517 return GetFuelValue(s) > 0;
1522 return GetFuelValue(t) > 0;
1531 return GetFuelValue(t.
id);
1538 if (
id ==
"battery")
1572 if (FindFuel(refuel:
false))
1574 FindFuel(refuel:
true);
1576 bool FindFuel(
bool refuel)
1582 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1591 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1592 num -= GetFuelValue(
item) * num2;
1595 Refuel(
item.Split(num2));
1628 t.SetActive(enable:
true);
1633 t.SetActive(enable:
true);
1638 t.SetActive(owner.
Num > 1);
1649 int rawDeadLine = 0;
1663 if (remainingHours > 0)
1665 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1677 return Emo2.restock;
1685 return Emo2.blessing;
1687 return Emo2.restock;
1706 owner.isRestocking =
true;
1718 Add(
"book_exp", 10, 0);
1723 if (c_copyContainer ==
null)
1735 thing6.isStolen =
false;
1736 thing6.isCopy =
true;
1737 thing6.c_priceFix = 0;
1747 num8 = (1000 + owner.c_invest * 100) / (thing6.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1748 int[] array =
new int[3] { 704, 703, 702 };
1749 foreach (
int ele
in array)
1751 if (thing6.HasElement(ele))
1762 if (num8 > 1 && thing6.trait.CanStack)
1764 thing6.SetNum(num8);
1790 AddCassette(10,
null, 999);
1791 AddCassette(15,
null, 999);
1792 AddCassette(17,
null, 999);
1793 AddCassette(29,
null, 999);
1794 AddCassette(40,
null, 999);
1795 AddCassette(46,
null, 999);
1796 AddCassette(47,
null, 999);
1797 AddCassette(52,
null, 999);
1798 AddCassette(54,
null, 999);
1799 AddCassette(59,
null, 999);
1800 AddCassette(65,
null, 999);
1801 AddCassette(109,
"debt", 0);
1802 AddCassette(110,
"curry", 999);
1805 AddCassette(122,
null, 999);
1806 AddCassette(123,
null, 999);
1814 Add(
"deed_wedding", 1, 0);
1815 Add(
"deed_divorce", 1, 0);
1816 Add(
"deed_lostring", 1, 0);
1817 Add(
"license_illumination", 1, 0);
1818 Add(
"license_void", 1, 0);
1819 Add(
"license_adv", 1, 0);
1823 for (
int k = 0; k < 30; k++)
1832 Add(
"tool_talisman", 1, 0);
1833 Add(
"camera", 1, 0);
1836 Add(
"unicorn_horn", 1, 0);
1837 Add(
"core_user", 1, 0);
1838 Add(
"generator_hamster1", 1, 0);
1839 Add(
"generator_hamster2", 1, 0);
1840 Add(
"generator_solar", 1, 0);
1841 Add(
"generator_wind", 1, 0);
1849 Add(
"censored_item", 1, 0);
1863 Thing thing5 = Add(
"scrubber", 1, 0);
1864 thing5.rarity =
Rarity.Legendary;
1869 Add(
"hammer_garokk", 1, 0);
1873 Add(
"water_jure", 1, 0);
1879 string[] array2 =
new string[11]
1881 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1884 foreach (
string id2
in array2)
1888 Add(
"cloud", 99, 0);
1889 Add(
"scroll_alias", 99, 0);
1890 Add(
"scroll_biography", 99, 0);
1892 Add(
"statue_lulu", 1, 0);
1893 Add(
"statue_jure", 1, 0);
1894 Add(
"statue_ehe", 1, 0);
1904 for (
int num10 = 0; num10 <
EClass.
rnd(3) + 1; num10++)
1908 for (
int num11 = 0; num11 <
EClass.
rnd(3) + 1; num11++)
1915 Add(
"board_map", 1, 0);
1916 Add(
"board_build", 1, 0);
1917 Add(
"book_resident", 1, 0);
1918 Add(
"board_party", 1, 0);
1919 Add(
"board_party2", 1, 0);
1920 Add(
"book_roster", 1, 0);
1934 Add(
"board_home", 1, 0);
1935 Add(
"board_resident", 1, 0);
1940 Add(
"board_expedition", 1, 0);
1941 Add(
"mailpost", 1, 0);
1942 Add(
"record", 1, 0);
1945 Add(
"wagon1", 1, 0);
1946 Add(
"wagon_big", 1, 0);
1947 Add(
"wagon_big2", 1, 0);
1948 Add(
"wagon_big3", 1, 0);
1949 Add(
"wagon_big4", 1, 0);
1950 Add(
"wagon_big5", 1, 0);
1951 Add(
"teleporter", 1, 0);
1952 Add(
"teleporter2", 1, 0);
1953 Add(
"recharger", 1, 0);
1954 Add(
"machine_gene2", 1, 0);
1971 Add(
"drawing_paper", 10, 0);
1972 Add(
"drawing_paper2", 10, 0);
1973 Add(
"stethoscope", 1, 0);
1974 Add(
"whip_love", 1, 0);
1975 Add(
"whip_interest", 1, 0);
1976 Add(
"syringe_blood", 20, 0);
1979 Add(
"chest_tax", 1, 0);
1985 Add(
"flyer", 1, 0).SetNum(99);
1990 bool num5 = owner.id ==
"big_sister";
1994 Add(
"littleball", 10, 0);
2005 for (
int m = 0; m < 20; m++)
2015 for (
int n = 0; n < 10; n++)
2023 for (
int num6 = 0; num6 < 30; num6++)
2029 Add(
"candle9", 1, -1);
2030 Add(
"candle9", 1, -1);
2031 Add(
"candle9", 1, -1);
2032 Add(
"candle8", 1, 0);
2033 Add(
"candle8b", 1, 0);
2034 Add(
"candle8c", 1, 0);
2041 Add(
"chest_tax", 1, 0);
2043 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
2046 Add(
"pillow_ehekatl", 1, 0);
2047 Add(
"grave_dagger1", 1, 0);
2048 Add(
"grave_dagger2", 1, 0);
2064 for (
int l = 0; l < 5; l++)
2068 thing2.c_priceFix = 1000;
2074 NoRestockId(
"hammer_garokk", 3, 0);
2075 NoRestockId(
"sword_dragon", 1, 0);
2076 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
2077 NoRestockId(
"point_stick", 1, 0);
2078 Add(
"point_stick", 1, 0).SetReplica(on:
true);
2079 NoRestockId(
"blunt_bonehammer", 1, 0);
2080 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
2081 NoRestockId(
"pole_gunlance", 1, 0);
2082 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
2083 NoRestockId(
"sword_muramasa", 1, 0);
2084 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
2085 NoRestockId(
"sword_forgetmenot", 1, 0);
2086 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
2087 NoRestockId(
"dagger_fish", 1, 0);
2088 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
2089 NoRestockId(
"sword_zephir", 1, 0);
2090 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
2091 Add(
"ribbon", 1, 0);
2092 Add(
"helm_sage", 1, 0);
2093 NoRestockId(
"wear_swim_danger", 1, 0);
2094 NoRestockId(
"wear_swim_danger", 1, 1);
2095 Add(
"diary_sister", 1, 0);
2096 Add(
"diary_catsister", 1, 0);
2097 Add(
"diary_lady", 1, 0);
2098 Add(
"1165", 1, 0).SetNum(5);
2100 Add(
"1282", 1, 0).SetNum(5);
2101 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
2102 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
2103 Add(
"bill_tax", 1, 0).c_bill = 1;
2104 Add(
"bill_tax", 1, 0).c_bill = 1;
2105 Add(
"bill_tax", 1, 0).c_bill = 1;
2107 Add(
"container_magic", 1, 0);
2108 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
2109 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
2110 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
2111 Add(
"wrench_tent_elec", 1, 0);
2112 Add(
"wrench_tent_soil", 1, 0);
2113 Add(
"wrench_tent_seabed", 1, 0);
2114 Add(
"wrench_bed", 1, 0).SetNum(20);
2115 Add(
"wrench_storage", 1, 0).SetNum(10);
2116 Add(
"wrench_fridge", 1, 0).SetNum(1);
2117 Add(
"wrench_extend_v", 1, 0).SetNum(2);
2118 Add(
"wrench_extend_h", 1, 0).SetNum(2);
2123 if (!owner.
GetStr(
"merchant_override").IsEmpty())
2127 float num2 = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
2148 num2 = Mathf.Min(num2, num3);
2149 for (
int j = 0; (float)j < num2; j++)
2157 Thing thing = CreateStock();
2162 bool tryStack =
true;
2167 t.AddThing(thing, tryStack);
2173 string str = owner.
GetStr(
"merchant_override");
2176 foreach (
Thing item3
in ModUtil.GenerateMerchantStock(owner, str))
2189 for (
int num9 = 0; num9 < array2.Length; num9++)
2191 if (array2[num9] == text)
2208 for (
int num14 = 1; num14 <= 22; num14++)
2216 int num15 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2219 Add(
"syringe_gene", num15, 0);
2220 Add(
"diary_little", 1, 0);
2224 Add(
"syringe_heaven", num15 / 5, 0);
2227 Add(
"medal", 10, 0);
2228 Add(
"ticket_fortune", 10, 0);
2232 Add(
"tool_talisman", 1, 0);
2243 Add(
"ecomark", 5, 0);
2244 Add(
"whip_egg", 1, 0);
2245 Add(
"helm_chef", 1, 0);
2246 Add(
"hammer_strip", 1, 0);
2247 Add(
"brush_strip", 1, 0);
2249 Add(
"plat", 100, 0);
2254 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2255 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2273 Add(
"holyFeather", 1, 0);
2282 Add(
"ticket_massage", 1, 0);
2283 Add(
"ticket_armpillow", 1, 0);
2284 Add(
"ticket_champagne", 1, 0);
2286 for (
int num12 = 0; num12 < 3; num12++)
2294 TreasureType.Map =>
"chest_treasure",
2295 TreasureType.BossNefia =>
"chest_boss",
2298 thing7.c_lockedHard =
true;
2299 thing7.c_lockLv = num13;
2300 thing7.c_priceAdd = 2000 + num13 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2301 thing7.c_revealLock =
true;
2314 for (
int num16 = 0; num16 < (EClass.debug.enable ? 3 : 3); num16++)
2358 Add(
"lockpick", 1, 0);
2361 Add(
"lockpick", 1, 0);
2367 thing13.c_idBacker = 0;
2371 if (thing13.
Num == 1)
2379 if (thing13.
IsFood && owner.
id ==
"rodwyn")
2387 thing13.noSell =
true;
2391 thing13.isStolen =
true;
2395 thing13.c_IDTState = 0;
2399 thing13.c_priceFix = -70;
2403 thing13.c_priceFix = 200;
2407 thing13.c_IDTState = 5;
2415 if (t.things.Count <= t.things.GridSize)
2419 int num17 = t.things.width * 10;
2420 if (t.things.Count > num17)
2422 int num18 = t.things.Count - num17;
2423 for (
int num19 = 0; num19 < num18; num19++)
2425 t.things.LastItem().Destroy();
2428 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2429 Thing Add(
string id,
int a,
int idSkin)
2433 thing10.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing10.
source.skins.Length + 1) : idSkin);
2436 void AddAdvWeek(
int i)
2439 thing8.c_priceFix = -90;
2442 void AddCassette(
int idCas,
string idQuest,
int phase)
2453 void NoRestock(
Thing _t)
2455 string text2 = owner.
id;
2458 text2 = text2 +
"_skin" + _t.
idSkin;
2461 if (hashSet ==
null)
2463 hashSet =
new HashSet<string>();
2473 void NoRestockId(
string _id,
int num,
int idSkin)
2476 thing9.idSkin = idSkin;
2492 return FromFilter(
"shop_generalExotic");
2496 return Create(
"wear_swim");
2500 return Create(
"panty");
2504 return Create(
"234");
2506 return FromFilter(
"shop_drink");
2508 return FromFilter(
"shop_furniture");
2510 return FromFilter(
"shop_book");
2512 return FromFilter(
"shop_magic");
2525 return Create(
"saddle");
2529 return Create(
"saddle_waist");
2531 return Create(
"pasture");
2534 Thing thing2 =
null;
2535 for (
int i = 0; i < 1000; i++)
2537 thing2 = FromFilter(
"shop_healer");
2540 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2547 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2553 else if (thing2.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2568 return Create(
"_milk");
2572 return Create(
"book_plan");
2574 return FromFilter(
"shop_weapon");
2578 return Create(
"mod_ranged");
2580 return FromFilter(
"shop_gun");
2599 return FromFilter(
"shop_blackmarket");
2602 return FromFilter(
"shop_drink");
2604 return FromFilter(
"shop_booze");
2606 return FromFilter(
"shop_fruit");
2610 return Create(
"bait");
2614 return Create(
"fishingRod");
2616 return FromFilter(
"shop_fish");
2620 return Create(
"seasoning");
2622 return FromFilter(
"shop_meat");
2626 return Create(
"dough");
2628 return FromFilter(
"shop_bread");
2632 return Create(
"dough");
2636 return Create(
"cream");
2638 return FromFilter(
"shop_sweet");
2642 return Create(
"seasoning");
2644 return Create(
"693");
2648 return Create(
"seasoning");
2650 return FromFilter(
"shop_food");
2652 return FromFilter(
"shop_drug");
2656 if (loytelMartLv >= 1)
2660 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2676 return Create(
"1165");
2682 switch ((from _s in row.
thing.ToCharArray()
2684 select _s).RandomItem())
2696 return FromFilter(
"shop_junk");
2700 return FromFilter(
"shop_junk");
2702 return FromFilter(
"shop_souvenir");
2708 return Create(
"firework_launcher");
2710 return Create(
"firework");
2714 if (IsFestival(
"olvina"))
2716 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2718 if (IsFestival(
"yowyn"))
2720 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2722 if (IsFestival(
"noyel"))
2724 return Create(
new string[13]
2726 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2727 "xmas_ball",
"xmas_ball",
"xmas_string"
2733 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2737 return FromFilter(
"shop_junk");
2739 return FromFilter(
"shop_souvenir");
2743 if (IsFestival(
"kapul"))
2745 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2747 if (IsFestival(
"yowyn"))
2749 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2751 if (IsFestival(
"noyel"))
2753 return Create(
new string[1] {
"1069" }.RandomItem());
2755 if (IsFestival(
"olvina"))
2757 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2762 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2764 return FromFilter(
"shop_lamp");
2768 return Create(
"lockpick");
2770 return FromFilter(
"shop_general");
2772 Thing Create(
string s)
2776 Thing FromFilter(
string s)
2780 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 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 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 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)