-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
even more redeems you won't believe it
fix big erm funny 😔 re-add a different funny to compensate
- Loading branch information
Showing
5 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
SCHIZO/SwarmControl/Redeems/Annoying/ScanTotallyRandomFragment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using SCHIZO.Commands.Base; | ||
using SCHIZO.Commands.Context; | ||
using SCHIZO.Commands.Output; | ||
using UnityEngine; | ||
using UWE; | ||
|
||
namespace SCHIZO.SwarmControl.Redeems.Annoying; | ||
|
||
[Redeem( | ||
Name = "redeem_scanrandomfragment", | ||
DisplayName = "Scan Random Fragment", | ||
Description = "Auto-scans a random fragment, chosen by fair dice roll." | ||
)] | ||
internal class ScanTotallyRandomFragment : Command, IParameters | ||
{ | ||
public IReadOnlyList<Parameter> Parameters => []; | ||
|
||
protected override object ExecuteCore(CommandExecutionContext ctx) | ||
{ | ||
CoroutineHost.StartCoroutine(Coro()); | ||
return CommonResults.OK(); | ||
} | ||
|
||
private IEnumerator Coro() | ||
{ | ||
yield return new WaitForSeconds(0.5f); | ||
ErrorMessage.AddMessage("Unlocking random fragment..."); | ||
yield return new WaitForSeconds(Random.Range(1f, 3f)); | ||
ErrorMessage.AddMessage("Result: Thermal Plant Fragment"); | ||
yield return InventoryConsoleCommands.ItemCmdSpawnAsync(2, TechType.Titanium); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
SCHIZO/SwarmControl/Redeems/Annoying/SpinHimAround.BelowZero.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Generic; | ||
using SCHIZO.Commands.Base; | ||
using SCHIZO.Commands.Context; | ||
using SCHIZO.Commands.Output; | ||
|
||
namespace SCHIZO.SwarmControl.Redeems.Annoying; | ||
[Redeem( | ||
Name = "redeem_spin", | ||
DisplayName = "Spin him around and make him dizzy" | ||
)] | ||
internal class SpinHimAround : Command, IParameters | ||
{ | ||
public IReadOnlyList<Parameter> Parameters => []; | ||
|
||
protected override object ExecuteCore(CommandExecutionContext ctx) | ||
{ | ||
if (!Player.main) return CommonResults.Error("Requires a loaded game."); | ||
|
||
Player.main.lilyPaddlerHypnosis.StartHypnosis(DayNightCycle.main.timePassed); | ||
|
||
return CommonResults.OK(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Collections.Generic; | ||
using Nautilus.Utility; | ||
using SCHIZO.Commands.Base; | ||
using SCHIZO.Commands.Context; | ||
using SCHIZO.Commands.Output; | ||
using UWE; | ||
|
||
namespace SCHIZO.SwarmControl.Redeems.Helpful; | ||
|
||
[Redeem( | ||
Name = "redeem_save", | ||
DisplayName = "Save Game", | ||
Description = "Please don't spam this one or we will disable it" | ||
)] | ||
internal class SaveGame : Command, IParameters | ||
{ | ||
public IReadOnlyList<Parameter> Parameters => []; | ||
|
||
private float _lastSave; | ||
public SaveGame() | ||
{ | ||
SaveUtils.RegisterOnFinishLoadingEvent(() => _lastSave = PDA.time); | ||
SaveUtils.RegisterOnSaveEvent(() => _lastSave = PDA.time); | ||
} | ||
|
||
protected override object ExecuteCore(CommandExecutionContext ctx) | ||
{ | ||
if (!Player.main) | ||
return CommonResults.Error("Requires a loaded game"); | ||
if (PDA.time - _lastSave >= 60f) // yoink money from spammers | ||
{ | ||
CoroutineHost.StartCoroutine(IngameMenu.main.SaveGameAsync()); | ||
_lastSave = PDA.time; | ||
} | ||
return CommonResults.OK(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters