diff --git a/Defs/Sounds/Lasers.xml b/Defs/Sounds/Lasers.xml index be9fbe5..4acbdfa 100644 --- a/Defs/Sounds/Lasers.xml +++ b/Defs/Sounds/Lasers.xml @@ -45,4 +45,22 @@ + + LaserHum_AA + true + MapOnly + PrioritizeNearest + +
  • + +
  • + AntimatterAnnihilation/LaserHum +
  • + + 18 + 10~40 + +
    +
    + \ No newline at end of file diff --git a/Sounds/AntimatterAnnihilation/LaserHum.ogg b/Sounds/AntimatterAnnihilation/LaserHum.ogg new file mode 100644 index 0000000..647e0e2 Binary files /dev/null and b/Sounds/AntimatterAnnihilation/LaserHum.ogg differ diff --git a/Source/AntimatterAnnihilation/Buildings/Building_ReactorInjector.cs b/Source/AntimatterAnnihilation/Buildings/Building_ReactorInjector.cs index 2668c7f..274b526 100644 --- a/Source/AntimatterAnnihilation/Buildings/Building_ReactorInjector.cs +++ b/Source/AntimatterAnnihilation/Buildings/Building_ReactorInjector.cs @@ -7,6 +7,7 @@ using UnityEngine; using Verse; using Verse.Noise; +using Verse.Sound; namespace AntimatterAnnihilation.Buildings { @@ -124,6 +125,7 @@ public float PowerOutputMultiplier private long tick; private Building_AntimatterReactor lastReactor; private List<(IntVec3 cell, byte weight)> avoidance = new List<(IntVec3 cell, byte weight)>(); + private Sustainer humSustainer; public override void SpawnSetup(Map map, bool respawningAfterLoad) { @@ -191,6 +193,20 @@ public override void Tick() Beam.BeamVisible = IsRunning; //CauseRedraw(); + if (IsRunning) + { + if (humSustainer != null && humSustainer.Ended) + humSustainer = null; + + if (humSustainer == null) + { + SoundInfo info = SoundInfo.InMap(this, MaintenanceType.PerTick); + humSustainer = AADefOf.LaserHum_AA.TrySpawnSustainer(info); + } + + humSustainer?.Maintain(); + } + Beam.Tick(); if (!IsRunning) diff --git a/Source/AntimatterAnnihilation/Utils/AADefOf.cs b/Source/AntimatterAnnihilation/Utils/AADefOf.cs index 8cdb5a1..1387830 100644 --- a/Source/AntimatterAnnihilation/Utils/AADefOf.cs +++ b/Source/AntimatterAnnihilation/Utils/AADefOf.cs @@ -23,6 +23,7 @@ static AADefOf() public static SoundDef Explosion_Voice_AA; public static SoundDef LaserStrike_AA; public static SoundDef RailgunShoot_AA; + public static SoundDef LaserHum_AA; public static ResearchProjectDef InstantFlick_AA; public static ThingDef Mote_LargeMuzzleFlash_AA; public static ThingDef Mote_LargeMuzzleFlashFast_AA; diff --git a/Textures/AntimatterAnnihilation/UI/UltratechPawns.jpg b/Textures/AntimatterAnnihilation/UI/UltratechPawns.jpg new file mode 100644 index 0000000..d864284 Binary files /dev/null and b/Textures/AntimatterAnnihilation/UI/UltratechPawns.jpg differ diff --git a/Wiki/English/S_UltratechFaction.txt b/Wiki/English/S_UltratechFaction.txt index c67ab67..a6f8ec1 100644 --- a/Wiki/English/S_UltratechFaction.txt +++ b/Wiki/English/S_UltratechFaction.txt @@ -11,6 +11,8 @@ ENDTAGS #The Ultratech are an inter-planetary conglomerate that posses the knowlege and technology to manipulate antimatter. All of their members are highly trained and heavily armed, and have orders to destroy anyone who has gains knowlege of antimatter technology.# +$AntimatterAnnihilation/UI/UltratechPawns$ + #!How often will they raid me?# #The ultratech have the same raid weight as any other faction, but are less likely to send strong raids early-game. If you get tired of waiting for them to attack you, take the fight to them. The Ultratech outposts are heavily guarded but also give the rare tech drops required for advanced crafting.#