2using System.Collections.Generic;
163 public virtual bool CanStack => owner.category.maxStack > 1;
237 return owner.c_lockLv == 0;
323 return owner.rarity <
Rarity.Artifact;
505 return "switch_on_electricity";
519 return "torch_unlit";
521 return "switch_off_electricity";
737 Vector3 vector2 =
item.Position();
768 for (
int i = 0; i < 50; i++)
770 Point point = list.RandomItem();
771 if (point.
IsValid && (func ==
null || func(point)) && (accessChara ==
null || accessChara.HasAccess(point)))
791 Room room = center.cell.room;
812 if (!p.cell.HasBlock || p.cell.HasFence)
814 listRadiusPoints.Add(p.Copy());
819 listRadiusPoints.Add(p.Copy());
882 string @ref = row.GetTextArray(
"name2")[1];
883 string ref2 = row.GetTextArray(
"name2")[0];
886 cc.
Talk(
"offer", @ref, ref2);
908 cc.depression.Mod(100);
922 int num = ((thing ==
null) ? (cc.
Evalue(280) / 2 + 2) : (cc.
Evalue(280) + 10));
927 num2 = num / 4 * 3 - 1;
929 if (num <= num2 && cc.
IsPC)
932 cc.
Say(
"openLockFail2");
936 if (thing !=
null && !flag)
943 cc.
Say(
"lockpick_success", cc, owner);
944 int num3 = 100 + num2 * 10;
953 owner.c_lockedHard =
false;
954 owner.c_priceAdd = 0;
960 owner.isLostProperty =
false;
970 cc.
Say(
"openLockFail");
972 cc.
ModExp(280, (thing !=
null) ? 50 : 30);
973 if ((thing ==
null) | (
EClass.
rnd(2) == 0))
1043 if (c.
held != owner)
1062 if (CanUse(owner.
Chara))
1116 if (Electricity != 0)
1118 EClass._zone.dirtyElectricity =
true;
1119 if (Electricity > 0)
1121 EClass._zone.electricity += Electricity;
1131 OnInstall(byPlayer);
1136 if (Electricity != 0)
1140 Toggle(on:
false, silent:
true);
1142 EClass._zone.dirtyElectricity =
true;
1143 if (Electricity > 0)
1145 EClass._zone.electricity -= Electricity;
1168 Toggle(on:
false, silent:
true);
1170 else if (AutoToggle)
1178 Toggle(on, silent:
true);
1182 public virtual void Toggle(
bool on,
bool silent =
false)
1184 if (owner.
isOn == on)
1188 if (Electricity < 0)
1198 owner.
Say(
"notEnoughElectricity", owner);
1200 owner.
PlaySound(
"electricity_insufficient");
1204 EClass._zone.electricity += Electricity;
1208 EClass._zone.electricity -= Electricity;
1212 PlayToggleEffect(silent);
1219 bool isOn = owner.
isOn;
1232 owner.
Say(isOn ?
"close" :
"open",
EClass.
pc, owner);
1233 owner.
PlaySound(
"Material/leather_drop");
1245 owner.
Say(flag ?
"toggle_fire" :
"toggle_ele",
EClass.
pc, owner);
1277 Toggle(!owner.
isOn);
1284 Toggle(!owner.
isOn);
1299 p.
TrySetAct(flag ?
"ActExtinguishTorch" :
"ActToggleOff", delegate
1308 p.
TrySetAct(flag ?
"ActTorch" :
"ActToggleOn", delegate
1337 public bool IsFuelEnough(
int num = 1, List<Thing> excludes =
null,
bool tryRefuel =
true)
1349 TryRefuel(FuelCost * num - owner.
c_charges, excludes);
1351 return owner.c_charges >= FuelCost * num;
1356 return GetFuelValue(s) > 0;
1361 return GetFuelValue(t) > 0;
1370 return GetFuelValue(t.
id);
1377 if (
id ==
"battery")
1411 if (FindFuel(refuel:
false))
1413 FindFuel(refuel:
true);
1415 bool FindFuel(
bool refuel)
1421 if (IsFuel(t) && t.tier == 0 && (excludes ==
null || !excludes.Contains(t)))
1430 int num2 = Mathf.Min(
item.Num, Mathf.CeilToInt((
float)num / (float)GetFuelValue(
item)));
1431 num -= GetFuelValue(
item) * num2;
1434 Refuel(
item.Split(num2));
1467 t.SetActive(enable:
true);
1472 t.SetActive(enable:
true);
1477 t.SetActive(owner.
Num > 1);
1488 int rawDeadLine = 0;
1502 if (remainingHours > 0)
1504 return "nextRestock".lang(lang.lang(),
Date.
GetText(remainingHours) ??
"");
1516 return Emo2.restock;
1524 return Emo2.blessing;
1526 return Emo2.restock;
1545 owner.isRestocking =
true;
1557 Add(
"book_exp", 10, 0);
1562 if (c_copyContainer ==
null)
1574 thing2.isStolen =
false;
1575 thing2.isCopy =
true;
1576 thing2.c_priceFix = 0;
1586 num6 = (1000 + owner.c_invest * 100) / (thing2.GetPrice(
CurrencyType.Money, sell:
false,
PriceType.CopyShop) + 50);
1587 int[] array =
new int[3] { 704, 703, 702 };
1588 foreach (
int ele
in array)
1590 if (thing2.HasElement(ele))
1601 if (num6 > 1 && thing2.trait.CanStack)
1603 thing2.SetNum(num6);
1629 AddCassette(10,
null, 999);
1630 AddCassette(15,
null, 999);
1631 AddCassette(17,
null, 999);
1632 AddCassette(29,
null, 999);
1633 AddCassette(40,
null, 999);
1634 AddCassette(46,
null, 999);
1635 AddCassette(47,
null, 999);
1636 AddCassette(52,
null, 999);
1637 AddCassette(54,
null, 999);
1638 AddCassette(59,
null, 999);
1639 AddCassette(65,
null, 999);
1640 AddCassette(109,
"debt", 0);
1641 AddCassette(110,
"curry", 999);
1644 AddCassette(122,
null, 999);
1645 AddCassette(123,
null, 999);
1653 Add(
"deed_wedding", 1, 0);
1654 Add(
"deed_divorce", 1, 0);
1655 Add(
"deed_lostring", 1, 0);
1656 Add(
"license_illumination", 1, 0);
1657 Add(
"license_void", 1, 0);
1658 Add(
"license_adv", 1, 0);
1662 for (
int num9 = 0; num9 < 30; num9++)
1671 Add(
"tool_talisman", 1, 0);
1672 Add(
"camera", 1, 0);
1675 Add(
"unicorn_horn", 1, 0);
1676 Add(
"core_user", 1, 0);
1677 Add(
"generator_hamster1", 1, 0);
1678 Add(
"generator_hamster2", 1, 0);
1679 Add(
"generator_solar", 1, 0);
1680 Add(
"generator_wind", 1, 0);
1688 Add(
"censored_item", 1, 0);
1702 Add(
"hammer_garokk", 1, 0);
1706 Add(
"water_jure", 1, 0);
1712 string[] array2 =
new string[11]
1714 "stone_defense",
"1325",
"1326",
"1327",
"1328",
"1330",
"1331",
"1332",
"1333",
"1283",
1717 foreach (
string id2
in array2)
1721 Add(
"cloud", 99, 0);
1722 Add(
"scroll_alias", 99, 0);
1723 Add(
"scroll_biography", 99, 0);
1725 Add(
"statue_lulu", 1, 0);
1726 Add(
"statue_jure", 1, 0);
1727 Add(
"statue_ehe", 1, 0);
1737 for (
int num10 = 0; num10 <
EClass.
rnd(3) + 1; num10++)
1741 for (
int num11 = 0; num11 <
EClass.
rnd(3) + 1; num11++)
1748 Add(
"board_map", 1, 0);
1749 Add(
"board_build", 1, 0);
1750 Add(
"book_resident", 1, 0);
1751 Add(
"board_party", 1, 0);
1752 Add(
"board_party2", 1, 0);
1753 Add(
"book_roster", 1, 0);
1767 Add(
"board_home", 1, 0);
1768 Add(
"board_resident", 1, 0);
1773 Add(
"board_expedition", 1, 0);
1774 Add(
"mailpost", 1, 0);
1775 Add(
"record", 1, 0);
1778 Add(
"wagon1", 1, 0);
1779 Add(
"wagon_big", 1, 0);
1780 Add(
"wagon_big2", 1, 0);
1781 Add(
"wagon_big3", 1, 0);
1782 Add(
"wagon_big4", 1, 0);
1783 Add(
"wagon_big5", 1, 0);
1784 Add(
"teleporter", 1, 0);
1785 Add(
"teleporter2", 1, 0);
1786 Add(
"recharger", 1, 0);
1787 Add(
"machine_gene2", 1, 0);
1804 Add(
"drawing_paper", 10, 0);
1805 Add(
"drawing_paper2", 10, 0);
1806 Add(
"stethoscope", 1, 0);
1807 Add(
"whip_love", 1, 0);
1808 Add(
"whip_interest", 1, 0);
1809 Add(
"syringe_blood", 20, 0);
1812 Add(
"chest_tax", 1, 0);
1818 Add(
"flyer", 1, 0).SetNum(99);
1823 bool num7 = owner.id ==
"big_sister";
1827 Add(
"littleball", 10, 0);
1838 for (
int m = 0; m < 20; m++)
1848 for (
int n = 0; n < 10; n++)
1856 for (
int num8 = 0; num8 < 30; num8++)
1862 Add(
"candle9", 1, -1);
1863 Add(
"candle9", 1, -1);
1864 Add(
"candle9", 1, -1);
1865 Add(
"candle8", 1, 0);
1866 Add(
"candle8b", 1, 0);
1867 Add(
"candle8c", 1, 0);
1874 Add(
"chest_tax", 1, 0);
1876 Add(
"monsterball", 1, 0).SetNum(3).SetLv(10);
1879 Add(
"pillow_ehekatl", 1, 0);
1880 Add(
"grave_dagger1", 1, 0);
1881 Add(
"grave_dagger2", 1, 0);
1897 for (
int l = 0; l < 5; l++)
1901 thing3.c_priceFix = 1000;
1907 NoRestockId(
"hammer_garokk", 3);
1908 NoRestockId(
"sword_dragon", 1);
1909 Add(
"sword_dragon", 1, 0).SetReplica(on:
true);
1910 NoRestockId(
"point_stick", 1);
1911 Add(
"point_stick", 1, 0).SetReplica(on:
true);
1912 NoRestockId(
"blunt_bonehammer", 1);
1913 Add(
"blunt_bonehammer", 1, 0).SetReplica(on:
true);
1914 NoRestockId(
"pole_gunlance", 1);
1915 Add(
"pole_gunlance", 1, 0).SetReplica(on:
true);
1916 NoRestockId(
"sword_muramasa", 1);
1917 Add(
"sword_muramasa", 1, 0).SetReplica(on:
true);
1918 NoRestockId(
"sword_forgetmenot", 1);
1919 Add(
"sword_forgetmenot", 1, 0).SetReplica(on:
true);
1920 NoRestockId(
"dagger_fish", 1);
1921 Add(
"dagger_fish", 1, 0).SetReplica(on:
true);
1922 NoRestockId(
"sword_zephir", 1);
1923 Add(
"sword_zephir", 1, 0).SetReplica(on:
true);
1924 Add(
"ribbon", 1, 0);
1925 Add(
"helm_sage", 1, 0);
1926 Add(
"diary_sister", 1, 0);
1927 Add(
"diary_catsister", 1, 0);
1928 Add(
"diary_lady", 1, 0);
1929 Add(
"1165", 1, 0).SetNum(5);
1931 Add(
"1282", 1, 0).SetNum(5);
1932 Add(
"monsterball", 1, 0).SetNum(3).SetLv(20);
1933 Add(
"monsterball", 1, 0).SetNum(3).SetLv(40);
1934 Add(
"bill_tax", 1, 0).c_bill = 1;
1935 Add(
"bill_tax", 1, 0).c_bill = 1;
1936 Add(
"bill_tax", 1, 0).c_bill = 1;
1938 Add(
"container_magic", 1, 0);
1939 Add(
"container_magic", 1, 0).ChangeMaterial(
"iron").idSkin = 1;
1940 Add(
"container_magic", 1, 0).ChangeMaterial(
"bamboo").idSkin = 2;
1941 Add(
"container_magic", 1, 0).ChangeMaterial(
"feywood").idSkin = 3;
1942 Add(
"wrench_tent_elec", 1, 0);
1943 Add(
"wrench_tent_soil", 1, 0);
1944 Add(
"wrench_tent_seabed", 1, 0);
1945 Add(
"wrench_bed", 1, 0).SetNum(20);
1946 Add(
"wrench_storage", 1, 0).SetNum(10);
1947 Add(
"wrench_fridge", 1, 0).SetNum(1);
1948 Add(
"wrench_extend_v", 1, 0).SetNum(2);
1949 Add(
"wrench_extend_h", 1, 0).SetNum(2);
1954 float num2 = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
1975 num2 = Mathf.Min(num2, num3);
1976 for (
int j = 0; (float)j < num2; j++)
1984 Thing thing = CreateStock();
1989 bool tryStack =
true;
1994 t.AddThing(thing, tryStack);
2007 for (
int k = 0; k < array2.Length; k++)
2009 if (array2[k] ==
ShopType.ToString())
2026 for (
int num14 = 1; num14 <= 20; num14++)
2034 int num15 = (EClass.debug.enable ? 20 : (EClass._zone.development / 10));
2037 Add(
"syringe_gene", num15, 0);
2038 Add(
"diary_little", 1, 0);
2042 Add(
"syringe_heaven", num15 / 5, 0);
2045 Add(
"medal", 10, 0);
2046 Add(
"ticket_fortune", 10, 0);
2050 Add(
"tool_talisman", 1, 0);
2061 Add(
"ecomark", 5, 0);
2062 Add(
"whip_egg", 1, 0);
2063 Add(
"helm_chef", 1, 0);
2064 Add(
"hammer_strip", 1, 0);
2065 Add(
"brush_strip", 1, 0);
2067 Add(
"plat", 100, 0);
2072 Add(
"bullet", 1, 0).SetNum(300 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2073 Add(
"bullet_energy", 1, 0).SetNum(100 +
EClass.
rnd(100)).ChangeMaterial(
"iron");
2091 Add(
"holyFeather", 1, 0);
2100 Add(
"ticket_massage", 1, 0);
2101 Add(
"ticket_armpillow", 1, 0);
2102 Add(
"ticket_champagne", 1, 0);
2104 for (
int num12 = 0; num12 < 3; num12++)
2112 TreasureType.Map =>
"chest_treasure",
2113 TreasureType.BossNefia =>
"chest_boss",
2116 thing6.c_lockedHard =
true;
2117 thing6.c_lockLv = num13;
2118 thing6.c_priceAdd = 2000 + num13 * 250 * ((treasureType ==
TreasureType.RandomChest) ? 1 : 5);
2119 thing6.c_revealLock =
true;
2132 for (
int num16 = 0; num16 < (EClass.debug.enable ? 3 : 3); num16++)
2176 Add(
"lockpick", 1, 0);
2179 Add(
"lockpick", 1, 0);
2185 thing11.c_idBacker = 0;
2189 if (thing11.
Num == 1)
2197 if (thing11.
IsFood && owner.
id ==
"rodwyn")
2205 thing11.noSell =
true;
2209 thing11.isStolen =
true;
2213 thing11.c_IDTState = 0;
2217 thing11.c_priceFix = -70;
2221 thing11.c_priceFix = 200;
2225 thing11.c_IDTState = 5;
2233 if (t.things.Count <= t.things.GridSize)
2237 int num17 = t.things.width * 10;
2238 if (t.things.Count > num17)
2240 int num18 = t.things.Count - num17;
2241 for (
int num19 = 0; num19 < num18; num19++)
2243 t.things.LastItem().Destroy();
2246 t.things.ChangeSize(t.things.width, Mathf.Min(t.things.Count / t.things.width + 1, 10));
2247 Thing Add(
string id,
int a,
int idSkin)
2251 thing8.idSkin = ((idSkin == -1) ?
EClass.
rnd(thing8.
source.skins.Length + 1) : idSkin);
2254 void AddAdvWeek(
int i)
2257 thing7.c_priceFix = -90;
2260 void AddCassette(
int idCas,
string idQuest,
int phase)
2271 void NoRestock(
Thing _t)
2274 if (hashSet ==
null)
2276 hashSet =
new HashSet<string>();
2286 void NoRestockId(
string _id,
int num)
2303 return FromFilter(
"shop_generalExotic");
2307 return Create(
"panty");
2311 return Create(
"234");
2313 return FromFilter(
"shop_drink");
2315 return FromFilter(
"shop_furniture");
2317 return FromFilter(
"shop_book");
2319 return FromFilter(
"shop_magic");
2331 Thing thing3 =
null;
2332 for (
int i = 0; i < 1000; i++)
2334 thing3 = FromFilter(
"shop_healer");
2337 if (!(traitScroll.source.aliasParent !=
"WIL") && !(traitScroll.source.categorySub ==
"attack"))
2344 if (!(traitPotionRandom.source.aliasParent !=
"WIL") && !(traitPotionRandom.source.categorySub ==
"attack"))
2350 else if (thing3.
trait is
TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent !=
"WIL") && !(traitRodRandom.source.categorySub ==
"attack"))
2365 return Create(
"milk");
2369 return Create(
"book_plan");
2371 return FromFilter(
"shop_weapon");
2375 return Create(
"mod_ranged");
2377 return FromFilter(
"shop_gun");
2396 return FromFilter(
"shop_blackmarket");
2399 return FromFilter(
"shop_drink");
2401 return FromFilter(
"shop_booze");
2403 return FromFilter(
"shop_fruit");
2407 return Create(
"bait");
2411 return Create(
"fishingRod");
2413 return FromFilter(
"shop_fish");
2417 return Create(
"seasoning");
2419 return FromFilter(
"shop_meat");
2423 return Create(
"dough");
2425 return FromFilter(
"shop_bread");
2429 return Create(
"dough");
2431 return FromFilter(
"shop_sweet");
2435 return Create(
"seasoning");
2437 return Create(
"693");
2441 return Create(
"seasoning");
2443 return FromFilter(
"shop_food");
2445 return FromFilter(
"shop_drug");
2449 if (loytelMartLv >= 1)
2453 return Create(
"monsterball").SetLv(40 +
EClass.
rnd(ShopLv)).Thing;
2469 return Create(
"1165");
2475 switch ((from _s in row.
thing.ToCharArray()
2477 select _s).RandomItem())
2489 return FromFilter(
"shop_junk");
2493 return FromFilter(
"shop_junk");
2495 return FromFilter(
"shop_souvenir");
2501 return Create(
"firework_launcher");
2503 return Create(
"firework");
2507 if (IsFestival(
"olvina"))
2509 return Create(
new string[4] {
"1125",
"1126",
"pillow_truth",
"1230" }.RandomItem());
2511 if (IsFestival(
"yowyn"))
2513 return Create(
new string[3] {
"hat_mushroom",
"hat_witch",
"hat_kumiromi" }.RandomItem());
2515 if (IsFestival(
"noyel"))
2517 return Create(
new string[13]
2519 "1127",
"1128",
"xmas_sled",
"xmas_bigbag",
"xmas_bigbox",
"xmas_blackcat",
"xmas_blackcat",
"xmas_jure",
"xmas_crown",
"xmas_ball",
2520 "xmas_ball",
"xmas_ball",
"xmas_string"
2526 return Create(
new string[4] {
"1081",
"1082",
"1083",
"1084" }.RandomItem());
2530 return FromFilter(
"shop_junk");
2532 return FromFilter(
"shop_souvenir");
2536 if (IsFestival(
"kapul"))
2538 return Create(
new string[6] {
"999",
"1000",
"1001",
"1002",
"1003",
"1004" }.RandomItem());
2540 if (IsFestival(
"yowyn"))
2542 return Create(
new string[2] {
"1072",
"1073" }.RandomItem());
2544 if (IsFestival(
"noyel"))
2546 return Create(
new string[1] {
"1069" }.RandomItem());
2548 if (IsFestival(
"olvina"))
2550 return Create(
new string[2] {
"1070",
"1071" }.RandomItem());
2555 return Create(
new string[4] {
"953",
"954",
"955",
"956" }.RandomItem());
2557 return FromFilter(
"shop_lamp");
2561 return Create(
"lockpick");
2563 return FromFilter(
"shop_general");
2565 Thing Create(
string s)
2569 Thing FromFilter(
string s)
2573 static bool IsFestival(
string id)
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
int GetInt(int id, int? defaultInt=null)
void SetInt(int id, int value=0)
static void SetRarity(Rarity q=Rarity.Normal)
static void SetNormalRarity(bool fixedMat=false)
void PlayAnime(AnimeID id, bool force)
void RemoveExtra(string id)
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
ElementContainerCard elements
SourceMaterial.Row material
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Card MakeRefFrom(string id)
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Thing AddThing(string id, int lv=-1)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
void ModCharge(int a, bool destroy=false)
void PlaySoundDrop(bool spatial=true)
virtual CardRow sourceCard
void ModExp(string alias, int a)
void PlayAnime(AnimeID id, bool force=false)
SourceCategory.Row category
bool HasElement(int ele, bool includeNagative=false)
void Say(string lang, string ref1=null, string ref2=null)
bool TryHoldCard(Card t, int num=-1, bool pickHeld=false)
static Thing MakeLoveLunch(Chara c)
static void MakeDish(Thing food, int lv, Chara crafter=null, int seed=-1)
static Thing GenerateGene(Chara c, Type? type=null)
int GetRaw(int offsetHours=0)
string GetText(TextFormat format)
int GetRemainingHours(int rawDeadLine)
static SourceManager sources
static int rndSeed(int a, int seed)
static BaseGameScreen screen
static int rndHalf(int a)
static GameSetting setting
Element SetBase(string alias, int v, int potential=0)
override bool IsCurrentZone
override bool IsCurrentZone
static GuildMerchant Merchant
static LayerDragGrid Create(InvOwnerDraglet owner, bool refuelFromLayerDragGrid=false)
static bool IsVisible(Point p1, Point p2, Action< Point, bool > _onVisit=null)
static SourceMaterial.Row GetRandomMaterial(int lv, string group=null, bool tryLevelMatTier=false)
static SourceMaterial.Row GetRandomMaterialFromCategory(int lv, string cat, SourceMaterial.Row fallback)
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
void Add(Point point, float tile=0f, float color=0f)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Dictionary< string, HashSet< string > > noRestocks
ref Vector3 Position(int height)
List< Card > ListCards(bool includeMasked=false)
void RefreshNeighborTiles()
bool IsCompleted(string id)
static void SetBaseSeed(int a=-1)
static void SetSeed(int a=-1)
static List< RecipeSource > list
static Recipe Create(RecipeSource _source, int idMat=-1, Thing ing=null)
string GetText(string id="name", bool returnNull=false)
static SpawnList Get(string id, string parent=null, CardFilter filter=null)
CardRow Select(int lv=-1, int levelRange=-1)
static void GetAchievement(ID_Achievement id)
void DestroyAll(Func< Thing, bool > funcExclude=null)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
static Thing CreateRune(int ele, int v, bool free=false)
static Thing CreatePotion(int ele, int num=1)
static Thing CreateFromFilter(string id, int lv=-1)
static Thing CreateMap(string idSource=null, int lv=-1)
static Thing CreatePerfume(int ele, int num=1)
static Thing CreateRedBook(string id, int num=1)
static void CreateTreasureContent(Thing t, int lv, TreasureType type, bool clearContent)
static Thing CreateCassette(int id)
static Thing CreateSpellbook(string alias, int num=1)
static Thing CreatePlan(int ele)
static Thing CreateRecipe(string id)
static Thing CreateSkillbook(int ele, int num=1)
static Thing CreateFromCategory(string idCat, int lv=-1)
static Thing CreateScroll(int ele, int num=1)
static Thing CreateRod(int ele, int charge=-1)
static Thing Create(string id, int idMat=-1, int lv=-1)
virtual bool IsBlockSight
static Thing MakeRandomSeed(bool enc=false)
static void LevelSeed(Thing t, SourceObj.Row obj, int num)
static Thing MakeSeed(string id, PlantData plant=null)
static void SetZone(Zone zone, Thing t)
virtual string LangBarter
virtual void OnImportMap()
virtual bool RequireFullStackCheck
virtual bool OnUse(Chara c, Card tg)
virtual bool CanExtendBuild
virtual TileMode tileMode
void OfferProcess(Chara cc)
virtual bool IsBlockSight
virtual bool HoldAsDefaultInteraction
virtual int GetActDuration(Chara c)
virtual bool CanBeAttacked
virtual bool CanBeHallucinated
virtual void SetMainText(UIText t, bool hotitem)
virtual bool CanUse(Chara c)
virtual bool ShouldRefreshTile
virtual bool ShowChildrenNumber
virtual List< Point > ListPoints(Point center=null, bool onlyPassable=true)
virtual CopyShopType CopyShop
virtual void OnChangePlaceState(PlaceState state)
virtual RenderData GetRenderData()
virtual Recipe GetRecipe()
virtual void OnSetCardGrid(ButtonGrid b)
virtual string IDInvStyle
virtual string IdSoundToggleOff
virtual HotItem GetHotItem()
int GetSortVal(UIList.SortMode m)
virtual bool Contains(RecipeSource r)
virtual void OnEquip(Chara c, bool onSetOwner)
virtual void OnTickHeld()
virtual void WriteNote(UINote n, bool identified)
int GetParamInt(int i, int def)
virtual void OnSteppedOut(Chara c)
virtual bool TryProgress(AIProgress p)
virtual bool CanBeDisassembled
virtual int OriginalElectricity
virtual void OnRead(Chara c)
virtual bool IgnoreLastStackHeight
Point GetRandomPoint(Func< Point, bool > func=null, Chara accessChara=null)
virtual void OnInstall(bool byPlayer)
virtual bool CanChangeHeight
virtual void TrySetAct(ActPlan p)
virtual bool CanSearchContent
virtual bool CanChildDecay(Card c)
virtual void TrySetHeldAct(ActPlan p)
virtual string IdSoundToggleOn
virtual void OnThrowGround(Chara c, Point p)
virtual bool CanStackTo(Thing to)
virtual string ReqHarvest
virtual bool IgnoreOnSteppedWhenMoving
virtual bool CanBeDestroyed
virtual bool CanRead(Chara c)
virtual bool AlwaysHideOnLowWall
virtual bool CanCook(Card c)
virtual string IdNoRestock
virtual bool CanBuildInTown
virtual void SetOwner(Card _owner)
virtual bool OnChildDecay(Card c, bool firstDecay)
void OnBarter(bool reroll=false)
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)
virtual bool CanEat(Chara c)
virtual Recipe GetBuildModeRecipe()
virtual int CostRerollShop
virtual void OnSimulateHour(VirtualDate date)
int GetFuelValue(Thing t)
virtual bool OnUse(Chara c, Point p)
virtual bool IsThrowMainAction
virtual bool InvertHeldSprite
virtual bool CanBeHeldAsFurniture
string TextNextRestockPet
virtual bool IsChangeFloorHeight
virtual void OnStepped(Chara c)
virtual bool CanBeTeleported
virtual string GetHoverText()
virtual void RefreshRenderer()
virtual bool CanUse(Chara c, Point p)
virtual bool CanOffer(Card tg)
virtual bool DisableAutoCombat
virtual void OnCreate(int lv)
virtual ? Color ColorExtra
virtual void 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 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 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)