2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Chat.Managers;
|
2020-08-13 14:40:27 +02:00
|
|
|
using Content.Shared.Roles;
|
2019-11-17 11:18:39 -05:00
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Roles
|
2019-11-17 11:18:39 -05:00
|
|
|
{
|
|
|
|
|
public class Job : Role
|
|
|
|
|
{
|
2020-01-23 17:31:47 +01:00
|
|
|
public JobPrototype Prototype { get; }
|
2019-11-17 11:18:39 -05:00
|
|
|
|
|
|
|
|
public override string Name { get; }
|
2020-07-06 16:24:29 -05:00
|
|
|
public override bool Antagonist => false;
|
2019-11-17 11:18:39 -05:00
|
|
|
|
2021-03-16 15:50:20 +01:00
|
|
|
public string? StartingGear => Prototype.StartingGear;
|
2019-11-17 11:18:39 -05:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
public Job(Mind.Mind mind, JobPrototype jobPrototype) : base(mind)
|
2019-11-17 11:18:39 -05:00
|
|
|
{
|
2020-01-23 17:31:47 +01:00
|
|
|
Prototype = jobPrototype;
|
2019-11-17 11:18:39 -05:00
|
|
|
Name = jobPrototype.Name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Greet()
|
|
|
|
|
{
|
|
|
|
|
base.Greet();
|
|
|
|
|
|
2021-03-16 15:50:20 +01:00
|
|
|
if (Mind.TryGetSession(out var session))
|
|
|
|
|
{
|
|
|
|
|
var chat = IoCManager.Resolve<IChatManager>();
|
|
|
|
|
chat.DispatchServerMessage(session, $"You're a new {Name}. Do your best!");
|
|
|
|
|
}
|
2019-11-17 11:18:39 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|