Template:Osslfunc
From OpenSimulator
(Difference between revisions)
m (ouch LPS is just a flag to use script has been done) |
|||
(17 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
--></noinclude><includeonly>{{quicklinks}}[[Category:OSSL Functions]] | --></noinclude><includeonly>{{quicklinks}}[[Category:OSSL Functions]] | ||
{| width="100%" style="border: thin solid black" | {| width="100%" style="border: thin solid black" | ||
− | |colspan="2"|{{#if:{{{function_syntax|}}}|<div style="font-size:18px | + | |colspan="2"|{{#if:{{{function_syntax|}}}|<div style="font-size:18px;margin-bottom:5px;">{{{function_syntax|)}}}{{#if:{{{csharp_syntax|}}}|<br /><span style="font-size:12px;">C#: {{{csharp_syntax|)}}}</span>|}} |
+ | </div>|''No function syntax provided'' [[Category:OSSL_functions_without_function_syntax]]}} | ||
|- valign="top" | |- valign="top" | ||
|colspan="2"|{{#if:{{{description|}}}|{{{description}}}|''No descriptions provided'' [[Category:OSSL_functions_without_descriptions]]}} | |colspan="2"|{{#if:{{{description|}}}|{{{description}}}|''No descriptions provided'' [[Category:OSSL_functions_without_descriptions]]}} | ||
|- valign="top" | |- valign="top" | ||
− | |width="100"|'''Threat Level'''||{{#if:{{{threat_level|}}}|{{{threat_level}}}|''No threat level specified'' [[Category:OSSL_functions_without_threat_level]]}} | + | |width="100"|'''Threat Level'''||{{#if:{{{threat_level|}}}|{{#switch:{{{threat_level|}}} |
+ | | ignored = This function does not do a threat level check | ||
+ | | None | ||
+ | | Nuisance | ||
+ | | VeryLow | ||
+ | | Low | ||
+ | | Moderate | ||
+ | | High | ||
+ | | VeryHigh | ||
+ | | Severe = {{{threat_level}}} | ||
+ | | #default = {{{threat_level}}} is unknown threat level }}|''No threat level specified'' [[Category:OSSL_functions_without_threat_level]] }} | ||
+ | {{!}}- valign="top" | ||
+ | |'''Permissions'''||{{#if:{{{permissions|}}}|{{#switch:{{{permissions|}}} | ||
+ | | true = Use of this function is always allowed by default | ||
+ | | false = Use of this function is always disabled by default | ||
+ | | #default = {{{permissions}}} }}|''No permissions specified'' [[Category:OSSL_functions_without_permissions]]}} | ||
+ | {{!}}- valign="top" | ||
+ | |'''Extra Delay'''||{{#if:{{{delay|}}}|{{{delay}}} seconds|''No function delay specified''}} | ||
{{#if:{{{ossl_example|}}}| | {{#if:{{{ossl_example|}}}| | ||
{{!}}- valign="top" | {{!}}- valign="top" | ||
Line 37: | Line 55: | ||
{{osslfunc | {{osslfunc | ||
|function_syntax= | |function_syntax= | ||
+ | |csharp_syntax= | ||
|description= | |description= | ||
|threat_level= | |threat_level= | ||
+ | |permissions= | ||
+ | |delay= | ||
|ossl_example= | |ossl_example= | ||
|additional_info= | |additional_info= | ||
Line 48: | Line 69: | ||
|Property||Description||Required | |Property||Description||Required | ||
|- | |- | ||
− | |function_syntax||syntax||Yes | + | |function_syntax||syntax in LSL||Yes |
+ | |- | ||
+ | |csharp_syntax||syntax in C#||No | ||
|- | |- | ||
|description||definitions or descriptions||Yes | |description||definitions or descriptions||Yes | ||
|- | |- | ||
− | |threat_level||[[Threat level]]|| | + | |threat_level||[[Threat level]] (Use ignored for functions that do not check threat level)||No |
+ | |- | ||
+ | |permissions||who may use this OSSL function (Use true for a function that is available to everyone) ||No | ||
+ | |- | ||
+ | |delay||any penalty (delay in seconds) for using this function||No | ||
|- | |- | ||
|ossl_example||sample codes||No | |ossl_example||sample codes||No | ||
Line 69: | Line 96: | ||
For deprecated functions, use [[:Template:Osslfunc/Deprecated]] instead of this template. | For deprecated functions, use [[:Template:Osslfunc/Deprecated]] instead of this template. | ||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 08:37, 28 April 2021
This template is to be used as follows (copy and paste the following into a new page):
{{osslfunc |function_syntax= |csharp_syntax= |description= |threat_level= |permissions= |delay= |ossl_example= |additional_info= }}
Property | Description | Required |
function_syntax | syntax in LSL | Yes |
csharp_syntax | syntax in C# | No |
description | definitions or descriptions | Yes |
threat_level | Threat level (Use ignored for functions that do not check threat level) | No |
permissions | who may use this OSSL function (Use true for a function that is available to everyone) | No |
delay | any penalty (delay in seconds) for using this function | No |
ossl_example | sample codes | No |
additional_info | notes, hints or so | No |
You can find some infomation about OSSL functions within IOSSL_Api.cs or OSSL_Api.cs. If you unsure what to fill in, feel free to leave it empty and wait for experts shown up:)
If you have added some additional common facilities like threat level, feel free to add it to this template.
Features of this template:
- Includes the {{quicklinks}} template
- Automatically adds the article to all the relevant categories
- Displays a placeholder text when required information is missing, and adds the article to the relevant "missing" category/categories.
For deprecated functions, use Template:Osslfunc/Deprecated instead of this template.