Files
tbd-station-14/Content.Server/Mobs/Roles/Job.cs
ZelteHonor 447db2e458 Basis for the job system (#434)
* Add basic yaml Jobs file

* Add Job Prototype

* Rename Jobs to Job

* Remove BaseJob

* Add the Job class child of Role

* Add code for spawning as an assistant. Not actually working, the job prototype can't be found.

* Fix role instead of job left in yaml

* Add starting gear support for job and the starting gear for assistant as an exemple

* Link job with starting gear in yaml

* Better naming and some error handling

* Tweak error handling
2019-11-17 17:18:39 +01:00

36 lines
845 B
C#

using System;
using System.Collections.Generic;
using Content.Server.Interfaces.Chat;
using Content.Shared.Jobs;
using Robust.Shared.IoC;
namespace Content.Server.Mobs.Roles
{
public class Job : Role
{
private readonly JobPrototype _jobPrototype;
public override string Name { get; }
public String StartingGear => _jobPrototype.StartingGear;
public Job(Mind mind, JobPrototype jobPrototype) : base(mind)
{
_jobPrototype = jobPrototype;
Name = jobPrototype.Name;
}
public override void Greet()
{
base.Greet();
var chat = IoCManager.Resolve<IChatManager>();
chat.DispatchServerMessage(
Mind.Session,
String.Format("You're a new {0}. Do your best!", Name));
}
}
}