Ejemplo n.º 1
0
        public override void PostSplitOff(Thing piece)
        {
            base.PostSplitOff(piece);
            CompNeurotrainer compNeurotrainer = piece.TryGetComp <CompNeurotrainer>();

            if (compNeurotrainer != null)
            {
                compNeurotrainer.skill = this.skill;
            }
        }
Ejemplo n.º 2
0
        public override bool AllowStackWith(Thing other)
        {
            if (!base.AllowStackWith(other))
            {
                return(false);
            }
            CompNeurotrainer compNeurotrainer = other.TryGetComp <CompNeurotrainer>();

            return(compNeurotrainer != null && compNeurotrainer.skill == this.skill);
        }
        public override bool AllowStackWith(Thing other)
        {
            if (!base.AllowStackWith(other))
            {
                return(false);
            }
            CompNeurotrainer compNeurotrainer = other.TryGetComp <CompNeurotrainer>();

            if (compNeurotrainer == null || compNeurotrainer.skill != skill || compNeurotrainer.ability != ability)
            {
                return(false);
            }
            return(true);
        }
        public override bool AllowStackWith(Thing other)
        {
            bool result;

            if (!base.AllowStackWith(other))
            {
                result = false;
            }
            else
            {
                CompNeurotrainer compNeurotrainer = other.TryGetComp <CompNeurotrainer>();
                result = (compNeurotrainer != null && compNeurotrainer.skill == this.skill);
            }
            return(result);
        }