first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using NitroxClient.Communication.Packets.Processors.Abstract;
using NitroxModel;
using NitroxModel.Packets;
using Story;
namespace NitroxClient.Communication.Packets.Processors;
public class PlaySunbeamEventProcessor : ClientPacketProcessor<PlaySunbeamEvent>
{
public override void Process(PlaySunbeamEvent packet)
{
// TODO: Look into compound goals and OnUnlock goals to bring back the necessary ones
int beginIndex = PlaySunbeamEvent.SunbeamGoals.GetIndex(packet.EventKey);
if (beginIndex == -1)
{
Log.Error($"Couldn't find the corresponding sunbeam event in {nameof(PlaySunbeamEvent.SunbeamGoals)} for key {packet.EventKey}");
return;
}
for (int i = beginIndex; i < PlaySunbeamEvent.SunbeamGoals.Length; i++)
{
StoryGoalManager.main.completedGoals.Remove(PlaySunbeamEvent.SunbeamGoals[i]);
}
// Same execution as for StoryGoalCustomEventHandler commands
StoryGoalManager.main.OnGoalComplete(packet.EventKey);
}
}