Beispiel #1
0
        public override void AssignParameters(SpawnerEntityMissionHelper _spawnerMissionHelper)
        {
            SiegeLadder firstScriptOfType = _spawnerMissionHelper.SpawnedEntity.GetFirstScriptOfType <SiegeLadder>();

            firstScriptOfType.AddOnDeployTag    = this.AddOnDeployTag;
            firstScriptOfType.RemoveOnDeployTag = this.RemoveOnDeployTag;
            firstScriptOfType.AssignParametersFromSpawner(this.SideTag, this.TargetWallSegmentTag, this.OnWallNavMeshId, this.DownStateRotationRadian, this.UpperStateRotationRadian, this.BarrierTagToRemove, this.IndestructibleMerlonsTag);
            List <GameEntity> children = new List <GameEntity>();

            _spawnerMissionHelper.SpawnedEntity.GetChildrenRecursive(ref children);
            children.Find((Predicate <GameEntity>)(x => x.Name == "initial_wait_pos")).GetFirstScriptOfType <TacticalPosition>().SetWidthFromSpawner(this.TacticalPositionWidth);
        }
Beispiel #2
0
 public static void Postfix(SiegeLadder __instance)
 {
     try
     {
         //if (Mission.Current != null)
         //if (Mission.Current.PlayerTeam.Side is TaleWorlds.Core.BattleSideEnum.Defender) { return; }
         if (!__instance.IsUsed)
         {
             (__instance as SiegeWeapon).ForcedUse = false;
         }
         else
         {
             (__instance as SiegeWeapon).ForcedUse = true;
         }
     } catch { Main.Log("Siege ladder tick skipped"); return; }
 }
 public SiegeLadderAI(SiegeLadder ladder)
     : base((UsableMachine)ladder)
 {
 }
Beispiel #4
0
 public SetSiegeLadderState(SiegeLadder siegeLadder, SiegeLadder.LadderState state)
 {
     this.SiegeLadder = siegeLadder;
     this.State       = state;
 }