Commit c70bc3f5 authored by Chris Chua's avatar Chris Chua
Browse files

Moving some meeting-related strings into database

parent d3fb759c
Subproject commit 10d9e43dffc687a1b93feda3a3e9558c785869cf
Subproject commit e9db99bab1d65068d867fb86e71160844d79bfe5
......@@ -236,7 +236,7 @@ namespace MomentaryMeeting.Game
// await _databaseApi.Refresh();
if (!player.InMeeting)
{
response = "There is no one around to hear what you have to say.";
response = _database.GlobalText.SelectFromList("lonely");
}
else if (words.Length < 2)
{
......@@ -512,7 +512,7 @@ namespace MomentaryMeeting.Game
else
{
string content = command.Substring(verb.Length + 1);
string message = $"<The Stranger says: {content}";
string message = "<" + _database.GlobalText.SelectFromList("other_says").Replace("__CONTENT__", content);
Meeting meeting = _interactionManager.FindMeeting(player);
foreach (UserModel other in meeting._users)
{
......@@ -522,7 +522,7 @@ namespace MomentaryMeeting.Game
await gameInstance.SendPromptToPlayer(conn, message);
}
}
response += $">You say: {content}";
response += ">" + _database.GlobalText.SelectFromList("you_say").Replace("__CONTENT__", content);
}
}
break;
......
......@@ -16,7 +16,6 @@ namespace MomentaryMeeting.Game
public class InteractionManager : IEndMeetings
{
private const string _entryText = "A stranger appears in front of you.{1} You feel as though you could {b}say{/b} something to them.";
// Two players cannot meet more than once within this interval
private const int _reMeetingLockoutInterval = 180;
......@@ -99,12 +98,12 @@ namespace MomentaryMeeting.Game
RecordMeetingOccurred(otherUser, player);
_meetings.Add(meeting);
// let them know someone has entered their room
await _gameInstance.SendPromptToPlayer(otherUser, "<" + _entryText);
await _gameInstance.SendPromptToPlayer(otherUser, "<" + _database.GlobalText.SelectFromList("begin_meeting"));
await _gameInstance.SyncPlayerMusic(_gameInstance.GetConnection(otherUser.DiscordId));
_logger.LogInformation("User(" + player.DiscordId + ":" + player.Username +
") has entered a room occupied by " + "User(" + otherUser.DiscordId + ":" + otherUser.Username + "). Beginning meeting!");
return _entryText;
return _database.GlobalText.SelectFromList("begin_meeting");
}
}
return null;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment