From cc48860b314265ada38750a02f8acf9a8908e29a Mon Sep 17 00:00:00 2001 From: ntm <35658945+ntm5@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:53:45 +0200 Subject: [PATCH 1/4] Remove shop from readme --- README.md | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/README.md b/README.md index 65f944b..1e1d825 100644 --- a/README.md +++ b/README.md @@ -9,46 +9,6 @@ TTT is in heavy development and I want you to know that contributions are always > [Using Dependency Injection](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-usage), > [Dependency Injection Guidelines](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines). -## Creating items - -Creating new items or modifying existing ones is easy. Create a new class in the correct directory, mod/TTT.Shop/Items/{group}. Then create it to your liking. Afterwards, compile the plugin and it's all set. The plugin handles loading all the items. - -> [!TIP] -> Available groups are [All, Detective, Traitor].
-> SimpleName is used for /buy {name} - -#### Example Item -```c# -namespace TTT.Shop.Items.Traitor; - -public class AwpItem : IShopItem -{ - public string Name() - { - return "AWP"; - } - - public string SimpleName() - { - return "awp"; - } - - public int Price() - { - return 2000; - } - - public BuyResult OnBuy(GamePlayer player) - { - if (player.Credits() < Price()) return BuyResult.NotEnoughCredits; - if (player.PlayerRole() != Role.Traitor) return BuyResult.IncorrectRole; - player.RemoveCredits(Price()); - player.Player().GiveNamedItem(CsItem.AWP); - return BuyResult.Successful; - } -} -``` - ## Road Map - [✅] Role assignment - [✅] DNA Scanner From 8314d881b069fb3394aa0a6c31fbebcb473e6238 Mon Sep 17 00:00:00 2001 From: ntm <35658945+ntm5@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:57:29 +0200 Subject: [PATCH 2/4] Remove posthook for now --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ec2c3ed..06ae769 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,7 +31,7 @@ jobs: post_webhook: needs: build runs-on: ubuntu-latest - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/aaaa' steps: - name: POST Webhook @@ -40,4 +40,4 @@ jobs: --fail \ -F token=${{ secrets.GITLAB_SECRET_TOKEN }} \ -F ref=dev \ - https://gitlab.edgegamers.io/api/v4/projects/2640/trigger/pipeline \ No newline at end of file + https://gitlab.edgegamers.io/api/v4/projects/2640/trigger/pipeline From e31188ca823ea5d7eef997ea19ffd661ebeb4eee Mon Sep 17 00:00:00 2001 From: ntm <35658945+ntm5@users.noreply.github.com> Date: Fri, 12 Jul 2024 01:32:55 +0200 Subject: [PATCH 3/4] Attempt to fix killfeed --- mod/TTT.Player/KarmaManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/TTT.Player/KarmaManager.cs b/mod/TTT.Player/KarmaManager.cs index 336e9da..c5b9517 100644 --- a/mod/TTT.Player/KarmaManager.cs +++ b/mod/TTT.Player/KarmaManager.cs @@ -31,7 +31,7 @@ public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) if (killerRole == killedRole) { gpKiller.RemoveKarma(5); - return HookResult.Stop; + return HookResult.Continue; } if (killedRole == Role.Traitor) @@ -40,4 +40,4 @@ public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) } return HookResult.Continue; } -} \ No newline at end of file +} From f7cae66453c256f0d91b00e1f9928e1bccc5c8be Mon Sep 17 00:00:00 2001 From: ntm <35658945+ntm5@users.noreply.github.com> Date: Fri, 12 Jul 2024 02:08:33 +0200 Subject: [PATCH 4/4] fix killfeed --- mod/TTT.Roles/RoleBehavior.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/TTT.Roles/RoleBehavior.cs b/mod/TTT.Roles/RoleBehavior.cs index 04fb0e4..be4a477 100644 --- a/mod/TTT.Roles/RoleBehavior.cs +++ b/mod/TTT.Roles/RoleBehavior.cs @@ -82,7 +82,7 @@ public HookResult OnPlayerConnect(EventPlayerConnectFull @event, GameEventInfo i return HookResult.Continue; } - [GameEventHandler] + [GameEventHandler(HookMode.Pre)] public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) { info.DontBroadcast = true;