[Simitone] Update FreeSO, Ingame UI

See FreeSO changes for more details.
- Greatly improve catalog handling (should match TS1 now)
- Family members can no longer be switched to if they join the lot
you're visiting.
- See FreeSO changes for more details.
- Greatly improve catalog handling (should match TS1 now)
- Family members can no longer be switched to if they join the lot
you're visiting.
- Community lots edited in Simless Build/Buy (simitone fsov) are now
playable when you join them.
- Some UI tweaks.
This commit is contained in:
riperiperi 2019-11-24 21:57:13 +00:00
parent 85b3db50f7
commit 8991fe5423
9 changed files with 26 additions and 11 deletions

View file

@ -270,8 +270,7 @@ namespace Simitone.Client
protected override void OnExiting(object sender, EventArgs args)
{
base.OnExiting(sender, args);
GameThread.Killed = true;
GameThread.OnKilled.Set();
GameThread.SetKilled();
}
/// <summary>

View file

@ -87,7 +87,7 @@ namespace Simitone.Client.UI.Controls
{
MainButton.Texture = Content.Get().CustomUI.Get(catG.IconName).Get(GameFacade.GraphicsDevice);
}
else
if (catG.ID != cat || UIScreen.Current.ScreenHeight >= 720)
{
var btn = new UIStencilButton(Content.Get().CustomUI.Get(catG.IconName).Get(GameFacade.GraphicsDevice));
btn.Shadow = true;

View file

@ -380,7 +380,7 @@ namespace Simitone.Client.UI.Panels.LiveSubpanels
private void ObjectHolder_OnPickup(UIObjectSelection holding, UpdateState state)
{
Game.LotControl.PickupPanel.SetInfo(Game.LotControl.vm, holding.Group.BaseObject);
Game.LotControl.PickupPanel.SetInfo(Game.LotControl.vm, holding.RealEnt ?? holding.Group.BaseObject);
Game.Frontend.MainPanel.SetSubpanelPickup(0f);
}
@ -817,6 +817,7 @@ namespace Simitone.Client.UI.Panels.LiveSubpanels
case UICatalogMode.Magictown:
return item.MagictownSort;
default:
if (item.RoomSort == 0) return 0; //items without a room sort should not appear.
return item.Subsort;
}
}
@ -871,6 +872,10 @@ namespace Simitone.Client.UI.Panels.LiveSubpanels
else
{
var mask = 1 << index;
if (Mode == UICatalogMode.Normal && index == 7)
{
mask |= 16;
}
FilterCategory = FullCategory.Where(x => (GetSubsort(x.Item) & mask) > 0);
}
CatContainer.Reset();
@ -893,6 +898,11 @@ namespace Simitone.Client.UI.Panels.LiveSubpanels
public ObjectCatalogItem Item;
public int CalcPrice;
public UISpecialCatalogElement Special;
public override string ToString()
{
return Item.Name ?? "(unknown)";
}
}
public class UISpecialCatalogElement

View file

@ -378,7 +378,7 @@ namespace Simitone.Client.UI.Panels
if (Mode != UIMainPanelMode.LIVE)
{
Game.vm.SpeedMultiplier = -1;
} else if (Game.vm.SpeedMultiplier < 0)
} else if (Game.vm.SpeedMultiplier == -1)
{
Game.vm.SpeedMultiplier = 0;
}

View file

@ -197,6 +197,10 @@ namespace Simitone.Client.UI.Panels
var strings = motivesString.ToString().Replace("\r", "").Split('\n').TakeWhile(x => x != "");
TitleAd.Caption = string.Join("\n", strings.Take(2));
TitleAd.CaptionStyle.LineHeightModifier = -3;
TitleAd.Y = 22;
TitleAd.Alignment = TextAlignment.Middle | TextAlignment.Right;
TitleAd.Wrapped = true;
Ad.Caption = string.Join(", ", strings);
SetTitleSize();

View file

@ -225,8 +225,7 @@ namespace Simitone.Client.UI.Panels
{
var selected = Game.LotControl.ActiveEntity;
var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x =>
((VMAvatar)x).GetPersonData(
FSO.SimAntics.Model.VMPersonDataVariable.TS1FamilyNumber) == (Game.vm.TS1State.CurrentFamily?.ChunkID)
Game.vm.TS1State.CurrentFamily.RuntimeSubset.Contains(x.Object.OBJ.GUID)
).ToList();
var index = familyMembers.IndexOf(selected);
if (familyMembers.Count > 0)

View file

@ -27,7 +27,7 @@ namespace Simitone.Client.UI.Panels
Game = screen;
Bg = Content.Get().CustomUI.Get("pswitch_bg.png").Get(GameFacade.GraphicsDevice);
var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x => ((VMAvatar)x).GetPersonData(FSO.SimAntics.Model.VMPersonDataVariable.TS1FamilyNumber) == (Game.vm.TS1State.CurrentFamily?.ChunkID));
var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x => Game.vm.TS1State.CurrentFamily.RuntimeSubset.Contains(x.Object.OBJ.GUID));
int i = 0;
foreach (var fam in familyMembers)
{

View file

@ -95,8 +95,8 @@ namespace Simitone.Client.UI.Screens
InterpolatedAnimation = InterpolatedAnimation;
(new Thread(() => {
FSO.Content.Content.Init(GlobalSettings.Default.StartupPath, GameFacade.GraphicsDevice);
VMContext.InitVMConfig(true);
FSO.Content.Content.Init(GlobalSettings.Default.StartupPath, GameFacade.GraphicsDevice);
lock (this)
{
LoadingComplete = true;

View file

@ -717,6 +717,9 @@ namespace Simitone.Client.UI.Screens
{
vm.SetGlobalValue(32, 1);
vm.SpeedMultiplier = -1;
} else
{
vm.SetGlobalValue(32, 0);
}
}