various thingies
This commit is contained in:
@@ -23,6 +23,7 @@ public class GamblingCoinChancesConfig
|
||||
public int AdvancedPositiveEffectChance { get; set; } = 150;
|
||||
public int AdvancedNegativeEffectChance { get; set; } = 250;
|
||||
public int RemoveCoinChance { get; set; } = 300;
|
||||
public int SpawnZombieChance { get; set; } = 100;
|
||||
}
|
||||
|
||||
public class GamblingCoinMessages
|
||||
@@ -44,6 +45,7 @@ public class GamblingCoinMessages
|
||||
public string NegativeEffectMessage { get; set; } = "You feel worse";
|
||||
public string AdvancedNegativeEffectMessage { get; set; } = "You feel like you could die any second";
|
||||
public string SwitchInventoryMessage { get; set; } = "Whoops... looks like something happened to your items!";
|
||||
public string SpawnZombieMessage { get; set; } = "You spawned as a Zombie!";
|
||||
}
|
||||
|
||||
public class GamblingCoinGameplayConfig
|
||||
|
||||
@@ -187,7 +187,23 @@ public class GamblingCoinEventHandler
|
||||
x.Player.ClearInventory();
|
||||
foreach (var randomPlayerItem in randomPlayerItems) x.Player.AddItem(randomPlayerItem.Type);
|
||||
}, configChances.SwitchInventoryChance)
|
||||
.AddAction(x => { x.Player.CurrentItem?.DropItem().Destroy(); }, configChances.RemoveCoinChance);
|
||||
.AddAction(x => { x.Player.CurrentItem?.DropItem().Destroy(); }, configChances.RemoveCoinChance)
|
||||
.AddAction(x =>
|
||||
{
|
||||
var spectators = Player.List.Where(player => player.Role == RoleTypeId.Spectator).ToArray();
|
||||
var spectator = spectators[Random.Range(0, spectators.Length)];
|
||||
|
||||
spectator.SendBroadcast(configMessages.SpawnZombieMessage, configGameplay.BroadcastDuration);
|
||||
spectator.SetRole(RoleTypeId.Scp0492);
|
||||
|
||||
var spawnRoom = Map.Rooms.First(room => room.Name == RoomName.HczWarhead);
|
||||
if (Warhead.IsDetonated)
|
||||
{
|
||||
spawnRoom = Map.Rooms.First(room => room.Name == RoomName.Outside);
|
||||
}
|
||||
|
||||
spectator.Position = spawnRoom.Position + new Vector3(0, 1, 0);
|
||||
}, configChances.SpawnZombieChance);
|
||||
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user