Skip to content

Commit

Permalink
Move SoundID to data/sound
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed May 11, 2024
1 parent 9695c3b commit 5e92cca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/js/stendhal/EventRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
declare var marauroa: any;
declare var stendhal: any;

import { SoundID } from "./data/sound/SoundID";

import { RPEntity } from "./entity/RPEntity";
import { RPObject } from "./entity/RPObject";

Expand All @@ -31,7 +33,6 @@ import { ui } from "./ui/UI";
import { DialogContentComponent } from "./ui/toolkit/DialogContentComponent";

import { Chat } from "./util/Chat";
import { SoundId } from "./util/SoundId";


export class EventRegistry {
Expand Down Expand Up @@ -376,7 +377,7 @@ export class EventRegistry {
let sound = this["sound"];
const sound_id = this["sound_id"];
if (sound_id) {
sound = SoundId[sound_id];
sound = SoundID[sound_id];
}

stendhal.ui.soundMan.playLocalizedEffect(rpobject["_x"], rpobject["_y"], radius, this["layer"], sound, volume);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2003-2023 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
Expand All @@ -10,8 +10,10 @@
***************************************************************************/


/** Configured sounds associated with IDs. */
export const SoundId = {
/**
* Configured sounds associated with IDs.
*/
export const SoundID = {
"level_up": "player/tadaa",
"level_down": undefined,
"stat_up": "player/stat_up-01",
Expand Down

0 comments on commit 5e92cca

Please sign in to comment.