thrust performance is now also an option
This commit is contained in:
		| @@ -1038,10 +1038,10 @@ player = mknew(ship_m.new{ | ||||
|  y=96, | ||||
|  xmomentum = 0, | ||||
|  ymomentum = 0, | ||||
|  maxspd = 2.5, -- momentum cap | ||||
|  thrust = 0.25, -- momentum added from button | ||||
|  maxspd = 1.5, -- momentum cap | ||||
|  thrust = 0.1875, -- momentum added from button | ||||
|  ymin = 0, ymax = 120, -- stay on screen | ||||
|  drag = 0.125, -- momentum lost per frame | ||||
|  drag = 0.0625, -- momentum lost per frame | ||||
|  slip = false, -- does not slide down screen | ||||
|  act = function(self)  -- fetch buttons | ||||
|   local b,th = btn(),self.thrust | ||||
| @@ -1074,7 +1074,7 @@ function player:small_upgrade_opts() | ||||
|  if (pr == 0 and self.shieldpenalty > 0x0.003c) pr = 0x0.0001 | ||||
|  | ||||
|  local ret = {{ | ||||
|   icon=1, | ||||
|   icon=53, | ||||
|   hdr="hull", | ||||
|   body=[[    armor | ||||
|  | ||||
| @@ -1084,7 +1084,7 @@ function player:small_upgrade_opts() | ||||
|    self.hp += 2 | ||||
|   end, | ||||
|  },{ | ||||
|   icon=1,  -- todo: icon | ||||
|   icon=52, | ||||
|   hdr="shield", | ||||
|   body=[[  capacity | ||||
|  | ||||
| @@ -1093,11 +1093,24 @@ function player:small_upgrade_opts() | ||||
|    self.maxshield += 1 | ||||
|    self.shield += 1 | ||||
|   end, | ||||
|  },{ | ||||
|   icon=1, | ||||
|   hdr="thrusters", | ||||
|   body=[[performance | ||||
|   | ||||
| move faster, | ||||
| steer faster]], | ||||
|  action=function() | ||||
|   --maxspd thrust drag | ||||
|   self.maxspd += 0.5 | ||||
|   self.thrust += 0.0625 | ||||
|   self.drag += 0.03125 | ||||
|  end, | ||||
|  }} | ||||
|  | ||||
|  if cdr > 0 then | ||||
|   add(ret, { | ||||
|    icon = 1, --todo: icon | ||||
|    icon = 6, | ||||
|    hdr = "shield", | ||||
|    body=[[charge rate | ||||
|   | ||||
| @@ -1110,11 +1123,11 @@ function player:small_upgrade_opts() | ||||
|  | ||||
|  if pr > 0 then | ||||
|   add(ret, { | ||||
|    icon = 1, --todo: icon | ||||
|    icon = 6, | ||||
|    hdr = "shield", | ||||
|    body=[[disruption | ||||
|   | ||||
|   ]] .. tostr(ceil(100 * pr / self.shieldpenalty)) .. "% shorter", | ||||
|  ]] .. tostr(ceil(100 * pr / self.shieldpenalty)) .. "% shorter", | ||||
|    action = function() | ||||
|     self.shieldpenalty -= pr | ||||
|    end | ||||
| @@ -1689,7 +1702,7 @@ end | ||||
| -- when near player ship | ||||
|  | ||||
| function xp_gem:hitship(ship) | ||||
|  if (ship ~= primary_ship) return false | ||||
|  if (ship ~= primary_ship or primary_ship.dead) return false | ||||
|  primary_ship.xp += self.val | ||||
|  primary_ship.last_xp_frame = lframe | ||||
|  return true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user