-using Content.Server.Ghost.Roles.Raffles;
+using Content.Server.Ghost.Roles.Raffles;
using Content.Server.Mind.Commands;
using Content.Shared.Roles;
+using Robust.Shared.Prototypes;
namespace Content.Server.Ghost.Roles.Components;
[DataField("rules")] private string _roleRules = "ghost-role-component-default-rules";
- // TODO ROLE TIMERS
// Actually make use of / enforce this requirement?
// Why is this even here.
// Move to ghost role prototype & respect CCvars.GameRoleTimerOverride
[DataField("raffle")]
[Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
public GhostRoleRaffleConfig? RaffleConfig { get; set; }
+
+ /// <summary>
+ /// Job the entity will receive after adding the mind.
+ /// </summary>
+ [DataField("job")]
+ [Access(typeof(GhostRoleSystem), Other = AccessPermissions.ReadWriteExecute)] // also FIXME Friends
+ public ProtoId<JobPrototype>? JobProto = null;
}
-namespace Content.Server.Ghost.Roles.Components;
+using Content.Shared.Roles;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.Ghost.Roles.Components;
/// <summary>
/// This is used for a ghost role which can be toggled on and off at will, like a PAI.
[DataField("stopSearchVerbPopup")]
public string StopSearchVerbPopup = string.Empty;
+
+ [DataField("job")]
+ public ProtoId<JobPrototype>? JobProto = null;
}
using Content.Shared.Verbs;
using Robust.Shared.Collections;
using Content.Shared.Ghost.Roles.Components;
+using Content.Shared.Roles.Jobs;
namespace Content.Server.Ghost.Roles;
if (!TryComp(uid, out GhostRoleComponent? ghostRole))
return;
+ if (ghostRole.JobProto != null)
+ {
+ if (HasComp<JobComponent>(args.Mind))
+ _roleSystem.MindRemoveRole<JobComponent>(args.Mind);
+
+ _roleSystem.MindAddRole(args.Mind, new JobComponent { Prototype = ghostRole.JobProto });
+ }
+
ghostRole.Taken = true;
UnregisterGhostRole((uid, ghostRole));
}
ghostRole.RoleName = Loc.GetString(component.RoleName);
ghostRole.RoleDescription = Loc.GetString(component.RoleDescription);
ghostRole.RoleRules = Loc.GetString(component.RoleRules);
+ ghostRole.JobProto = component.JobProto;
}
private void OnExamined(EntityUid uid, ToggleableGhostRoleComponent component, ExaminedEvent args)
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTLeader
- type: Loadout
prototypes: [ ERTLeaderGear ]
roleLoadout: [ RoleSurvivalExtended ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTLeader
- type: Loadout
prototypes: [ ERTLeaderGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTLeader
- type: Loadout
prototypes: [ ERTLeaderGearEVALecter ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTChaplain
- type: RandomMetadata
nameSegments:
- NamesFirstMilitary
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTChaplain
- type: Loadout
prototypes: [ ERTChaplainGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTJanitor
- type: RandomMetadata
nameSegments:
- NamesFirstMilitary
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTJanitor
- type: Loadout
prototypes: [ ERTJanitorGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTEngineer
- type: RandomMetadata
nameSegments:
- NamesFirstMilitary
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTEngineer
- type: Loadout
prototypes: [ ERTEngineerGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTSecurity
- type: RandomMetadata
nameSegments:
- NamesFirstMilitary
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTSecurity
- type: Loadout
prototypes: [ ERTSecurityGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTSecurity
- type: Loadout
prototypes: [ ERTSecurityGearEVALecter ]
roleLoadout: [ RoleSurvivalEVA ]
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTMedical
- type: RandomMetadata
nameSegments:
- NamesFirstMilitary
rules: ghost-role-information-nonantagonist-rules
raffle:
settings: short
+ job: ERTMedical
- type: Loadout
prototypes: [ ERTMedicalGearEVA ]
roleLoadout: [ RoleSurvivalEVA ]
wipeVerbPopup: positronic-brain-wiped-device
stopSearchVerbText: positronic-brain-stop-searching-verb-text
stopSearchVerbPopup: positronic-brain-stopped-searching
+ job: Borg
- type: BlockMovement
- type: Examiner
- type: BorgBrain