Пример #1
0
        public Pluggable(ActorInitializer init, PluggableInfo info)
        {
            Info = info;

            var plugInit = init.Contains <PlugsInit>() ? init.Get <PlugsInit, Dictionary <CVec, string> >() : new Dictionary <CVec, string>();

            if (plugInit.ContainsKey(Info.Offset))
            {
                initialPlug = plugInit[Info.Offset];
            }
        }
Пример #2
0
        public Pluggable(ActorInitializer init, PluggableInfo info)
        {
            Info = info;

            initialPlug = init.GetValue <PlugInit, string>(info, null);

            if (info.Requirements.Count > 0)
            {
                plugTypesAvailability = new Dictionary <string, bool>();
                foreach (var plug in info.Requirements)
                {
                    plugTypesAvailability[plug.Key] = true;
                }
            }
        }
Пример #3
0
        public Pluggable(ActorInitializer init, PluggableInfo info)
        {
            Info = info;

            var plugInit = init.Contains <PlugsInit>() ? init.Get <PlugsInit, Dictionary <CVec, string> >() : new Dictionary <CVec, string>();

            if (plugInit.ContainsKey(Info.Offset))
            {
                initialPlug = plugInit[Info.Offset];
            }

            if (info.Requirements.Count > 0)
            {
                plugTypesAvailability = new Dictionary <string, bool>();
                foreach (var plug in info.Requirements)
                {
                    plugTypesAvailability[plug.Key] = true;
                }
            }
        }
Пример #4
0
 public Pluggable(Actor self, PluggableInfo info)
 {
     Info           = info;
     upgradeManager = self.Trait <UpgradeManager>();
 }