mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
New role configs system
This commit is contained in:
1 parent
faed84d0f6
commit
6e3de08043
15 files changed
+175
-138
No files matched your search
@@ -1,5 +1,4 @@
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -13,8 +12,12 @@ public class ChameloenRole : CrewmateRole, ICustomRole
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => Palette.AcceptedGreen;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
public LoadableAsset<Sprite> OptionsScreenshot => ExampleAssets.Banner;
|
||||
public int MaxPlayers => 2;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration(this)
|
||||
{
|
||||
MaxPlayers = 2,
|
||||
OptionsScreenshot = ExampleAssets.Banner,
|
||||
};
|
||||
|
||||
public void PlayerControlFixedUpdate(PlayerControl playerControl)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Il2CppInterop.Runtime.Attributes;
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using MiraAPI.Roles;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Example.Roles;
|
||||
@@ -13,7 +11,10 @@ public class FreezerRole : ImpostorRole, ICustomRole
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => Palette.Blue;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Impostor;
|
||||
[HideFromIl2Cpp]
|
||||
public LoadableAsset<Sprite> OptionsScreenshot => ExampleAssets.Banner;
|
||||
public int MaxPlayers => 2;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration(this)
|
||||
{
|
||||
OptionsScreenshot = ExampleAssets.Banner,
|
||||
MaxPlayers = 2,
|
||||
};
|
||||
}
|
||||
@@ -11,9 +11,13 @@ public class NeutralKillerRole : ImpostorRole, ICustomRole
|
||||
public string RoleLongDescription => RoleDescription;
|
||||
public Color RoleColor => Color.magenta;
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Neutral;
|
||||
public bool UseVanillaKillButton => true;
|
||||
public bool CanGetKilled => true;
|
||||
public bool CanUseVent => true;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration(this)
|
||||
{
|
||||
UseVanillaKillButton = true,
|
||||
CanGetKilled = true,
|
||||
CanUseVent = true
|
||||
};
|
||||
|
||||
public override void SpawnTaskHeader(PlayerControl playerControl)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Il2CppInterop.Runtime.Attributes;
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities.Assets;
|
||||
using MiraAPI.Roles;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MiraAPI.Example.Roles;
|
||||
@@ -13,6 +11,9 @@ public class TeleporterRole : CrewmateRole, ICustomRole
|
||||
public string RoleDescription => RoleLongDescription;
|
||||
public Color RoleColor => new Color32(221, 176, 152, 255);
|
||||
public ModdedRoleTeams Team => ModdedRoleTeams.Crewmate;
|
||||
[HideFromIl2Cpp]
|
||||
public LoadableAsset<Sprite> OptionsScreenshot => ExampleAssets.Banner;
|
||||
|
||||
public CustomRoleConfiguration Configuration => new CustomRoleConfiguration()
|
||||
{
|
||||
OptionsScreenshot = ExampleAssets.Banner,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user