Skip to content

Add Shop Engine Sound Preview mod with input binding and packaging script#4

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

Add Shop Engine Sound Preview mod with input binding and packaging script#4
HamiltonLockhart42 wants to merge 2 commits intomainfrom
codex/create-vehicle-sound-preview-mod-o98kjg

Conversation

@HamiltonLockhart42
Copy link
Copy Markdown
Owner

Motivation

  • Provide an in-shop engine sound preview so players can hear a vehicle's engine before purchase.
  • Allow quick start/stop of the preview via a configurable input action and ensure the preview stops when switching vehicles or closing the shop.
  • Keep the feature client-side and multiplayer-safe by avoiding server-side state changes.

Description

  • Added modDesc.xml and scripts/ShopEnginePreview.lua which implement the ShopEnginePreview class that hooks ShopConfigScreen to register an input action and toggle preview engine start/stop.
  • Implemented preview logic to detect the preview vehicle, start/stop the motor via startMotor/stopMotor or fallback to motor getters/setters, and automatically stop preview on vehicle switch or shop close.
  • Added default input bindings in inputBinding.xml (keyboard K, gamepad X) and localization files l10n/texts_en.xml and l10n/texts_de.xml for action text.
  • Included package_mod.sh to produce a game-ready zip and updated README.md with features, packaging instructions, and mod file structure.

Testing

  • No automated tests were executed for this change.

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