Skip to content

Commit

Permalink
Merge branch 'maximize_resources'
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Nov 13, 2013
2 parents 81d9150 + 5b21d33 commit 42599c4
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ftlsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,15 @@ void user_input(SAVEGAME *save)
printw("===================\n\n");
printw(" Spaceship: %s\n", (*save).ss_name);
printw(" Crew size: %d\n\n", (*save).current_crew_len);
printw(" [M]aximize resources\n\n");
printw(" - [C]rew\n");
printw(" - [I]ntegrity: %d\n", (*save).ss_integrity);
printw(" - i[N]tegrity: %d\n", (*save).ss_integrity);
printw(" - [F]uel: %d\n", (*save).ss_fuel);
printw(" - [M]issiles: %d\n", (*save).ss_missiles);
printw(" - m[I]ssiles: %d\n", (*save).ss_missiles);
printw(" - [D]roids: %d\n", (*save).ss_droids);
printw(" - [S]crap: %d\n\n", (*save).scrap);
attron(A_BOLD);
printw("What do you want to change? [I,F,M,D,S] [return=exit] ");
printw("What do you want to change? [M,C,N,F,I,D,S] [return=exit] ");
attroff(A_BOLD);
refresh();
ch = getch();
Expand All @@ -340,6 +341,13 @@ void user_input(SAVEGAME *save)
int temp = 0;
switch(ch)
{
case 109: // m
(*save).scrap = 9999;
(*save).ss_droids = 999;
(*save).ss_fuel = 999;
(*save).ss_integrity = 30;
(*save).ss_missiles = 999;
break;
case 99: // c
for (int i=0;i<(*save).current_crew_len;i++)
{
Expand All @@ -352,7 +360,7 @@ void user_input(SAVEGAME *save)
crewid-=49;
user_input_crew(save, crewid);
break;
case 105: // i
case 110: // n
printw("\nSet current integrity value: ");
scanw("%d", &temp);
// should validate all input, but the example below is a lot of
Expand All @@ -376,7 +384,7 @@ void user_input(SAVEGAME *save)
printw("\nSet current droid value: ");
scanw("%d", &(*save).ss_droids);
break;
case 109: // m
case 105: // i
printw("\nSet current missile value: ");
scanw("%d", &(*save).ss_missiles);
break;
Expand Down

0 comments on commit 42599c4

Please sign in to comment.