Reference

by Forum_account
Create custom DM reference pages that appear in Dream Maker's help. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Forum_account.Reference##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Forum_account.Reference##version=3

156 downloads
Version 1.2
Date added: Jan 25 2011
Last updated: Feb 25 2012
3 fans
This library lets you create custom DM reference pages that will appear in Dream Maker's help when you press F1. To create a page you define a type of datum using DM code, like this:

REF/my_new_page
name = "my_new_page"
title = "my new reference page"


The library defines the world.generate_reference() proc. Call this and reference pages will be generated for each /REF datum you defined.

Version 1.2
• The args var can now be a list or a string.
• Added the possible_values var, which is a list.
• Added support for the library var. The var should be a string of the format "/author/library", which correspond's to the library's hub entry. A link will be put on every entry whose library value is set, indicating it's part of a library and linking to a help page whose name matches the library string.

Version 1.1
• The library no longer starts with a fresh copy of info.html each time you generate reference pages. It still creates a backup so world.restore_reference() still works, but it writes changes to the same file.
• Added the world.parse_reference proc which opens info.html and finds all page names.
• When writing new reference pages, old pages of the same name are cut out of info.html before the new page is written.

Version 1
• Initial release.

Comments

Forum_account: (Jan 28 2011, 2:15 am)
I'll look into this as soon as I can. Were there duplicates for all pages or just duplicates of the pages you defined?

Before modifying info.html it creates a backup of it. The library has a proc (world.restore_reference, I think) that replaces info.html with the backup of the original.
Kaiochao: (Jan 27 2011, 12:58 pm)
I used this once. For some reason, my reference now has 2 copies of everything.