Skip to content

Add wrappers for almost all console commands. #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: bleeding-edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
21397e5
Add a thunderstore.build.props that is configured for devs using Thun…
Doug-Murphy May 4, 2025
3e6ad93
Add console command to add employee to property.
Doug-Murphy May 4, 2025
d471058
Add console command to add items to inventory.
Doug-Murphy May 4, 2025
7e047bd
Add console command to set player's bank balance.
Doug-Murphy May 4, 2025
a4d3251
Add console command to clear player's inventory.
Doug-Murphy May 4, 2025
b72644e
Add console command to clear trash from world.
Doug-Murphy May 4, 2025
127e5bb
Add console command to clear player's wanted level.
Doug-Murphy May 4, 2025
e812e71
Add console command to give player XP.
Doug-Murphy May 4, 2025
97a6fe1
Add console command to grow all plants in the world.
Doug-Murphy May 4, 2025
44e1b6a
Add console command to lower the player's wanted level.
Doug-Murphy May 4, 2025
e308cb1
Add console command to package equipped product.
Doug-Murphy May 4, 2025
8bbd656
Add console command to raise the player's wanted level.
Doug-Murphy May 4, 2025
6a6bd5d
Add console command to save the game.
Doug-Murphy May 4, 2025
4aa448a
Add console command to discover a product.
Doug-Murphy May 4, 2025
13c324e
Add console command to set the player's energy level.
Doug-Murphy May 4, 2025
27d25cf
Add console command to set the player's health.
Doug-Murphy May 4, 2025
fe6a16a
Add console command to set the player's jump multiplier.
Doug-Murphy May 4, 2025
77240bb
Add console command to set the intensity of law enforcement.
Doug-Murphy May 4, 2025
c301fa1
Add console command to set the player's move speed multiplier.
Doug-Murphy May 5, 2025
3ea8942
Add console commands to unlock businesses and properties.
Doug-Murphy May 7, 2025
80c8bff
Add new StorageUnit property from 0.3.5
Doug-Murphy May 8, 2025
ab5639e
Add console command to set item quality.
Doug-Murphy May 8, 2025
0a07a8c
Add console command to set quest state.
Doug-Murphy May 8, 2025
b627e5f
Massive cleanup with removing unnecessary preprocessor directives in …
Doug-Murphy May 8, 2025
e767f53
Add enum utility and console command to set NPC relationship.
Doug-Murphy May 8, 2025
53a11f0
Add console command to set time of day.
Doug-Murphy May 9, 2025
8ad7713
Add override for setting NPC relationship console command that uses N…
Doug-Murphy May 9, 2025
a3b7a2a
Add console command to unlock a NPC.
Doug-Murphy May 9, 2025
0bb68d5
Add console command to teleport to business and properties.
Doug-Murphy May 9, 2025
d32f8c4
Add console command to spawn vehicles.
Doug-Murphy May 9, 2025
d4fcb73
Add XML comments to VanillaQuest.cs
Doug-Murphy May 9, 2025
87eda29
Add Description attribute for Ming in VanillaNpcList.cs
Doug-Murphy May 9, 2025
1110c5d
Use block-scoped namespace in EnumUtils.cs
Doug-Murphy May 9, 2025
3e7941c
Use block-scoped namespace in VanillaVehicleList.cs
Doug-Murphy May 9, 2025
2f634df
Rename some console methods to be more descriptive.
Doug-Murphy May 9, 2025
2f2c152
Delete VanillaNpcList.cs
Doug-Murphy May 12, 2025
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
495 changes: 488 additions & 7 deletions S1API/Console/ConsoleHelper.cs

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions S1API/Internal/Utils/EnumUtils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.ComponentModel;
using System.Reflection;

namespace S1API.Internal.Utils
{
/// <summary>
/// A set of utility methods when working with enums.
/// </summary>
internal static class EnumUtils
{
/// <summary>
/// Gets the value of the Description attribute for an enum value.
/// </summary>
/// <param name="value">The enum value</param>
/// <returns>The description string or the enum value's name if no description is found</returns>
internal static string GetDescriptionValue(this Enum value)
{
var fieldInfo = value.GetType().GetField(value.ToString());
var attribute = fieldInfo?.GetCustomAttribute<DescriptionAttribute>();
return attribute?.Description ?? value.ToString();
}
}
}
21 changes: 21 additions & 0 deletions S1API/Products/Packaging/PackageType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace S1API.Products.Packaging
{
/// <summary>
/// The types of packages
/// </summary>
public enum PackageType
{
/// <summary>
/// The baggie package type.
/// </summary>
Baggie,
/// <summary>
/// The brick package type.
/// </summary>
Brick,
/// <summary>
/// The jar package type.
/// </summary>
Jar
}
}
64 changes: 64 additions & 0 deletions S1API/Property/PropertyType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
namespace S1API.Property
{
/// <summary>
/// The types of properties in the game.
/// </summary>
public enum PropertyType
{
/// <summary>
/// The Barn property.
/// </summary>
Barn,
/// <summary>
/// The Bungalow property.
/// </summary>
Bungalow,
/// <summary>
/// The Docks property.
/// </summary>
DocksWarehouse,
/// <summary>
/// The Manor property.
/// </summary>
Manor,
/// <summary>
/// The Motel Room property.
/// </summary>
MotelRoom,
/// <summary>
/// The RV property.
/// </summary>
Rv,
/// <summary>
/// The Storage Unit property.
/// </summary>
StorageUnit,
/// <summary>
/// The Sweatshop property
/// </summary>
Sweatshop
}

/// <summary>
/// The types of businesses in the game.
/// </summary>
public enum BusinessType
{
/// <summary>
/// The Car Wash business.
/// </summary>
CarWash,
/// <summary>
/// The Laundromat business.
/// </summary>
Laundromat,
/// <summary>
/// The Post Office business.
/// </summary>
PostOffice,
/// <summary>
/// The Taco Ticklers business.
/// </summary>
TacoTicklers,
}
}
106 changes: 106 additions & 0 deletions S1API/Quests/Constants/VanillaQuest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
using System.ComponentModel;

namespace S1API.Quests.Constants
{
/// <summary>
/// The list of quests in vanilla.
/// </summary>
public enum VanillaQuest
{
/// <summary>
/// The Botanists quest
/// </summary>
[Description("Botanists")]
Botanists,
/// <summary>
/// The Chemists quest
/// </summary>
[Description("Chemists")]
Chemists,
/// <summary>
/// The Clean Cash quest
/// </summary>
[Description("Clean Cash")]
Clean_Cash,
/// <summary>
/// The Cleaners quest
/// </summary>
[Description("Cleaners")]
Cleaners,
/// <summary>
/// The Dodgy Dealing quest
/// </summary>
[Description("Dodgy Dealing")]
Dodgy_Dealing,
/// <summary>
/// The Gearing Up quest
/// </summary>
[Description("Gearing Up")]
Gearing_Up,
/// <summary>
/// The Getting Started quest
/// </summary>
[Description("Getting Started")]
Getting_Started,
/// <summary>
/// The Keeping it Fresh quest
/// </summary>
[Description("Keeping it Fresh")]
Keeping_it_Fresh,
/// <summary>
/// The Making the Rounds quest
/// </summary>
[Description("Making the Rounds")]
Making_the_Rounds,
/// <summary>
/// The Mixing Mania quest
/// </summary>
[Description("Mixing Mania")]
Mixing_Mania,
/// <summary>
/// The Money Management quest
/// </summary>
[Description("Money Management")]
Money_Management,
/// <summary>
/// The Moving Up quest
/// </summary>
[Description("Moving Up")]
Moving_Up,
/// <summary>
/// The Needin' the Green quest
/// </summary>
[Description("Needin' the Green")]
NeedinTheGreen,
/// <summary>
/// The On the Grind quest
/// </summary>
[Description("On the Grind")]
On_the_Grind,
/// <summary>
/// The Packagers quest
/// </summary>
[Description("Packagers")]
Packagers,
/// <summary>
/// The Packin' quest
/// </summary>
[Description("Packin'")]
Packin,
/// <summary>
/// The We Need To Cook quest
/// </summary>
[Description("We Need To Cook")]
We_Need_To_Cook,
/// <summary>
/// The Welcome to Hyland Point quest
/// </summary>
[Description("Welcome to Hyland Point")]
Welcome_to_Hyland_Point,
/// <summary>
/// The Wretched Hive of Scum and Villainy quest
/// </summary>
[Description("Wretched Hive of Scum and Villainy")]
Wretched_Hive_of_Scum_and_Villainy,
}
}
6 changes: 5 additions & 1 deletion S1API/S1API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<!-- Imports the standard GitHub build properties. -->
<Import Project="../github.build.props" Condition="Exists('../github.build.props')" />

<!-- Imports any local build properties over the GitHub repository one. -->
<!-- Imports build properties for developers using Thunderstore Mod Manager. -->
<Import Project="../thunderstore.build.props" Condition="Exists('../thunderstore.build.props')" />

<!-- Imports any local build properties over the other build properties.
Serves as the "ultimate override" that is tailored specifically to the developer building the code. -->
<Import Project="../local.build.props" Condition="Exists('../local.build.props')" />

<!-- General properties -->
Expand Down
33 changes: 33 additions & 0 deletions S1API/Vehicles/VanillaVehicleList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace S1API.Vehicles
{
/// <summary>
/// The vehicles available in vanilla.
/// </summary>
public enum VanillaVehicleList
{
/// <summary>
/// The Bruiser vehicle.
/// </summary>
Bruiser,
/// <summary>
/// The Cheetah vehicle.
/// </summary>
Cheetah,
/// <summary>
/// The Dinkler vehicle.
/// </summary>
Dinkler,
/// <summary>
/// The Hounddog vehicle.
/// </summary>
Hounddog,
/// <summary>
/// The Shitbox vehicle.
/// </summary>
Shitbox,
/// <summary>
/// The Veeper vehicle.
/// </summary>
Veeper,
}
}
8 changes: 6 additions & 2 deletions S1APILoader/S1APILoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<!-- Imports the standard GitHub build properties. -->
<Import Project="../github.build.props" Condition="Exists('../github.build.props')" />

<!-- Imports any local build properties over the GitHub repository one. -->
<!-- Imports build properties for developers using Thunderstore Mod Manager. -->
<Import Project="../thunderstore.build.props" Condition="Exists('../thunderstore.build.props')" />

<!-- Imports any local build properties over the other build properties.
Serves as the "ultimate override" that is tailored specifically to the developer building the code. -->
<Import Project="../local.build.props" Condition="Exists('../local.build.props')" />

<PropertyGroup>
Expand All @@ -12,7 +16,7 @@
<Platforms>AnyCPU</Platforms>
<RootNamespace>S1APILoader</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(MelonLoaderAssembliesPath)\0Harmony.dll</HintPath>
Expand Down
35 changes: 35 additions & 0 deletions thunderstore.build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- This file should be placed inside your local directory in order to build. -->
<!-- Name the file `local.build.props`. -->
<!-- Adjust the properties below to fit your local configuration. -->

<Project>
<PropertyGroup>
<!-- General Configuration -->

<!-- Whether or not you want the build steps to copy over the newly built versions. -->
<AutomateLocalDeployment>true</AutomateLocalDeployment>

<!-- Used when building both Il2Cpp and Mono. Typically located at `steamapps/Schedule I/MelonLoader/net6` -->
<MelonLoaderAssembliesPath>$(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default\MelonLoader\net6</MelonLoaderAssembliesPath>
<BepInExAssembliesPath>TBD</BepInExAssembliesPath>

<!-- Mono Configuration -->

<!-- Used only when building against Mono. Typically located at `steamapps/Schedule I` -->
<LocalMonoDeploymentPath>$(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default</LocalMonoDeploymentPath>

<!-- Used only when building against Mono. Typically located at `steamapps/Schedule I/Schedule I_Data/Managed` -->
<MonoAssembliesPath>C:\Program Files (x86)\Steam\steamapps\common\Schedule I\Schedule I_Data\Managed</MonoAssembliesPath>

<!-- Il2Cpp Configuration -->

<!-- Used only when building against Il2Cpp. Typically located at `steamapps/Schedule I` -->
<LocalIl2CppDeploymentPath>$(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default</LocalIl2CppDeploymentPath>

<!-- Used only when building against Melon Il2Cpp. Typically located at `steamapps/Schedule I/MelonLoader/Il2CppAssemblies` -->
<Il2CppAssembliesPath Condition="'$(Configuration)' == 'Il2CppMelon'">$(AppData)\Thunderstore Mod Manager\DataFolder\ScheduleI\profiles\Default\MelonLoader\Il2CppAssemblies</Il2CppAssembliesPath>

<!-- Used only when building against BepInEx Il2Cpp. Typically located at `steamapps/Schedule I/BepInEx/interop` -->
<Il2CppAssembliesPath Condition="'$(Configuration)' == 'Il2CppBepInEx'">TBD</Il2CppAssembliesPath>
</PropertyGroup>
</Project>