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(); }
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; }
public bool TryGetValueAsProc(out DreamProc proc) { if (Type == DreamValueType.DreamProc) { proc = (DreamProc)Value; return(true); } else { proc = null; return(false); } }
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; }
public DreamValue(DreamProc value) { Type = DreamValueType.DreamProc; Value = value; }