/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-10-21 18:10:48 UTC
  • Revision ID: josh@9ix.org-20131021181048-03jg7enu0pu4mmco
recharge shields automatically for free, remove bandit bounty

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
   money = 2000, -- what to use for money symbol? ✪ or ☥ or Ⓐ?
30
30
   goods = {},
31
31
   cargoSpace = 20,
 
32
   onPlanet = false,
 
33
   kills = 0,
32
34
   onNew = function(self)
33
35
              self.thrust = Tile:new{image = 'data/thrust.png'}
34
36
              self.shield = Shield:new{ship = self}
108
110
                  end
109
111
 
110
112
                  if not self.active then
111
 
                     the.over.visible = true
112
 
                     the.instructions.visible = true
 
113
                     the.interface:add(GameOver:new())
113
114
                  end
114
115
               end,
115
116
   buy = function(self, good, price)
131
132
                       end
132
133
 
133
134
                       return self.cargoSpace - cargo
134
 
                    end
 
135
                    end,
 
136
   save = function(self)
 
137
             -- save player data
 
138
             the.storage.data.player = {x = self.x,
 
139
                                        y = self.y,
 
140
                                        money = self.money,
 
141
                                        goods = self.goods,
 
142
                                        cargoSpace = self.cargoSpace
 
143
                                     }
 
144
             the.storage:save()
 
145
          end
135
146
}
 
 
b'\\ No newline at end of file'