Skip to content

Commit

Permalink
made ammo type switch a bit better, added nimrod to upgraded gunyards…
Browse files Browse the repository at this point in the history
…, nimrod can use AP now, some decription update
  • Loading branch information
jal76 committed Jul 7, 2018
1 parent a9d0819 commit fc6596c
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions LuaRules/Configs/side_morph_defs/ita.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ local itaDefs = {
metal = 2000,
energy = 0,
time = 65,
name = 'Light\nArmor',
text = 'Makes Light Armor available in this yard',
name = 'Light\nArtillery',
text = 'Makes light selfpropelled artillery available in this yard',
facing = true,
},
},
Expand Down
2 changes: 2 additions & 0 deletions gamedata/side_units/hun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ local hununits = {
"hunlefh18_truck",
"hun36mbofors_truck",
"hun44mbuzoganyveto_truck",
"hun40mnimrod",
"hunhetzer",
},

Expand All @@ -103,6 +104,7 @@ local hununits = {
"hunlefh18_truck",
"hun36mbofors_truck",
"hun44mbuzoganyveto_truck",
"hun40mnimrod",
"hun43mzrynyiii",
},

Expand Down
4 changes: 2 additions & 2 deletions scripts/Vehicle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ local function ResolveDirection(headingPiece, pitchPiece)
prioritisedWeapon = weaponNum
break
end
if weaponPriorities[weaponNum] < topPriority then
if weaponPriorities[weaponNum] ~= topPriority then
topDirection = dir
topPriority = weaponPriorities[weaponNum]
prioritisedWeapon = weaponNum
Expand Down Expand Up @@ -475,7 +475,7 @@ local function CanAim(weaponNum)
if not loaded then
return false
end
if IsAimed(i) and weaponPriorities[i] < weaponPriorities[weaponNum] then
if IsAimed(i) and weaponPriorities[i] ~= weaponPriorities[weaponNum] then
return false
end
end
Expand Down
2 changes: 1 addition & 1 deletion units/hun/tanks/HUNTuran.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ local HUN43MTuranIII = HUN41MTuranII:New{
armor_top = 15,
maxammo = 18,
maxvelocitykmh = 47,

weapontoggle = "priorityAPHE",
},
}

Expand Down
7 changes: 5 additions & 2 deletions units/hun/vehicles/HUN40MNimrod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ local HUN40MNimrod = ArmouredCarAA:New{
trackWidth = 16,

weapons = {
[1] = { -- AA
[3] = { -- AA
name = "bofors40mmaa",
},
[2] = { -- HE
name = "bofors40mmhe",
},
[1] = { -- AP
name = "bofors40mmap",
},
},
customParams = {
hasturnbutton = true,
Expand All @@ -24,7 +27,7 @@ local HUN40MNimrod = ArmouredCarAA:New{
armor_top = 0,
maxammo = 19,
maxvelocitykmh = 50,

weapontoggle = "priorityAPHE",
}
}

Expand Down
4 changes: 2 additions & 2 deletions weapons/Armour/LightGun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ local CannoneDa47mml32AP = LightAP:New(CannoneDa47mml32, true):New{
}

local CannoneDa47mml32HEAT = HEAT:New(CannoneDa47mml32, true):New{
weaponVelocity = 1200,
weaponVelocity = 1000,
accuracy = 500,
customparams = {
armor_penetration = 75,
Expand Down Expand Up @@ -198,7 +198,7 @@ local CannoneDa47mml40AP = LightAP:New(CannoneDa47mml40, true):New{
},
}
local CannoneDa47mml40HEAT = HEAT:New(CannoneDa47mml40, true):New{
weaponVelocity = 1818,
weaponVelocity = 1180,
accuracy = 500,
customparams = {
armor_penetration = 115,
Expand Down
2 changes: 1 addition & 1 deletion weapons/Armour/MediumGun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ local Ansaldo75mmL34AP = MediumAP:New(Ansaldo75mmL34, true):New{
},
}
local Ansaldo75mmL34HEAT = HEAT:New(Ansaldo75mmL34, true):New{
weaponVelocity = 1358,
weaponVelocity = 1100,
accuracy = 500,
customparams = {
armor_penetration = 120,
Expand Down
12 changes: 12 additions & 0 deletions weapons/Arty/AntiAircraftGuns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ local Bofors40mmAA = AntiAirGunAA:New(Bofors40mm, true):New{
local Bofors40mmHE = AutoCannonHE:New(Bofors40mm, true):New{
range = 725,
}
local Bofors40mmAP = AutoCannonAP:New(Bofors40mm, true):New{
range = 725,
customparams = {
armor_penetration_1000m = 35,
armor_penetration_100m = 68,
},
damage = {
default = 895,
},
}


-- Twin Bofors 40mm AA Gun (For ships)
-- derives from the above, only with half the reloadtime
Expand Down Expand Up @@ -134,6 +145,7 @@ return lowerkeys({
-- Medium (40mm)
Bofors40mmAA = Bofors40mmAA,
Bofors40mmHE = Bofors40mmHE,
Bofors40mmAP = Bofors40mmAP,
Twin_Bofors40mmAA = Twin_Bofors40mmAA,
Twin_Bofors40mmHE = Twin_Bofors40mmHE,
FlaK4337mmAA = FlaK4337mmAA,
Expand Down

0 comments on commit fc6596c

Please sign in to comment.