Skip to content

Commit

Permalink
0.8.1: toggleable damage report
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhit-pathak committed Aug 17, 2024
1 parent 4ba0b83 commit e8047a1
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# MatchZy Changelog

# 0.8.1

#### August 17, 2024

- Added matchzy_enable_damage_report convar to toggle damage report after every round.
- Fixed bad demo name formatting.
- Updated Uzbek translations.

# 0.8.0

#### August 17, 2024
Expand Down
2 changes: 2 additions & 0 deletions ConfigConvars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public partial class MatchZy

public FakeConVar<string> hostnameFormat = new("matchzy_hostname_format", "The server hostname to use. Set to \"\" to disable/use existing. Default: MatchZy | {TEAM1} vs {TEAM2}", "MatchZy | {TEAM1} vs {TEAM2}");

public FakeConVar<bool> enableDamageReport = new("matchzy_enable_damage_report", "Whether to show damage report after each round or not. Default: true", true);

[ConsoleCommand("matchzy_whitelist_enabled_default", "Whether Whitelist is enabled by default or not. Default value: false")]
public void MatchZyWLConvar(CCSPlayerController? player, CommandInfo command)
{
Expand Down
1 change: 1 addition & 0 deletions DamageInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ private void UpdatePlayerDamageInfo(EventPlayerHurt @event, int targetId)

private void ShowDamageInfo()
{
if (!enableDamageReport.Value) return;
try
{
HashSet<(int, int)> processedPairs = new HashSet<(int, int)>();
Expand Down
2 changes: 1 addition & 1 deletion MatchZy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class MatchZy : BasePlugin
{

public override string ModuleName => "MatchZy";
public override string ModuleVersion => "0.8.0";
public override string ModuleVersion => "0.8.1";

public override string ModuleAuthor => "WD- (https://github.com/shobhit-pathak/)";

Expand Down
4 changes: 2 additions & 2 deletions Teams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class Team
[JsonPropertyName("teamname")]
public required string teamName;

[JsonPropertyName("teamname")]
[JsonPropertyName("teamflag")]
public string teamFlag = "";

[JsonPropertyName("teamflag")]
[JsonPropertyName("teamtag")]
public string teamTag = "";

[JsonPropertyName("teamplayers")]
Expand Down
2 changes: 1 addition & 1 deletion Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ public void ResetChangedConvars()

public string FormatCvarValue(string value)
{
string formattedTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string formattedTime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
(int team1Score, int team2Score) = GetTeamsScore();

var formattedValue = value
Expand Down
3 changes: 3 additions & 0 deletions cfg/MatchZy/config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ matchzy_show_credits_on_match_start true

// The server hostname to use. Set to "" to disable/use existing.
matchzy_hostname_format "MatchZy | {TEAM1} vs {TEAM2}"

// Whether to show damage report after each round or not. Default: true.
matchzy_enable_damage_report true
3 changes: 3 additions & 0 deletions documentation/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ Example: `matchzy_demo_upload_url "https://your-website.com/upload-endpoint"` <b
####`matchzy_remote_backup_header_value`
: If this and matchzy_remote_backup_header_key are defined, this header name and value will be used for your backup upload HTTP request. **`Default: ""`**

####`matchzy_enable_damage_report`
: Whether to show damage report after each round or not. **`Default: "true"`**

### Configuring Warmup/Knife/Live/Prac CFGs
Again, inside `csgo/cfg/MatchZy`, files named `warmup.cfg`, `knife.cfg`, `live.cfg` and `prac.cfg` should be present. These configs are executed when Warmup, Knife, Live and Practice Mode is started respectively.

Expand Down

0 comments on commit e8047a1

Please sign in to comment.