private void CreateProperties(ArchSolarComponent arch) { foreach (ArchSolarComponentProperty prop in arch.properties) { AddProperty(prop); } }
public SolarComponent(Solar solar, ArchSolarComponent arch) { this.id = arch.id; this.solar = solar; this.properties = new Dictionary <Type, SolarComponentProperty>(); this.hardpoints = new Dictionary <ulong, SolarComponentHardpoint>(); CreateProperties(arch); // should be first before creating hardpoints CreateHardpoints(arch); }
private void CreateHardpoints(ArchSolarComponent arch) { SolarComponentPropertyRigidHull hull = GetProperty <SolarComponentPropertyRigidHull>(); if (hull == null) { return; } foreach (ArchComponentHardpoint hp in arch.hardpoints) { SolarComponentHardpoint hardpoint = new SolarComponentHardpoint(hp, hull); hardpoints.Add(hardpoint.id, hardpoint); } }