/tg/ Station 13 - Modules - TypesDefine Details

code/datums/ai_laws/ai_laws.dm

/proc/get_round_default_lawset A getter that sets up the round default if it has not been yet.
CONFIG_ASIMOVAlways make the round default asimov
CONFIG_CUSTOMSet to a custom lawset defined by another config value
CONFIG_RANDOMSet to a completely random ai law subtype, good, bad, it cares not. Careful with this one
CONFIG_WEIGHTEDSet to a configged weighted list of lawtypes in the config. This lets server owners pick from a pool of sane laws, it is also the same process for ian law rerolls.
/proc/setup_round_default_laws first called when something wants round default laws for the first time in a round, considers config returns a law datum that GLOB._round_default_lawset will be set to.
/proc/pick_weighted_lawset returns a law datum based off of config. will never roll asimov as the weighted datum if the station has a unique AI.
/proc/lawid_to_type returns the law datum with the lawid in question, law boards and law datums should share this id.

Define Details

CONFIG_ASIMOV

Always make the round default asimov

CONFIG_CUSTOM

Set to a custom lawset defined by another config value

CONFIG_RANDOM

Set to a completely random ai law subtype, good, bad, it cares not. Careful with this one

CONFIG_WEIGHTED

Set to a configged weighted list of lawtypes in the config. This lets server owners pick from a pool of sane laws, it is also the same process for ian law rerolls.