Example #1
0
        protected override bool OnRead()
        {
            bool bufferReadValid = true;

            this.Agent           = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid);
            this.IsKilled        = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid);
            this.ActionCodeIndex = new ActionIndexCache(GameNetworkMessage.ReadIntFromPacket(CompressionBasic.ActionCodeCompressionInfo, ref bufferReadValid));
            return(bufferReadValid);
        }
Example #2
0
            private void DoBandaging()
            {
                var bleeding = agent.GetComponent <BleedingBehavior.BleedingComponent>();

                if (mission != null && bleeding != null && !bleeding._bandaged && count > 0 && bleeding._tickDamage * 3 > agent.Health)
                {
                    canBandage = false;
                    Announce($"{agent.Name} used {(agent.IsFemale ? "her" : "his")} bandage.");
                    count--;
                    agent.SetActionChannel(1, ActionIndexCache.Create("act_reload_crossbow"), true);
                    if (!mission.MissionEnded())
                    {
                        bleeding._bandaged = true;
                    }
                }
                canBandage = true;
            }
 public ResetAnimationOnStopUsageComponent(ActionIndexCache successfulResetActionCode) => this._successfulResetAction = successfulResetActionCode;
Example #4
0
 public MakeAgentDead(Agent agent, bool isKilled, ActionIndexCache actionCodeIndex)
 {
     this.Agent           = agent;
     this.IsKilled        = isKilled;
     this.ActionCodeIndex = actionCodeIndex;
 }