Skip to content

Add Shop Engine Sound Preview mod with input action, script, localization, and packaging#5

Open
HamiltonLockhart42 wants to merge 2 commits intomainfrom
codex/create-vehicle-sound-preview-mod-k1z4p8
Open

Add Shop Engine Sound Preview mod with input action, script, localization, and packaging#5
HamiltonLockhart42 wants to merge 2 commits intomainfrom
codex/create-vehicle-sound-preview-mod-k1z4p8

Conversation

@HamiltonLockhart42
Copy link
Copy Markdown
Owner

Motivation

  • Provide a client-side feature that lets players start/stop the preview vehicle engine sound from the vehicle shop to hear it before purchasing.
  • Integrate a configurable input action and localizations so the feature works out-of-the-box and is translatable.

Description

  • Add modDesc.xml to register the TOGGLE_SHOP_ENGINE_PREVIEW action, include scripts/ShopEnginePreview.lua, and declare inputBinding.xml and localization files.
  • Implement scripts/ShopEnginePreview.lua which hooks ShopConfigScreen (onOpen, onClose, update), registers the input action, and toggles the preview vehicle motor via vehicle:startMotor()/stopMotor() or the vehicle motor API while avoiding dedicated servers.
  • Add inputBinding.xml with default bindings (KEY_k and BUTTON_X) and localization files l10n/texts_en.xml and l10n/texts_de.xml for the action labels.
  • Add package_mod.sh to create a game-ready zip and update README.md with usage, controls, file structure, and packaging instructions.

Testing

  • No automated tests were run.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant