File tree 2 files changed +5
-0
lines changed
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public override void Spawn()
28
28
Player . RoleType = CustomRole . Spawnrole ;
29
29
Player . MaxHealth = CustomRole . MaxHealth ;
30
30
Player . Health = CustomRole . SpawnHealth ;
31
+ Player . GodMode = CustomRole . GodMode ;
31
32
CustomRole . Inventory . Apply ( Player ) ;
32
33
33
34
if ( ! string . IsNullOrWhiteSpace ( CustomRole . DisplayInfo ) )
@@ -57,6 +58,8 @@ public override void DeSpawn()
57
58
Player . DisplayInfo = string . Empty ;
58
59
if ( CustomRole . RemoveRoleName )
59
60
Player . AddDisplayInfo ( PlayerInfoArea . Role ) ;
61
+ if ( CustomRole . GodMode )
62
+ Player . GodMode = false ;
60
63
}
61
64
}
62
65
}
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public class CustomRole : IConfigSection
18
18
public RoleType Spawnrole { get ; set ; } = RoleType . ClassD ;
19
19
20
20
public int EscapeRole { get ; set ; } = - 1 ;
21
+
22
+ public bool GodMode { get ; set ; } = false ;
21
23
22
24
public float SpawnHealth { get ; set ; } = 100f ;
23
25
You can’t perform that action at this time.
0 commit comments