示例#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();
 }
示例#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;
        }
示例#3
0
        public bool TryGetValueAsProc(out DreamProc proc)
        {
            if (Type == DreamValueType.DreamProc)
            {
                proc = (DreamProc)Value;

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

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