Difference between revisions of "Template:Section/doc"
Jump to navigation
Jump to search
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Used for objects to automate the content of sections like heat, light, and fuel. | Used for objects to automate the content of sections like heat, light, and fuel. | ||
+ | |||
+ | <nowiki>{{#if: {{{glowradius|}}} | | ||
+ | {{#if: {{#var:setProperty}} | {{#set:Glow Radius = {{{glowradius|}}} }} }} | ||
+ | }} | ||
+ | {{#if: {{{glowcolor|}}} | | ||
+ | {{#if: {{#var:setProperty}} | {{#set:Glow Color = {{{glowcolor|}}} }} }} | ||
+ | {{#vardefine:Red | {{#replace:{{#explode:{{{glowcolor|}}}|,|0}}|(}} }} | ||
+ | {{#vardefine:Green| {{#explode:{{{glowcolor|}}}|,|1}} }} | ||
+ | {{#vardefine:Blue | {{#replace:{{#explode:{{{glowcolor|}}}|,|2}}|)}} }} | ||
+ | {{#vardefine:LightRadius|{{Lit Radius|{{{glowradius|}}}|{{#expr:{{#var:Red}}+{{#var:Green}}+{{#var:Blue}} }} }} }} | ||
+ | {{#if: {{#var:setProperty}} | {{#set:Light Radius = {{#var:LightRadius}} }} }} | ||
+ | ;<abbr title="The furthest away a tile can be before it falls below 30% light">Light Radius</abbr> | ||
+ | :{{#expr:{{#var:LightRadius}} round 2}} <!-- | ||
+ | Color Square: --><abbr title="RGB: {{{glowcolor|}}}"><span><div style="width:16px;height:16px;background-color:rgb({{#var:Red}},{{#var:Green}},{{#var:Blue}});display:inline-block;border:1px solid black;vertical-align:middle;"></div></span></abbr> | ||
+ | }}</nowiki> | ||
== Usage == | == Usage == |
Latest revision as of 17:40, 23 August 2024
Overview[edit]
Used for objects to automate the content of sections like heat, light, and fuel.
{{#if: {{{glowradius|}}} | {{#if: {{#var:setProperty}} | {{#set:Glow Radius = {{{glowradius|}}} }} }} }} {{#if: {{{glowcolor|}}} | {{#if: {{#var:setProperty}} | {{#set:Glow Color = {{{glowcolor|}}} }} }} {{#vardefine:Red | {{#replace:{{#explode:{{{glowcolor|}}}|,|0}}|(}} }} {{#vardefine:Green| {{#explode:{{{glowcolor|}}}|,|1}} }} {{#vardefine:Blue | {{#replace:{{#explode:{{{glowcolor|}}}|,|2}}|)}} }} {{#vardefine:LightRadius|{{Lit Radius|{{{glowradius|}}}|{{#expr:{{#var:Red}}+{{#var:Green}}+{{#var:Blue}} }} }} }} {{#if: {{#var:setProperty}} | {{#set:Light Radius = {{#var:LightRadius}} }} }} ;<abbr title="The furthest away a tile can be before it falls below 30% light">Light Radius</abbr> :{{#expr:{{#var:LightRadius}} round 2}} <!-- Color Square: --><abbr title="RGB: {{{glowcolor|}}}"><span><div style="width:16px;height:16px;background-color:rgb({{#var:Red}},{{#var:Green}},{{#var:Blue}});display:inline-block;border:1px solid black;vertical-align:middle;"></div></span></abbr> }}
Usage[edit]
{{Section|Light}}
Torch lamp produces light in a 7.175 tile radius.
50% light: 5.9307552253293
30% light: 7.1749373541663
0% light: 9.06579794414
{{Section|Heat}}
heat section
{{Section|Fuelable}}
fuelable section
{{Section|Mineable}}
mineable section