byond - Modules - TypesVar Details - Proc Details

/datum/autowiki

A representation of an automated wiki page.

Vars

generate_multipleIf the generation of this autowiki should call /generate_multiple(), which should return a list of list(title = "Page Title", contents) allowing for the generation of multiple pages in the same autowiki
pageThe page on the wiki to be replaced. This should never be a user-facing page, like "Guide to circuits". It should always be a template that only Autowiki should touch. For example: "Template:Autowiki/CircuitInfo".

Procs

escape_valueEscape a parameter such that it can be correctly put inside a wiki output
generateOverride and return the new text of the page. This proc can be impure, usually to call upload_file.
include_templateGenerates an auto formatted template user. Your autowiki should ideally be a lot of these. It lets wiki editors edit it much easier later, without having to enter repo. Parameters will be passed in by name. That means your template should expect something that looks like {{ Autowiki_Circuit|name=Combiner|description=This combines }} Lists, which must be array-like (no keys), will be turned into a flat list with their key and a number, such that list("food" = list("fruit", "candy")) -> food1=fruit|food2=candy Your page should respect AUTOWIKI_SKIP, and check for this using IS_AUTOWIKI_SKIP
upload_iconTakes an icon and uploads it to Autowiki-name.png. Do your best to make sure this is unique, so it doesn't clash with other autowiki icons.

Var Details

generate_multiple

If the generation of this autowiki should call /generate_multiple(), which should return a list of list(title = "Page Title", contents) allowing for the generation of multiple pages in the same autowiki

page

The page on the wiki to be replaced. This should never be a user-facing page, like "Guide to circuits". It should always be a template that only Autowiki should touch. For example: "Template:Autowiki/CircuitInfo".

Proc Details

escape_value

Escape a parameter such that it can be correctly put inside a wiki output

generate

Override and return the new text of the page. This proc can be impure, usually to call upload_file.

include_template

Generates an auto formatted template user. Your autowiki should ideally be a lot of these. It lets wiki editors edit it much easier later, without having to enter repo. Parameters will be passed in by name. That means your template should expect something that looks like {{ Autowiki_Circuit|name=Combiner|description=This combines }} Lists, which must be array-like (no keys), will be turned into a flat list with their key and a number, such that list("food" = list("fruit", "candy")) -> food1=fruit|food2=candy Your page should respect AUTOWIKI_SKIP, and check for this using IS_AUTOWIKI_SKIP

upload_icon

Takes an icon and uploads it to Autowiki-name.png. Do your best to make sure this is unique, so it doesn't clash with other autowiki icons.