mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Clear some warnings
This commit is contained in:
1 parent
c449669cf2
commit
80e1e6e454
6 files changed
+12
-11
No files matched your search
@@ -4,11 +4,9 @@ using BepInEx.Unity.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using MiraAPI.PluginLoading;
|
||||
using MiraAPI.Translation;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using Reactor;
|
||||
using Reactor.Networking;
|
||||
using Reactor.Networking.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Example;
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using MiraAPI.Example.Modifiers;
|
||||
using MiraAPI.Example.Roles;
|
||||
using MiraAPI.Hud;
|
||||
using MiraAPI.Keybinds;
|
||||
using MiraAPI.Example.Roles;
|
||||
using MiraAPI.MeetingAbilities;
|
||||
using MiraAPI.Modifiers;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ public class ShootButton : TargetedMeetingButton
|
||||
{
|
||||
playerVoteArea.SetDisabled();
|
||||
var player = playerVoteArea.GetPlayer();
|
||||
PlayerControl.LocalPlayer.RpcCustomMurder(player);
|
||||
if (player != null)
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcCustomMurder(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using MiraAPI.MeetingAbilities;
|
||||
using MiraAPI.Networking;
|
||||
using MiraAPI.Utilities;
|
||||
@@ -28,6 +27,7 @@ public class ShotgunButton : MultiTargetMeetingButton
|
||||
|
||||
protected override void OnClick(PlayerVoteArea playerVoteArea)
|
||||
{
|
||||
// Emptu because it only triggers the actual kills once all meeting abilities have been used.
|
||||
}
|
||||
|
||||
public override LoadableAsset<Sprite> SpriteActive => ExampleAssets.CallMeetingButton;
|
||||
@@ -45,7 +45,10 @@ public class ShotgunButton : MultiTargetMeetingButton
|
||||
{
|
||||
playerVoteArea.SetDisabled();
|
||||
var player = playerVoteArea.GetPlayer();
|
||||
PlayerControl.LocalPlayer.RpcCustomMurder(player);
|
||||
if (player != null)
|
||||
{
|
||||
PlayerControl.LocalPlayer.RpcCustomMurder(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<Version>1.0.0</Version>
|
||||
<Description>Example mod for Mira API</Description>
|
||||
<Authors>Angxl, XtraCube</Authors>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -59,7 +59,7 @@ public static class CustomGameModeManager
|
||||
/// <summary>
|
||||
/// Checks to see if the current game mode is an instance of the HNS mode.
|
||||
/// </summary>
|
||||
/// <returns>True if the Hide & Seek mode is the current one.</returns>
|
||||
/// <returns>True if the Hide n Seek mode is the current one.</returns>
|
||||
public static bool IsHideNSeek() => ActiveMode != null && ActiveMode.GetType().IsAssignableTo(typeof(HideAndSeekMode));
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user