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
e1e8f328
Commit
e1e8f328
authored
Jan 31, 2021
by
NukeKitty
Browse files
Merge branch 'main' into append-inputenabled
parents
08c58924
cb88e6f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Data
@
39ceacc9
Compare
fd8643ae
...
39ceacc9
Subproject commit
fd8643ae48b174e7eb0a533f59eef79ff5e9df49
Subproject commit
39ceacc91fd41d1013185a350d84726f5aaa668f
MomentaryMeeting/Game/CommandParser.cs
View file @
e1e8f328
...
...
@@ -609,6 +609,7 @@ namespace MomentaryMeeting.Game
List
<
Prompt
>
prompts
=
_database
.
Locations
[
player
.
LocationName
].
Prompt
;
sb
.
Append
(
EvaluatePrompt
(
prompts
));
var
neighbours
=
_arrangementGenerator
.
GetNeighbours
(
player
.
LocationName
);
var
needsNewlineBeforeAutoExit
=
true
;
AutoExitForDirection
(
RelativeDirection
.
Forward
);
AutoExitForDirection
(
RelativeDirection
.
Right
);
AutoExitForDirection
(
RelativeDirection
.
Back
);
...
...
@@ -632,7 +633,14 @@ namespace MomentaryMeeting.Game
{
var
target
=
_database
.
Locations
[
neighbours
.
GetNeighbour
(
dir
)];
if
(
target
.
ViewFrom
!=
null
&&
target
.
ViewFrom
.
ContainsKey
(
dir
))
{
if
(
needsNewlineBeforeAutoExit
)
{
sb
.
AppendLine
();
needsNewlineBeforeAutoExit
=
false
;
}
sb
.
AppendLine
().
Append
(
EvaluatePrompt
(
target
.
ViewFrom
[
dir
]));
}
}
}
}
...
...
MomentaryMeeting/Services/DatabaseApi.cs
View file @
e1e8f328
...
...
@@ -62,6 +62,7 @@
while
(
newdb
.
Include
.
Any
())
{
var
filename
=
newdb
.
Include
.
First
();
_logger
.
LogInformation
(
$"Loading
{
filename
}
"
);
var
temp
=
_deserializer
.
Deserialize
<
Database
>(
getFileContents
(
filename
));
temp
.
Arrangements
?.
ToList
().
ForEach
(
kv
=>
newdb
.
Arrangements
[
kv
.
Key
]
=
kv
.
Value
);
temp
.
GlobalText
?.
ToList
().
ForEach
(
kv
=>
newdb
.
GlobalText
[
kv
.
Key
]
=
kv
.
Value
);
...
...
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