Skip to content

Commit c6c8649

Browse files
committed
Added PlaySFX()
1 parent 0219130 commit c6c8649

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

TemplateMod/Commands.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Hacknet;
2+
using Microsoft.Xna.Framework.Audio;
23
using System;
34
using System.Collections.Generic;
45
using System.Linq;
56
using System.Text;
7+
using XNA = Microsoft.Xna.Framework;
68

79
namespace TemplateMod
810
{
@@ -459,7 +461,7 @@ public static bool RemoveProxy(Hacknet.OS os, string[] args)
459461
Computer computer = os.connectedComp;
460462
computer.
461463
return false;
462-
} */
464+
}
463465
public static bool AddComputer(Hacknet.OS os, string[] args)
464466
{
465467
@@ -468,6 +470,12 @@ public static bool AddComputer(Hacknet.OS os, string[] args)
468470
469471
Computer computer = new Computer()
470472
return false;
473+
} */
474+
public static bool PlaySFX(Hacknet.OS os, string[] args)
475+
{
476+
SoundEffect sound = os.content.Load<SoundEffect>(args[1]);
477+
sound.Play();
478+
return false;
471479
}
472480
}
473481
}

0 commit comments

Comments
 (0)