From 745d0e553207939502ceacedd4fe05f5cfdabe46 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Sun, 7 Sep 2025 00:17:07 +0200 Subject: [PATCH] Add WeakReference to sandbox --- RELEASE-NOTES.md | 1 + Robust.Shared/ContentPack/Sandbox.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5ce85a4be..6179eee96 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -40,6 +40,7 @@ END TEMPLATE--> ### New features * `Control.OrderedChildCollection` (gotten from `.Children`) now implements `IReadOnlyList`, allowing it to be indexed directly. +* `System.WeakReference` is now available in the sandbox. ### Bugfixes diff --git a/Robust.Shared/ContentPack/Sandbox.yml b/Robust.Shared/ContentPack/Sandbox.yml index 60f70aa78..83b70ae9b 100644 --- a/Robust.Shared/ContentPack/Sandbox.yml +++ b/Robust.Shared/ContentPack/Sandbox.yml @@ -1560,6 +1560,11 @@ Types: ValueType: { All: True } Version: { All: True } Void: { All: True } + WeakReference`1: + Methods: + - "void .ctor(!0)" + - "bool TryGetTarget(ref !0)" + - "void SetTarget(!0)" YamlDotNet.Core.Events: MappingStyle: { } # Enum SequenceStyle: { } # Enum