Don't send comms while player is exiting witchspace
This commit is contained in:
parent
7276ef6257
commit
daf9338c03
@ -332,6 +332,11 @@ this.PriorityAIController = function(ship)
|
||||
|
||||
this.communicate = function(key,params,priority)
|
||||
{
|
||||
if (!worldScripts["oolite-libPriorityAI"].$commsAllowed)
|
||||
{
|
||||
// comms temporarily disabled
|
||||
return;
|
||||
}
|
||||
if (priority > 1)
|
||||
{
|
||||
var send = clock.adjustedSeconds - lastCommSent;
|
||||
@ -6173,6 +6178,7 @@ this.startUp = function()
|
||||
{
|
||||
// initial definition is just essential communications for now
|
||||
this.$commsSettings = {};
|
||||
this.$commsAllowed = true;
|
||||
this._setCommunications({
|
||||
generic: {
|
||||
generic: {
|
||||
@ -6241,6 +6247,19 @@ this.startUp = function()
|
||||
|
||||
|
||||
|
||||
/* Event handler pair to prevent comms from being received while in
|
||||
* witchspace tunnel */
|
||||
this.shipWillEnterWitchspace = function()
|
||||
{
|
||||
this.$commsAllowed = false;
|
||||
}
|
||||
|
||||
this.shipExitedWitchspace = function()
|
||||
{
|
||||
this.$commsAllowed = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Search through communications from most specific to least specific.
|
||||
* role+personality
|
||||
|
Loading…
x
Reference in New Issue
Block a user