Skip to content

Commit

Permalink
Version 4.85
Browse files Browse the repository at this point in the history
  • Loading branch information
QuestionableM committed Dec 20, 2022
1 parent f141738 commit 97bb0c0
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 23 deletions.

Large diffs are not rendered by default.

45 changes: 31 additions & 14 deletions Scripts/Cannons_Pack_libs/Databases/ProjectileSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ ProjSettingEnum =
explosionImpulseStrength = 13,
syncEffect = 14,
proxFuze = 15,
keep_effect = 16,
collision_size = 17,
disconnectRadius = 18,
player = 19,
mode = 20,
speed = 21,
count = 22,
obstacleAvoidance = 23
collision_size = 16,
disconnectRadius = 17,
player = 18,
mode = 19,
speed = 20,
count = 21,
obstacleAvoidance = 22
}

CP_ProjShellEffectEnum =
Expand Down Expand Up @@ -104,6 +103,27 @@ CP_ProjShellEffectEnumStrings =
[CP_ProjShellEffectEnum.LaserCannonShell ] = "LaserCannon - Shell"
}

--Projectiles that have smoke effects should be kept alive, otherwise the smoke particles will just disappear on impact
CP_ProjShouldKeepEffect =
{
[CP_ProjShellEffectEnum.AircraftCannonShell ] = false,
[CP_ProjShellEffectEnum.FlakCannonShell ] = false,
[CP_ProjShellEffectEnum.HowitzerCannonShell ] = false,
[CP_ProjShellEffectEnum.M1AbramsCannonShell ] = false,
[CP_ProjShellEffectEnum.NavalCannonShell ] = false,
[CP_ProjShellEffectEnum.NavalCannon2Shell ] = false,
[CP_ProjShellEffectEnum.RocketLauncherShell ] = true,
[CP_ProjShellEffectEnum.DoraCannonShell ] = false,
[CP_ProjShellEffectEnum.TankCannonShell ] = false,
[CP_ProjShellEffectEnum.RailgunCannonShell ] = false,
[CP_ProjShellEffectEnum.SmartCannonShell ] = false,
[CP_ProjShellEffectEnum.SmallSmartCannonShell] = false,
[CP_ProjShellEffectEnum.RocketPodShell ] = true,
[CP_ProjShellEffectEnum.SmallRocketPodShell ] = true,
[CP_ProjShellEffectEnum.EmpCannonShell ] = true,
[CP_ProjShellEffectEnum.LaserCannonShell ] = false
}

local function TranslateSettings(set_table)
local output_table = {}

Expand Down Expand Up @@ -219,8 +239,7 @@ local ProjSettings = {
explosionRadius = 0.7,
explosionImpulseRadius = 30,
explosionImpulseStrength = 8000,
syncEffect = true,
keep_effect = true
syncEffect = true
}),
[ProjEnum.SchwererGustavCannon] = TranslateSettings({
localPosition = true,
Expand Down Expand Up @@ -394,8 +413,7 @@ local ProjSettings = {
explosionRadius = 0.4,
explosionImpulseRadius = 25,
explosionImpulseStrength = 6000,
syncEffect = true,
keep_effect = true
syncEffect = true
}),
[ProjEnum.SmallRocketPod] = TranslateSettings({
localPosition = true,
Expand All @@ -410,8 +428,7 @@ local ProjSettings = {
explosionRadius = 0.3,
explosionImpulseRadius = 25,
explosionImpulseStrength = 6000,
syncEffect = true,
keep_effect = true
syncEffect = true
})
}

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Cannons_Pack_libs/Global_Scripts/CPProjectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function CPProjectile.client_loadProjectile(self, data)
proxFuze = proxFuze,
ignored_players = ignored_players,
syncEffect = proj_settings[ProjSettingEnum.syncEffect],
keep_effect = proj_settings[ProjSettingEnum.keep_effect]
keep_effect = CP_ProjShouldKeepEffect[v_effectId]
}
end

Expand Down
2 changes: 1 addition & 1 deletion Scripts/Cannons_Pack_libs/ScriptLoader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if CP_SCRIPTLOADER_SCRIPTS_LOADED then return end
CP_SCRIPTLOADER_SCRIPTS_LOADED = true

print("[CannonsPack] Version: 4.84")
print("[CannonsPack] Version: 4.85")
print("[CannonsPack] Loading libraries...")

dofile("FunctionReferences.lua")
Expand Down
9 changes: 5 additions & 4 deletions Scripts/SmartCannon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Questionable Mark
]]

--if SmartCannon then return end
if SmartCannon then return end
dofile("Cannons_Pack_libs/ScriptLoader.lua")
SmartCannon = class(GLOBAL_SCRIPT)
SmartCannon.maxParentCount = -1
Expand Down Expand Up @@ -32,7 +32,8 @@ local _ShellEffectTrans = {
[4] = CP_ProjShellEffectEnum.RocketPodShell,
[5] = CP_ProjShellEffectEnum.SmallRocketPodShell,
[6] = CP_ProjShellEffectEnum.EmpCannonShell,
[7] = CP_ProjShellEffectEnum.LaserCannonShell
[7] = CP_ProjShellEffectEnum.LaserCannonShell,
[8] = CP_ProjShellEffectEnum.DoraCannonShell
}

local _ExplosionTrans = {
Expand Down Expand Up @@ -763,11 +764,11 @@ function SmartCannon:client_GUI_CreateTempValTable()
[1] = { name = "Small Shell" }, [2] = { name = "Medium Shell" },
[3] = { name = "Large Shell" }, [4] = { name = "Giant Shell" }
}},
[6] = {name = "Shell Model", value = 0, default = self:getDefaultProjectileId(), max = 6, type = sc_gui_list_val, id = OtherTrTable.shell_effect_id, list = {
[6] = {name = "Shell Model", value = 0, default = self:getDefaultProjectileId(), max = 7, type = sc_gui_list_val, id = OtherTrTable.shell_effect_id, list = {
[1] = { name = "Small Smart Cannon" }, [2] = { name = "Smart Cannon" },
[3] = { name = "Rocket" }, [4] = { name = "Rocket Pod Rocket" },
[5] = { name = "Small Rocket Pod Rocket" }, [6] = { name = "EMP" },
[7] = { name = "Laser" }
[7] = { name = "Laser" }, [8] = { name = "Schwerer Gustav" }
}}
}

Expand Down
6 changes: 4 additions & 2 deletions Scripts/_info.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
What are u doing here? you little thief

Cannons Pack version 4.84 changelog:
1. Smart Cannon can now destroy 1 block when explosion radius is less than 0.3
Cannons Pack version 4.85 changelog:
1. Customizable projectile for Smart Cannons
2. Resetting smart cannons to defaults now sets the correct ejector shell model
3. The shockwave of the giant explosion lasts a bit longer

Made by:
Questionable Mark - creator of all the textures, UV maps and also some scripts and cannon models.
Expand Down

0 comments on commit 97bb0c0

Please sign in to comment.