Skip to content

Commit d746ae4

Browse files
authored
Merge pull request #6844 from Goober5000/modular_poofs
allow modular nebula tables to not define bitmaps
2 parents 5fbce06 + 07db2aa commit d746ae4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

code/nebula/neb.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,13 @@ void parse_nebula_table(const char* filename)
204204
read_file_text(filename, CF_TYPE_TABLES);
205205
reset_parse();
206206

207+
// allow modular tables to not define bitmaps
208+
bool skip_background_bitmaps = false;
209+
if (Parsing_modular_table && (check_for_string("+Poof:") || check_for_string("$Name:")))
210+
skip_background_bitmaps = true;
211+
207212
// background bitmaps
208-
while (!optional_string("#end")) {
213+
while (!skip_background_bitmaps && !optional_string("#end")) {
209214
// nebula
210215
optional_string("+Nebula:");
211216
stuff_string(name, F_NAME, MAX_FILENAME_LEN);
@@ -222,7 +227,7 @@ void parse_nebula_table(const char* filename)
222227
if (Parsing_modular_table && check_for_eof())
223228
return;
224229

225-
// poofs
230+
// poofs (see also check_for_string above)
226231
while (required_string_one_of(3, "#end", "+Poof:", "$Name:")) {
227232
bool create_if_not_found = true;
228233
poof_info pooft;

0 commit comments

Comments
 (0)