special treatment of multi-line game name

This commit is contained in:
Max Bradbury 2020-04-30 21:48:51 +01:00
parent febb04fc09
commit 3e985962c8
1 changed files with 14 additions and 9 deletions

View File

@ -101,15 +101,20 @@ impl Game {
let mut name = "".to_string();
if
! segments[0].starts_with("# BITSY VERSION ")
&&
! segments[0].starts_with("! ROOM_FORMAT ")
&&
! segments[0].starts_with("PAL ")
&&
! segments[0].starts_with("DEFAULT_FONT ")
&&
! segments[0].starts_with("TEXT_DIRECTION ") {
segments[0].starts_with("\"\"\"") // multi-line game name
||
(
! segments[0].starts_with("# BITSY VERSION ")
&&
! segments[0].starts_with("! ROOM_FORMAT ")
&&
! segments[0].starts_with("PAL ")
&&
! segments[0].starts_with("DEFAULT_FONT ")
&&
! segments[0].starts_with("TEXT_DIRECTION ")
)
{
name = segments[0].to_string();
segments = segments[1..].to_owned();
}