EA 23.49 Nightly
December 5, 2024
13 files modified. 2 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Point (2)
public bool IsInSpot<T>() where T : TraitSpot
public bool IsInSpot<T>() where T : Trait
public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false)
public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false, int maxRange = 30)
BaseListPeople
@@ -372,9 +372,9 @@ public override void OnClick(Chara c, ItemGeneral i)
SE.Click();
}
});
uIContextMenu.AddButton("addToReserve", delegate
uIContextMenu.AddButton("addToReserve".lang() + " (" + EClass.Home.listReserve.Count + "/" + EClass.Home.GetMaxReserve() + ")", delegate // [!code ++]
{
if (EClass.Home.listReserve.Count >= EClass.Home.maxReserve)
if (EClass.Home.listReserve.Count >= EClass.Home.GetMaxReserve())
{
SE.Beep();
Msg.Say("reserveLimit");
ConSleep
@@ -86,24 +86,28 @@ public override void Tick()
}
base.value = 1;
slept = true;
foreach (Chara chara in EClass._map.charas)
if (!EClass.pc.pos.IsInSpot<TraitPillowStrange>())
{
if (chara.host != null || chara.noMove || chara.conSuspend != null || chara.isRestrained || chara.IsPC)
foreach (Chara chara in EClass._map.charas)
{
continue;
}
bool flag = chara.GetBool(123);
if (!flag && chara.IsPCFaction && chara.race.tag.Contains("sleepBeside") && EClass.rnd(5) == 0)
{
flag = true;
}
if (flag)
{
chara.MoveImmediate(EClass.pc.pos);
chara.Say("sleep_beside", chara, EClass.pc);
if (!chara.HasCondition<ConSleep>())
if (chara.host != null || chara.noMove || chara.conSuspend != null || chara.isRestrained || chara.IsPC)
{
continue;
}
bool flag = chara.GetBool(123);
if (!flag && chara.IsPCFaction && chara.race.tag.Contains("sleepBeside") && EClass.rnd(5) == 0)
{
flag = true;
}
if (flag)
{
chara.AddCondition<ConSleep>(20 + EClass.rnd(25), force: true);
chara.MoveImmediate(EClass.pc.pos);
chara.SetDir(chara.IsPCC ? EClass.pc.dir : 0);
chara.Say("sleep_beside", chara, EClass.pc);
if (!chara.HasCondition<ConSleep>())
{
chara.AddCondition<ConSleep>(20 + EClass.rnd(25), force: true);
}
}
}
}
@@ -147,7 +151,7 @@ public override void Tick()
public static void SuccubusVisit(Chara tg)
{
if (tg.bio.IsUnderAge)
if (tg.pos.IsInSpot<TraitPillowStrange>())
{
return;
}
CoreDebug
@@ -930,38 +930,16 @@ public void UpdateInput()
}
if (Input.GetKeyDown(KeyCode.F3))
{
for (int i = 0; i < 10; i++)
EClass.pc.pos.ForeachNearestPoint(delegate(Point p)
{
Thing thing = ThingGen.Create("egg_fertilized");
thing.TryMakeRandomItem(40);
thing.SetEncLv(200);
EClass.pc.Pick(thing);
}
foreach (Chara deadChara in EClass._map.deadCharas)
{
Debug.Log(deadChara);
}
EClass.core.steam.CheckUpdate();
EClass.player.flags.loytelMartLv++;
Msg.Say("loytelmart:" + EClass.player.flags.loytelMartLv);
Guild.Fighter.relation.rank = 20;
Guild.Mage.relation.rank = 20;
Guild.Thief.relation.rank = 20;
Guild.Merchant.relation.rank = 20;
if (EClass.Branch != null)
{
EClass.Branch.ModExp(EClass.Branch.GetNextExp());
}
foreach (Chara member in EClass.pc.party.members)
{
member.AddExp(member.ExpToNext);
}
EClass.pc.PlayEffect("boost");
EClass.pc.PlaySound("boost");
EClass.pc.elements.SetBase(306, 100);
EClass.pc.elements.SetBase(85, 100);
EClass.pc.feat += 10;
EClass.player.totalFeat += 10;
if (PathManager.Instance.IsPathClear(EClass.pc.pos, p, EClass.pc, 10) && !p.Equals(EClass.pc.pos))
{
Chara t = CharaGen.Create("putty");
EClass._zone.AddCard(t, p);
return true;
}
return false;
}, allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true);
return;
}
if (Input.GetKeyDown(KeyCode.F4))
@@ -1032,7 +1010,7 @@ public void UpdateInput()
if (Input.GetKey(KeyCode.F9))
{
EClass.scene.paused = false;
for (int j = 0; j < advanceMin; j++)
for (int i = 0; i < advanceMin; i++)
{
EClass.game.updater.FixedUpdate();
}
@@ -1172,8 +1150,8 @@ public void UpdateInput()
{
for (int num4 = hitPoint.detail.things.Count - 1; num4 >= 0; num4--)
{
Thing thing2 = hitPoint.detail.things[num4];
Debug.Log(thing2.id + "/" + thing2.Pref.height + "/" + thing2.trait?.ToString() + "/" + thing2.source.tileType.CanStack + "/" + thing2.source.tileType?.ToString() + "/" + thing2.isSynced + "/" + RenderObject.syncList.Contains(thing2.renderer));
Thing thing = hitPoint.detail.things[num4];
Debug.Log(thing.id + "/" + thing.Pref.height + "/" + thing.trait?.ToString() + "/" + thing.source.tileType.CanStack + "/" + thing.source.tileType?.ToString() + "/" + thing.isSynced + "/" + RenderObject.syncList.Contains(thing.renderer));
}
}
if (!Application.isEditor)
@@ -1249,64 +1227,64 @@ public void UpdateInput()
case DebugHotkey.Item:
if (Input.GetKeyDown(KeyCode.Alpha1))
{
Thing thing3 = ThingGen.Create("stairsDown_cave");
Thing thing2 = ThingGen.Create("stairsDown_cave");
EClass._zone.AddCard(thing2, EClass.pc.pos);
thing2.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
Thing thing3 = ThingGen.Create("stairs");
EClass._zone.AddCard(thing3, EClass.pc.pos);
thing3.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha2))
if (Input.GetKeyDown(KeyCode.Alpha3))
{
Thing thing4 = ThingGen.Create("stairs");
EClass._zone.AddCard(thing4, EClass.pc.pos);
Thing thing4 = ThingGen.Create("sign");
EClass._zone.AddCard(thing4, hitPoint);
thing4.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha3))
if (Input.GetKeyDown(KeyCode.Alpha4))
{
Thing thing5 = ThingGen.Create("sign");
Thing thing5 = ThingGen.Create("sign2");
EClass._zone.AddCard(thing5, hitPoint);
thing5.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha4))
if (Input.GetKeyDown(KeyCode.Alpha5))
{
Thing thing6 = ThingGen.Create("sign2");
Thing thing6 = ThingGen.Create("well");
EClass._zone.AddCard(thing6, hitPoint);
thing6.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha5))
if (Input.GetKeyDown(KeyCode.Alpha6))
{
Thing thing7 = ThingGen.Create("well");
Thing thing7 = ThingGen.Create("altar");
EClass._zone.AddCard(thing7, hitPoint);
thing7.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha6))
{
Thing thing8 = ThingGen.Create("altar");
EClass._zone.AddCard(thing8, hitPoint);
thing8.SetPlaceState(PlaceState.installed);
}
if (Input.GetKeyDown(KeyCode.Alpha7))
{
Thing t = ThingGen.Create("torch");
EClass._zone.AddCard(t, hitPoint);
Thing t2 = ThingGen.Create("torch");
EClass._zone.AddCard(t2, hitPoint);
}
if (Input.GetKeyDown(KeyCode.Alpha8))
{
Thing t2 = ThingGen.Create("street_lamp");
EClass._zone.AddCard(t2, hitPoint);
Thing t3 = ThingGen.Create("street_lamp");
EClass._zone.AddCard(t3, hitPoint);
}
if (Input.GetKeyDown(KeyCode.Alpha9))
{
Thing t3 = ThingGen.Create("statue_elin");
EClass._zone.AddCard(t3, hitPoint);
Thing t4 = ThingGen.Create("statue_elin");
EClass._zone.AddCard(t4, hitPoint);
}
if (Input.GetKeyDown(KeyCode.Alpha0))
{
Thing t4 = ThingGen.TestCreate();
EClass._zone.AddCard(t4, hitPoint);
Thing t5 = ThingGen.TestCreate();
EClass._zone.AddCard(t5, hitPoint);
}
if (key && Input.GetKeyDown(KeyCode.Alpha1))
{
Chara t5 = CharaGen.Create("korgon");
EClass._zone.AddCard(t5, hitPoint);
Chara t6 = CharaGen.Create("korgon");
EClass._zone.AddCard(t6, hitPoint);
}
break;
case DebugHotkey.Decal:
DNA
@@ -224,7 +224,11 @@ public void Generate(Type _type, Chara model = null)
Rand.SetSeed(seed);
if (model == null)
{
model = CharaGen.Create(id, lv);
model = CharaGen.Create(id);
if (lv > model.LV)
{
model.SetLv(lv);
}
}
if (type == Type.Inferior || model == null)
{
FACTION
@@ -123,9 +123,6 @@ public class Faction : EClass
[JsonProperty]
public FactionRelation relation = new FactionRelation();
[JsonProperty]
public int maxReserve = 3;
[JsonProperty]
public string id;
@@ -190,6 +187,16 @@ public int CountTax()
return (int)((float)CountWealth() * 0.1f);
}
public int GetMaxReserve()
{
int num = 2;
foreach (FactionBranch child in GetChildren())
{
num += child.lv;
}
return num;
}
public List<FactionBranch> GetChildren()
{
List<FactionBranch> list = new List<FactionBranch>();
@@ -335,7 +342,7 @@ public void RemoveReserve(Chara c)
public void OnAdvanceDay()
{
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
child.OnAdvanceDay();
}
@@ -392,7 +399,7 @@ public void TryPayBill(Thing bill)
public FactionBranch FindBranch(Chara c)
{
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
if (child.members.Contains(c))
{
@@ -410,7 +417,7 @@ public void AddGlobalPolicy(int id)
public bool IsGlobalPolicyActive(int id)
{
bool result = false;
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
if (child.policies.IsActive(id))
{
@@ -422,7 +429,7 @@ public bool IsGlobalPolicyActive(int id)
public void SetGlobalPolicyActive(int id, bool active)
{
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
child.policies.SetActive(id, active);
}
@@ -431,7 +438,7 @@ public void SetGlobalPolicyActive(int id, bool active)
public int GetResidentTax()
{
int num = 0;
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
num += child.GetResidentTax();
}
@@ -445,7 +452,7 @@ public int GetResidentTax()
public int GetRankIncome()
{
int num = 0;
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
num += EClass.game.spatials.ranks.GetIncome(child.owner);
}
@@ -495,7 +502,7 @@ public int EvadeTax(int v, bool evasion)
return v;
}
int num = 0;
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
num += child.Evalue(2119);
}
@@ -513,7 +520,7 @@ public void SetTaxTooltip(UINote n)
public int CountTaxFreeLand()
{
int num = 0;
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
foreach (FactionBranch child in GetChildren())
{
if (child.policies.IsActive(2514))
{
FactionBranch
@@ -946,7 +946,7 @@ public int GetResidentTax()
{
num7 += (80 + (int)Mathf.Sqrt(num3) * 5) * member.faith.source.tax / 100;
}
num7 = num7 * efficiency / 100;
num7 = num7 * efficiency / (IsTaxFree ? 100 : 1000);
num += num7;
if (num7 > 0)
{
GameIO
@@ -168,6 +168,10 @@ public static void PrepareSteamCloud(string id, string path = "")
{
File.Delete(text);
}
if (File.Exists(text2))
{
File.Delete(text2);
}
ZipFile.CreateFromDirectory(path, text);
if (File.Exists(text2))
{
Point
@@ -403,7 +403,7 @@ public bool HasRoomOrArea(BaseArea a)
return true;
}
public bool IsInSpot<T>() where T : TraitSpot
public bool IsInSpot<T>() where T : Trait
{
foreach (Thing thing in EClass._map.things)
{
@@ -616,7 +616,6 @@ public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bo
return p;
}
}
num++;
for (int k = 0; k < num; k++)
{
num3++;
@@ -625,6 +624,7 @@ public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bo
return p;
}
}
num++;
for (int l = 0; l < num; l++)
{
num2--;
@@ -633,7 +633,6 @@ public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bo
return p;
}
}
num++;
for (int m = 0; m < num; m++)
{
num3--;
@@ -642,6 +641,7 @@ public Point GetNearestPoint(bool allowBlock = false, bool allowChara = true, bo
return p;
}
}
num++;
}
p.Set(this);
return p;
@@ -660,7 +660,7 @@ bool IsValid(int dx, int dz)
}
}
public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false)
public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = false, bool allowChara = true, bool allowInstalled = true, bool ignoreCenter = false, int maxRange = 30)
{
Point p = new Point();
int num = 1;
@@ -674,7 +674,7 @@ public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = fal
{
return true;
}
for (int i = 0; i < 30; i++)
for (int i = 0; i < maxRange; i++)
{
for (int j = 0; j < num; j++)
{
@@ -684,7 +684,6 @@ public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = fal
return true;
}
}
num++;
for (int k = 0; k < num; k++)
{
num3++;
@@ -693,6 +692,7 @@ public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = fal
return true;
}
}
num++;
for (int l = 0; l < num; l++)
{
num2--;
@@ -701,7 +701,6 @@ public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = fal
return true;
}
}
num++;
for (int m = 0; m < num; m++)
{
num3--;
@@ -710,6 +709,7 @@ public bool ForeachNearestPoint(Func<Point, bool> endFunc, bool allowBlock = fal
return true;
}
}
num++;
}
Debug.Log("ForeachNearestPoint Fail:" + this);
return false;
ShopType
@@ -47,5 +47,6 @@ public enum ShopType
Copy,
Plat,
LoytelMart,
StrangeGirl
StrangeGirl,
Sweet
}
Steam
@@ -108,23 +108,7 @@ private void CreateUserContent2(UgcQuery query)
}
}
Debug.Log("Creating Content");
FileInfo fileInfo = new FileInfo(baseModPackage.dirInfo.FullName + "/preview.jpg");
DirectoryInfo directoryInfo = new DirectoryInfo(baseModPackage.dirInfo.FullName);
WorkshopItemData workshopItemData = default(WorkshopItemData);
workshopItemData.appId = steamworks.settings.applicationId;
workshopItemData.title = baseModPackage.title;
workshopItemData.description = baseModPackage.description;
workshopItemData.content = directoryInfo;
workshopItemData.preview = fileInfo;
workshopItemData.metadata = baseModPackage.id ?? "";
workshopItemData.tags = new string[0];
WorkshopItemData workshopItemData2 = workshopItemData;
Debug.Log(App.Client.Owner.id);
Debug.Log(workshopItemData2.appId);
Debug.Log(baseModPackage.id);
Debug.Log(directoryInfo.Exists + "/" + directoryInfo.FullName);
Debug.Log(fileInfo.Exists + "/" + fileInfo.FullName);
workshopItemData2.Create(null, null, new WorkshopItemKeyValueTag[1]
CreateItemData(baseModPackage).Create(null, null, new WorkshopItemKeyValueTag[1]
{
new WorkshopItemKeyValueTag
{
@@ -137,6 +121,7 @@ private void CreateUserContent2(UgcQuery query)
if (result.hasError)
{
Dialog.Ok("mod_publish_error");
EClass.ui.Say(result.errorMessage);
Debug.Log("error:" + result.errorMessage);
}
else
@@ -150,23 +135,16 @@ private void CreateUserContent2(UgcQuery query)
public void UpdateUserContent(PublishedFileId_t fileId)
{
Debug.Log("Updating Content");
BaseModPackage baseModPackage = currentPackage;
WorkshopItemData workshopItemData = default(WorkshopItemData);
workshopItemData.appId = steamworks.settings.applicationId;
workshopItemData.title = baseModPackage.title;
workshopItemData.description = baseModPackage.description;
workshopItemData.content = new DirectoryInfo(baseModPackage.dirInfo.FullName);
workshopItemData.preview = new FileInfo(baseModPackage.dirInfo.FullName + "/preview.jpg");
workshopItemData.metadata = baseModPackage.id ?? "";
workshopItemData.tags = new string[0];
WorkshopItemData workshopItemData2 = workshopItemData;
workshopItemData2.publishedFileId = fileId;
workshopItemData2.Update(delegate(WorkshopItemDataUpdateStatus result)
BaseModPackage p = currentPackage;
WorkshopItemData workshopItemData = CreateItemData(p);
workshopItemData.publishedFileId = fileId;
workshopItemData.Update(delegate(WorkshopItemDataUpdateStatus result)
{
LayerProgress.completed = true;
if (result.hasError)
{
Dialog.Ok("mod_publish_error");
EClass.ui.Say(result.errorMessage);
Debug.Log("error:" + result.errorMessage);
}
else
@@ -176,4 +154,39 @@ public void UpdateUserContent(PublishedFileId_t fileId)
}
});
}
public WorkshopItemData CreateItemData(BaseModPackage p)
{
FileInfo fileInfo = new FileInfo(p.dirInfo.FullName + "/preview.jpg");
DirectoryInfo directoryInfo = new DirectoryInfo(p.dirInfo.FullName);
WorkshopItemData workshopItemData = default(WorkshopItemData);
workshopItemData.appId = steamworks.settings.applicationId;
workshopItemData.title = p.title;
workshopItemData.description = p.description;
workshopItemData.content = directoryInfo;
workshopItemData.preview = fileInfo;
workshopItemData.metadata = p.id ?? "";
workshopItemData.tags = p.tags;
workshopItemData.visibility = ERemoteStoragePublishedFileVisibility.k_ERemoteStoragePublishedFileVisibilityPublic;
WorkshopItemData result = workshopItemData;
switch (p.visibility)
{
case "Unlisted":
result.visibility = ERemoteStoragePublishedFileVisibility.k_ERemoteStoragePublishedFileVisibilityUnlisted;
break;
case "Private":
result.visibility = ERemoteStoragePublishedFileVisibility.k_ERemoteStoragePublishedFileVisibilityPrivate;
break;
case "FriendsOnly":
result.visibility = ERemoteStoragePublishedFileVisibility.k_ERemoteStoragePublishedFileVisibilityFriendsOnly;
break;
}
Debug.Log(App.Client.Owner.id);
Debug.Log(result.appId);
Debug.Log(p.id);
Debug.Log(p.description + "/" + result.description);
Debug.Log(directoryInfo.Exists + "/" + directoryInfo.FullName);
Debug.Log(fileInfo.Exists + "/" + fileInfo.FullName);
return result;
}
}
Trait
@@ -1676,6 +1676,7 @@ public void OnBarter()
Add("dagger_fish", 1, 0).SetReplica(on: true);
NoRestock(ThingGen.Create("sword_zephir"));
Add("sword_zephir", 1, 0).SetReplica(on: true);
Add("ribbon", 1, 0);
Add("helm_sage", 1, 0);
Add("diary_sister", 1, 0);
Add("diary_catsister", 1, 0);
@@ -1947,9 +1948,9 @@ public Thing CreateStock()
{
case ShopType.Dye:
{
Thing thing2 = ThingGen.Create("dye").SetNum(15 + EClass.rnd(30));
thing2.ChangeMaterial(EClass.sources.materials.rows.RandomItem().alias);
return thing2;
Thing thing4 = ThingGen.Create("dye").SetNum(15 + EClass.rnd(30));
thing4.ChangeMaterial(EClass.sources.materials.rows.RandomItem().alias);
return thing4;
}
case ShopType.GeneralExotic:
return FromFilter("shop_generalExotic");
@@ -1971,45 +1972,45 @@ public Thing CreateStock()
return FromFilter("shop_magic");
case ShopType.Ecopo:
{
Thing thing4 = TraitSeed.MakeRandomSeed(enc: true);
TraitSeed.LevelSeed(thing4, (thing4.trait as TraitSeed).row, 1);
return thing4;
Thing thing3 = TraitSeed.MakeRandomSeed(enc: true);
TraitSeed.LevelSeed(thing3, (thing3.trait as TraitSeed).row, 1);
return thing3;
}
case ShopType.Healer:
{
Thing thing3 = null;
Thing thing = null;
for (int i = 0; i < 1000; i++)
{
thing3 = FromFilter("shop_healer");
if (thing3.trait is TraitScroll { source: not null } traitScroll)
thing = FromFilter("shop_healer");
if (thing.trait is TraitScroll { source: not null } traitScroll)
{
if (!(traitScroll.source.aliasParent != "WIL") && !(traitScroll.source.categorySub == "attack"))
{
break;
}
}
else if (thing3.trait is TraitPotionRandom { source: not null } traitPotionRandom)
else if (thing.trait is TraitPotionRandom { source: not null } traitPotionRandom)
{
if (!(traitPotionRandom.source.aliasParent != "WIL") && !(traitPotionRandom.source.categorySub == "attack"))
{
thing3.SetNum(EClass.rnd(5) + 1);
thing.SetNum(EClass.rnd(5) + 1);
break;
}
}
else if (thing3.trait is TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent != "WIL") && !(traitRodRandom.source.categorySub == "attack"))
else if (thing.trait is TraitRodRandom { source: not null } traitRodRandom && !(traitRodRandom.source.aliasParent != "WIL") && !(traitRodRandom.source.categorySub == "attack"))
{
break;
}
}
return thing3;
return thing;
}
case ShopType.Milk:
if (EClass._zone is Zone_Nefu && EClass.rnd(2) == 0)
{
Thing thing = ThingGen.Create("milk");
thing.MakeRefFrom(EClass.sources.charas.rows.Where((SourceChara.Row r) => r.race == "mifu" || r.race == "nefu").RandomItem().model);
Debug.Log(thing);
return thing;
Thing thing2 = ThingGen.Create("milk");
thing2.MakeRefFrom(EClass.sources.charas.rows.Where((SourceChara.Row r) => r.race == "mifu" || r.race == "nefu").RandomItem().model);
Debug.Log(thing2);
return thing2;
}
return Create("milk");
case ShopType.Map:
@@ -2062,11 +2063,17 @@ public Thing CreateStock()
}
return FromFilter("shop_meat");
case ShopType.Bread:
if (EClass.rnd(2) == 0)
if (EClass.rnd(3) == 0)
{
return Create("dough");
}
return FromFilter("shop_bread");
case ShopType.Sweet:
if (EClass.rnd(3) == 0)
{
return Create("dough");
}
return FromFilter("shop_sweet");
case ShopType.Food:
if (EClass.rnd(5) == 0)
{
+TraitChef
File Created
public class TraitChef : TraitMerchantFood
{
public override ShopType ShopType => ShopType.Sweet;
public override bool CanServeFood => true;
}
+TraitPillowStrange
File Created
public class TraitPillowStrange : TraitPillow
{
public override bool IsOn
{
get
{
if (owner.dir != 0)
{
return owner.dir == 2;
}
return true;
}
}
public override int radius
{
get
{
if (!IsOn)
{
return 5;
}
return 0;
}
}
public override void TrySetAct(ActPlan p)
{
if (owner.IsInstalled)
{
p.TrySetAct("actUse", delegate
{
owner.SetDir((owner.dir == 0) ? 1 : ((owner.dir != 1) ? ((owner.dir == 2) ? 3 : 2) : 0));
SE.Rotate();
return false;
});
}
}
}
Zone
@@ -1433,6 +1433,7 @@ public void AddGlobalCharasOnActivate()
spawnPosPC = spawnPosPC.GetNearestPoint();
}
spawnPosPC = spawnPosPC.Clamp(useBounds: true).GetNearestPoint();
Debug.Log(spawnPosPC);
foreach (Chara c in EClass.game.cards.globalCharas.Values)
{
if (c.currentZone != this)
@@ -1464,13 +1465,13 @@ public void AddGlobalCharasOnActivate()
c.pos.Set(spawnPosPC);
if (!spawnPosPC.ForeachNearestPoint(delegate(Point p)
{
if (PathManager.Instance.IsPathClear(spawnPosPC, p, c, 5) && !p.Equals(spawnPosPC))
if (PathManager.Instance.IsPathClear(spawnPosPC, p, c, 10) && !p.Equals(spawnPosPC))
{
pos.Set(p);
return true;
}
return false;
}, allowBlock: false, EClass.pc.party.members.Count >= 12, allowInstalled: true, ignoreCenter: true))
}, allowBlock: false, EClass.pc.party.members.Count >= 12, allowInstalled: true, ignoreCenter: true, EClass._zone.IsRegion ? 2 : 6))
{
pos.Set(spawnPosPC);
}