This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| script:module:defs [2015-11-15 18:29] – external edit 127.0.0.1 | script:module:defs [2020-12-06 19:25] (current) – skyjake | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Defs (Module) ====== | ||
| + | |||
| + | |||
| + | The '' | ||
| + | |||
| + | < | ||
| + | $ dir(Defs) | ||
| + | ⇒ [ SDN_ACTIVE, SDN_ATTACK, SDN_DEATH, SDN_PAIN, SDN_SEE, SN_CRASH, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Lookups ===== | ||
| + | |||
| + | |||
| + | Each collection of definitions contains various lookup tables and indices: | ||
| + | |||
| + | |||
| + | $ dir(Defs.things) | ||
| + | ⇒ [ idLookup, nameLookup, order ] | ||
| + | |||
| + | |||
| + | For example, '' | ||
| + | |||
| + | < | ||
| + | $ Defs.things.idLookup[' | ||
| + | ⇒ __order__: | ||
| + | custom: | ||
| + | damage: | ||
| + | doomEdNum: | ||
| + | flags: | ||
| + | height: | ||
| + | id: POSSESSED | ||
| + | mass: 100 | ||
| + | misc: [ 0, 0, 0, 0 ] | ||
| + | name: Zombieman | ||
| + | painChance: | ||
| + | radius: | ||
| + | reactionTime: | ||
| + | sounds: | ||
| + | spawnHealth: | ||
| + | speed: | ||
| + | states: | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Order ===== | ||
| + | |||
| + | |||
| + | The '' | ||
| + | |||
| + | |||
| + | $ len(Defs.things.order) | ||
| + | ⇒ 140 | ||
| + | $ Defs.things.order[1].id | ||
| + | ⇒ POSSESSED | ||
| + | |||
| + | |||
| + | |||
| + | ===== Constants ===== | ||
| + | |||
| + | |||
| + | The '' | ||
| + | |||
| + | The '' | ||
| + | |||
| + | |||
| + | |||
| + | ===== Functions ===== | ||
| + | |||
| + | The following return the internal index number for a given ID: | ||
| + | |||
| + | # | ||
| + | |||
| + | # | ||
| + | |||
| + | # | ||