Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework plugin and add alarms #54

Merged
merged 9 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
submodules: true
- name: Setup dev names
run: |
((Get-Content -path .\EngageTimer.csproj -Raw) -replace '<AssemblyName>EngageTimer','<AssemblyName>EngageTimerDev') | Set-Content -Path .\EngageTimer.csproj
((Get-Content -path .\EngageTimer.csproj -Raw) -replace '<Name>EngageTimer - Dev Version','<Name>EngageTimerDev') | Set-Content -Path .\EngageTimer.csproj
((Get-Content -path .\EngageTimer.yaml -Raw) -replace 'name: EngageTimer','name: EngageTimer - Dev Version') | Set-Content -Path .\EngageTimer.yaml
Move-Item .\EngageTimer.yaml .\EngageTimerDev.yaml
((Get-Content -path .\Plugin\EngageTimer.csproj -Raw) -replace '<AssemblyName>EngageTimer','<AssemblyName>EngageTimerDev') | Set-Content -Path .\Plugin\EngageTimer.csproj
((Get-Content -path .\Plugin\EngageTimer.csproj -Raw) -replace '<Name>EngageTimer - Dev Version','<Name>EngageTimerDev') | Set-Content -Path .\Plugin\EngageTimer.csproj
((Get-Content -path .\Plugin\EngageTimer.yaml -Raw) -replace 'name: EngageTimer','name: EngageTimer - Dev Version') | Set-Content -Path .\Plugin\EngageTimer.yaml
Move-Item .\Plugin\EngageTimer.yaml .\Plugin\EngageTimerDev.yaml
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Setup .NET
Expand All @@ -39,8 +39,8 @@ jobs:
with:
name: build.zip
path: |
bin/Release/EngageTimerDev/latest.zip
bin/Release/EngageTimerDev/EngageTimerDev.json
Plugin/bin/Release/EngageTimerDev/latest.zip
Plugin/bin/Release/EngageTimerDev/EngageTimerDev.json
- name: Update testing repository
run: |
Invoke-WebRequest -Uri https://plogon.xorus.dev/update
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,9 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb

.vscode

Doc/custom_example
TODO.md
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# v2.3.0.0 - unreleased

- Big code rewrite and a bit of optimization
- Fix save errors when spinning color sliders like a maniac in configuration
- Reorganized configuration file to preserve my sanity
- "Hide original addon" now uses AddonLifecycle events instead of searching for the original countdown every frame
- Reduce CountdownHook CPU usage by fixing a stupid event spam mistake
- Optimize countdown display code
- Fix the "first-draw" workaround that draws the countdown window once on plugin activation so it does not the micro
freeze caused by ImGUI initializing the window does not occur when starting a countdown

# v2.2.6.0

Expand Down
2 changes: 1 addition & 1 deletion EngageTimer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EngageTimer", "EngageTimer.csproj", "{517A4352-7F10-48B9-B332-BB592157E377}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EngageTimer", "Plugin/EngageTimer.csproj", "{517A4352-7F10-48B9-B332-BB592157E377}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
63 changes: 0 additions & 63 deletions Game/TickingSound.cs

This file was deleted.

68 changes: 0 additions & 68 deletions Plugin.cs

This file was deleted.

74 changes: 74 additions & 0 deletions Plugin/Attributes/AutoField.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// This file is part of EngageTimer
// Copyright (C) 2023 Xorus <xorus@posteo.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#nullable enable

using System;
using EngageTimer.Ui;

namespace EngageTimer.Attributes;

[AttributeUsage(AttributeTargets.Property)]
public class AutoField : Attribute
{
public string? String { get; set; }
public string? Id { get; set; }
public Components.FieldType Mode { get; set; } = Components.FieldType.Auto;
public float? Step { get; set; }
public float? StepFast { get; set; }
public string? Format { get; set; }
public float? Min { get; set; }
public float? Max { get; set; }

public AutoField()
{
}

public AutoField(string str)
{
String = str;
}

public AutoField(string str, Components.FieldType mode)
{
String = str;
Mode = mode;
}

public AutoField(string str, float min, float max)
{
String = str;
Min = min;
Max = max;
}

public AutoField(string str, Components.FieldType mode, float step, float min, float max)
{
String = str;
Mode = mode;
Step = step;
Min = min;
Max = max;
}

public AutoField(string str, Components.FieldType mode, float step, float stepFast, string format)
{
String = str;
Mode = mode;
Step = step;
StepFast = stepFast;
Format = format;
}
}
29 changes: 29 additions & 0 deletions Plugin/Attributes/ColorPicker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// This file is part of EngageTimer
// Copyright (C) 2024 Xorus <xorus@posteo.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

using System;

namespace EngageTimer.Attributes;

[AttributeUsage(AttributeTargets.Property)]
public class ColorPicker : Attribute
{
public readonly int Id;

public ColorPicker(int id)
{
Id = id;
}
}
File renamed without changes.
34 changes: 34 additions & 0 deletions Plugin/Attributes/Help.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// This file is part of EngageTimer
// Copyright (C) 2023 Xorus <xorus@posteo.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

using System;

namespace EngageTimer.Attributes;

[AttributeUsage(AttributeTargets.Property)]
public class Help: Attribute
{
public string? Str { get; set; }

public Help()
{

}

public Help(string str)
{
Str = str;
}
}
31 changes: 31 additions & 0 deletions Plugin/Attributes/ItemWidth.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// This file is part of EngageTimer
// Copyright (C) 2023 Xorus <xorus@posteo.net>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

using System;

namespace EngageTimer.Attributes;

#nullable enable

[AttributeUsage(AttributeTargets.Property)]
public class ItemWidth : Attribute
{
public float Width { get; set; }

public ItemWidth(float width)
{
Width = width;
}
}
Loading
Loading