Skip to content

Commit

Permalink
Merge pull request #736 from zymex22/issue735
Browse files Browse the repository at this point in the history
#735 added support for non sustainer workingSounds
  • Loading branch information
Sn1p3rr3c0n authored Sep 5, 2023
2 parents 67a3b7d + 70d7dd0 commit 204ed87
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/ProjectRimFactory/AutoMachineTool/SAL_TargetBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,18 @@ public override void Reset(WorkingState workingState)
public override void CreateWorkingEffect(MapTickManager mapTickManager)
{
workingEffect = this.bill.recipe.effectWorking?.Spawn();
var sound = this.bill.recipe.soundWorking;

workingSound = this.bill.recipe.soundWorking?.TrySpawnSustainer(my_workTable);
workingSound?.Maintain();
if (sound?.sustain ?? false)
{
workingSound = sound?.TrySpawnSustainer(my_workTable);
workingSound?.Maintain();
}
else if (sound != null)
{
sound.PlayOneShot(my_workTable);
}


mapTickManager.EachTickAction(EffectTick);

Expand Down

0 comments on commit 204ed87

Please sign in to comment.