Skip to content

Commit e4a8767

Browse files
committed
fix ref commands, and tweak ready message
1 parent 8f9ec43 commit e4a8767

2 files changed

Lines changed: 6 additions & 26 deletions

File tree

commands/rounds/ready.js

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,12 @@ module.exports = {
1818
};
1919

2020
function onCommand(displayName, gameState) {
21-
var message = 'Nobody seems ready for much of anything right now.';
21+
var message = 'Nobody seems ready to work since it is not the work round.';
2222
if (gameState.workRound) {
2323
message =
2424
'People available to work: ' +
2525
worklib.listReadyToWork(gameState.population);
2626
}
27-
// this may just be an artifact of non-secret mating?
28-
if (gameState.reproductionRound) {
29-
if (gameState.reproductionList && gameState.reproductionList[0]) {
30-
message =
31-
'The mating invitation order is ' +
32-
gameState.reproductionList.join(', ') +
33-
'\n';
34-
var cleanName = gameState.reproductionList[0];
35-
if (cleanName.indexOf('(') > 0) {
36-
startParen = cleanName.indexOf('(');
37-
cleanName = cleanName.substring(0, startParen);
38-
}
39-
message +=
40-
'Available partners: ' +
41-
reproLib.eligibleMates(cleanName, gameState.population);
42-
for (personName in population) {
43-
member = pop.memberByName(personName, gameState);
44-
if (member.invite) {
45-
message +=
46-
'\n' + personName + ' is awaiting a response from ' + member.invite;
47-
}
48-
}
49-
}
50-
}
5127
text.addMessage(gameState, displayName, message);
5228
return;
5329
}

tribes-interface.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,7 @@ <h3 id="selectedCommandName">Game Messages</h3>
19211921

19221922
// Sort commands alphabetically by name and filter out hidden commands
19231923
const sortedCommands = Object.entries(this.commands)
1924-
.filter(([name]) => !hiddenCommands.includes(name))
1924+
.filter(([name, command]) => !hiddenCommands.includes(name) && (!this.isRefereeCommand(command.description) || this.isReferee))
19251925
.sort(([a], [b]) => a.localeCompare(b));
19261926

19271927
sortedCommands.forEach(([name, command]) => {
@@ -2886,6 +2886,10 @@ <h3 id="selectedCommandName">Game Messages</h3>
28862886
container.appendChild(group);
28872887
}
28882888

2889+
isRefereeCommand(description) {
2890+
return description && description.toUpperCase().includes('REFEREE ONLY');
2891+
}
2892+
28892893
isChiefCommand(description) {
28902894
// Check if command description indicates it requires chief privileges
28912895
return description && (

0 commit comments

Comments
 (0)