refactor: collapse item modules into plugins and remove no-op client item behaviors
This commit is contained in:
@@ -1,2 +1 @@
|
||||
"""Per-item modules containing item-specific schema and behavior."""
|
||||
|
||||
"""Item subsystem package (shared helpers + type-plugin loader)."""
|
||||
|
||||
@@ -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?"
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user