/* NAME
* $sendNewsToSnoopers
*
* FUNCTION
* Send news to Snoopers (if available).
*
* INPUTS
* message - news to show
* agency - agency to use (optional)
*/
this.$sendNewsToSnoopers = function (message, agency) {
var news = {},
result,
index;
if (!worldScripts.snoopers && !worldScripts.GNN) {
/* Snoopers not installed. */
return;
}
if (!agency || typeof agency !== "number") {
/* Random agency. [1, 2 or 3] */
agency = Math.floor(Math.random() * 3.0) + 1;
}
news.ID = this.name;
news.Message = message;
news.Agency = agency;
if (worldScripts.GNN) {
result = worldScripts.GNN.insertNews(news);
} else {
result = worldScripts.snoopers.insertNews(news);
}
index = result + 5;
if (result < 0) {
/* Save for later. Snoopers only allows one news item at a time. */
this.$playerVar.newsForSnoopers.push(news);
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::Saving news for later.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result >= -5 ? ") " + p_const.snoopersErrorCodes[index] : ""));
}
} else if (result > 0) {
/* Problem. */
log(this.name, "$sendNewsToSnoopers::Problem with news.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result <= 30 ? ") " + p_const.snoopersErrorCodes[index] : ""));
} else {
/* News inserted. */
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::News inserted.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + ") " + p_const.snoopersErrorCodes[index]);
}
}
};
/* NAME
* newsDisplayed
*
* FUNCTION
* Called by Snoopers when the news item has been displayed.
* Check for any more news available and send it.
*/
this.newsDisplayed = function () {
var news = this.$playerVar.newsForSnoopers.shift();
if (news) {
/* More news available. Send it to Snoopers. */
this.$sendNewsToSnoopers(news.Message, news.Agency);
}
};
}.bind(this)());
The text for the news flashes is in descriptions.plist: keys are "jaguar_company_help_news", "jaguar_company_help_news_quote", "jaguar_company_rescue_news", "jaguar_company_rescue_multiple_news", and "jaguar_company_rescue_news_quote".
I don't know if it helps, but here's the version I was working on (I think with dybal if memory serves): Jaguar_Company_2.6.0.zip
/* NAME
* $sendNewsToSnoopers
*
* FUNCTION
* Send news to Snoopers (if available).
*
* INPUTS
* message - news to show
* agency - agency to use (optional)
*/
this.$sendNewsToSnoopers = function (message, agency) {
var news = {},
result,
index;
if (!worldScripts.snoopers && !worldScripts.GNN) {
/* Snoopers not installed. */
return;
}
if (!agency || typeof agency !== "number") {
/* Random agency. [1, 2 or 3] */
agency = Math.floor(Math.random() * 3.0) + 1;
}
news.ID = this.name;
news.Message = message;
news.Agency = agency;
if (worldScripts.GNN) {
result = worldScripts.GNN.insertNews(news);
} else {
result = worldScripts.snoopers.insertNews(news);
}
index = result + 5;
if (result < 0) {
/* Save for later. Snoopers only allows one news item at a time. */
this.$playerVar.newsForSnoopers.push(news);
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::Saving news for later.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result >= -5 ? ") " + p_const.snoopersErrorCodes[index] : ""));
}
} else if (result > 0) {
/* Problem. */
log(this.name, "$sendNewsToSnoopers::Problem with news.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result <= 30 ? ") " + p_const.snoopersErrorCodes[index] : ""));
} else {
/* News inserted. */
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::News inserted.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + ") " + p_const.snoopersErrorCodes[index]);
}
}
};
/* NAME
* newsDisplayed
*
* FUNCTION
* Called by Snoopers when the news item has been displayed.
* Check for any more news available and send it.
*/
this.newsDisplayed = function () {
var news = this.$playerVar.newsForSnoopers.shift();
if (news) {
/* More news available. Send it to Snoopers. */
this.$sendNewsToSnoopers(news.Message, news.Agency);
}
};
}.bind(this)());
The text for the news flashes is in descriptions.plist: keys are "jaguar_company_help_news", "jaguar_company_help_news_quote", "jaguar_company_rescue_news", "jaguar_company_rescue_multiple_news", and "jaguar_company_rescue_news_quote".
I don't know if it helps, but here's the version I was working on (I think with dybal if memory serves): Jaguar_Company_2.6.0.zip
Does Jaguar Company add in bases to every single anarchy/feudal/multi-gov? Or just some of them?
Some of them. Based on what I can see in the code, there's a 37.5% chance in an anarchy, a 25% chance in a feudal, and a 12.5% chance in a multi-gov. But I think the randomness of the choice has been set so that it will be the same systems in each galaxy, although I haven't confirmed that.
Does Jaguar Company add in bases to every single anarchy/feudal/multi-gov? Or just some of them?
Some of them. Based on what I can see in the code, there's a 37.5% chance in an anarchy, a 25% chance in a feudal, and a 12.5% chance in a multi-gov. But I think the randomness of the choice has been set so that it will be the same systems in each galaxy, although I haven't confirmed that.