Template:Object infobox 2: Difference between revisions

Adding some constants, WIP
(To prevent completely breaking everything, creating a temporary sandbox template that I will be redoing. This template is going to be based almost entirely off of what the code dictates.)
 
(Adding some constants, WIP)
Line 3: Line 3:
{{#if: {{{image|}}} |
{{#if: {{{image|}}} |
{{!}}-  
{{!}}-  
{{!}} colspan=2 style="text-align:center;" {{!}} [[File:{{{image}}}]]
{{!}} colspan=2 style="text-align:center;" {{!}} [[File:{{{image}}}|300px|]]
}}
}}
|-
|-
{{#if:{{{hitbox_type|}}}{{{interaction_type|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Hitbox Info</span>'''
{{#if:{{{group|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Technical Constants</span>'''
|}}
|}}
|-
|-
{{!}} '''[[Hitbox]]'''
{{#if: {{{group|}}} |
{{!}}
{{!}} '''Object Group''' {{!!}} [[{{{group}}}]]
{{#switch: {{{hitbox_type}}}  
{{!}}-}}
| N/A = No collision with Mario
|-
| surface = Collision involves triangles instead of a cylindrical hitbox
{{#if:{{{gravity|}}}{{{friction|}}}{{{buoyancy|}}}|{{!}}align="center" colspan="2" bgcolor="#10274c" style="font-size:125%;" {{!}} '''<span style="color:white;">Physical Constants</span>'''
| cylinder = cylinder with radius of {{{hitbox_radius}}} and height of {{{hitbox_height}}}{{#if: {{{hitbox_down|}}}|, offset down {{{hitbox_down}}} units|, not offset down
| cylinder with radius of {{{hitbox_radius}}} and height of {{{hitbox_height}}}{{#if: {{{hitbox_down|}}}|, offset down {{{hitbox_down}}} units|, not offset down}}
}}
|}}
|}}
|-
|-
{{#if: {{{damage|}}} |
{{#if: {{{gravity|}}} |
{{!}} '''[[HP|Damage]]''' {{!!}} {{{damage}}}
{{!}} '''Gravity''' {{!!}} [[{{{gravity}}}]]
{{!}}-}}
{{!}}-}}
|-
|-
{{#if:{{{damage_hatless|}}}|
{{#if: {{{friction|}}} |
{{!}} '''[[Hat|Damage without hat]]''' {{!!}} {{{damage_hatless}}}
{{!}} '''Friction''' {{!!}} [[{{{friction}}}]]
{{!}}-}}
|-
{{#if:{{{speed|}}}|
{{!}} '''Speed'''{{!!}} {{{speed}}}
{{!}}-}}
|-
{{#if:{{{tangibility_radius|}}}|
{{!}} '''[[Tangibility Radius|Tangibility radius]]''' {{!!}} {{{tangibility_radius}}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if:{{{interaction_type|}}}|
{{#if: {{{buoyancy|}}} |
{{!}} '''[[Interaction Type|Interaction type]]'''  
{{!}} '''Buoyancy''' {{!!}} [[{{{buoyancy}}}]]
{{!!}} [[Interaction Type#{{{interaction_type}}}|{{{interaction_type}}}]]
{{!}}-}}
|-
{{#if:{{{surfaces|}}}|
{{!}} '''[[Surface]]s''' {{!!}} {{{surfaces}}}
{{!}}-}}
{{!}}-}}
|-
|-
{{#if:{{{related|}}}|
{{!}} colspan="2" style="padding:0" {{!}}
{{{!}} class="{{#ifeq:{{{expand}}}|expandable|mw-collapsible mw-collapsed|noexpandable}}" width="100%" style="background:ghostwhite; text-align:left;" border="0" cellpadding="0" cellspacing="0"
! style="background:{{{secbg|#c5ced6}}}; padding:2px;" {{!}} Related
{{!}}-
{{!}} style="padding:0 2px;" {{!}} {{{related|}}}
{{!}}}
|}}
|- style="vertical-align: top"
{{#if:{{{found_in|}}}|
{{!}} colspan="2" style="padding:0" {{!}}
{{{!}} class="{{#ifeq:{{{expand}}}|expandable|mw-collapsible mw-collapsed|noexpandable}}" width="100%" style="background: ghostwhite; text-align:left;" border="0" cellpadding="0" cellspacing="0"
! style="background:{{{secbg|#c5ced6}}}; padding:2px;" {{!}} Found In
{{!}}-
{{!}} style="padding:0 2px;" {{!}} {{{found_in}}}
{{!}}}
|}}
|}{{#ifeq:{{NAMESPACENUMBER}}|0|
|}{{#ifeq:{{NAMESPACENUMBER}}|0|
[[Category:Objects]]}}</includeonly>
[[Category:Objects]]}}</includeonly>
<noinclude>{{object_infobox
<noinclude><div style="float:right"><pre>{{object_infobox
|title= Yellow Coin
|image= Yellow_Coin.gif
|hitbox_type= cylinder
|hitbox_radius= 100
|hitbox_height= 64
|hitbox_down= 0
|speed= Dependent on [[RNG]]. Varies based on how it was spawned.
|tangibility_radius= 1000
|interaction_type= Coin
|surfaces=
|related= [[Red Coin|Red Coins]] <br> [[Blue Coin|Blue Coins]]
|found_in= [[All courses]], [[The Castle]]
|expand=
}}
<div style="float:right"><pre>{{object_infobox
|title=
|title=
|image=
|image=