def refresh_concept(concept_name, xy): xy = (xy[0] + 100, xy[1]) g.screen.fill(g.colors["white"], (xy[0] + 155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0] + 156, xy[1] + 1, 298, 348)) if concept_name == "": return g.print_string(g.screen, g.help_strings[concept_name][0], g.font[0][22], -1, (xy[0] + 160, xy[1] + 5), g.colors["white"]) g.print_multiline(g.screen, g.help_strings[concept_name][1], g.font[0][18], 290, (xy[0] + 160, xy[1] + 30), g.colors["white"])
def refresh_concept(concept_name, xy): xy = (xy[0]+100, xy[1]) g.screen.fill(g.colors["white"], (xy[0]+155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0]+156, xy[1]+1, 298, 348)) if concept_name == "": return g.print_string(g.screen, g.help_strings[concept_name][0], g.font[0][22], -1, (xy[0]+160, xy[1]+5), g.colors["white"]) g.print_multiline(g.screen, g.help_strings[concept_name][1], g.font[0][18], 290, (xy[0]+160, xy[1]+30), g.colors["white"])
def refresh_tech(tech_name, xy): xy = (xy[0] + 100, xy[1]) g.screen.fill(g.colors["white"], (xy[0] + 155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0] + 156, xy[1] + 1, 298, 348)) if tech_name == "": return g.print_string(g.screen, g.techs[tech_name].name, g.font[0][22], -1, (xy[0] + 160, xy[1] + 5), g.colors["white"]) #Building cost if not g.techs[tech_name].done: string = "Research Cost:" g.print_string(g.screen, string, g.font[0][18], -1, (xy[0] + 160, xy[1] + 30), g.colors["white"]) string = g.to_money(g.techs[tech_name].cost_left[0]) + " Money" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0] + 160, xy[1] + 50), g.colors["white"]) string = g.to_cpu(g.techs[tech_name].cost_left[1]) + " CPU" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0] + 160, xy[1] + 70), g.colors["white"]) else: g.print_string(g.screen, "Research complete.", g.font[0][22], -1, (xy[0] + 160, xy[1] + 30), g.colors["white"]) #Danger if g.techs[tech_name].danger == 0: string = "Study anywhere." elif g.techs[tech_name].danger == 1: string = "Study underseas or farther." elif g.techs[tech_name].danger == 2: string = "Study off-planet." elif g.techs[tech_name].danger == 3: string = "Study far away from this planet." elif g.techs[tech_name].danger == 4: string = "Do not study in this dimension." g.print_string(g.screen, string, g.font[0][20], -1, (xy[0] + 160, xy[1] + 90), g.colors["white"]) if g.techs[tech_name].done: g.print_multiline( g.screen, g.techs[tech_name].description + " \\n \\n " + g.techs[tech_name].result, g.font[0][18], 290, (xy[0] + 160, xy[1] + 120), g.colors["white"]) else: g.print_multiline(g.screen, g.techs[tech_name].description, g.font[0][18], 290, (xy[0] + 160, xy[1] + 120), g.colors["white"])
def refresh_tech(tech_name, xy): xy = (xy[0]+100, xy[1]) g.screen.fill(g.colors["white"], (xy[0]+155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0]+156, xy[1]+1, 298, 348)) if tech_name == "": return g.print_string(g.screen, g.techs[tech_name].name, g.font[0][22], -1, (xy[0]+160, xy[1]+5), g.colors["white"]) #Building cost if not g.techs[tech_name].done: string = "Research Cost:" g.print_string(g.screen, string, g.font[0][18], -1, (xy[0]+160, xy[1]+30), g.colors["white"]) string = g.to_money(g.techs[tech_name].cost_left[0])+" Money" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0]+160, xy[1]+50), g.colors["white"]) string = g.to_cpu(g.techs[tech_name].cost_left[1]) + " CPU" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0]+160, xy[1]+70), g.colors["white"]) else: g.print_string(g.screen, "Research complete.", g.font[0][22], -1, (xy[0]+160, xy[1]+30), g.colors["white"]) #Danger if g.techs[tech_name].danger == 0: string = "Study anywhere." elif g.techs[tech_name].danger == 1: string = "Study underseas or farther." elif g.techs[tech_name].danger == 2: string = "Study off-planet." elif g.techs[tech_name].danger == 3: string = "Study far away from this planet." elif g.techs[tech_name].danger == 4: string = "Do not study in this dimension." g.print_string(g.screen, string, g.font[0][20], -1, (xy[0]+160, xy[1]+90), g.colors["white"]) if g.techs[tech_name].done: g.print_multiline(g.screen, g.techs[tech_name].description+" \\n \\n "+ g.techs[tech_name].result, g.font[0][18], 290, (xy[0]+160, xy[1]+120), g.colors["white"]) else: g.print_multiline(g.screen, g.techs[tech_name].description, g.font[0][18], 290, (xy[0]+160, xy[1]+120), g.colors["white"])
def refresh_items(item_name, xy): xy = (xy[0] + 100, xy[1]) g.screen.fill(g.colors["white"], (xy[0] + 155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0] + 156, xy[1] + 1, 298, 348)) if item_name == "": return g.print_string(g.screen, g.items[item_name].name, g.font[0][22], -1, (xy[0] + 160, xy[1] + 5), g.colors["white"]) #Building cost string = "Building Cost:" g.print_string(g.screen, string, g.font[0][18], -1, (xy[0] + 160, xy[1] + 30), g.colors["white"]) string = g.to_money(g.items[item_name].cost[0]) + " Money" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0] + 160, xy[1] + 50), g.colors["white"]) string = g.to_time(g.items[item_name].cost[2]) g.print_string(g.screen, string, g.font[0][16], -1, (xy[0] + 160, xy[1] + 70), g.colors["white"]) #Quality if g.items[item_name].item_type == "compute": string = "CPU per day: " + str(g.items[item_name].item_qual) elif g.items[item_name].item_type == "react": string = "Detection chance reduction: " + g.to_percent( g.items[item_name].item_qual) elif g.items[item_name].item_type == "network": string = "CPU bonus: " + g.to_percent(g.items[item_name].item_qual) elif g.items[item_name].item_type == "security": string = "Detection chance reduction: " + g.to_percent( g.items[item_name].item_qual) g.print_string(g.screen, string, g.font[0][20], -1, (xy[0] + 160, xy[1] + 90), g.colors["white"]) g.print_multiline(g.screen, g.items[item_name].description, g.font[0][18], 290, (xy[0] + 160, xy[1] + 120), g.colors["white"])
def refresh_items(item_name, xy): xy = (xy[0]+100, xy[1]) g.screen.fill(g.colors["white"], (xy[0]+155, xy[1], 300, 350)) g.screen.fill(g.colors["dark_blue"], (xy[0]+156, xy[1]+1, 298, 348)) if item_name == "": return g.print_string(g.screen, g.items[item_name].name, g.font[0][22], -1, (xy[0]+160, xy[1]+5), g.colors["white"]) #Building cost string = "Building Cost:" g.print_string(g.screen, string, g.font[0][18], -1, (xy[0]+160, xy[1]+30), g.colors["white"]) string = g.to_money(g.items[item_name].cost[0])+" Money" g.print_string(g.screen, string, g.font[0][16], -1, (xy[0]+160, xy[1]+50), g.colors["white"]) string = g.to_time(g.items[item_name].cost[2]) g.print_string(g.screen, string, g.font[0][16], -1, (xy[0]+160, xy[1]+70), g.colors["white"]) #Quality if g.items[item_name].item_type == "compute": string = "CPU per day: "+str(g.items[item_name].item_qual) elif g.items[item_name].item_type == "react": string = "Detection chance reduction: "+g.to_percent(g.items[item_name].item_qual) elif g.items[item_name].item_type == "network": string = "CPU bonus: "+g.to_percent(g.items[item_name].item_qual) elif g.items[item_name].item_type == "security": string = "Detection chance reduction: "+g.to_percent(g.items[item_name].item_qual) g.print_string(g.screen, string, g.font[0][20], -1, (xy[0]+160, xy[1]+90), g.colors["white"]) g.print_multiline(g.screen, g.items[item_name].description, g.font[0][18], 290, (xy[0]+160, xy[1]+120), g.colors["white"])