Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix movement effect warning spam due to Spearhead (XEL0306) #6552

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog/snippets/fix.6436.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- (#6436, #6480) Prevent the logging of an unecessary warning when certain units make landfall.
- (#6436, #6480, #6552) Prevent the logging of an unecessary warning when certain units make landfall.
4 changes: 2 additions & 2 deletions lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3729,8 +3729,8 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent, DebugUni
local effectTypeGroups = bpTable.Effects

if not effectTypeGroups or (effectTypeGroups and (table.empty(effectTypeGroups))) then
-- warning isn't needed if this layer's table is used for Footfall or Contrails without terrain effects
if not bpTable.Footfall and not bpTable.Contrails then
-- warning isn't needed if this layer's table is used for Footfall or Contrails or Treads without terrain movement effects
if not bpTable.Footfall and not bpTable.Contrails and not bpTable.Treads then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point perhaps it is more readable as not (X or Y or Z)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur with Jip

WARN('*No movement effect groups defined for unit ', repr(self.UnitId), ', Effect groups with bone lists must be defined to play movement effects. Add these to the Display.MovementEffects.', layer, '.Effects table in unit blueprint.')
end
return false
Expand Down
15 changes: 2 additions & 13 deletions units/URL0208/URL0208_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,5 @@
local CConstructionUnit = import("/lua/cybranunits.lua").CConstructionUnit

---@class URL0208 : CConstructionUnit
URL0208 = ClassUnit(CConstructionUnit) {
Treads = {
ScrollTreads = true,
BoneName = 'URL0208',
TreadMarks = 'tank_treads_albedo',
TreadMarksSizeX = 0.65,
TreadMarksSizeZ = 0.4,
TreadMarksInterval = 0.3,
TreadOffset = { 0, 0, 0 },
},
}

TypeClass = URL0208
URL0208 = ClassUnit(CConstructionUnit) {}
TypeClass = URL0208
4 changes: 2 additions & 2 deletions units/XEL0306/XEL0306_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ UnitBlueprint{
{
BoneName = "XEL0306",
TreadMarks = "tank_treads_albedo",
TreadMarksInterval = 0.6,
TreadMarksInterval = 0.4,
TreadMarksSizeX = 1.3,
TreadMarksSizeZ = 1,
TreadMarksSizeZ = 1.12,
TreadOffset = { 0, 0, 0 },
},
},
Expand Down
Loading