Remove unsupported emit sound reverse option
This commit is contained in:
@@ -101,10 +101,6 @@ GLOBAL_ITEM_PROPERTY_METADATA: dict[str, dict[str, object]] = {
|
||||
"tooltip": "Global emitted sound tempo percent. 50 is normal.",
|
||||
"range": {"min": 0, "max": 100, "step": 1},
|
||||
},
|
||||
"emitSoundReverse": {
|
||||
"valueType": "boolean",
|
||||
"tooltip": "Global emitted sound reverse flag.",
|
||||
},
|
||||
}
|
||||
|
||||
ITEM_TYPE_PROPERTY_METADATA: dict[ItemType, dict[str, dict[str, object]]] = {
|
||||
@@ -140,5 +136,4 @@ def get_item_global_properties(item_type: ItemType) -> dict[str, str | int | boo
|
||||
"directional": bool(definition.directional),
|
||||
"emitSoundSpeed": 50,
|
||||
"emitSoundTempo": 50,
|
||||
"emitSoundReverse": False,
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ EDITABLE_PROPERTIES: tuple[str, ...] = (
|
||||
"emitVolume",
|
||||
"emitSoundSpeed",
|
||||
"emitSoundTempo",
|
||||
"emitSoundReverse",
|
||||
"emitEffect",
|
||||
"emitEffectValue",
|
||||
"useSound",
|
||||
@@ -40,7 +39,6 @@ DEFAULT_PARAMS: dict = {
|
||||
"emitVolume": 100,
|
||||
"emitSoundSpeed": 50,
|
||||
"emitSoundTempo": 50,
|
||||
"emitSoundReverse": False,
|
||||
"emitEffect": "off",
|
||||
"emitEffectValue": 50,
|
||||
"useSound": "",
|
||||
@@ -77,10 +75,6 @@ PROPERTY_METADATA: dict[str, dict[str, object]] = {
|
||||
"tooltip": "Playback tempo percent for emitted sound. 50 is normal, 0 is half, 100 is double. Using speed and tempo together may sound weird.",
|
||||
"range": {"min": 0, "max": 100, "step": 1},
|
||||
},
|
||||
"emitSoundReverse": {
|
||||
"valueType": "boolean",
|
||||
"tooltip": "Play emitted sound in reverse.",
|
||||
},
|
||||
"emitEffect": {"valueType": "list", "tooltip": "Effect applied to emitted sound."},
|
||||
"emitEffectValue": {
|
||||
"valueType": "number",
|
||||
@@ -160,12 +154,6 @@ def validate_update(item: WorldItem, next_params: dict) -> dict:
|
||||
raise ValueError("emitSoundTempo must be between 0 and 100.")
|
||||
next_params["emitSoundTempo"] = emit_tempo
|
||||
|
||||
emit_reverse = parse_bool_like(
|
||||
next_params.get("emitSoundReverse", item.params.get("emitSoundReverse", False)),
|
||||
default=False,
|
||||
)
|
||||
next_params["emitSoundReverse"] = emit_reverse
|
||||
|
||||
emit_effect = str(next_params.get("emitEffect", item.params.get("emitEffect", "off"))).strip().lower()
|
||||
if emit_effect not in EFFECT_OPTIONS:
|
||||
raise ValueError("emitEffect must be one of reverb, echo, flanger, high_pass, low_pass, off.")
|
||||
|
||||
Reference in New Issue
Block a user