Added allowInteractionEverywhere setting.
This commit is contained in:
parent
9d7d4ea97f
commit
05cddb09b9
@ -10,6 +10,7 @@ public class AreaProtection : FortressCraftMod
|
||||
{
|
||||
private bool showGUI = true;
|
||||
private bool allowInteractionAtSpawn;
|
||||
private bool allowInteractionEverywhere;
|
||||
private Coroutine serverCoroutine;
|
||||
private Vector3 playerPosition;
|
||||
private Vector3 clientAreaPosition;
|
||||
@ -85,6 +86,17 @@ public class AreaProtection : FortressCraftMod
|
||||
Debug.Log("Area Protection Mod: Error loading settings file: " + e.Message);
|
||||
}
|
||||
}
|
||||
if (entryName == "allowInteractionEverywhere")
|
||||
{
|
||||
try
|
||||
{
|
||||
allowInteractionEverywhere = bool.Parse(splitEntry[1]);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("Area Protection Mod: Error loading settings file: " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -457,7 +469,7 @@ public class AreaProtection : FortressCraftMod
|
||||
Vector2 spawn_pos = new Vector2(0, 0);
|
||||
float spawnDistance = Vector2.Distance(clientPos2D, spawn_pos);
|
||||
|
||||
if (spawnDistance <= 250 && allowInteractionAtSpawn == true)
|
||||
if (allowInteractionEverywhere || (spawnDistance <= 250 && allowInteractionAtSpawn))
|
||||
{
|
||||
interactionException = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user