Skip to content

Commit

Permalink
Merge pull request #1 from ngoedde/add-to-core
Browse files Browse the repository at this point in the history
Add to core
  • Loading branch information
DummkopfOfHachtenduden authored Nov 9, 2023
2 parents 3983f31 + 7d63739 commit 44b8ed2
Show file tree
Hide file tree
Showing 79 changed files with 498 additions and 831 deletions.
22 changes: 0 additions & 22 deletions Application/RSBot/Views/SplashScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,28 +186,6 @@ private void InitializeBot()
MessageBoxButtons.OK, MessageBoxIcon.Error);

CommandManager.Initialize();

InitializeMap();
}

/// <summary>
/// Initializes the map.
/// </summary>
private void InitializeMap()
{
//---- Load Map ----
var mapFile = Path.Combine(Kernel.BasePath, "Data", "Game", "map.rsc");

if (!CollisionManager.Enabled) Log.Warn("[Collision] Collision detection has been deactivated by the user!");

if (!File.Exists(mapFile))
{
Log.Error($"[Collisions] Directory {mapFile} not found!");

return;
}

CollisionManager.Initialize();
}

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Botbases/RSBot.Default/Bot/Botbase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public void Reload()
/// </summary>
public void Tick()
{
if (!Kernel.Bot.Running)
return;

if (Game.Player.HasActiveVehicle)
{
Game.Player.Vehicle.Dismount();
Expand Down
17 changes: 9 additions & 8 deletions Botbases/RSBot.Default/Bundle/Target/TargetBundle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using System.Linq;
using RSBot.Core;
using RSBot.Core.Components;
Expand Down Expand Up @@ -144,14 +145,14 @@ private SpawnedMonster GetNearestEnemy()
var ignorePillar = PlayerConfig.Get<bool>("RSBot.Training.checkBoxDimensionPillar");

if (!SpawnManager.TryGetEntities<SpawnedMonster>(m =>
m.State.LifeState == LifeState.Alive &&
!(warlockModeEnabled && m.State.HasTwoDots()) &&
m.IsBehindObstacle == false &&
_blacklist?.ContainsKey(m.UniqueId) == false &&
Container.Bot.Area.IsInSight(m) &&
!m.Record.IsPandora &&
//m.DistanceToPlayer <= 40 &&
!(m.Record.IsDimensionPillar && ignorePillar) &&
m.State.LifeState == LifeState.Alive && //Only alive
!(warlockModeEnabled && m.State.HasTwoDots()) && //Has two Dots?
m.IsBehindObstacle == false && //Is not behind obstacle
(_blacklist == null || !_blacklist.ContainsKey(m.UniqueId)) && //Is not blacklisted
(m.AttackingPlayer || !Bundles.Avoidance.AvoidMonster(m.Rarity)) && //Is attacking player or shouldn't be avoided
Container.Bot.Area.IsInSight(m) && //Is in training area
!m.Record.IsPandora && //Isn't pandora box
!(m.Record.IsDimensionPillar && ignorePillar) && //Isn't dimension pillar
!m.Record.IsSummonFlower, out var entities))
return default;

Expand Down

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions Library/RSBot.Core/Components/Collision/CollisionCalculator.cs

This file was deleted.

30 changes: 0 additions & 30 deletions Library/RSBot.Core/Components/Collision/CollisionResult.cs

This file was deleted.

108 changes: 0 additions & 108 deletions Library/RSBot.Core/Components/Collision/Intersection.cs

This file was deleted.

28 changes: 0 additions & 28 deletions Library/RSBot.Core/Components/Collision/RSCollisionLine.cs

This file was deleted.

49 changes: 0 additions & 49 deletions Library/RSBot.Core/Components/Collision/RSCollisionMesh.cs

This file was deleted.

Loading

0 comments on commit 44b8ed2

Please sign in to comment.