Skip to content

Commit

Permalink
fix for Dark Nebula bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGullickson committed Sep 28, 2019
1 parent 854ab29 commit 5d8ec20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions produce_systems.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ for(i in 1:xml_length(planets)) {
faction <- xml_text(xml_find_first(planet, "faction"))
hpg <- xml_text(xml_find_first(planet, "hpg"))
sic <- xml_text(xml_find_first(planet, "socioIndustrial"))
nadir_charge
nadir_charge <- xml_text(xml_find_first(planet, "nadirCharge"))=="true"
zenith_charge <- xml_text(xml_find_first(planet, "zenithCharge"))=="true"
#it seems like all planets were given a default FALSE value here, which makes it difficult
Expand Down Expand Up @@ -1212,6 +1213,10 @@ for(i in 1:xml_length(waystations)) {

## create the system
system <- generate_connector_names(generate_system(star=star, habitable=surface_base, habit_pos=sys_pos))
#if this is a space base we need to make sure we generated a system with enough planets for the primary_slot
while(!is.na(primary_slot) && nrow(system$planets)<primary_slot) {
system <- generate_connector_names(generate_system(star=star, habitable=surface_base, habit_pos=sys_pos))
}

if(surface_base) {
primary_slot <- which(system$planets$inhabitable)[1]
Expand Down

0 comments on commit 5d8ec20

Please sign in to comment.