riperiperi / FreeSO

Re-implementation of The Sims Online.
http://freeso.org
Mozilla Public License 2.0
817 stars 95 forks source link

Fix GetLotThumb() with rooflessCallback problem. #133

Closed simptomo closed 4 years ago

simptomo commented 5 years ago

So Simitone cannot save current Lot data. Thanks!

riperiperi commented 5 years ago

Is this a bug with 2D mode? Can you explain how it manifests, and how this fixes it?

simptomo commented 5 years ago

OK, I created quick patch for Simitone's CAS screen. You can create family and move in. Enjoy debugging!

diff --git Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs
index 4d1518b..45f40e3 100644
--- Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs
+++ Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs
@@ -966,7 +966,14 @@ namespace Simitone.Client.UI.Screens
             vm = new VM(new VMContext(World), Driver, new UIHeadlineRendererProvider());
             vm.ListenBHAVChanges();
             vm.Init();
+            var blueprint = new Blueprint(1, 1);
+            blueprint.Terrain = new FSO.LotView.Components.TerrainComponent(new Rectangle(0, 0, 0, 0), blueprint);

+            //world.InitBlueprint(blueprint);
+            vm.Context.Blueprint = blueprint;
+            vm.Context.Architecture = new VMArchitecture(1, 1, blueprint, vm.Context);
+
+            /*
             using (var file = new BinaryReader(File.OpenRead(Path.Combine(FSOEnvironment.ContentDir, "cas.fsov"))))
             {
                 var marshal = new FSO.SimAntics.Marshals.VMMarshal();
@@ -974,7 +981,7 @@ namespace Simitone.Client.UI.Screens
                 marshal.PlatformState = new VMTS1LotState();
                 vm.Load(marshal);
                 vm.Reset();
-            }
+            }*/
             vm.Tick();

             vm.Context.Clock.Hours = 12;
riperiperi commented 5 years ago

I'm not sure what this patch is hoping to achieve. It seems you are loading a blank lot instead of the CAS property? Is there a problem when you attempt to load the CAS property?

with patch: image

without patch: image

simptomo commented 5 years ago

In my environment, with patch: So did I. without patch: 無題

riperiperi commented 5 years ago

Does this issue still occur with your recent change to ignore case when detecting FAR files? Which version of the game are you using, so that I can attempt to purchase it and see if there are any more things we're missing?

riperiperi commented 4 years ago

Both issues should be resolved.