improve colors
This commit is contained in:
parent
0ff218530b
commit
9c67403aa8
@ -11,6 +11,9 @@ namespace DeathLog;
|
||||
|
||||
public static class LogHandler {
|
||||
|
||||
private const string Lime = "#00FF00";
|
||||
private const string Cyan = "#00FFF6";
|
||||
|
||||
private static readonly Color DntColor = new(0.59f, 0.59f, 0.59f);
|
||||
|
||||
private static bool IsWeapon(ItemType type) => type is ItemType.GunCOM15
|
||||
@ -35,10 +38,10 @@ public static class LogHandler {
|
||||
), true, permissions);
|
||||
|
||||
private static string GetDeathMessage(DamageHandlerBase handler) => handler switch {
|
||||
CustomReasonDamageHandler custom => $"{{0}} has died: {custom._deathReason.Bold().Color("#00FF00").Size(30)}",
|
||||
UniversalDamageHandler universal => $"{{0}} has died. Reason: {universal._logsText.TrimEnd('.').Bold().Color("#00FF00").Size(30)}",
|
||||
WarheadDamageHandler => $"{{0}} died to {"the Alpha Warhead".Bold().Color("#00FF00").Size(30)}",
|
||||
_ => $"{{0}} has died. {"Reason is unknown".Italic().Color("#00FF00")}"
|
||||
CustomReasonDamageHandler custom => $"{{0}} has died: {custom._deathReason.Bold().Color(Lime).Size(30)}",
|
||||
UniversalDamageHandler universal => $"{{0}} has died. Reason: {universal._logsText.TrimEnd('.').Bold().Color(Lime).Size(30)}",
|
||||
WarheadDamageHandler => $"{{0}} died to {"the Alpha Warhead".Bold().Color(Lime).Size(30)}",
|
||||
_ => $"{{0}} has died. {"Reason is unknown".Italic().Color(Lime)}"
|
||||
};
|
||||
|
||||
public static void LogAttackerDeathMessage(Player victim, Player attacker, AttackerDamageHandler handler, PlayerPermissions permissions) {
|
||||
@ -69,7 +72,7 @@ public static class LogHandler {
|
||||
|
||||
private static string GetIdWithDnt(Player player) {
|
||||
var dnt = player.DoNotTrack;
|
||||
return $"{(dnt ? "(DNT)".Color(DntColor).Size(50) + " " : "")}{player.UserId} {player.PlayerId.ToString().Bold().Color("yellow").Size(30)}";
|
||||
return $"{(dnt ? "(DNT)".Color(DntColor).Size(50) + " " : "")}{player.UserId.Color(Color.magenta)} {player.PlayerId.ToString().Bold().Color("yellow").Size(30)}";
|
||||
}
|
||||
|
||||
private static object GetKillerStatus(Player attacker) {
|
||||
@ -90,24 +93,24 @@ public static class LogHandler {
|
||||
|
||||
private static string GetKillMessage(AttackerDamageHandler handler, bool canBeKos, bool hasWeaponEquipped, bool cuffed, bool carriesWeapon, bool scpAttacker) =>
|
||||
(canBeKos && !hasWeaponEquipped ? "POSSIBLE KOS".Color("red").Size(50) + " " : "")
|
||||
+ (cuffed ? "DETAINED KILL ".Color("#00fff6").Size(50) + " " : "")
|
||||
+ (cuffed ? "DETAINED KILL ".Color(Cyan).Size(50) + " " : "")
|
||||
+ handler switch {
|
||||
RecontainmentDamageHandler => $"{{0}} {"recontained".Bold().Color("orange").Size(35)} {{1}}",
|
||||
RecontainmentDamageHandler => $"{{0}} {"recontained".Bold().Color(Lime).Size(35)} {{1}}",
|
||||
FirearmDamageHandler firearm => GetFirearmKillLog(firearm),
|
||||
ScpDamageHandler => $"{{0}} killed {{1}} using the {"default SCP attack".Bold().Color("orange").Size(35)}",
|
||||
Scp096DamageHandler scp096 => $"{{0}} killed {{1}} using {GetScp096AttackType(scp096).Bold().Color("orange").Size(35)}",
|
||||
Scp049DamageHandler scp049 => $"{{0}} killed {{1}} using {GetScp049AttackType(scp049).Bold().Color("orange").Size(35)}",
|
||||
Scp939DamageHandler scp939 => $"{{0}} killed {{1}} using {GetScp939AttackType(scp939).Bold().Color("orange").Size(35)}",
|
||||
MicroHidDamageHandler => $"{{0}} fried {{1}} with the {"Micro H.I.D.".Bold().Color("orange").Size(35)}",
|
||||
ExplosionDamageHandler => $"{{0}} {"exploded".Bold().Color("orange").Size(35)} {{1}}",
|
||||
Scp018DamageHandler => $"{{0}} killed {{1}} with {"SCP-018".Bold().Color("orange").Size(35)}",
|
||||
DisruptorDamageHandler => $"{{0}} killed {{1}} with the {"3-X Particle Disruptor".Bold().Color("orange").Size(35)}",
|
||||
JailbirdDamageHandler => $"{{0}} killed {{1}} with the {"Jailbird".Bold().Color("orange").Size(35)}",
|
||||
_ => $"{{0}} killed {{1}}. {"Reason is unknown".Italic()}"
|
||||
ScpDamageHandler => $"{{0}} killed {{1}} using the {"default SCP attack".Bold().Color(Lime).Size(35)}",
|
||||
Scp096DamageHandler scp096 => $"{{0}} killed {{1}} using {GetScp096AttackType(scp096).Bold().Color(Lime).Size(35)}",
|
||||
Scp049DamageHandler scp049 => $"{{0}} killed {{1}} using {GetScp049AttackType(scp049).Bold().Color(Lime).Size(35)}",
|
||||
Scp939DamageHandler scp939 => $"{{0}} killed {{1}} using {GetScp939AttackType(scp939).Bold().Color(Lime).Size(35)}",
|
||||
MicroHidDamageHandler => $"{{0}} fried {{1}} with the {"Micro H.I.D.".Bold().Color(Lime).Size(35)}",
|
||||
ExplosionDamageHandler => $"{{0}} {"exploded".Bold().Color(Lime).Size(35)} {{1}}",
|
||||
Scp018DamageHandler => $"{{0}} killed {{1}} with {"SCP-018".Bold().Color(Lime).Size(35)}",
|
||||
DisruptorDamageHandler => $"{{0}} killed {{1}} with the {"3-X Particle Disruptor".Bold().Color(Lime).Size(35)}",
|
||||
JailbirdDamageHandler => $"{{0}} killed {{1}} with the {"Jailbird".Bold().Color(Lime).Size(35)}",
|
||||
_ => $"{{0}} killed {{1}}. {"Reason is unknown".Italic().Color(Lime)}"
|
||||
}
|
||||
+ WeaponStatusMessage(!scpAttacker, hasWeaponEquipped, carriesWeapon);
|
||||
|
||||
private static string WeaponStatusMessage(bool show, bool hasWeaponEquipped, bool carriesWeapon) => show && (carriesWeapon || hasWeaponEquipped) ? (hasWeaponEquipped ? " Victim was " + "holding".Underline() + " a weapon." : " Victim was " + "carrying".Underline() + " a weapon.").Color("orange").Size(30) : "";
|
||||
private static string WeaponStatusMessage(bool show, bool hasWeaponEquipped, bool carriesWeapon) => show && (carriesWeapon || hasWeaponEquipped) ? (hasWeaponEquipped ? " Victim was " + "holding".Underline() + " a weapon." : " Victim was " + "carrying".Underline() + " a weapon.").Color(Cyan).Size(30) : "";
|
||||
|
||||
private static string GetFirearmKillLog(FirearmDamageHandler firearm) => $"{{0}} shot {{1}} with {firearm.WeaponType.ToString().Bold().Color("red").Size(35)} to the hitbox " + firearm.Hitbox.ToString().Color("red").Bold().Size(35);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user