Chaplain stuff (#98)

* - add: Null rod.

* - add: Only chaplain can use holy weapons.

* - add: Chaplain is cult immune.

* - fix: Fix component granting.

* - add: Only chaplain can use null rod.

* - add: Armaments beacon.

* - add: Chaplain playtime requirement.
This commit is contained in:
Aviu00
2024-02-20 19:28:44 +09:00
committed by GitHub
parent e6b6274874
commit 03fed0caa7
158 changed files with 2342 additions and 14 deletions

View File

@@ -141,19 +141,25 @@ public sealed class InteractionOutlineSystem : EntitySystem
var inRange = false;
if (localPlayer.ControlledEntity != null && !Deleted(entityToClick))
{
inRange = _interactionSystem.InRangeUnobstructed(localPlayer.ControlledEntity.Value, entityToClick.Value);
// WD START
if (_combatMode.IsInCombatMode(localPlayer.ControlledEntity) &&
(_meleeWeapon.TryGetWeapon(localPlayer.ControlledEntity.Value, out _, out var weapon) ||
TryComp(localPlayer.ControlledEntity, out weapon)))
{
inRange = _interactionSystem.InRangeUnobstructed(localPlayer.ControlledEntity.Value,
entityToClick.Value, weapon.Range);
var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition);
var userPos = Transform(localPlayer.ControlledEntity.Value).MapPosition;
if (mousePos.MapId != userPos.MapId || (userPos.Position - mousePos.Position).Length() > weapon.Range)
inRange = false;
} // WD END
}
else
{
inRange = _interactionSystem.InRangeUnobstructed(localPlayer.ControlledEntity.Value, entityToClick.Value);
}
// WD END
}
InteractionOutlineComponent? outline;