Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 9771bbd

Browse files
committed
removed Old patches and some fixes
1 parent d96ebe7 commit 9771bbd

38 files changed

+191
-5405
lines changed

Synapse3.Bootstrap/Synapse3.Bootstrap.csproj

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Patchless|AnyCPU' ">
4141
<OutputPath>bin\Patchless\</OutputPath>
4242
</PropertyGroup>
43+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Custom Version|AnyCPU' ">
44+
<OutputPath>bin\Custom Version\</OutputPath>
45+
<Optimize>true</Optimize>
46+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
47+
<PlatformTarget>x64</PlatformTarget>
48+
</PropertyGroup>
4349
<ItemGroup>
4450
<Reference Include="Assembly-CSharp">
4551
<HintPath>..\Refs\Assembly-CSharp-Publicized.dll</HintPath>

Synapse3.ExamplePlugin/ExampleConfig.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Collections.Generic;
22
using Neuron.Core.Meta;
33
using Syml;
4-
using Synapse3.SynapseModule.Role;
54

65
namespace Synapse3.ExamplePlugin;
76

Synapse3.ExamplePlugin/ExempleAbstractRole.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Synapse3.SynapseModule.Map.Rooms;
55
using Synapse3.SynapseModule.Player;
66
using Synapse3.SynapseModule.Role;
7-
using System.Collections.Generic;
87
using UnityEngine;
98

109
namespace Synapse3.ExamplePlugin;

Synapse3.Platform/Synapse3.Platform.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,9 @@
4545
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
4646
<DocumentationFile />
4747
</PropertyGroup>
48+
49+
<PropertyGroup Condition=" '$(Configuration)' == 'Custom Version' ">
50+
<Optimize>true</Optimize>
51+
</PropertyGroup>
4852

4953
</Project>

Synapse3.SynapseModule/Config/GamePlayConfiguration.cs

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ public class GamePlayConfiguration : IDocumentSection
1616
[Description("If Enabled everyone can attack everyone after the Round ended")]
1717
public bool AutoFriendlyFire { get; set; } = true;
1818

19-
[Description("If Enabled SCP-268 will hide you even for SCP-096 and SCP-079")]
20-
public bool BetterScp268{ get; set; } = false;
21-
2219
[Description("If enabled a Player don't need to equip his keycard to use it")]
2320
public bool RemoteKeyCard{ get; set; } = false;
2421

Synapse3.SynapseModule/Config/SynapseTranslation.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SynapseTranslation : Translations<SynapseTranslation>
3232
public string DnT { get; set; } =
3333
"You have enabled Do Not Track in your settings therefore can we not store your language";
3434

35-
public string DeathMessage { get; set; } = "You were killed by\n{0}\nas\n{1}";
35+
public string DeathMessage { get; set; } = "You were killed by\\n{0}\\nas\\n{1}";
3636

3737
public string KeyBindCommandGetCommand { get; set; } = "Select a command whose bind you want to change, current bind:{0}";
3838
public string KeyBindCommandSelectKey { get; set; } = "Please press the new key";

Synapse3.SynapseModule/DebugService.cs

+7-19
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
using MEC;
2-
using Neuron.Core.Events;
1+
using Neuron.Core.Events;
32
using Neuron.Core.Meta;
4-
using PlayerStatsSystem;
5-
using PlayerRoles;
63
using Synapse3.SynapseModule.Command;
7-
using Synapse3.SynapseModule.Dummy;
84
using Synapse3.SynapseModule.Events;
95
using Synapse3.SynapseModule.Teams;
106
using System;
11-
using Respawning;
12-
using Synapse3.SynapseModule.Item;
13-
using Synapse3.SynapseModule.Map.Objects;
14-
using Synapse3.SynapseModule.Map.Schematic;
15-
using Synapse3.SynapseModule.Player;
7+
using Synapse3.SynapseModule.Enums;
168
using UnityEngine;
179

1810

@@ -49,23 +41,18 @@ public override void Enable()
4941
foreach (var reactor in _event.Reactors)
5042
{
5143
if (reactor.Key == typeof(UpdateObjectEvent)) continue;
44+
if (reactor.Key == typeof(UpdateEvent)) continue;
5245
if (reactor.Key == typeof(EscapeEvent)) continue;
5346
if (reactor.Key == typeof(Scp173ObserveEvent)) continue;
5447
if (reactor.Key == typeof(KeyPressEvent)) continue;
5548
if (reactor.Key == typeof(SpeakEvent)) continue;
5649
if (reactor.Key == typeof(RoundCheckEndEvent)) continue;
50+
if (reactor.Key == typeof(SendPlayerDataEvent)) continue;
5751
if (reactor.Key.IsAbstract) continue;
5852
reactor.Value.SubscribeUnsafe(this, method);
5953
}
6054
_player.KeyPress.Subscribe(OnKeyPress);
61-
_round.SelectTeam.Subscribe(ev =>
62-
{
63-
ev.TeamId = 15;
64-
});
65-
_round.SpawnTeam.Subscribe(ev =>
66-
{
67-
ev.Allow = false;
68-
});
55+
_player.Pickup.Subscribe(ev => ev.Allow = false);
6956
}
7057

7158
public void Event(IEvent ev)
@@ -78,7 +65,8 @@ private void OnKeyPress(KeyPressEvent ev)
7865
switch (ev.KeyCode)
7966
{
8067
case KeyCode.Alpha1:
81-
Logger.Warn(ev.Player.MaxHealth);
68+
ev.Player.Invisible += 1;
69+
if (ev.Player.Invisible > InvisibleMode.Full) ev.Player.Invisible = InvisibleMode.None;
8270
break;
8371

8472
case KeyCode.Alpha2:

Synapse3.SynapseModule/Events/EventHooks.cs

+8-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public bool PlayerChangeItemHook(IPlayer player, ushort oldItem, ushort newItem)
4242
}
4343
}
4444

45-
//TODO: Make this for all types of Damages not only damage by other player
4645
[PluginEvent(ServerEventType.PlayerDamage)]
4746
public bool PlayerDamageHook(IPlayer player, IPlayer target, DamageHandlerBase damageHandler)
4847
{
@@ -62,19 +61,12 @@ public bool PlayerFreeHook(IPlayer player, IPlayer target)
6261
FreePlayer.RaiseSafely(ev);
6362
return ev.Allow;
6463
}
65-
66-
[PluginEvent(ServerEventType.PlayerSearchPickup)]
67-
public bool PlayerSearchedPickupHook(IPlayer player, ItemPickupBase item)
68-
{
69-
var ev = new PickupEvent(player.GetSynapsePlayer(), true, item.GetItem());
70-
Pickup.RaiseSafely(ev);
71-
return ev.Allow;
72-
}
7364
}
7465

7566
public partial class RoundEvents
7667
{
7768
private bool _firstTime = true;
69+
7870
[PluginEvent(ServerEventType.WaitingForPlayers)]
7971
public void RoundWaitingHook()
8072
{
@@ -87,7 +79,8 @@ public void RoundWaitingHook()
8779
public void RoundStartHook() => Start.RaiseSafely(new RoundStartEvent());
8880

8981
[PluginEvent(ServerEventType.RoundEnd)]
90-
public void RoundEndHook(RoundSummary.LeadingTeam leadingTeam) => End.RaiseSafely(new RoundEndEvent(RoundSummary.LeadingTeam.Draw));
82+
public void RoundEndHook(RoundSummary.LeadingTeam leadingTeam) =>
83+
End.RaiseSafely(new RoundEndEvent(RoundSummary.LeadingTeam.Draw));
9184

9285
[PluginEvent(ServerEventType.RoundRestart)]
9386
public void RoundRestartHook() => Restart.RaiseSafely(new RoundRestartEvent());
@@ -102,9 +95,10 @@ public bool DecontaminationHook()
10295
DecontaminationController.Singleton.NetworkDecontaminationOverride =
10396
DecontaminationController.DecontaminationStatus.None;
10497
}
98+
10599
return ev.Allow;
106100
}
107-
101+
108102
[PluginEvent(ServerEventType.WarheadStart)]
109103
public bool WarheadStartHook(bool isAutomatic, IPlayer player, bool isResumed)
110104
{
@@ -169,7 +163,8 @@ public bool PlayerCuffHook(IPlayer player, IPlayer target)
169163
{
170164
var synapsePlayer = player.GetSynapsePlayer();
171165
var synapseTarget = target.GetSynapsePlayer();
172-
var ev = new DisarmEvent(synapsePlayer.Inventory.ItemInHand, ItemInteractState.Finalize, synapsePlayer, synapseTarget);
166+
var ev = new DisarmEvent(synapsePlayer.Inventory.ItemInHand, ItemInteractState.Finalize, synapsePlayer,
167+
synapseTarget);
173168
Disarm.RaiseSafely(ev);
174169
return ev.Allow;
175170
}
@@ -197,7 +192,7 @@ public bool DetonateWarheadHook()
197192
DetonateWarhead.RaiseSafely(ev);
198193
return ev.Allow;
199194
}
200-
195+
201196
[PluginEvent(ServerEventType.WarheadStop)]
202197
public bool PlayerCancelWarhead(IPlayer player)
203198
{

Synapse3.SynapseModule/Events/MapEvents.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,14 @@ public ElevatorMoveContentEvent(IElevator elevator)
118118

119119
public class TriggerTeslaEvent : PlayerInteractEvent
120120
{
121-
public TriggerTeslaEvent(SynapsePlayer player, bool allow, SynapseTesla tesla) : base(player, allow)
121+
public TriggerTeslaEvent(SynapsePlayer player, bool allow, SynapseTesla tesla, bool idle) : base(player, allow)
122122
{
123123
Tesla = tesla;
124+
Idle = idle;
124125
}
125126

127+
public bool Idle { get; }
128+
126129
public SynapseTesla Tesla { get; }
127130
}
128131

Synapse3.SynapseModule/Events/PlayerEvents.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Hazards;
22
using Interactables.Interobjects.DoorUtils;
3-
using MEC;
43
using Neuron.Core.Events;
54
using Neuron.Core.Meta;
65
using PlayerRoles;
@@ -72,11 +71,13 @@ public override void Enable()
7271
_eventManager.RegisterEvent(KeyPress);
7372
_eventManager.RegisterEvent(HarmPermission);
7473
_eventManager.RegisterEvent(SetClass);
74+
_eventManager.RegisterEvent(Update);
7575
_eventManager.RegisterEvent(StartWarhead);
7676
_eventManager.RegisterEvent(DoorInteract);
7777
_eventManager.RegisterEvent(LockerUse);
7878
_eventManager.RegisterEvent(WarheadPanelInteract);
7979
_eventManager.RegisterEvent(Ban);
80+
_eventManager.RegisterEvent(Damage);
8081
_eventManager.RegisterEvent(ChangeItem);
8182
_eventManager.RegisterEvent(Death);
8283
_eventManager.RegisterEvent(FreePlayer);
@@ -114,11 +115,13 @@ public override void Disable()
114115
_eventManager.UnregisterEvent(KeyPress);
115116
_eventManager.UnregisterEvent(HarmPermission);
116117
_eventManager.UnregisterEvent(SetClass);
118+
_eventManager.UnregisterEvent(Update);
117119
_eventManager.UnregisterEvent(StartWarhead);
118120
_eventManager.UnregisterEvent(DoorInteract);
119121
_eventManager.UnregisterEvent(LockerUse);
120122
_eventManager.UnregisterEvent(WarheadPanelInteract);
121123
_eventManager.UnregisterEvent(Ban);
124+
_eventManager.UnregisterEvent(Damage);
122125
_eventManager.UnregisterEvent(ChangeItem);
123126
_eventManager.UnregisterEvent(Death);
124127
_eventManager.UnregisterEvent(FreePlayer);

Synapse3.SynapseModule/OldPatches/CommandPatches.cs

-141
This file was deleted.

0 commit comments

Comments
 (0)