Skip to content

Commit

Permalink
fixed spare nameless + enabled garage buy\upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
LIPtoH committed Jan 14, 2019
1 parent 9906201 commit 7dca768
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 77 deletions.
7 changes: 7 additions & 0 deletions TS SE Tool/CustomClasses/PlayerProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ You may obtain a copy of the License at
See the License for the specific language governing permissions and
limitations under the License.
*/
using System.Collections.Generic;

namespace TS_SE_Tool
{
class PlayerProfile
Expand All @@ -24,6 +26,11 @@ class PlayerProfile
public byte[] PlayerSkills { get; set; }
public string CompanyName { get; set; }
public int CreationTime { get; set; }
public string UserCompanyAssignedTruck { get; set; }
public string UserCompanyAssignedTruckPlacement { get; set; }
public string UserCompanyAssignedTrailer { get; set; }
//public string UserCompanyAssignedTrailerPlacement { get; set; }
public List<string> UserCompanyAssignedSlaveTrailerPlacements = new List<string>();


public PlayerProfile(string _HQcity, uint _Expirience, byte[] _PlayerSkills, uint _AccountMoney)
Expand Down
10 changes: 6 additions & 4 deletions TS SE Tool/DataManipulation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ private void PrepareData(object sender, DoWorkEventArgs e)
tempGarage.Vehicles.Add(tempSavefileInMemory[line].Split(new char[] { ' ' })[2]);
else if (tempSavefileInMemory[line].StartsWith(" drivers["))
tempGarage.Drivers.Add(tempSavefileInMemory[line].Split(new char[] { ' ' })[2]);
else if (tempSavefileInMemory[line].StartsWith(" trailers["))
tempGarage.Trailers.Add(tempSavefileInMemory[line].Split(new char[] { ' ' })[2]);
else if (tempSavefileInMemory[line].StartsWith(" status:"))
tempGarage.GarageStatus = int.Parse(tempSavefileInMemory[line].Split(new char[] { ':' })[1]);
else if (tempSavefileInMemory[line].StartsWith("}"))
Expand Down Expand Up @@ -372,7 +374,7 @@ private void PrepareData(object sender, DoWorkEventArgs e)
if (tempSavefileInMemory[line].StartsWith(" assigned_truck:"))
{
chunkOfline = tempSavefileInMemory[line].Split(new char[] { ' ' });
UserCompanyAssignedTruck = chunkOfline[2];
PlayerProfileData.UserCompanyAssignedTruck = chunkOfline[2];
continue;
}

Expand All @@ -393,14 +395,14 @@ private void PrepareData(object sender, DoWorkEventArgs e)
if(tempSavefileInMemory[line].StartsWith(" assigned_trailer:"))
{
chunkOfline = tempSavefileInMemory[line].Split(new char[] { ' ' });
UserCompanyAssignedTrailer = chunkOfline[2];
PlayerProfileData.UserCompanyAssignedTrailer = chunkOfline[2];
continue;
}

if (tempSavefileInMemory[line].StartsWith(" truck_placement:"))
{
//chunkOfline = tempSavefileInMemory[line].Split(new char[] { ':' });
UserCompanyAssignedTruckPlacement = tempSavefileInMemory[line];//chunkOfline[1];
chunkOfline = tempSavefileInMemory[line].Split(new char[] { ':' });
PlayerProfileData.UserCompanyAssignedTruckPlacement = chunkOfline[1].TrimStart(' ');
continue;
}

Expand Down
4 changes: 0 additions & 4 deletions TS SE Tool/FormMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions TS SE Tool/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public partial class FormMain : Form
private string LoopStartCity;
private string LoopStartCompany;

private string UserCompanyAssignedTruck;
private string UserCompanyAssignedTrailer;
private string UserCompanyAssignedTruckPlacement;
//private string UserCompanyAssignedTruck;
//private string UserCompanyAssignedTrailer;
//private string UserCompanyAssignedTruckPlacement;
private bool UserCompanyAssignedTruckPlacementEdited;

private string ProfileETS2;
Expand Down
Loading

0 comments on commit 7dca768

Please # to comment.