Skip to content

Commit

Permalink
[PvPPunishment] Added a new config option to announce and log grief-k…
Browse files Browse the repository at this point in the history
…ills (same as PvP Leaderboard v1.0.1); Bumped version to v1.0.3
  • Loading branch information
WhiteFang5 committed Aug 3, 2022
1 parent 445d0bc commit 1aeb5b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
* Initial release

## PvP Punishment
### v1.0.3
* Added a new config option to announce a grief-kill (exactly the same as the PvP Leaderboard mod v1.0.1)

### v1.0.1, v1.0.2
* F*cked up the release of another plugin, so we're skipping these versions.

### v1.0.0
* Initial release

Expand Down
2 changes: 2 additions & 0 deletions PvPPunishment/Configs/PvPPunishmentConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static class PvPPunishmentConfig
public static ConfigEntry<float> PvPPunishmentSilverResistReduction { get; private set; }
public static ConfigEntry<float> PvPPunishmentPhysPowerReduction { get; private set; }
public static ConfigEntry<float> PvPPunishmentSpellPowerReduction { get; private set; }
public static ConfigEntry<bool> PvPPunishmentAnnounceLowLevelKill { get; private set; }

#endregion

Expand All @@ -43,6 +44,7 @@ public static void Initialize(ConfigFile config)
PvPPunishmentSilverResistReduction = config.Bind(nameof(PvPPunishmentConfig), nameof(PvPPunishmentSilverResistReduction), 15f, "The amount of reduced Silver Resistance when a player is punished.");
PvPPunishmentPhysPowerReduction = config.Bind(nameof(PvPPunishmentConfig), nameof(PvPPunishmentPhysPowerReduction), 15f, "The percentage of reduced Physical Power when a player is punished.");
PvPPunishmentSpellPowerReduction = config.Bind(nameof(PvPPunishmentConfig), nameof(PvPPunishmentSpellPowerReduction), 15f, "The percentage of reduced Spell Power when a player is punished.");
PvPPunishmentAnnounceLowLevelKill = config.Bind(nameof(PvPPunishmentConfig), nameof(PvPPunishmentAnnounceLowLevelKill), false, "When enabled, a kill of a lower level player is announced server-wide.");
}

#endregion
Expand Down
2 changes: 1 addition & 1 deletion PvPPunishment/PvPPunishment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AssemblyName>VMods.PvPPunishment</AssemblyName>
<RootNamespace>VMods.PvPPunishment</RootNamespace>
<Description>A mod that punishes high-level players that kill low-level players</Description>
<Version>1.0.0</Version>
<Version>1.0.3</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
5 changes: 5 additions & 0 deletions PvPPunishment/Systems/PvPPunishmentSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ private static void OnVampireDowned(Entity killer, Entity victim)
//Utils.SendMessage(victimUserEntity, msg, ServerChatMessageType.System);
}
#endif
Utils.Logger.LogMessage($"Vampire {killerUser.CharacterName} (Lv: {killerLevel}; Current Lv: {HighestGearScoreSystem.GetCurrentGearScore(killer, entityManager)}) has grief-killed {victimUser.CharacterName} (Lv {victimLevel}; Current Lv: {HighestGearScoreSystem.GetCurrentGearScore(victim, entityManager)})!");
if(PvPPunishmentConfig.PvPPunishmentAnnounceLowLevelKill.Value)
{
ServerChatUtils.SendSystemMessageToAllClients(entityManager, $"Vampire <color=#ffffff>{killerUser.CharacterName}</color> (Lv {killerLevel}) has grief-killed <color=#ffffff>{victimUser.CharacterName}</color> (Lv {victimLevel})!");
}
}
#if DEBUG
else
Expand Down
2 changes: 1 addition & 1 deletion Thunderstone/PvPPunishment/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "VMods_PvP_Punishment",
"description": "A mod that punishes low-level kills.",
"version_number": "1.0.1",
"version_number": "1.0.3",
"dependencies": [
"BepInEx-BepInExPack_V_Rising-1.0.0",
"molenzwiebel-Wetstone-1.1.0"
Expand Down

0 comments on commit 1aeb5b5

Please sign in to comment.