/// <summary> /// Creates a pod with the given characteristics. /// </summary> /// <param name="id">The ID of the pod.</param> /// <param name="tier">The initial position (tier).</param> /// <param name="waypoint">The waypoint to place the pod at.</param> /// <param name="radius">The radius of the pod.</param> /// <param name="orientation">The initial orientation of the pod.</param> /// <param name="capacity">The capacity of the pod.</param> /// <returns>The newly created pod.</returns> public Pod CreatePod(int id, Tier tier, Waypoint waypoint, double radius, double orientation, double capacity) { // Consider override values if (SettingConfig.OverrideConfig != null && SettingConfig.OverrideConfig.OverridePodCapacity) { capacity = SettingConfig.OverrideConfig.OverridePodCapacityValue; } // Create the pod Pod pod = new Pod(this) { ID = id, Tier = tier, Radius = radius, X = waypoint.X, Y = waypoint.Y, Orientation = orientation, Capacity = capacity, Waypoint = waypoint }; Pods.Add(pod); tier.AddPod(pod); _idToPods[pod.ID] = pod; // Set volatile ID SetVolatileIDForPod(pod); // Emulate setdown operation WaypointGraph.PodSetdown(pod, waypoint); // Notify listeners NewPod(pod); // Return it return(pod); }