Gun Equipment


Mode add automatic guns applyable to equipment grid.

Content
4 days ago
1.0 - 2.0
40.5K
Combat Armor

b Not compatible with KS combat

a month ago

Will not reload the ammo automatically, until deleting the KS combat: https://mods.factorio.com/mod/KS_Combat_Updated

a month ago

Works it with the original mod?
What make this mod with personal laser turrets?

a month ago

I does not reload and when the mod is activated it may also cause removement of the equipment without any programatical error.

a month ago

I tested with two different settings:
1. Only Gun Equipment -> Personal laser turrets + Automatic guns works
2. Gun Equipment + KS combat -> Only Personal laser turret works

Maybe add incompatible for KS combat?

a month ago

Incompatible we cannot say, but they both editing the magazines, I do not know how to define dependency to be able to initialize first the GunEquipment, then the other.

a month ago
(updated a month ago)

This action decides shootability:

function AutoGun.ActionDamage(damage, actions)
  if actions then
    for _,action in pairs(actions) do
      if action.type == "direct" then
        for _,action_delivery in pairs(action.action_delivery) do
          if (action_delivery.type == "instant") and (action_delivery.target_effects) then
            for _,target_effect in pairs(action_delivery.target_effects) do
              if target_effect.type == "damage" then
                -- some ammo has multiple direct instant damage sources
                damage.value = damage.value + target_effect.damage.amount
              end
            end
          elseif action_delivery.type == "projectile" then
            -- Projecty ammo type damage calculation
            AutoGun.ActionDamage(damage, action_delivery.final_action)
          end
        end
      end
    end
  end
end

In case the attack is not direct, the ammo is not loaded.

New response