Skip to content
This repository was archived by the owner on Apr 21, 2024. It is now read-only.

Merge Master to Melons Dev #29

Open
wants to merge 76 commits into
base: melon-networking-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
0943b9b
Merge pull request #15 from commandblox/dev
WackyModer Jan 23, 2024
c504ce9
Merge pull request #18 from commandblox/dev
codemob-dev Jan 23, 2024
e23034e
Version bump
codemob-dev Jan 23, 2024
68ca669
Version bump
codemob-dev Jan 23, 2024
d172228
Added a version file
invalid-email-address Jan 23, 2024
e65b85d
merged dev
invalid-email-address Jan 24, 2024
bdb6ecf
Merge branch 'dev'
invalid-email-address Feb 11, 2024
5c4a3bc
Merge branch 'dev'
invalid-email-address Feb 11, 2024
ea7c108
Added a roadmap to the readme
codemob-dev Feb 13, 2024
1cde7ca
added repo size badge
codemob-dev Feb 13, 2024
4a945b5
added latest release badge
codemob-dev Feb 13, 2024
a6a023a
Fixed latest release badge
codemob-dev Feb 13, 2024
ee7defa
Update README.md
codemob-dev Feb 13, 2024
393005d
merged dev to master
invalid-email-address Feb 14, 2024
bbfb8b3
Merge branch 'master' of https://github.com/commandblox/Splotch
invalid-email-address Feb 14, 2024
488d7d4
updated readme for 0.4.0
codemob-dev Feb 15, 2024
f797a27
Update README.md
codemob-dev Feb 15, 2024
c0d350a
Update LICENSE
codemob-dev Feb 17, 2024
5837499
ahhh you desynced stufff
WackyModer Feb 18, 2024
637053d
Merge pull request #21 from WackyModer/dev
WackyModer Feb 18, 2024
85fc973
Read stuff
Feb 24, 2024
45cfe2e
Updated Readme.md
Feb 24, 2024
ed75f1b
Update README.md
AbstractMelon Feb 24, 2024
47e296b
Update README.md
AbstractMelon Feb 24, 2024
c8c16d3
Update README.md
AbstractMelon Feb 24, 2024
20d72b2
Update README.md
AbstractMelon Feb 24, 2024
427c90d
Update README.md
AbstractMelon Feb 24, 2024
825ab53
Update README.md
AbstractMelon Feb 24, 2024
5b048f1
Update README.md
AbstractMelon Mar 4, 2024
ac0579a
Update README.md
AbstractMelon Mar 4, 2024
5257b6a
Added mod dependency support (#24)
almafa64 Mar 12, 2024
c83f7b1
Update README.md
AbstractMelon Mar 18, 2024
eeb5a0a
Update README.md
AbstractMelon Mar 18, 2024
1e7dcd3
Merge pull request #25 from AbstractMelon/master
AbstractMelon Mar 18, 2024
a7becbb
Add files via upload
AbstractMelon Mar 18, 2024
ac6db88
Rename Splotchart.png to githublogo.png
AbstractMelon Mar 18, 2024
1227187
Added an image
AbstractMelon Mar 18, 2024
189ebd0
Fixed license
AbstractMelon Mar 18, 2024
a82339a
Merge branch 'master' into dev
AbstractMelon Mar 20, 2024
2e04f87
Update version
AbstractMelon Mar 20, 2024
dbe5d98
Merge pull request #26 from commandblox/dev
AbstractMelon Mar 20, 2024
3ba1205
Merge pull request #27 from commandblox/master
WackyModer Mar 20, 2024
dd8e891
Merge pull request #28 from commandblox/dev
AbstractMelon Mar 20, 2024
c8c2ebf
Created SplotchPatches.cs
AbstractMelon Mar 20, 2024
b4f0deb
Update ModLoader.cs
AbstractMelon Mar 20, 2024
47bbfc9
cmon github
AbstractMelon Mar 20, 2024
dd9c1f5
Added patch code
AbstractMelon Mar 20, 2024
14c674d
Added a patch to SplotchPatches
AbstractMelon Mar 20, 2024
610f979
Update SplotchPatches.cs
AbstractMelon Mar 20, 2024
4ca4337
Update SplotchPatches.cs
AbstractMelon Mar 20, 2024
23fb419
please fix dis
AbstractMelon Mar 20, 2024
a4497fa
say
AbstractMelon Mar 20, 2024
7cfdffd
Added Almafa64
AbstractMelon Mar 20, 2024
7d445f7
Undid my patch fixes cuz codemob already did
AbstractMelon Mar 20, 2024
4645dc6
Update run.bat
AbstractMelon Mar 20, 2024
5e6ef37
Update GuiModifications.cs
AbstractMelon Mar 20, 2024
b028d10
EpicPatchingStuff
AbstractMelon Mar 20, 2024
901a5f8
Merge branch 'melon-networking-dev' into master
AbstractMelon Mar 20, 2024
4a821b9
Revert "Merge branch 'melon-networking-dev' into master"
AbstractMelon Mar 20, 2024
5baf020
Added more betterer
AbstractMelon Mar 24, 2024
a0c70a1
Update HarmonyLoader.cs
AbstractMelon Mar 24, 2024
845262b
added the thunderstore stuff
AbstractMelon Mar 24, 2024
ad7a43b
Simpler stuffs
AbstractMelon Mar 24, 2024
9ed88d7
thunderstore stuff pt 2
AbstractMelon Mar 24, 2024
3e2e277
Update AssemblyInfo.cs
AbstractMelon Mar 24, 2024
8f30207
Update AssemblyInfo.cs
AbstractMelon Mar 24, 2024
f2309ee
Update AssemblyInfo.cs
AbstractMelon Mar 24, 2024
2173fd4
Update version
AbstractMelon Mar 24, 2024
24fa913
Merge branch 'master' into dev
AbstractMelon Mar 24, 2024
45271f9
Merge pull request #30 from commandblox/dev
AbstractMelon Mar 24, 2024
d06d536
Update version
AbstractMelon Mar 24, 2024
587df85
Update VersionChecker.cs
AbstractMelon Mar 24, 2024
d8b3c2c
Update version
AbstractMelon Mar 24, 2024
b4c7468
Update AssemblyInfo.cs
AbstractMelon Mar 24, 2024
e4519df
ctrl + z
AbstractMelon Apr 6, 2024
f32f1c1
archive
codemob-dev Apr 21, 2024
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
4 changes: 2 additions & 2 deletions GuiModifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal static void RunMainMenuModifications()
textComponent.font = LocalizedText.localizationTable.GetFont(Settings.Get().Language, false);
textComponent.color = Color.Lerp(Color.blue, Color.black, 0.6f);

// not sure what this is I stole it from WackyModer lol
// not sure what this is I stole it from WackyModer lol -- Melon, It stops the text from being clickced and blocking the buttons I think
textComponent.raycastTarget = false;

textComponent.fontSize = 13;
Expand Down Expand Up @@ -91,4 +91,4 @@ internal static string GetBepInExInfo()
return text;
}
}
}
}
65 changes: 64 additions & 1 deletion HarmonyLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,70 @@ namespace Splotch.Loader
/// </summary>
internal static class Patcher
{
public static Harmony harmony = new Harmony("com.codemob.splotch");
public static Harmony harmony = new Harmony("com.splotch.splotchfixes");
/// <summary>
/// Runs all of Splotch's patches.
/// </summary>
public static void DoPatching()
{
harmony.PatchAll(typeof(Patches));
}

[HarmonyPatch]
internal static class Patches
{
/* im not done with this yet
[HarmonyPatch(typeof(Client)]
public static bool UpdateInputHistoryReplacement(Client __instance, InputPacketUpdate update)
{
uint num = this.inputHistoryHeadSeqNum;
int num2 = (int)(update.seqNumber - num);
if (num2 > 32)
{
Debug.LogError("Discarded a packet because it was too new");
return true;
}
for (int i = num2 - 1; i >= 0; i--)
{
uint num = this.inputHistoryHeadSeqNum;
int num2 = (int)(update.seqNumber - num);
if (num2 > 32)
{
Debug.LogError("Discarded a packet because it was too new");
return true;
}
for (int i = num2 - 1; i >= 0; i--)
{
uint num3 = 1U << i;
InputPacket inputPacket = default(InputPacket);
inputPacket.jump = ((update.jump & num3) > 0U);
inputPacket.ab1 = ((update.ab1 & num3) > 0U);
inputPacket.ab2 = ((update.ab2 & num3) > 0U);
inputPacket.ab3 = ((update.ab3 & num3) > 0U);
inputPacket.select = ((update.select & num3) > 0U);
inputPacket.start = ((update.start & num3) > 0U);
inputPacket.w = ((update.w & num3) > 0U);
inputPacket.a = ((update.a & num3) > 0U);
inputPacket.s = ((update.s & num3) > 0U);
inputPacket.d = ((update.d & num3) > 0U);
inputPacket.joystickAngle = update.joystickAngle[i];
inputPacket.targetDelayBufferSize = update.targetDelayBufferSize;
inputPacket.seqNumber = num + 1U;
num += 1U;
this.inputHistory.Enqueue(inputPacket);
this.inputHistoryHeadSeqNum = inputPacket.seqNumber;
}
return false;
}
*/
// put your patch here
}

[HarmonyPatch]
internal static class Patches
{
// second one for ease
}
}

}
26 changes: 9 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
MIT License
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (c) 2024 codemob
Copyright (C) 2004 Sam Hocevar <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
0. You just DO WHAT THE FUCK YOU WANT TO.
40 changes: 35 additions & 5 deletions Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
using System.Collections;
using HarmonyLib;
using MonoMod.Utils;
using Splotch.Network;
using Splotch.UserInterface;

namespace Splotch.Loader
{
Expand All @@ -21,6 +19,7 @@ namespace Splotch.Loader
public static class Loader
{
public static bool BepInExPresent { get { return Directory.Exists(@"BepInEx\core\"); } }
public static string ModPath = null;

struct SplotchConfigContainer
{
Expand All @@ -42,11 +41,17 @@ public static void OnEnterScene(Scene scene, LoadSceneMode loadSceneMode)

Logger.Log($"Entering main menu on version {VersionChecker.currentVersionString}");

string[] commandLineArgs = Environment.GetCommandLineArgs();

foreach (string arg in commandLineArgs)
{
Console.WriteLine(arg);
}

enteredScene = true;
Patcher.DoPatching();
ModLoader.ModLoader.LoadMods();
EventManager.Load();
Networker.Load();
UserInterface.SplotchGUI.Load();

GameObject obj = new GameObject("Unloader", new Type[] { typeof(UnLoader) });
Logger.Debug("Finished main menu loading!");
Expand Down Expand Up @@ -80,6 +85,31 @@ public static void LoadBepInEx()
/// </summary>
public static void Main()
{
// Test for the "--begone-splotch" command line arg so we can run vanilla

string[] commandLineArgs = Environment.GetCommandLineArgs();

bool CustomPath = false;
foreach (string arg in commandLineArgs)
{
if (CustomPath)
{
ModPath = arg;
}

CustomPath = false;

// I have no clue why, it just breaks randomly and inoften when this is not .Contains()
if (arg.Contains("--begone-splotch"))
{
return;
}

if (arg.Contains("--splotch-mods-dir"))
{
CustomPath = true;
}
}
if (BepInExPresent)
LoadBepInEx();

Expand Down Expand Up @@ -144,4 +174,4 @@ public static void LoadBepInExUnstable()
SceneManager.sceneLoaded += Loader.SceneLoaded;
}
}
}
}
Loading