Example #1
0
 protected DreamProc(string name, DreamProc superProc, bool waitFor, List <String> argumentNames, List <DMValueType> argumentTypes)
 {
     Name          = name;
     SuperProc     = superProc;
     WaitFor       = waitFor;
     ArgumentNames = argumentNames ?? new();
     ArgumentTypes = argumentTypes ?? new();
 }
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;
            VerbCategory = verbCategory;
            VerbDesc     = verbDesc;
            Invisibility = invisibility;
        }
Example #3
0
        public bool TryGetValueAsProc(out DreamProc proc)
        {
            if (Type == DreamValueType.DreamProc)
            {
                proc = (DreamProc)Value;

                return(true);
            }
            else
            {
                proc = null;

                return(false);
            }
        }
Example #4
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 #5
0
 public DreamValue(DreamProc value)
 {
     Type  = DreamValueType.DreamProc;
     Value = value;
 }