[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) protected override void OnExiting(object sender, EventArgs args)
{ {
base.OnExiting(sender, args); base.OnExiting(sender, args);
GameThread.Killed = true; GameThread.SetKilled();
GameThread.OnKilled.Set();
} }
/// <summary> /// <summary>

View file

@ -87,7 +87,7 @@ namespace Simitone.Client.UI.Controls
{ {
MainButton.Texture = Content.Get().CustomUI.Get(catG.IconName).Get(GameFacade.GraphicsDevice); 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)); var btn = new UIStencilButton(Content.Get().CustomUI.Get(catG.IconName).Get(GameFacade.GraphicsDevice));
btn.Shadow = true; btn.Shadow = true;

View file

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

View file

@ -378,7 +378,7 @@ namespace Simitone.Client.UI.Panels
if (Mode != UIMainPanelMode.LIVE) if (Mode != UIMainPanelMode.LIVE)
{ {
Game.vm.SpeedMultiplier = -1; Game.vm.SpeedMultiplier = -1;
} else if (Game.vm.SpeedMultiplier < 0) } else if (Game.vm.SpeedMultiplier == -1)
{ {
Game.vm.SpeedMultiplier = 0; 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 != ""); var strings = motivesString.ToString().Replace("\r", "").Split('\n').TakeWhile(x => x != "");
TitleAd.Caption = string.Join("\n", strings.Take(2)); 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); Ad.Caption = string.Join(", ", strings);
SetTitleSize(); SetTitleSize();

View file

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

View file

@ -26,8 +26,8 @@ namespace Simitone.Client.UI.Panels
{ {
Game = screen; Game = screen;
Bg = Content.Get().CustomUI.Get("pswitch_bg.png").Get(GameFacade.GraphicsDevice); 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; int i = 0;
foreach (var fam in familyMembers) foreach (var fam in familyMembers)
{ {

View file

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

View file

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