private void Load(StructureValueCollection values, StringIDSource stringIDs) { Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name"); Type = (short)values.GetInteger("type"); ExpressionIndex = new DatumIndex(values.GetInteger("expression index")); }
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, BuildInformation buildInfo) { Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name"); ExecutionType = (short)values.GetInteger("execution type"); ReturnType = (short)values.GetInteger("return type"); RootExpressionIndex = new DatumIndex(values.GetInteger("first expression index")); if (Name == null) Name = "script_" + RootExpressionIndex.Value.ToString("X8"); Parameters = LoadParameters(reader, values, metaArea, buildInfo); }
private string GetObjectName(StructureValueCollection values, StringIDSource stringIDs) { if (values.HasString("name")) { return values.GetString("name"); } if (values.HasInteger("name stringid")) { var sid = new StringID(values.GetInteger("name stringid")); return stringIDs.GetString(sid); } throw new InvalidOperationException("Unable to determine the name of objects in the \"" + _layoutName + "\" layout"); }
private string GetObjectName(StructureValueCollection values, StringIDSource stringIDs) { if (values.HasString("name")) { return(values.GetString("name")); } if (values.HasInteger("name stringid")) { var sid = new StringID(values.GetInteger("name stringid")); return(stringIDs.GetString(sid)); } throw new InvalidOperationException("Unable to determine the name of objects in the \"" + _layoutName + "\" layout"); }
private void Load(IReader reader, StructureValueCollection values, FileSegmentGroup metaArea, StringIDSource stringIDs, ExpressionTable expressions, BuildInformation buildInfo) { Name = stringIDs.GetString(new StringID((int)values.GetInteger("name index"))); ExecutionType = (short)values.GetInteger("execution type"); ReturnType = (short)values.GetInteger("return type"); DatumIndex rootExpr = new DatumIndex(values.GetInteger("first expression index")); if (rootExpr.IsValid) RootExpression = expressions.FindExpression(rootExpr); if (Name == null) Name = "script_" + rootExpr.Value.ToString("X8"); Parameters = LoadParameters(reader, values, metaArea, buildInfo); }
private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, EngineDescription buildInfo) { Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name"); ExecutionType = (short)values.GetInteger("execution type"); ReturnType = (short)values.GetInteger("return type"); RootExpressionIndex = new DatumIndex(values.GetInteger("first expression index")); if (Name == null) { Name = "script_" + RootExpressionIndex.Value.ToString("X8"); } Parameters = LoadParameters(reader, values, metaArea, buildInfo); }
private void Load(StructureValueCollection values, StringIDSource stringIDs) { Guid = values.GetRaw("guid"); Name = stringIDs.GetString(new StringID(values.GetInteger("name stringid"))); }
private void Load(StructureValueCollection values, StringIDSource stringIDs) { Guid = values.GetRaw("guid"); Name = stringIDs.GetString(new StringID(values.GetInteger("name stringid"))); }
public ThirdGenGlobalObject(StructureValueCollection values, StringIDSource stringIDs) { Name = values.HasInteger("name index") ? stringIDs.GetString(new StringID(values.GetInteger("name index"))) : values.GetString("name"); Class = (short)values.GetInteger("type"); PlacementIndex = (short)values.GetInteger("placement index"); }