AI_PLANET_SIZE_TINY: string := "Tiny" AI_PLANET_SIZE_SMALL: string := "Small" AI_PLANET_SIZE_MEDIUM: string := "Medium" AI_PLANET_SIZE_LARGE: string := "Large" AI_PLANET_SIZE_HUGE: string := "Huge" AI_PLANET_SIZE_RING: string := "Ringworld" AI_PLANET_SIZE_SPHERE: string := "Sphereworld" AI_PLANET_POP_TINY: long := 500 AI_PLANET_POP_SMALL: long := 1000 AI_PLANET_POP_MEDIUM: long := 2000 AI_PLANET_POP_LARGE: long := 4000 AI_PLANET_POP_HUGE: long := 8000 AI_PLANET_POP_RING: long := 32000 AI_PLANET_POP_SPHERE: long := 64000 AI_PLANET_POP_TINY_DOMED: long := 125 AI_PLANET_POP_SMALL_DOMED: long := 250 AI_PLANET_POP_MEDIUM_DOMED: long := 500 AI_PLANET_POP_LARGE_DOMED: long := 1000 AI_PLANET_POP_HUGE_DOMED: long := 2000 AI_PLANET_POP_RING_DOMED: long := 8000 AI_PLANET_POP_SPHERE_DOMED: long := 16000 //------------------------------------------------------------------------ // Planet_Max_Population //------------------------------------------------------------------------ function Planet_Max_Population returns long params planet_id: long vars planet_size: string is_domed: boolean planet_max_pop: long begin set planet_size := Sys_Get_Planet_Size(planet_id) set is_domed := Is_Colony_Domed(planet_id) set planet_max_pop := 0 if is_domed then case planet_size AI_PLANET_SIZE_TINY: set planet_max_pop := AI_PLANET_POP_TINY_DOMED AI_PLANET_SIZE_SMALL: set planet_max_pop := AI_PLANET_POP_SMALL_DOMED AI_PLANET_SIZE_MEDIUM: set planet_max_pop := AI_PLANET_POP_MEDIUM_DOMED AI_PLANET_SIZE_LARGE: set planet_max_pop := AI_PLANET_POP_LARGE_DOMED AI_PLANET_SIZE_HUGE: set planet_max_pop := AI_PLANET_POP_HUGE_DOMED AI_PLANET_SIZE_RING: set planet_max_pop := AI_PLANET_POP_RING_DOMED AI_PLANET_SIZE_SPHERE: set planet_max_pop := AI_PLANET_POP_SPHERE_DOMED endcase else case planet_size AI_PLANET_SIZE_TINY: set planet_max_pop := AI_PLANET_POP_TINY AI_PLANET_SIZE_SMALL: set planet_max_pop := AI_PLANET_POP_SMALL AI_PLANET_SIZE_MEDIUM: set planet_max_pop := AI_PLANET_POP_MEDIUM AI_PLANET_SIZE_LARGE: set planet_max_pop := AI_PLANET_POP_LARGE AI_PLANET_SIZE_HUGE: set planet_max_pop := AI_PLANET_POP_HUGE AI_PLANET_SIZE_RING: set planet_max_pop := AI_PLANET_POP_RING AI_PLANET_SIZE_SPHERE: set planet_max_pop := AI_PLANET_POP_SPHERE endcase endif return planet_max_pop end