refactor: collapse item modules into plugins and remove no-op client item behaviors

This commit is contained in:
Jage9
2026-02-24 03:00:30 -05:00
parent d4dbb807da
commit 7903bab131
38 changed files with 375 additions and 345 deletions

View File

@@ -1,2 +1 @@
"""Per-item modules containing item-specific schema and behavior."""
"""Item subsystem package (shared helpers + type-plugin loader)."""

View File

@@ -4,9 +4,9 @@ from __future__ import annotations
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params, parse_bool_like_or_none
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params, parse_bool_like_or_none
LABEL = "clock"
TOOLTIP = "It tells the time. What did you think it did?"

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import clock
from . import module
ITEM_TYPE_PLUGIN = {
"type": "clock",
"order": 10,
"module": clock,
"module": module,
}

View File

@@ -5,9 +5,9 @@ from __future__ import annotations
import random
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params
LABEL = "dice"
TOOLTIP = "Great for drinking games or boredom."

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import dice
from . import module
ITEM_TYPE_PLUGIN = {
"type": "dice",
"order": 20,
"module": dice,
"module": module,
}

View File

@@ -4,9 +4,9 @@ from __future__ import annotations
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params
LABEL = "piano"
TOOLTIP = "Playable keyboard instrument with multiple synth voices."

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import piano
from . import module
ITEM_TYPE_PLUGIN = {
"type": "piano",
"order": 30,
"module": piano,
"module": module,
}

View File

@@ -4,9 +4,9 @@ from __future__ import annotations
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params, toggle_bool_param
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params, toggle_bool_param
LABEL = "radio"
TOOLTIP = "Can play stations from the Internet. Tune multiple to the same station and they will sync up."

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import radio
from . import module
ITEM_TYPE_PLUGIN = {
"type": "radio_station",
"order": 40,
"module": radio,
"module": module,
}

View File

@@ -5,9 +5,9 @@ from __future__ import annotations
import random
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params
LABEL = "wheel"
TOOLTIP = "Spin to win fabulous prizes."

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import wheel
from . import module
ITEM_TYPE_PLUGIN = {
"type": "wheel",
"order": 50,
"module": wheel,
"module": module,
}

View File

@@ -4,9 +4,9 @@ from __future__ import annotations
from typing import Callable
from ..item_types import ItemUseResult
from ..models import WorldItem
from .helpers import keep_only_known_params, parse_bool_like, toggle_bool_param
from ....item_types import ItemUseResult
from ....models import WorldItem
from ...helpers import keep_only_known_params, parse_bool_like, toggle_bool_param
LABEL = "widget"
TOOLTIP = "A basic item. Make it a beacon or whatever you want."

View File

@@ -2,10 +2,10 @@
from __future__ import annotations
from ... import widget
from . import module
ITEM_TYPE_PLUGIN = {
"type": "widget",
"order": 60,
"module": widget,
"module": module,
}