add-verb

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Adding Verbs to Word Lists

为词库添加动词

Verb word lists map player input to entity handlers (
OnLook
,
OnTouch
, etc.).
动词词库用于将玩家输入映射到实体处理器(
OnLook
OnTouch
等)。

Adding a Verb

添加动词

Run the script from the project root:
bash
./scripts/add_verb.py --action ACTION --verb VERB
Valid actions: Auto-discovered from
data/verbs/on_*.txt
files. Run
./scripts/add_verb.py --help
to see current options.
Example:
./scripts/add_verb.py --action on_attack --verb pummel
从项目根目录运行以下脚本:
bash
./scripts/add_verb.py --action ACTION --verb VERB
有效动作:从
data/verbs/on_*.txt
文件中自动识别。运行
./scripts/add_verb.py --help
查看当前可用选项。
示例
./scripts/add_verb.py --action on_attack --verb pummel

Rules

规则

  1. No duplicates: A verb can only exist in ONE file across all word lists
  2. Lowercase: All verbs are stored lowercase
  3. Auto-sorted: Files are automatically kept alphabetically sorted (Python default sort)
  4. One per line: Each verb on its own line
  5. Multi-word verbs: Supported (e.g., "log in", "log out")
  1. 无重复:一个动词只能出现在所有词库中的某一个文件里
  2. 小写存储:所有动词均以小写形式存储
  3. 自动排序:文件会自动保持按字母顺序排序(Python默认排序规则)
  4. 一行一词:每个动词单独占一行
  5. 支持多词动词:例如“log in”、“log out”

Files

文件说明

Word lists are in
data/verbs/
:
  • on_look.txt
    - examine, inspect, look, peer, etc.
  • on_touch.txt
    - feel, poke, prod, touch, etc.
  • on_attack.txt
    - attack, hit, smash, strike, etc.
  • on_use.txt
    - activate, operate, use, etc.
  • on_take.txt
    - grab, pick, take, etc.
  • on_open.txt
    - open, login, access, boot, etc.
  • on_close.txt
    - close, logout, disconnect, etc.
  • on_drop.txt
    - drop, etc.
词库文件位于
data/verbs/
目录下:
  • on_look.txt
    - 包含examine、inspect、look、peer等动词
  • on_touch.txt
    - 包含feel、poke、prod、touch等动词
  • on_attack.txt
    - 包含attack、hit、smash、strike等动词
  • on_use.txt
    - 包含activate、operate、use等动词
  • on_take.txt
    - 包含grab、pick、take等动词
  • on_open.txt
    - 包含open、login、access、boot等动词
  • on_close.txt
    - 包含close、logout、disconnect等动词
  • on_drop.txt
    - 包含drop等动词

Validation

验证

Run
just verbs
to check for duplicates across all files.
运行
just verbs
检查所有文件中是否存在重复动词。