fix starting ammo
This commit is contained in:
		| @@ -688,6 +688,8 @@ gun_base = mknew{ | ||||
| -- as an action, assign | ||||
| -- themselves to the player | ||||
| function gun_base:action() | ||||
|  local item = self.new() | ||||
|  item.ammo = item.maxammo | ||||
|  if not primary_ship.special_guns then | ||||
|   primary_ship.special_guns = {self.new()} | ||||
|  else | ||||
| @@ -1843,8 +1845,8 @@ function rearm_mode:update() | ||||
|    -- todo: rewrite for three guns | ||||
|    local specs = primary_ship.special_guns | ||||
|    if specs then | ||||
|     specs[1].ammo = specs[1].max_ammo | ||||
|     if (specs[2]) specs[2].ammo = specs[2].max_ammo | ||||
|     specs[1].ammo = specs[1].maxammo | ||||
|     if (specs[2]) specs[2].ammo = specs[2].maxammo | ||||
|    end | ||||
|    primary_ship.hp = min(primary_ship.maxhp, primary_ship.hp + primary_ship.maxhp/2) | ||||
|    primary_ship.xp -= primary_ship.xptarget / 2 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user