Page MenuHomeWildfire Games

Support inheritance in special filter templates
Needs ReviewPublic

Authored by TheCake91 on Jan 8 2019, 6:15 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#5380
Summary

This modification allows special filter templates to inherit from a parent. Instead of just loading the filter template directly onto the base filter, the filter template gets loaded and applied recursively with the new ApplyTemplateFilter method.

Test Plan

I tested the implementation roughly by having a filter template inheriting from another filter template and running the simulation successfully in Atlas. Before writing a unit test (unfortunately, there are no unit tests at all for the TemplateManager so far) and a more detailed test plan, I would like to ask if the current implementation is on the right way?

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

TheCake91 created this revision.Jan 8 2019, 6:15 PM
TheCake91 updated the Trac tickets for this revision.Jan 8 2019, 6:17 PM
lyv added a reviewer: Restricted Owners Package.Jan 8 2019, 6:44 PM
lyv added a subscriber: lyv.

Add yourself to binaries/data/mods/public/gui/credit/programming.json. I might have messed up that path.

TheCake91 updated this revision to Diff 7312.Jan 8 2019, 10:59 PM

Adding myself to the contributors list as suggested by simley.

vladislavbelov added inline comments.
source/ps/TemplateLoader.cpp
76

And L"special" / L"filter" instead of "special/filter/".

123

I suppose the templateFilter should have the VfsPath.

126

Why exactly 100? Probably it crashes even with this value on slower machines. The value should be a constant.

Also why there are infinity loops? Why not to handle them?

134

ok > result or even shorter:

if (xero.Load(g_VFS, path) != PSRETURN_OK)
	return false; // ...
Freagarach updated this revision to Diff 11608.Mar 30 2020, 1:41 PM
Freagarach added a subscriber: Freagarach.

Rebased, @vladislavbelov 's inlines.

Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Mar 30 2020, 1:41 PM
Freagarach added inline comments.Mar 30 2020, 1:42 PM
binaries/data/mods/public/simulation/templates/special/filter/corpse.xml
3 ↗(On Diff #11608)

Remnant of testing of D263.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/521/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1949/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/ps/TemplateLoader.h
|  44| class·CTemplateLoader
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCTemplateLoader{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1951/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/525/display/redirect