TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ Register()

static short short perEntityIndex Terraria.ModLoader.GlobalList< TGlobal >.Register ( TGlobal global)
inlinestaticpackage

Definition at line 23 of file GlobalList.cs.

24 {
26 {
27 throw new Exception("Loading has finished. Cannot add more globals");
28 }
29 short item = (short)_globals.Count;
30 short perEntityIndex = (short)(global.SlotPerEntity ? SlotsPerEntity++ : (-1));
31 _globals.Add(global);
32 return (index: item, perEntityIndex: perEntityIndex);
33 }
static List< TGlobal > _globals
Definition GlobalList.cs:11