Module helpers

Module helpers 

Source
Expand description

Miscellaneous convenience functions.

Enums§

ActionOrEvent 🔒
AllowInject
Basically a named bool.
Choices 🔒
The Choices enum exists to hook into the Display logic of printing to a string
PrefixShould
TriBool

Constants§

BANNED_NAMES
Warn if a scripted item has one of these names, and ignore it when validating. This avoids tons of errors from for example a scripted effect named if. Such an effect can happen accidentally with a misplaced brace or two.

Traits§

TigerHashMapExt
A convenience trait that can be used together with the type aliases defined to get access to the new() and with_capacity() methods for the HashMap type alias.
TigerHashSetExt
A convenience trait that can be used together with the type aliases defined to get access to the new() and with_capacity() methods for the HashSet type aliases.

Functions§

camel_case_to_separated_words
display_choices
dup_assign_error
Warns about a duplicate key = value in a database item. key is the new one, other is the old one.
dup_error
Warns about a redefinition of a database item
exact_dup_advice
Warns about a redefinition of a database item, but only at “advice” level
exact_dup_error
Warns about an exact redefinition of a database item
is_country_tag
item_prefix_should
Used for prefixed items other than effects, triggers, and modifiers.
limited_item_prefix_should_insert
Used for scripted triggers, effects, and modifiers. Handles the REPLACE: etc prefixes, and returns the name to insert under iff the new item should be inserted.
snake_case_to_camel_case
stringify_choices
stringify_list

Type Aliases§

BiTigerHashMap 🔒
TigerHashMap
TigerHashSet