Skip to content

Instantly share code, notes, and snippets.

View FairlySadPanda's full-sized avatar
🏠
Back in the office!

Hannah Giovanna Dawson FairlySadPanda

🏠
Back in the office!
View GitHub Profile
@FairlySadPanda
FairlySadPanda / ButtonEditorEnhancer.cs
Last active October 19, 2024 19:31
Some handy editor scripting for working with UI text and buttons in VRChat Udon development
using System.Linq;
using TMPro;
using TMPro.EditorUtilities;
using UnityEditor;
using UnityEditor.Events;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.UI;
using VRC.Udon;
@FairlySadPanda
FairlySadPanda / MainMenu.cs
Created October 14, 2024 23:27
Example of registration and use of event bus pattern in UdonSharp for VRChat :)
using UnityEngine;
using VRCBilliardsCE.Packages.com.vrcbilliards.vrcbce.Runtime.ScriptsV2.Core;
using VRCBilliardsCE.Packages.com.vrcbilliards.vrcbce.Runtime.ScriptsV2.Core.Infrastructure;
namespace VRCBilliardsCE.Packages.com.vrcbilliards.vrcbce.Runtime.ScriptsV2.Menu.Domain
{
public enum State
{
// The main menu is closed.
Closed,
@FairlySadPanda
FairlySadPanda / EventBus.cs
Created October 14, 2024 23:24
Event Bus pattern in UdonSharp for VRChat :)
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Data;
using VRC.SDKBase;
using VRC.Udon;
using Event = VRCBilliardsCE.Packages.com.vrcbilliards.vrcbce.Runtime.ScriptsV2.Core.Domain.Event;
namespace VRCBilliardsCE.Packages.com.vrcbilliards.vrcbce.Runtime.ScriptsV2.Core.Infrastructure
{
// An event bus. This manager handles discrete events being issued to it from VRCBilliards, and dispatches these
@FairlySadPanda
FairlySadPanda / ChatValidator.cs
Created February 20, 2024 13:44
ChatValidator
using Content.Server.Administration.Logs;
using Content.Server.Administration.Managers;
using Content.Server.Chat.Managers;
using Content.Server.Chat.V2.Repository;
using Content.Shared.CCVar;
using Content.Shared.Chat.V2;
using Content.Shared.Chat.V2.Components;
using Content.Shared.Database;
using Content.Shared.Ghost;
using Content.Shared.Mobs.Systems;
using System.Linq;
using Robust.Shared.Serialization;
namespace Content.Server.Chat.V2.Repository;
/// <summary>
/// Stores <see cref="IStorableChatEvent"/>, gives them UIDs, and issues them again locally for actioning.
/// </summary>
/// <remarks>
/// This is an <see cref="EntitySystem"/> because:
@FairlySadPanda
FairlySadPanda / RR.txt
Created January 3, 2024 12:05
Revolutionaries Refactor
Operative: you will be going deep undercover at the new Nanotransen research lab we have uncovered in our territory. Your objective is to seize control of the space station from those unsuspecting oafs, so we may use it and its crew against our enemies. To aid you in this, we are providing you with the tools needed to seize control of the loyalties of the unshielded crew. Install yourself as the leader of a revolution and destroy the station’s chain of command. Be aware that Nanotransen has access to defensive mechanisms against your revolt, and you must not let their Security team act against you before you are ready. As such, stealth and intelligence will be needed to achieve your aims.
Good luck, Operative. Long live the revolution.
What is Revolutionaries?
Revolutionaries is a classic Space Station 13 game mode, updated and revised for maximum chaotic fun. A cabal of Head Revolutionaries, specialist infiltrators from the Syndicate, have sneaked aboard the Space Station. Their job: kill the department he
@FairlySadPanda
FairlySadPanda / GenericGameLobby.cs
Last active December 29, 2021 00:48
A generic game lobby for Udon
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
using VRC.SDK3.Components;
using UnityEditor;
namespace FSP.UsefulThings {
// Implemented ahead of U# 1.0 supporting custom property attributes.
public class ReadOnlyAttribute : PropertyAttribute
@FairlySadPanda
FairlySadPanda / UGuiTextToTextMeshPro.cs
Last active November 24, 2021 15:59 — forked from Naphier/UGuiTextToTextMeshPro.cs
Unity3D Editor Tool to convert Unity GUI Text objects to Text Mesh Pro Text Objects
using TMPro;
using TMPro.EditorUtilities;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
public class UGuiTextToTextMeshPro : Editor
{
[MenuItem("GameObject/UI/Convert To Text Mesh Pro", false, 4000)]
static void DoIt()