Skip to content

Commit

Permalink
Update FreeSO, simless build, CAS outfit discovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
riperiperi committed May 14, 2020
1 parent eda7f0e commit 5786205
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 12 additions & 4 deletions Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void CameraInterp(float value)
var pos1 = Mode2D[prev];
var pos2 = Mode2D[next];

if (World != null) World.State.PreciseZoom = 1 + Math.Min(0, value*0.5f);
if (World != null) World.State.PreciseZoom = 1 + Math.Min(0, value * 0.5f);
value = (float)DirectionUtils.PosMod(value, 1.0);
var campos = Vector3.Lerp(pos1, pos2, value);
campos += (float)Math.Sin(value * Math.PI) * SinTransitions[prev];
Expand Down Expand Up @@ -173,21 +173,29 @@ public void CameraInterp(float value)
}
}

private string MissingFallback(string x, IEnumerable<string> texnames)
{
return "x";
}

private void PopulateSimType(string simtype)
{
CurrentCode = simtype;
var heads = Content.Get().BCFGlobal.CollectionsByName["c"].ClothesByAvatarType[simtype];
if (simtype[1] == 'c') simtype += "chd";
var bodies = Content.Get().BCFGlobal.CollectionsByName["b"].ClothesByAvatarType[simtype];
var bodies = Content.Get().BCFGlobal.CollectionsByName["b"].GeneralAvatarType(simtype);

var tex = (TS1AvatarTextureProvider)Content.Get().AvatarTextures;
var texnames = tex.GetAllNames();
ActiveHeads = heads;
ActiveBodies = bodies;

ActiveHeadTex = heads.Select(x => RemoveExt(texnames.FirstOrDefault(y => y.StartsWith(ExtractID(x, CurrentSkin))))).ToList();
ActiveBodyTex = bodies.Select(x => RemoveExt(texnames.FirstOrDefault(y => y.StartsWith(ExtractID(x, CurrentSkin))))).ToList();
ActiveHandgroupTex = bodies.Select(x => (RemoveExt(texnames.FirstOrDefault(y => y == "huao"+FindHG(x))) ?? "huao"+ CurrentSkin).Substring(4)).ToList();
ActiveBodyTex = bodies.Select(x => RemoveExt(
texnames.FirstOrDefault(y => y.StartsWith(ExtractID(x, CurrentSkin)))
?? texnames.FirstOrDefault(y => y.StartsWith(ExtractID(x, ""))) ?? MissingFallback(x, texnames)
)).ToList();
ActiveHandgroupTex = ActiveBodyTex.Select(x => (RemoveExt(texnames.FirstOrDefault(y => RemoveExt(y) == "huao"+FindHG(x))) ?? "huao"+ CurrentSkin).Substring(4)).ToList();

for (int i=0; i<ActiveHeads.Count; i++)
{
Expand Down
8 changes: 3 additions & 5 deletions Client/Simitone/Simitone.Client/UI/Screens/TS1GameScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,16 @@ public void BlueprintReset(string path, VM vm)
});
}

var isSimless = (ActiveFamily == null && !isSurrounding);
vm.SpeedMultiplier = -1;
vm.Tick();
vm.SpeedMultiplier = 1;

if (ActiveFamily == null && !isSurrounding)
if (isSimless)
{
vm.SetGlobalValue(32, 1);
vm.SpeedMultiplier = -1;
} else
{
vm.SetGlobalValue(32, 0);
}
vm.SetGlobalValue(32, (short)(isSimless ? 1 : 0));
}


Expand Down
2 changes: 1 addition & 1 deletion FreeSO
Submodule FreeSO updated 437 files

0 comments on commit 5786205

Please sign in to comment.