Skip to content

The whitelist

CRUMB checks every line against the lists as you type and again when the part compiles. Anything else is refused with one of three errors, and a part that breaks the rules won’t load, whether it comes from a save file or the Workshop.

This page is generated from the code that compiles each half, so it always matches what CRUMB enforces. Circuit logic and Component logic explain how to work within it.

Circuit logic Component logic
Allowed Simulation Simulation, CRUMB.Script.Component.Logic, CRUMB.Script.Component.Logic.Wrappers
using lines System, System.Collections.Generic System, System.Collections.Generic, CRUMB.Script.Component.Logic.Wrappers

An allowed namespace includes every namespace inside it. CRUMB adds the using lines for you, and they only save typing: System is there so you can write Math, and opens nothing else in System.

Outside those namespaces, both halves may use these types and nothing else:

void, bool, byte, sbyte, short, ushort, int, uint, long, ulong, char, float, double, decimal, string, object, IntPtr, UIntPtr, Nullable<T>, List<T> and Math.

Nullable<T> is what you write as double? or int?, and Math is System.Math.

  • Types you declare yourself are always allowed: a struct that holds one sample, an enum of modes, a small helper class.
  • Arrays and pointers are allowed when what they hold is: double[], int*.
  • Every type argument counts: List<double> is allowed, and List<Random> isn’t.
  • A member is checked through its type: Math.Sqrt is allowed, and MathF.Sqrt isn’t, because MathF isn’t on the list.
  • var hides nothing: the type it stands for is checked.

Common things that aren’t on it: Dictionary, HashSet, tuples, Random, MathF, Func and Action, exception types, LINQ, files and the network.

Some methods only make sense at one moment in a step, so they can only be called inside one hook. Write the call in that hook itself: a call from a helper method of your own is refused, even when the hook calls the helper. A lambda or local function written inside the hook counts as the hook.

Method Call it only inside On
Fail CheckFailure BaseCircuitLogic
Error Means Message
CRUMB001 Method call restricted The method ‘‹method›’ can only be called within: ‹hooks›
CRUMB002 Namespace restricted The namespace ‘‹namespace›’ is not allowed in this script type. Allowed namespaces: ‹allowed namespaces›.
CRUMB003 Type restricted The type ‘‹type›’ is not allowed in this script type. Allowed namespaces: ‹allowed namespaces›. Allowed types: ‹allowed types›.

Generated from the CRUMB source, commit fcec660d, 2026-10-29.