monoidal_effects/effectset.api

32 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-01-05 19:01:04 -08:00
Methods
-------
get(uid) - Gets the record with the UID, if there is one.
effects() - An iterator for the effect records, indexed by UID
insert(record) - Inserts a record, returns the UID
2016-01-09 02:24:22 -08:00
insert_with_uid(uid, record) - Inserts a record with a specific UID.
2016-01-05 19:01:04 -08:00
delete(uid) - Deletes the record with that UID, if it exists
with_index("index_name", index) - Gets a set of all UIDs with that index.
Other functions
---------------
effectset.new_set() - Makes a new effectset
effectset.serialize(effectset) - Serializes the effectset
effectset.deserialize(effectset) - Deserializes
2016-01-05 19:01:04 -08:00
effectset.intersect - Intersects two effectsets (not much use yet)
effectset.union - Unions two effectsets (not much use yet)
2016-01-09 02:24:22 -08:00
effectset.set_intersect(s1, s2)
effectset.set_union(s1, s2)
effectset.record(dyn, effect_type, players, tags, monoids, dur, values) -
Construct a record.
Tables
------
These can be used with with_index
player - Player names an effect applies to
tag - Tags an effect has
monoid - Monoids an effect belongs to
name - The name of an effect
perm - Whether the effect is permanent