Exemple #1
0
        /// <summary>
        /// 艦船情報作成
        /// </summary>
        /// <param name="ware">ベースとなるウェア情報</param>
        /// <returns>艦船情報</returns>
        public IShip Build(IWare ware)
        {
            if (!ware.Tags.Contains("ship"))
            {
                throw new ArgumentException();
            }

            var item = _Ships[ware.ID];

            return(new Ship(
                       ware,
                       _ShipTypes[item.ShipTypeID],
                       item.Macro,
                       X4Database.Instance.X4Size.Get(item.SizeID),
                       item.Mass,
                       new Drag(item.DragForward, item.DragReverse, item.DragHorizontal, item.DragVertical, item.DragPitch, item.DragYaw, item.DragRoll),
                       new Inertia(item.InertiaPitch, item.InertiaYaw, item.InertiaRoll),
                       item.Hull,
                       item.People,
                       item.MissileStorage,
                       item.DroneStorage,
                       item.CargoSize,
                       _ShipHangerManager.Get(ware.ID),
                       _ShipLoadoutManager.Get(ware.ID),
                       _WareEquipmentManager.Get(ware.ID).ToDictionary(x => x.ConnectionName)
                       ));
        }
Exemple #2
0
        /// <summary>
        /// モジュール情報作成
        /// </summary>
        /// <param name="ware">ベースとなるウェア情報</param>
        /// <returns>モジュール情報</returns>
        public IX4Module Builld(IWare ware)
        {
            if (!ware.Tags.Contains("module"))
            {
                throw new ArgumentException();
            }

            var item = _Modules[ware.ID];

            return(new Module(
                       ware,
                       item.Macro,
                       _ModuleTypes[item.ModuleTypeID],
                       item.MaxWorkers,
                       item.WorkersCapacity,
                       item.NoBlueprint,
                       _ModuleProductManager.Get(ware.ID),
                       _StorageManager.Get(ware.ID),
                       _WareEquipmentManager.Get(ware.ID).ToDictionary(x => x.ConnectionName)
                       ));
        }