Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Simitone

on:
workflow_dispatch:
inputs:
configuration:
description: 'Build configuration'
required: false
default: 'Release'
type: choice
options:
- Release
- Debug

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Run Protobuild
shell: pwsh
run: |
cd FreeSO/Other/libs/FSOMonoGame/
./protobuild.exe --generate
continue-on-error: true

- name: Restore Simitone dependencies
run: dotnet restore Client/Simitone/Simitone.sln

- name: Restore FreeSO dependencies
run: dotnet restore FreeSO/TSOClient/FreeSO.sln
continue-on-error: true

- name: Restore Roslyn dependencies
shell: pwsh
run: |
cd FreeSO/TSOClient/FSO.SimAntics.JIT.Roslyn/
dotnet restore
continue-on-error: true

- name: Build
run: dotnet build Client/Simitone/Simitone.sln -c ${{ inputs.configuration || 'Release' }} --no-restore

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: SimitoneWindows-${{ inputs.configuration || 'Release' }}
path: Client/Simitone/Simitone.Windows/bin/${{ inputs.configuration || 'Release' }}/net9.0-windows/
if-no-files-found: error
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "FreeSO"]
path = FreeSO
url = https://github.com/riperiperi/FreeSO
url = https://github.com/alexjyong/FreeSO
19 changes: 16 additions & 3 deletions Client/Simitone/Simitone.Client/UI/Screens/TS1CASScreen.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using FSO.Client;
using FSO.Client;
using FSO.Client.UI.Framework;
using FSO.Common;
using FSO.Common.Utils;
Expand Down Expand Up @@ -769,8 +769,21 @@ public void SetFamilies()
//get all families that don't have a house from neighbourhood, and populate the list
//i think house number -1 is townies, so only select 0
var all = Content.Get().Neighborhood.MainResource.List<FAMI>();
var families = all.Where(x => (x.Unknown & 16) > 0 && x.HouseNumber == 0);
FamiliesPanel.UpdateFamilies(families.ToList(), vm);

// Filter: HouseNumber == 0 (not moved into a house)
// AND ChunkID < 1000 (exclude NPCs/townies which have IDs like 2000, 3000+, 4000, 5000, 6000)
// AND ChunkID > 0 (exclude "Default Family" which is ChunkID=0 with 0 members)
// AND FamilyGUIDs.Length > 0 (must have at least one member)
var families = all.Where(x => x.HouseNumber == 0 && x.ChunkID > 0 && x.ChunkID < 1000 && x.FamilyGUIDs.Length > 0).ToList();

File.AppendAllText("simitone_debug.log", $"[SetFamilies] Families being added to CAS panel ({families.Count} total):\n");
foreach (var fam in families)
{
File.AppendAllText("simitone_debug.log",
$" - ChunkID={fam.ChunkID}, HouseNumber={fam.HouseNumber}, Unknown={fam.Unknown}, Members={fam.FamilyGUIDs.Length}\n");
}

FamiliesPanel.UpdateFamilies(families, vm);
}

public void SetFamilyMember(int index)
Expand Down
171 changes: 171 additions & 0 deletions Client/Simitone/Simitone.Windows/GameLocator/InstallationInfoDialog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
using System;
using System.Drawing;
using System.Windows.Forms;

namespace Simitone.Windows.GameLocator
{
public class InstallationInfoDialog : Form
{
public InstallationInfoDialog(string installationType, string gamePath, string savesPath, string simitoneSavesPath)
{
InitializeComponents(installationType, gamePath, savesPath, simitoneSavesPath);
}

private void InitializeComponents(string installationType, string gamePath, string savesPath, string simitoneSavesPath)
{
// Form settings
this.Text = "The Sims Installation Configured";
this.Size = new Size(600, 550);
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;

// Main panel with padding
var mainPanel = new Panel
{
Location = new Point(10, 10),
Size = new Size(560, 430),
AutoScroll = true
};

int yPos = 10;

// Success icon/text
var successLabel = new Label
{
Text = "✓ Installation Configured Successfully",
Location = new Point(10, yPos),
Size = new Size(540, 30),
Font = new Font(this.Font.FontFamily, 12, FontStyle.Bold),
ForeColor = Color.DarkGreen
};
mainPanel.Controls.Add(successLabel);
yPos += 40;

// Installation type
var installLabel = new Label
{
Text = $"Installation Type:\n{installationType}",
Location = new Point(10, yPos),
Size = new Size(540, 40),
Font = new Font(this.Font.FontFamily, 9, FontStyle.Bold)
};
mainPanel.Controls.Add(installLabel);
yPos += 50;

// Game files path
var gamePathLabel = new Label
{
Text = $"Game Files Location:\n{gamePath}",
Location = new Point(10, yPos),
Size = new Size(540, 40),
AutoSize = false
};
mainPanel.Controls.Add(gamePathLabel);
yPos += 50;

// Saves path
var savesPathLabel = new Label
{
Text = $"Original Saves Location:\n{savesPath}",
Location = new Point(10, yPos),
Size = new Size(540, 40),
AutoSize = false
};
mainPanel.Controls.Add(savesPathLabel);
yPos += 50;

// Simitone saves path
var simitoneSavesLabel = new Label
{
Text = $"Simitone Saves Location (Safe Copy):\n{simitoneSavesPath}",
Location = new Point(10, yPos),
Size = new Size(540, 40),
AutoSize = false,
Font = new Font(this.Font.FontFamily, 9, FontStyle.Bold)
};
mainPanel.Controls.Add(simitoneSavesLabel);
yPos += 60;

// Warning section
var warningPanel = new Panel
{
Location = new Point(10, yPos),
Size = new Size(540, 100),
BorderStyle = BorderStyle.FixedSingle,
BackColor = Color.LightYellow
};

var warningIcon = new Label
{
Text = "⚠",
Location = new Point(10, 10),
Size = new Size(30, 30),
Font = new Font(this.Font.FontFamily, 16, FontStyle.Bold),
ForeColor = Color.DarkOrange
};
warningPanel.Controls.Add(warningIcon);

var warningText = new Label
{
Text = "IMPORTANT: Steam and non-Steam saves are NOT compatible!\n\n" +
"If you switch installations later, you will need to start fresh. " +
"Your Simitone saves are safely stored separately and won't affect " +
"your original game saves.",
Location = new Point(45, 10),
Size = new Size(480, 80),
AutoSize = false
};
warningPanel.Controls.Add(warningText);

mainPanel.Controls.Add(warningPanel);
yPos += 110;

// How to change section
var changeLabel = new Label
{
Text = "To change installation later:",
Location = new Point(10, yPos),
Size = new Size(540, 20),
Font = new Font(this.Font.FontFamily, 9, FontStyle.Bold)
};
mainPanel.Controls.Add(changeLabel);
yPos += 25;

var changeOption1 = new Label
{
Text = "• Delete config.ini from your Simitone documents folder and restart",
Location = new Point(10, yPos),
Size = new Size(540, 20),
AutoSize = false
};
mainPanel.Controls.Add(changeOption1);
yPos += 25;

var changeOption2 = new Label
{
Text = "• Use command line: Simitone.exe -path\"C:\\Your\\Path\\Here\"",
Location = new Point(10, yPos),
Size = new Size(540, 20),
AutoSize = false
};
mainPanel.Controls.Add(changeOption2);

this.Controls.Add(mainPanel);

// OK Button
var okButton = new Button
{
Text = "OK",
Location = new Point(250, 450),
Size = new Size(100, 35),
DialogResult = DialogResult.OK
};
okButton.Click += (s, e) => this.Close();
this.Controls.Add(okButton);

this.AcceptButton = okButton;
}
}
}
108 changes: 108 additions & 0 deletions Client/Simitone/Simitone.Windows/GameLocator/InstallationSelector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace Simitone.Windows.GameLocator
{
public class InstallationSelector : Form
{
private ListBox installListBox;
private Button okButton;
private Button cancelButton;
private Label instructionLabel;
private List<(string description, string path, TS1InstallationType type)> installations;

public string SelectedPath { get; private set; }
public TS1InstallationType SelectedType { get; private set; }

public InstallationSelector(List<(string description, string path, TS1InstallationType type)> installations)
{
this.installations = installations;
InitializeComponents();
}

private void InitializeComponents()
{
// Form settings
this.Text = "Select The Sims Installation";
this.Size = new Size(600, 300);
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;

// Instruction label
instructionLabel = new Label
{
Text = "Multiple installations of The Sims were detected. Please select which one to use:",
Location = new Point(10, 10),
Size = new Size(560, 40),
AutoSize = false
};

// ListBox for installations
installListBox = new ListBox
{
Location = new Point(10, 60),
Size = new Size(560, 150)
};

foreach (var (description, path, type) in installations)
{
installListBox.Items.Add($"{description}\n{path}");
}

if (installListBox.Items.Count > 0)
{
installListBox.SelectedIndex = 0;
}

installListBox.DoubleClick += (s, e) => OkButton_Click(s, e);

// OK Button
okButton = new Button
{
Text = "OK",
Location = new Point(410, 220),
Size = new Size(75, 30),
DialogResult = DialogResult.OK
};
okButton.Click += OkButton_Click;

// Cancel Button
cancelButton = new Button
{
Text = "Cancel",
Location = new Point(495, 220),
Size = new Size(75, 30),
DialogResult = DialogResult.Cancel
};

// Add controls to form
this.Controls.Add(instructionLabel);
this.Controls.Add(installListBox);
this.Controls.Add(okButton);
this.Controls.Add(cancelButton);

this.AcceptButton = okButton;
this.CancelButton = cancelButton;
}

private void OkButton_Click(object sender, EventArgs e)
{
if (installListBox.SelectedIndex >= 0)
{
var selected = installations[installListBox.SelectedIndex];
SelectedPath = selected.path;
SelectedType = selected.type;
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageBox.Show("Please select an installation.", "No Selection", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
Loading