derikb / rpg-table-randomizer

Module for random tables for use in roleplaying games.
GNU General Public License v3.0
9 stars 2 forks source link

NPCSchemaField types are not really being handled #53

Closed derikb closed 2 years ago

derikb commented 2 years ago

Other than the array type and getting multiple results from the source, the type property is mostly ignored. Should be using that in various places to I think to help with typing the field values, and serialize/unserialize.

derikb commented 2 years ago

Also should add some methods to ascertain the type rather than relying on the comparing the type property to various strings. (i.e. field.isArray(), field.isText(), etc.)

derikb commented 2 years ago

Wondering too if the default empty should fill the array with empty strings appropriate to the count value. (i.e. ['', ''] if count is 2.)