mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 17:16:38 +00:00
Move brand images to proprietary/ and support multi-dir asset pipeline (#3662)
## Description: * Move proprietary brand images (logos, favicon) from resources/images/ to proprietary/images/ to separate open-source assets from proprietary ones * Extend the asset pipeline (PublicAssetManifest, vite.config.ts) to support multiple source directories (resources/ + proprietary/), so buildAssetUrl resolves assets from either location transparently * In dev, serve proprietary/ as a fallback middleware (registered after Vite's publicDir handler) so resources/ takes precedence when files exist in both. The idea is we could have placeholder assets placeholders that can be used by forks, and only the production build uses proprietary assets. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { Howl } from "howler";
|
||||
import of4 from "../../../proprietary/sounds/music/of4.mp3";
|
||||
import openfront from "../../../proprietary/sounds/music/openfront.mp3";
|
||||
import war from "../../../proprietary/sounds/music/war.mp3";
|
||||
import { assetUrl } from "../../core/AssetUrls";
|
||||
import { EventBus } from "../../core/EventBus";
|
||||
import { UserSettings } from "../../core/game/UserSettings";
|
||||
import {
|
||||
@@ -33,19 +31,19 @@ export class SoundManager {
|
||||
this.safely("initialize background music", () => {
|
||||
this.backgroundMusic = [
|
||||
new Howl({
|
||||
src: [of4],
|
||||
src: [assetUrl("sounds/music/of4.mp3")],
|
||||
loop: false,
|
||||
onend: this.playNext.bind(this),
|
||||
volume: 0,
|
||||
}),
|
||||
new Howl({
|
||||
src: [openfront],
|
||||
src: [assetUrl("sounds/music/openfront.mp3")],
|
||||
loop: false,
|
||||
onend: this.playNext.bind(this),
|
||||
volume: 0,
|
||||
}),
|
||||
new Howl({
|
||||
src: [war],
|
||||
src: [assetUrl("sounds/music/war.mp3")],
|
||||
loop: false,
|
||||
onend: this.playNext.bind(this),
|
||||
volume: 0,
|
||||
|
||||
Reference in New Issue
Block a user