Фиксы апстрима
This commit is contained in:
parent
c8e9b7bbf4
commit
918213bee5
14 changed files with 71 additions and 31 deletions
|
|
@ -57,7 +57,12 @@ public sealed partial class ChangelingRuleSystem : GameRuleSystem<ChangelingRule
|
|||
var briefingShort = Loc.GetString("changeling-role-greeting-short", ("name", metaData?.EntityName ?? "Unknown"));
|
||||
|
||||
_antag.SendBriefing(target, briefing, Color.Yellow, BriefingSound);
|
||||
_role.MindAddRole(mindId, new RoleBriefingComponent { Briefing = briefingShort }, mind, true);
|
||||
_role.MindHasRole<ChangelingRoleComponent>(mindId, out var changelingRole);
|
||||
if (changelingRole is not null)
|
||||
{
|
||||
AddComp<RoleBriefingComponent>(changelingRole.Value.Owner);
|
||||
Comp<RoleBriefingComponent>(changelingRole.Value.Owner).Briefing = briefing;
|
||||
}
|
||||
}
|
||||
// hivemind stuff
|
||||
_npcFaction.RemoveFaction(target, NanotrasenFactionId, false);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using Content.Shared.Roles;
|
|||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
[RegisterComponent, ExclusiveAntagonist]
|
||||
public sealed partial class ChangelingRoleComponent : AntagonistRoleComponent
|
||||
[RegisterComponent]
|
||||
public sealed partial class ChangelingRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using Content.Shared.Roles;
|
|||
|
||||
namespace Content.Server.Roles;
|
||||
|
||||
[RegisterComponent, ExclusiveAntagonist]
|
||||
public sealed partial class TerminatorRoleComponent : AntagonistRoleComponent
|
||||
[RegisterComponent]
|
||||
public sealed partial class TerminatorRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public sealed class SpawnPointSystem : EntitySystem
|
|||
if (args.DesiredSpawnPointType != SpawnPointType.Unset)
|
||||
{
|
||||
var isMatchingJob = spawnPoint.SpawnType == SpawnPointType.Job &&
|
||||
(args.Job == null || spawnPoint.Job == args.Job.Prototype);
|
||||
(args.Job == null || spawnPoint.Job == args.Job);
|
||||
|
||||
switch (args.DesiredSpawnPointType)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,13 +38,14 @@ public sealed class TerminatorSystem : EntitySystem
|
|||
private void OnCreated(EntityUid uid, TerminatorComponent comp, ref GenericAntagCreatedEvent args)
|
||||
{
|
||||
var mindId = args.MindId;
|
||||
var mind = args.Mind;
|
||||
|
||||
_role.MindAddRole(mindId, new RoleBriefingComponent
|
||||
_role.MindAddRole(mindId, "MindRoleTerminator");
|
||||
_role.MindHasRole<TerminatorRoleComponent>(mindId, out var terminatorRole);
|
||||
if (terminatorRole is not null)
|
||||
{
|
||||
Briefing = Loc.GetString("terminator-role-briefing")
|
||||
}, mind);
|
||||
_role.MindAddRole(mindId, new TerminatorRoleComponent(), mind);
|
||||
AddComp<RoleBriefingComponent>(terminatorRole.Value.Owner);
|
||||
Comp<RoleBriefingComponent>(terminatorRole.Value.Owner).Briefing = Loc.GetString("terminator-role-briefing");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Content.Shared.Roles;
|
|||
namespace Content.Server._Sunrise.EvilTwin;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class EvilTwinRoleComponent : AntagonistRoleComponent
|
||||
public sealed partial class EvilTwinRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,11 +119,7 @@ public sealed class EvilTwinSystem : EntitySystem
|
|||
!_mindSystem.TryGetMind(uid, out var mindId, out var mind))
|
||||
return;
|
||||
|
||||
var role = new EvilTwinRoleComponent
|
||||
{
|
||||
PrototypeId = EvilTwinRole,
|
||||
};
|
||||
_roleSystem.MindAddRole(mindId, role, mind);
|
||||
_roleSystem.MindAddRole(mindId, "MindRoleEvilTwin");
|
||||
_mindSystem.TryAddObjective(mindId, mind, EscapeObjective);
|
||||
_mindSystem.TryAddObjective(mindId, mind, KillObjective);
|
||||
if (_mindSystem.TryGetObjectiveComp<TargetObjectiveComponent>(uid, out var obj))
|
||||
|
|
@ -141,7 +137,7 @@ public sealed class EvilTwinSystem : EntitySystem
|
|||
if (!_mindSystem.TryGetMind(actor.PlayerSession, out var mindId, out var mind) || mind.OwnedEntity == null)
|
||||
continue;
|
||||
|
||||
if (!_jobSystem.MindTryGetJob(mindId, out _, out _))
|
||||
if (!_jobSystem.MindTryGetJob(mindId, out _))
|
||||
continue;
|
||||
|
||||
uid = mind.OwnedEntity;
|
||||
|
|
@ -171,7 +167,7 @@ public sealed class EvilTwinSystem : EntitySystem
|
|||
detailCopy.Content = detail.Content;
|
||||
}
|
||||
|
||||
if (_jobSystem.MindTryGetJob(mindId, out _, out var jobProto) && jobProto.StartingGear != null)
|
||||
if (_jobSystem.MindTryGetJob(mindId, out var jobProto) && jobProto.StartingGear != null)
|
||||
{
|
||||
var jobLoadout = LoadoutSystem.GetJobPrototype(jobProto.ID);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Content.Shared.Roles;
|
|||
namespace Content.Server._Sunrise.Fugitive;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class FugitiveRoleComponent : AntagonistRoleComponent
|
||||
public sealed partial class FugitiveRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,10 +138,7 @@ namespace Content.Server._Sunrise.Fugitive
|
|||
_roleSystem.MindTryRemoveRole<FugitiveRoleComponent>(mindId);
|
||||
}
|
||||
|
||||
_roleSystem.MindAddRole(mindId, new FugitiveRoleComponent
|
||||
{
|
||||
PrototypeId = AntagRole,
|
||||
});
|
||||
_roleSystem.MindAddRole(mindId, "MindRoleFugitive");
|
||||
|
||||
_mindSystem.TryAddObjective(mindId, mind, EscapeObjective);
|
||||
|
||||
|
|
|
|||
|
|
@ -159,10 +159,7 @@ namespace Content.Server._Sunrise.PlanetPrison
|
|||
_roleSystem.MindTryRemoveRole<PlanetPrisonerRoleComponent>(mindId);
|
||||
}
|
||||
|
||||
_roleSystem.MindAddRole(mindId, new PlanetPrisonerRoleComponent
|
||||
{
|
||||
PrototypeId = AntagRole,
|
||||
});
|
||||
_roleSystem.MindAddRole(mindId, "MindRolePlanetPrisoner");
|
||||
|
||||
_mindSystem.TryAddObjective(mindId, mind, EscapeObjective);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Content.Shared.Roles;
|
|||
namespace Content.Server._Sunrise.PlanetPrison;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class PlanetPrisonerRoleComponent : AntagonistRoleComponent
|
||||
public sealed partial class PlanetPrisonerRoleComponent : BaseMindRoleComponent
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
agentName: changeling-roundend-name
|
||||
definitions:
|
||||
- prefRoles: [ Changeling ]
|
||||
max: 5
|
||||
playerRatio: 10
|
||||
max: 4
|
||||
playerRatio: 30
|
||||
lateJoinAdditional: true
|
||||
mindRoles:
|
||||
- MindRoleChangeling
|
||||
|
|
|
|||
|
|
@ -178,3 +178,12 @@
|
|||
antagPrototype: Zombie
|
||||
exclusiveAntag: true
|
||||
- type: ZombieRole
|
||||
|
||||
- type: entity
|
||||
parent: BaseMindRoleAntag
|
||||
id: MindRoleChangeling
|
||||
name: Changeling Role
|
||||
components:
|
||||
- type: MindRole
|
||||
antagPrototype: Changeling
|
||||
- type: ChangelingRole
|
||||
|
|
|
|||
35
Resources/Prototypes/_Sunrise/Roles/MindRoles/mind_roles.yml
Normal file
35
Resources/Prototypes/_Sunrise/Roles/MindRoles/mind_roles.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
- type: entity
|
||||
parent: BaseMindRoleAntag
|
||||
id: MindRoleTerminator
|
||||
name: Terminator Role
|
||||
components:
|
||||
- type: MindRole
|
||||
antagPrototype: Changeling
|
||||
- type: TerminatorRole
|
||||
|
||||
- type: entity
|
||||
parent: BaseMindRoleAntag
|
||||
id: MindRoleEvilTwin
|
||||
name: Evil Twin Role
|
||||
components:
|
||||
- type: MindRole
|
||||
antagPrototype: Changeling
|
||||
- type: EvilTwinRole
|
||||
|
||||
- type: entity
|
||||
parent: BaseMindRoleAntag
|
||||
id: MindRoleFugitive
|
||||
name: Fugitive Role
|
||||
components:
|
||||
- type: MindRole
|
||||
antagPrototype: Changeling
|
||||
- type: FugitiveRole
|
||||
|
||||
- type: entity
|
||||
parent: BaseMindRoleAntag
|
||||
id: MindRolePlanetPrisoner
|
||||
name: Planet Prisoner Role
|
||||
components:
|
||||
- type: MindRole
|
||||
antagPrototype: Changeling
|
||||
- type: PlanetPrisonerRole
|
||||
Loading…
Add table
Reference in a new issue