HammeriteAudioEditorExtension

Audio. Inherits RefCounted

Acoustic System Editor Plugin.

Adds acoustic entity types and a toolbar button/tool to the Hammerite HammeriteMapEditor. Requires hammerite-editor. Zones and portals are no longer authored: they are derived from the compiled world. The tool this plugin adds inspects that derived graph and names the openings in it, which is the only part of a portal an author still decides. The runtime side (HammeriteAudioManager injection into HammeriteMap3D) is handled separately and unconditionally by the HammeriteAudio autoload, so acoustic propagation works whether or not this editor plugin is ever initialized -- see scripts/hammerite_audio.gd. Initialize it after integrating the HammeriteMapEditor:

var audio_editor_plugin := HammeriteAudioEditorExtension.new()
audio_editor_plugin.initialize(map_editor)

Methods

ReturnsMethod
voidinitialize(editor: HammeriteMapEditor)
voidcleanup()
voidopen_tool()

Constants

MENU_COMMAND

const MENU_COMMAND = &"audio.open_portal_tool"

Id of the Tools menu command that opens the Audio Portals tool, in HammeriteMapEditor.commands - so a game can rebind it or take it away.

Method descriptions

initialize()

func initialize(editor: HammeriteMapEditor) -> void

Initialize the plugin with a HammeriteMapEditor instance: registers env_sound and env_sound_environment, the Acoustics floorplan overlay, the toolbar button and menu command, and the manual section. Call once per editor.

cleanup()

func cleanup() -> void

Clean up when the plugin is removed: the overlay, menu command, manual section, toolbar button and the icons it hung on the sound entity types. The types themselves stay registered, and deliberately: they are the autoload's (HammeriteAudioRuntime.register_entity_types()), because a shipped build with no editor in it still has to build a map's sound entities. All this extension ever added to them is a picture for the entity picker, and that is what goes (#224).

open_tool()

func open_tool() -> void

Open this addon's editor tool - the Audio Portals tool, which inspects the derived graph and names its openings. The same thing the toolbar button and the Tools menu entry do.

Hammerite 1.0 · built from a6dd634, 2026-10-10