forked from PerpetuumOnline/PerpetuumServer
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathActiveHackingSAP.cs
More file actions
37 lines (32 loc) · 1.05 KB
/
ActiveHackingSAP.cs
File metadata and controls
37 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Perpetuum.ExportedTypes;
using Perpetuum.Players;
using Perpetuum.Zones.Beams;
namespace Perpetuum.Zones.Intrusion
{
/// <summary>
/// Intrusion target which can be completed by using a hacking module on the SAP
/// </summary>
public class ActiveHackingSAP : SAP
{
private const int MAX_MODULE_CYCLE = 120;
public ActiveHackingSAP() : base(BeamType.attackpoint_usage_enter, BeamType.attackpoint_usage_out)
{
}
protected override int MaxScore => MAX_MODULE_CYCLE;
protected override void AppendTopScoresToPacket(Packet packet, int count)
{
AppendPlayerTopScoresToPacket(this, packet, count);
}
public void OnModuleUse(Player player)
{
Zone.CreateBeam(
BeamType.loot_bolt,
b => b
.WithSource(this)
.WithTarget(player)
.WithState(BeamState.Hit)
.WithDuration(3000));
IncrementPlayerScore(player, 1);
}
}
}