https://wiki.warthunder.com/index.php?title=Template_talk:Tree-Unit&feed=atom&action=historyTemplate talk:Tree-Unit - Revision history2024-03-29T00:19:39ZRevision history for this page on the wikiMediaWiki 1.30.0https://wiki.warthunder.com/index.php?title=Template_talk:Tree-Unit&diff=26695&oldid=prevU30585107: to inceptor2019-06-09T19:04:00Z<p>to inceptor</p>
<p><b>New page</b></p><div>==making my edit work==<br />
So the way it is suppose to work is that it would check <nowiki>{{#unit:name|gift}}</nowiki> and choose the premium background if it returns 1. As #unit currently works nonpremium event vehicles are also marked as premium. I built in the argument 'overwrite' to force it to choose the standard background when it is 0 and premium when it is 1. <br />
<br />
So a nonpremium event vehicle like the E100 would need <nowiki>{{Tree-Unit|E100|overwrite=0}}</nowiki> and if a vehicle hasnt been labelled as a premium yet like the A7M1 you would need <nowiki>{{Tree-Unit|A7M1|overwrite=1}}</nowiki><br />
<br />
If we don't want to mess with 'overwrite' we would have to:<br />
# make sure <nowiki>{{#unit:name|gift}}</nowiki> has all premiums labelled as such<br />
# make <nowiki>{{#unit:name|gift}}</nowiki> return "2" or some other value to designate nonpremium event vehicles(and adjust this template accordingly).--[[User:U30585107|U30585107]] ([[User talk:U30585107|talk]]) 19:03, 9 June 2019 (UTC)</div>U30585107