public Instance(IStateMachineTarget master, Def def)
            : base(master, def)
        {
            incubation = Db.Get().Amounts.Incubation.Lookup(base.gameObject);
            Action <object> handler = OnStore;

            master.Subscribe(856640610, handler);
            master.Subscribe(1309017699, handler);
            Action <object> handler2 = OnOperationalChanged;

            master.Subscribe(1628751838, handler2);
            master.Subscribe(960378201, handler2);
            wildness        = Db.Get().Amounts.Wildness.Lookup(base.gameObject);
            wildness.value  = wildness.GetMax();
            viability       = Db.Get().Amounts.Viability.Lookup(base.gameObject);
            viability.value = viability.GetMax();
            float value = def.baseIncubationRate;

            if (GenericGameSettings.instance.acceleratedLifecycle)
            {
                value = 33.3333321f;
            }
            AttributeModifier modifier = new AttributeModifier(Db.Get().Amounts.Incubation.deltaAttribute.Id, value, CREATURES.MODIFIERS.BASE_INCUBATION_RATE.NAME, false, false, true);

            incubatingEffect = new Effect("Incubating", CREATURES.MODIFIERS.INCUBATING.NAME, CREATURES.MODIFIERS.INCUBATING.TOOLTIP, 0f, true, false, false, null, 0f, null);
            incubatingEffect.Add(modifier);
        }
Example #2
0
        public Instance(IStateMachineTarget master, Def def)
            : base(master, def)
        {
            World instance = World.Instance;

            instance.OnSolidChanged = (Action <int>)Delegate.Combine(instance.OnSolidChanged, new Action <int>(OnSolidChanged));
            master.Subscribe(387220196, OnDestinationReached);
            master.Subscribe(-766531887, OnDestinationReached);
        }
 public Instance(IStateMachineTarget master, Def def)
     : base(master, def)
 {
     AddAmounts(base.gameObject);
     MakeModifiers();
     master.Subscribe(1309017699, SetStorage);
 }
 public Instance(IStateMachineTarget master)
     : base(master)
 {
     master.Subscribe(493375141, OnRefreshUserMenu);
 }