/traderous

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

« back to all changes in this revision

Viewing changes to planet.lua

  • Committer: Josh C
  • Date: 2013-06-30 22:36:26 UTC
  • Revision ID: josh@9ix.org-20130630223626-pgya1z6raymhzj2v
5-7 planets, tweak some goods

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                       the.player.velocity = {x=0, y=0}
52
52
                       the.player.acceleration = {x=0, y=0}
53
53
 
54
 
                       the.player:save()
55
 
 
56
 
                       -- disengage all the enemies
57
 
                       for _, enemy in pairs(the.enemies.sprites) do
58
 
                          if enemy.state == 'combat' then
59
 
                             enemy.state = 'patrolling'
60
 
                          end
61
 
                       end
 
54
                       -- save player data
 
55
                       the.storage.data.player = {x = the.player.x,
 
56
                                                  y = the.player.y,
 
57
                                                  money = the.player.money,
 
58
                                                  goods = the.player.goods,
 
59
                                                  cargoSpace = the.player.cargoSpace
 
60
                                               }
 
61
                       the.storage:save()
62
62
 
63
63
                       tradeView = TradeView:new{ planet = self }
64
64
                       tradeView:activate()