Skip to content

CompAudioSource

flango edited this page Mar 6, 2023 · 2 revisions

×× Things with sounds ××

Allows you to turn anything into an audio player.

Audio can be played by either an UI button or at random.

ezgif.com-video-cutter.mp4

Performance impact: 🟩 Negligible


Type: Comp

XML Node: ThingDef/comps/li

Example:

<comps>
    <li Class="flangoCore.CompProperties_AudioSource">
        <soundDefs>
            <li>BuildingDestroyed_Wood_Big</li>
            <li>BuildingDestroyed_Metal_Big</li>
            <li>BuildingDestroyed_Stone_Big</li>
            <li>SomeMusic</li>
        </soundDefs>
        <commandPlayIcon>UI/PlayIcon</commandPlayIcon>
        <commandSwitchIcon>UI/ResetIcon</commandSwitchIcon>
        <commandStopIcon>UI/StopIcon</commandStopIcon>
        <!-- Defaults: -->
    <!--
        <hideGizmos>false</hideGizmos>
        <random>false</random>
        <canPlay>true</canPlay>
        <canStop>true</canStop>
        <canSwitch>true</canSwitch>
        <randomIntervalTicks>200~800</randomIntervalTicks>
        <commandPlayLabel>Play</commandPlayLabel>
        <commandPlayDesc>Play selected sound.</commandPlayDesc>
        <commandStopLabel>Stop</commandStopLabel>
        <commandStopDesc>Stop sound.</commandStopDesc>
        <commandSwitchLabel>Switch audio...</commandSwitchLabel>
        <commandSwitchDesc>Switch current audio.</commandSwitchDesc>
    -->
    </li>
</comps>

🦩 Home

🚧 - 404 Page not found.
🖼 - Preview needed.

🟡 - Works but has some TODOs.
🟠 - Basic functionality implemented.
🔴 - Not working properly.
❓ - Not tested.


--== XML ==--

💡 Abilities

General

Ability Givers

Equipment Abilities

🟡 Should recode some stuff 🟡

🌳 Skill Trees

🟠 WIP, work/kill XP gain not implemented 🟠

Defs

Comps

🏘 Buildings

⚙ Comps

🏹 Equipment

General

Weapons

Projectiles

🧪 Hediffs

🧍‍♂‍ Pawn behaviors

📊 Stats

🎲 Misc

🧔 Vanilla Expanded

✨ Debug (Dev Mode)


--== C# ==--

📂 Shared Classes

🧬 Patches


Clone this wiki locally