Template:AreaSection: Difference between revisions

From IdleOn MMO Wiki
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
   |Area=String
   |Area=String
   |World=Integer
   |World=Integer
  |WorldImage=File
   |ID=String
   |ID=String
   |x=Integer
   |x=Integer
Line 18: Line 17:
   |Area={{{Area}}}
   |Area={{{Area}}}
   |World={{{World}}}
   |World={{{World}}}
  |WorldImage={{{WorldImage}}}
   |ID={{{ID}}}
   |ID={{{ID}}}
   |x={{{x}}}
   |x={{{x}}}
Line 29: Line 27:
### Rendering ###
### Rendering ###
--><div style="margin: 2em 0 -1em;" id="{{{Area}}}"><!--
--><div style="margin: 2em 0 -1em;" id="{{{Area}}}"><!--
   -->{{#ifexpr: {{#if:{{{WorldImage|}}}|1|0}} and {{#if:{{{ID|}}}|1|0}} and {{#if:{{{x|}}}|1|0}} and {{#if:{{{y|}}}|1|0}}<!--  
   -->{{#ifexpr: {{#if:{{{World}}}|1|0}} and {{#if:{{{ID|}}}|1|0}} and {{#if:{{{x|}}}|1|0}} and {{#if:{{{y|}}}|1|0}}<!--  
     checking if all the required parameters for render the map are present
     checking if all the required parameters for render the map are present
     -->|<!-- if the area is on the map, draw "^"
     -->|<!-- if the area is on the map, draw "^"
       --><span style="font-size: 1.5rem; font-family: 'Idleon';"><!--  
       --><span style="font-size: 1.5rem; font-family: 'Idleon';"><!--  
         -->[[#{{#invoke:String|replace|{{{WorldImage}}}|.png|}}|^ ]]<!--
         -->[[#{{#invoke:String|replace|{{#switch: {{{World}}}
            |1=Blunder Hills World Map.png
            |2=Yum Yum Desert World Map.png
            |3=Frostbite Tundra World Map.png
            |4=Hyperion Nebula World Map.png
            |5=Smolderin' Plateau World Map.png
            |6=Spirited Valley World Map.png
            |#default=Unknown World Map.png
          }}|.png|}}|^ ]]<!--
       --></span><!--
       --></span><!--
     -->|<!-- if the area is not on the map, draw nothing
     -->|<!-- if the area is not on the map, draw nothing
Line 58: Line 64:
|Link=<Link to the page of the area>
|Link=<Link to the page of the area>
|World=<World(Integer)>
|World=<World(Integer)>
|WorldImage=<WorldImage.png> (If you want to draw a marker on the map)
|x=<x coordinate of the marker> (If you want to draw a marker on the map)
|x=<x coordinate of the marker> (If you want to draw a marker on the map)
|y=<y coordinate of the marker> (If you want to draw a marker on the map)
|y=<y coordinate of the marker> (If you want to draw a marker on the map)

Latest revision as of 22:36, 15 October 2024

This template defines the table "AreaData". View table. Usage:

{{AreaSection
|ID=<the ID displayed on map>
|Area=<Area(map)>
|Link=<Link to the page of the area>
|World=<World(Integer)>
|x=<x coordinate of the marker> (If you want to draw a marker on the map)
|y=<y coordinate of the marker> (If you want to draw a marker on the map)
|Size=<Diameter of the marker circle> (Default value 25)
|color_text=<Color of the text and border of the marker on map> (Default value depends on map)
|color_fill=<Color of the fill of the marker on map> (Default value depends on map)
}}