Template talk:Tree-Unit

From War Thunder Wiki
Revision as of 19:04, 9 June 2019 by blastedryan (talk | contribs) (to inceptor)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

making my edit work

So the way it is suppose to work is that it would check {{#unit:name|gift}} 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.

So a nonpremium event vehicle like the E100 would need {{Tree-Unit|E100|overwrite=0}} and if a vehicle hasnt been labelled as a premium yet like the A7M1 you would need {{Tree-Unit|A7M1|overwrite=1}}

If we don't want to mess with 'overwrite' we would have to:

  1. make sure {{#unit:name|gift}} has all premiums labelled as such
  2. make {{#unit:name|gift}} return "2" or some other value to designate nonpremium event vehicles(and adjust this template accordingly).--blastedryan (talk) 19:03, 9 June 2019 (UTC)