-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCPSL-SCP-181.cs
90 lines (63 loc) · 2.58 KB
/
SCPSL-SCP-181.cs
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Smod2;
using Smod2.Attributes;
using SCPSL_SCP_181;
using SCPSL_SCP_181.Event;
using Smod2.Config;
using Smod2.Events;
namespace SCPSL_SCP_181 {
[PluginDetails(
author = "SaigyoujiYuyuko",
configPrefix = "scp181",
name = "SCP-181",
description = "Randomly D-class personnel have randomly chance to open the authorizing door without KeyCards",
id = "org.shitsurakugensou.scp.scp-181",
version = "1.0.1",
SmodMajor = 3,
SmodMinor = 1,
SmodRevision = 20
)]
public class SCPSL_SCP_181 : Plugin{
public override void OnDisable(){
this.Info("[SCP-181][Info] SCP181 disable!");
}
public override void OnEnable(){
this.Info("[SCP-181][Info] SCP181 loaded!");
}
public override void Register() {
/*
* 插件配置文件
*/
// 是否启用插件
this.AddConfig(new ConfigSetting("scp181_enable", true, true, "enable/disable scp181"));
// 调试模式
this.AddConfig(new ConfigSetting("scp181_debug", false, true, "enable/disable debug mode for scp181"));
// 181称号显示
this.AddConfig(new ConfigSetting("scp181_prefix_display", true, true, "enable/disable prefix of scp181"));
// 181开门几率
this.AddConfig(new ConfigSetting("scp181_door_open_chance", 6, true, "How many percentage that SCP181 can open the door"));
// 181躲避攻击几率
this.AddConfig(new ConfigSetting("scp181_dodge_chance", 6, true, "How many percentage that SCP181 can dodge the attack"));
/*
* 注册事件
*/
// 开局选取181
this.AddEventHandlers(new OnGameStartEvent(this));
// 玩家开门事件
this.AddEventHandlers(new OnDoorAccessEvent(this));
// SCP-181 躲避攻击
this.AddEventHandlers(new OnPlayerHurtEvent(this));
// SCP-181 出逃
this.AddEventHandlers(new OnCheckEscapeEvent(this), Priority.Highest);
// SCP-181 死亡
this.AddEventHandlers(new OnPlayerDieEvent(this));
// SCP-181 转换阵营
this.AddEventHandlers(new OnPlayerSpawnEvent(this), Priority.Highest);
return;
}
}
}