Example #1
0
        protected DreamProc(string name, DreamProc superProc, ProcAttributes attributes, List <String> argumentNames, List <DMValueType> argumentTypes, string?verbName, string?verbCategory, string?verbDesc, sbyte?invisibility)
        {
            Name          = name;
            SuperProc     = superProc;
            Attributes    = attributes;
            ArgumentNames = argumentNames ?? new();
            ArgumentTypes = argumentTypes ?? new();

            VerbName     = verbName;
            VerbCategory = verbCategory;
            VerbDesc     = verbDesc;
            Invisibility = invisibility;
        }
Example #2
0
        protected DreamProc(string name, DreamProc superProc, ProcAttributes attributes, List <String> argumentNames, List <DMValueType> argumentTypes, string?verbName, string?verbCategory, string?verbDesc, sbyte?invisibility)
        {
            Name          = name;
            SuperProc     = superProc;
            Attributes    = attributes;
            ArgumentNames = argumentNames ?? new();
            ArgumentTypes = argumentTypes ?? new();

            VerbName = verbName;
            if (verbCategory is not null)
            {
                // (de)serialization meme to reduce JSON size
                // It's string.Empty by default but we invert it to null to prevent serialization
                // Explicit null becomes treated as string.Empty
                VerbCategory = verbCategory == string.Empty ? null : verbCategory;
            }
            VerbDesc     = verbDesc;
            Invisibility = invisibility;
        }
Example #3
0
 public DMProc(string name, DreamProc superProc, List <String> argumentNames, List <DMValueType> argumentTypes, byte[] bytecode, int maxStackSize, ProcAttributes attributes, string?verbName, string?verbCategory, string?verbDesc, sbyte?invisibility)
     : base(name, superProc, attributes, argumentNames, argumentTypes, verbName, verbCategory, verbDesc, invisibility)
 {
     Bytecode      = bytecode;
     _maxStackSize = maxStackSize;
 }