Difference between revisions of "Template:DbParser"

From StarMade Wiki
m
m
Line 1: Line 1:
 
{{#if:{{{2|}}}|<!--  
 
{{#if:{{{2|}}}|<!--  
-->{{#switch:{{{2}}}
+
-->{{#switch:{{{2}}}<!--
|name={{Db|{{{1}}}|link}}
+
---------    Rename some database type name -->
 +
|Id={{#ifeq:{{Db|{{{1}}}|Type}}}
 +
|Depreciated={{#ifeq:{{Db|{{{1}}}|Deprecated}}}
 +
|Ahp={{#ifeq:{{Db|{{{1}}}|AHP}}}
 +
|Shp={{#ifeq:{{Db|{{{1}}}|SHP}}}
 +
|name={{Db|{{{1}}}|link}}<!--
 +
---------    Preformat some answers (0, False, etc..) -->
 
|image=[[File:{{Db|{{{1}}}|link}}.png|{{#if:{{{3|}}}|{{{3}}}|150}}px|link={{Db|{{{1}}}|link}}]]
 
|image=[[File:{{Db|{{{1}}}|link}}.png|{{#if:{{{3|}}}|{{{3}}}|150}}px|link={{Db|{{{1}}}|link}}]]
|Armor={{#ifeq:{{Db|{{{1}}}|Armor}}|0.0|No|{{Db|{{{1}}}|{{{2}}}}}%}}
+
|Armor|hp={{#ifeq:{{Db|{{{1}}}|SHP}}|0|No|{{Db|{{{1}}}|SHP}}}}
|Ahp={{#ifeq:{{Db|{{{1}}}|AHP}}|0| ---- |{{Db|{{{1}}}|ArmorHPContribution}}}}
+
|Ahp={{#ifeq:{{Db|{{{1}}}|ReactorHp}}|0| ---- |{{Db|{{{1}}}|ReactorHp}}}}
|Shp={{#ifeq:{{Db|{{{1}}}|SHP}}|0|No|{{Db|{{{1}}}|SHP}}}}
+
|Light|Transparency|InShop|Placable|MainCtrl|EffectCtrl|SupportCtrl={{#ifeq:{{Db|{{{1}}}|{{{2}}}}}|true|Yes|No}}
|ReactorHp={{#ifeq:{{Db|{{{1}}}|ReactorHp}}|0| ---- |{{Db|{{{1}}}|ReactorHp}}}}
 
|Light={{#ifeq:{{Db|{{{1}}}|Light}}|true|Yes|No}}
 
|Transparency={{#ifeq:{{Db|{{{1}}}|Transparency}}|true|Yes|No}}
 
 
|Factory={{#Ifeq:{{Db|{{{1}}}|Factory}}|3|Basic Factory|{{#Ifeq:{{Db|{{{1}}}|Factory}}|4|Standard Factory|{{#Ifeq:{{Db|{{{1}}}|Factory}}|5|Advanced Factory|n/a}}}}}}
 
|Factory={{#Ifeq:{{Db|{{{1}}}|Factory}}|3|Basic Factory|{{#Ifeq:{{Db|{{{1}}}|Factory}}|4|Standard Factory|{{#Ifeq:{{Db|{{{1}}}|Factory}}|5|Advanced Factory|n/a}}}}}}
|InShop={{#ifeq:{{Db|{{{1}}}|InShop}}|true|Yes|No}}
+
|ExpAbsorb|ReactorHp={{#ifeq:{{Db|{{{1}}}|{{{2}}}}}|0||{{Db|{{{1}}}|{{{2}}}}}}}
 
|{{Db|{{{1}}}|{{{2}}}}}
 
|{{Db|{{{1}}}|{{{2}}}}}
 
}}<!-- switch
 
}}<!-- switch
 
-->|}}
 
-->|}}

Revision as of 17:12, 11 May 2018

{{#if:|{{#switch:{{{2}}} |Id={{#ifeq:Unknow "Type" : link, Id, Factory, Animated, Armor, Shp, Shp, Transparency, FactoryBakeTime, Heat, Kinetic, EM, InShop, ReactorHp, Mass, Hp, cat, cat2, cat3, cat4, Placable, BlockStyle,HasActivationTexture, IndivSides, Light, Depreciated, LightColor} |Depreciated={{#ifeq:} |Ahp=