mirror of
https://github.com/Alee14/OpenHacknet.git
synced 2025-01-22 09:12:44 -05:00
32 lines
No EOL
955 B
C#
32 lines
No EOL
955 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Hacknet.Mission
|
|
{
|
|
internal class WipeDegreesMission : MisisonGoal
|
|
{
|
|
public AcademicDatabaseDaemon database;
|
|
private readonly string ownerName;
|
|
|
|
public WipeDegreesMission(string targetName, OS _os)
|
|
{
|
|
var wipeDegreesMission = this;
|
|
ownerName = targetName;
|
|
Action init = null;
|
|
init = () =>
|
|
{
|
|
if (_os.netMap.academicDatabase == null)
|
|
_os.delayer.Post(ActionDelayer.NextTick(), init);
|
|
else
|
|
database =
|
|
(AcademicDatabaseDaemon) _os.netMap.academicDatabase.getDaemon(typeof (AcademicDatabaseDaemon));
|
|
};
|
|
init();
|
|
}
|
|
|
|
public override bool isComplete(List<string> additionalDetails = null)
|
|
{
|
|
return !database.hasDegrees(ownerName);
|
|
}
|
|
}
|
|
} |