Changeset 803

Show
Ignore:
Timestamp:
06/14/2012 01:58:43 PM (22 months ago)
Author:
jhoffswell
Message:

added turn benefit information to building menu and repositioned aliens on new backgrounds

Files:
13 modified

Legend:

Unmodified
Added
Removed
  • resources/data/landscapes/landscape1.txt

    r792 r803  
    11(250,500);(350,600);(550,550);(750,650) 
    22(200,100);(275,100);(350,100);(650,150) 
    3 (200,450);(320,450);(380,470);(400,500);(550,430);(700,480);(950,470);(840,460) 
     3(200,450);(320,450);(400,470);(475,500);(550,430);(700,480);(950,470);(840,460) 
  • resources/data/landscapes/landscape2.txt

    r785 r803  
    11(350,600);(550,550);(650,650);(800,600) 
    22(200,100);(275,100);(350,100);(800,100) 
    3 (220,400);(220,450);(300,550);(400,500);(700,430);(550,400);(950,470);(840,420) 
     3(220,380);(250,550);(300,550);(400,475);(700,530);(550,300);(950,370);(850,500) 
  • resources/data/landscapes/landscape3.txt

    r785 r803  
    1 (150,250);(350,500);(650,500);(780,250) 
     1(150,250);(350,475);(650,500);(780,240) 
    22(150,50);(275,150);(300,100);(540,150) 
    3 (250,600);(300,600);(470,580);(550,600);(700,580);(550,600);(950,550);(840,640) 
     3(250,225);(300,215);(470,450);(550,450);(700,580);(600,500);(950,550);(840,600) 
  • resources/data/landscapes/landscape5.txt

    r744 r803  
    1 (200,500);(500,570);(750,600);(650,550) 
     1(200,500);(500,570);(650,550);(775,600) 
    22(150,50);(275,50);(300,50);(650,50) 
    3 (240,680);(290,650);(350,550);(400,500);(700,530);(550,500);(950,570);(840,540) 
     3(240,600);(290,400);(350,550);(400,500);(725,530);(575,450);(950,570);(840,540) 
  • resources/data/landscapes/landscape6.txt

    r744 r803  
    1 (200,400);(350,450);(500,450);(750,500) 
     1(200,375);(350,450);(500,450);(750,500) 
    22(150,50);(275,50);(300,50);(600,50) 
    3 (270,400);(290,550);(390,550);(400,500);(690,430);(550,400);(950,470);(840,440) 
     3(240,500);(295,550);(350,580);(425,500);(690,430);(575,400);(950,470);(840,440) 
  • resources/data/scenes/lose_pollution.txt

    r762 r803  
    22main_menu 
    33The pollution levels have risen too high... 
    4 Lose-01 
     4pollution-01 
    55The planet is in distress... 
    6 Lose-02 
     6pollution-02 
    77You lost. Try again! 
    8 Lose-03 
     8pollution-03 
  • resources/data/scenes/lose_resource.txt

    r771 r803  
    22main_menu 
    33Your resource levels got too low... 
    4 generic 
     4Lose-01 
    55The planet cannot sustain itself... 
    6 generic 
     6Lose-02 
    77You lost. Try again. 
    8 generic 
     8Lose-03 
  • src/buildDescription.py

    r668 r803  
    2525            yesButtonIndex = self.getElementByAttr(SimpleButton, "affirmative") 
    2626            self.subwindows.pop(yesButtonIndex) 
    27         cost = STR.COST % info.buildCostText 
     27        cost = (STR.COST % info.buildCostText) + "\n" + \ 
     28               (STR.TURN_COST % info.constantCostText) 
    2829        self.addText(Text(DIM.COST_POS, cost, MD_TEXT, WHITE, DIM.COST_W)) 
  • src/buildingStats.py

    r610 r803  
    5959        return self.contSpecs 
    6060 
    61     def getCostText(self): 
     61    def getCostText(self, includeNeg=False): 
    6262        """ 
    6363            returns the cost text from the building stat. 
    6464 
    65             input type: none 
     65            input type: bool(includeNeg, includeNeg) 
    6666            return type: str 
    6767        """ 
    68         return self.oneTimeSpecs.getCostText() 
     68        return self.oneTimeSpecs.getCostText(includeNeg) 
     69         
     70    def getConstantCostText(self, includeNeg=True): 
     71        """ 
     72            returns the constant building cost text from the building stat. 
     73             
     74            input type: bool(includeNeg) 
     75            return type: str 
     76        """ 
     77        return self.contSpecs.getCostText(includeNeg) 
     78         
  • src/heuristic.py

    r785 r803  
    132132        if state.getCurrentSpecs() < self.lowerTrig or \ 
    133133            state.getCurrentSpecs() > self.upperTrig: 
     134            print "Lower: ", (state.getCurrentSpecs() < self.lowerTrig) 
     135            print "Upper: ", (state.getCurrentSpecs() > self.upperTrig) 
    134136            trig = True 
    135137        # check building triggers 
  • src/info.py

    r763 r803  
    6363        self.hoverText = building.menuDescrip 
    6464        self.buildCostText = building.stats.getCostText() 
     65        self.constantCostText = building.stats.getConstantCostText() 
    6566        self.icon = (iconDir + building.imageFileName) 
    6667 
  • src/spec.py

    r759 r803  
    188188            return 0 
    189189 
    190     def getCostText(self): 
     190    def getCostText(self, includeNeg=False): 
    191191        """ 
    192192            gets the text for the change in spec at end of turn 
     
    197197        for cat in specList: 
    198198            value = self.stringToValue(cat) 
     199            if not includeNeg: 
     200                value = abs(value) 
    199201            if value != 0: 
    200                 output += "%s: %d, " % (cat.capitalize(), abs(value)) 
     202                output += "%s: %d, " % (cat.capitalize(), value) 
    201203        return output.rstrip(", ") 
    202204 
  • src/strings.py

    r763 r803  
    2626RESEARCH = "Research" 
    2727BUILD = "Build" 
    28 COST = "Costs\n%s" 
     28COST = "Cost of purchase:   %s" 
     29TURN_COST = "Effects per turn:    %s" 
    2930NO_UNLOCK = "Nothing more to unlock." 
    3031NO_MONEY = "You don't have enough money to unlock this."