Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
RedpointGames
A Momentary Meeting
Commits
c70bc3f5
Commit
c70bc3f5
authored
Jan 31, 2021
by
Chris Chua
Browse files
Moving some meeting-related strings into database
parent
d3fb759c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Data
@
e9db99ba
Compare
10d9e43d
...
e9db99ba
Subproject commit
10d9e43dffc687a1b93feda3a3e9558c785869cf
Subproject commit
e9db99bab1d65068d867fb86e71160844d79bfe5
MomentaryMeeting/Game/CommandParser.cs
View file @
c70bc3f5
...
...
@@ -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 Strang
er
says
:
{
content
}
"
;
string
message
=
"<
"
+
_database
.
GlobalText
.
SelectFromList
(
"oth
er
_
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
+=
$
">
Y
ou
say
:
{
content
}
"
;
response
+=
">
"
+
_database
.
GlobalText
.
SelectFromList
(
"y
ou
_
say
"
).
Replace
(
"__CONTENT__"
,
content
)
;
}
}
break
;
...
...
MomentaryMeeting/Game/InteractionManager.cs
View file @
c70bc3f5
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment