Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
v2.0.3 Source
Browse files Browse the repository at this point in the history
  • Loading branch information
slushiegoose committed May 11, 2021
1 parent 0a28521 commit a93d288
Show file tree
Hide file tree
Showing 53 changed files with 307 additions and 250 deletions.
4 changes: 2 additions & 2 deletions source/Patches/ArsonistMod/HudManagerUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void UpdateMeeting(MeetingHud __instance, Arsonist role)
if (player == null) continue;
if (role.DousedPlayers.Contains(player.PlayerId))
{
state.NameText.Color = Color.black;
state.NameText.color = Color.black;
}
}
}
Expand All @@ -38,7 +38,7 @@ public static void Postfix(HudManager __instance)

var player = Utils.PlayerById(playerId);
player.myRend.material.SetColor("_VisorColor", role.Color);
player.nameText.Color = Color.black;
player.nameText.color = Color.black;
}

if (role.IgniteButton == null)
Expand Down
8 changes: 4 additions & 4 deletions source/Patches/ArsonistMod/Outro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ public static void Postfix(EndGameManager __instance)
if (role == null) return;
if (Roles.Role.GetRoles(RoleEnum.Jester).Any(x => ((Jester) x).VotedOut)) return;
PoolablePlayer[] array = Object.FindObjectsOfType<PoolablePlayer>();
array[0].NameText.Text = role.ColorString + array[0].NameText.Text;
array[0].NameText.text = role.ColorString + array[0].NameText.text + "</color>";
__instance.BackgroundBar.material.color = role.Color;
var text = Object.Instantiate(__instance.WinText);
text.Text = "Arsonist wins";
text.Color = role.Color;
text.text = "Arsonist wins";
text.color = role.Color;
var pos = __instance.WinText.transform.localPosition;
pos.y = 1.5f;
text.transform.position = pos;
text.scale = 1f;
text.text = $"<size=4>{text.text}</size>";
}
}
}
2 changes: 1 addition & 1 deletion source/Patches/CamouflageMod/UpdateMeeting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private static void Postfix(MeetingHud __instance)
{
if(!PlayerControl.LocalPlayer.Is(RoleEnum.Seer))
{
state.NameText.Text = "";
state.NameText.text = "";

};
PlayerControl.SetPlayerMaterialColors(Color.grey, state.PlayerIcon.Body);
Expand Down
6 changes: 3 additions & 3 deletions source/Patches/ChildMod/Outro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public static void Postfix(EndGameManager __instance)
//System.Console.WriteLine(role);
if (role == null) return;
var text = Object.Instantiate(__instance.WinText);
text.Text = "The Child was killed";
text.Color = Color.red;
text.text = "The Child was killed";
text.color = Color.red;
var pos = __instance.WinText.transform.localPosition;
pos.y = 1.5f;
text.transform.position = pos;
text.scale = 1f;
text.text = $"<size=4>{text.text}</size>";
}
}
}
9 changes: 9 additions & 0 deletions source/Patches/CustomHats/CreateHat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ protected internal struct HatData

private static List<HatData> _hatDatas = new List<HatData>()
{

new HatData {name = "glitch", bounce = false, highUp = false, offset = new Vector2(0f, 0.1f), author="PhasmoFireGod"},
new HatData {name = "firegod", bounce = false, highUp = false, offset = new Vector2(0f, 0.1f), author="PhasmoFireGod"},
new HatData {name = "dad", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.4f), author="PhasmoFireGod"},
new HatData {name = "mama", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.4f), author="PhasmoFireGod"},
new HatData {name = "pinkee", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.4f), author="PhasmoFireGod"},
new HatData {name = "racoon", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.4f), author="PhasmoFireGod"},

new HatData {name = "aphex", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.2f), author="Nassegris"},
new HatData {name = "junkyard", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.2f), author="Nassegris"},
new HatData {name = "cheesy", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.2f), author="Nassegris"},
Expand All @@ -33,6 +41,7 @@ protected internal struct HatData
new HatData {name = "chilled", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.2f), author="Nassegris"},


new HatData {name = "raflp", bounce = true, highUp = true, offset = new Vector2(-0.1f, 0.1f), author="??????"},
new HatData {name = "harrie", bounce = true, highUp = true, offset = new Vector2(-0.1f, 0.1f), author="TheLastShaymin"},
new HatData {name = "razz", bounce = true, highUp = true, offset = new Vector2(-0.1f, 0.3f), author="TheLastShaymin"},
new HatData {name = "kay", bounce = false, highUp = false, offset = new Vector2(-0.1f, 0.4f), author="TheLastShaymin"},
Expand Down
7 changes: 5 additions & 2 deletions source/Patches/CustomOption/Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This folder is a Stripped down version of Reactor-Essentials
// Please use https://github.com/DorCoMaNdO/Reactor-Essentials because it is more updated and less buggy

using System;
using System.Collections.Generic;

Expand Down Expand Up @@ -71,14 +74,14 @@ protected internal void Set(object value, bool SendRpc = true)
float newValue = (float) Value;

number.Value = number.oldValue = newValue;
number.ValueText.Text = ToString();
number.ValueText.text = ToString();
}
else if (Setting is StringOption str)
{
int newValue = (int) Value;

str.Value = str.oldValue = newValue;
str.ValueText.Text = ToString();
str.ValueText.text = ToString();
}

}
Expand Down
5 changes: 4 additions & 1 deletion source/Patches/CustomOption/Button.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This folder is a Stripped down version of Reactor-Essentials
// Please use https://github.com/DorCoMaNdO/Reactor-Essentials because it is more updated and less buggy

using System;

namespace TownOfUs.CustomOption
Expand All @@ -20,7 +23,7 @@ public static void BaseToDo()
public override void OptionCreated()
{
base.OptionCreated();
Setting.Cast<ToggleOption>().TitleText.Text = Name;
Setting.Cast<ToggleOption>().TitleText.text = Name;
}
}
}
3 changes: 3 additions & 0 deletions source/Patches/CustomOption/CustomOptionType.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This folder is a Stripped down version of Reactor-Essentials
// Please use https://github.com/DorCoMaNdO/Reactor-Essentials because it is more updated and less buggy

namespace TownOfUs.CustomOption
{
public enum CustomOptionType
Expand Down
13 changes: 8 additions & 5 deletions source/Patches/CustomOption/Export.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This folder is a Stripped down version of Reactor-Essentials
// Please use https://github.com/DorCoMaNdO/Reactor-Essentials because it is more updated and less buggy

using System;
using System.Collections;
using System.Collections.Generic;
Expand Down Expand Up @@ -75,7 +78,7 @@ protected internal IEnumerator CancelCoro(Func<IEnumerator> flashCoro)

Loading = SlotButtons[0];
Loading.Do = () => { };
Loading.Setting.Cast<ToggleOption>().TitleText.Text = "Loading...";
Loading.Setting.Cast<ToggleOption>().TitleText.text = "Loading...";

__instance.Children = new[] {Loading.Setting};

Expand Down Expand Up @@ -179,17 +182,17 @@ private void ExportSlot(int slotId)

private IEnumerator FlashGreen()
{
Setting.Cast<ToggleOption>().TitleText.Color = Color.green;
Setting.Cast<ToggleOption>().TitleText.color = Color.green;
yield return new WaitForSeconds(0.5f);
Setting.Cast<ToggleOption>().TitleText.Color = Color.white;
Setting.Cast<ToggleOption>().TitleText.color = Color.white;

}

private IEnumerator FlashRed()
{
Setting.Cast<ToggleOption>().TitleText.Color = Color.red;
Setting.Cast<ToggleOption>().TitleText.color = Color.red;
yield return new WaitForSeconds(0.5f);
Setting.Cast<ToggleOption>().TitleText.Color = Color.white;
Setting.Cast<ToggleOption>().TitleText.color = Color.white;

}

Expand Down
Loading

1 comment on commit a93d288

@Kamryn877
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u help me

Please sign in to comment.