mirror of
https://github.com/riperiperi/Simitone.git
synced 2025-01-22 09:11:52 -05:00
[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:
parent
85b3db50f7
commit
8991fe5423
9 changed files with 26 additions and 11 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -224,9 +224,8 @@ namespace Simitone.Client.UI.Panels
|
|||
if (state.NewKeys.Contains(Keys.Space))
|
||||
{
|
||||
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)
|
||||
var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x =>
|
||||
Game.vm.TS1State.CurrentFamily.RuntimeSubset.Contains(x.Object.OBJ.GUID)
|
||||
).ToList();
|
||||
var index = familyMembers.IndexOf(selected);
|
||||
if (familyMembers.Count > 0)
|
||||
|
|
|
@ -26,8 +26,8 @@ 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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -717,6 +717,9 @@ namespace Simitone.Client.UI.Screens
|
|||
{
|
||||
vm.SetGlobalValue(32, 1);
|
||||
vm.SpeedMultiplier = -1;
|
||||
} else
|
||||
{
|
||||
vm.SetGlobalValue(32, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue