@@ -17,7 +17,7 @@ namespace Content.Server._ES.Auditions;
1717/// <summary>
1818/// This handles the server-side of auditioning!
1919/// </summary>
20- public sealed class AuditionsSystem : SharedAuditionsSystem
20+ public sealed class ESAuditionsSystem : ESSharedAuditionsSystem
2121{
2222 [ Dependency ] private readonly IRobustRandom _random = default ! ;
2323 [ Dependency ] private readonly MindSystem _mind = default ! ;
@@ -34,15 +34,15 @@ private void OnSpawnComplete(PlayerSpawnCompleteEvent ev)
3434 if ( ! _mind . TryGetMind ( ev . Mob , out var mind , out _ ) )
3535 return ;
3636
37- var cast = EnsureComp < StationCastComponent > ( ev . Station ) ;
37+ var cast = EnsureComp < ESStationCastComponent > ( ev . Station ) ;
3838 cast . Crew . Add ( mind ) ;
3939 }
4040
41- public Entity < MindComponent , CharacterComponent > GetRandomCharacterFromPool ( EntityUid station )
41+ public Entity < MindComponent , ESCharacterComponent > GetRandomCharacterFromPool ( EntityUid station )
4242 {
4343 var producer = GetProducer ( ) ;
4444
45- var cast = EnsureComp < StationCastComponent > ( station ) ;
45+ var cast = EnsureComp < ESStationCastComponent > ( station ) ;
4646
4747 if ( producer . UnusedCharacterPool . Count < producer . PoolRefreshSize )
4848 {
@@ -53,25 +53,25 @@ public Entity<MindComponent, CharacterComponent> GetRandomCharacterFromPool(Enti
5353 var weightedMembers = new Dictionary < EntityUid , float > ( ) ;
5454 foreach ( var castMember in producer . UnusedCharacterPool )
5555 {
56- if ( ! TryComp < CharacterComponent > ( castMember , out var characterComponent ) )
56+ if ( ! TryComp < ESCharacterComponent > ( castMember , out var characterComponent ) )
5757 continue ;
5858
5959 // arbitrary formula but good enough
6060 weightedMembers . Add ( castMember , 4 * MathF . Pow ( 4 , characterComponent . Relationships . Keys . Count ( k => cast . Crew . Contains ( k ) ) ) ) ;
6161 }
6262
6363 var ent = _random . PickAndTake ( weightedMembers ) ;
64- return ( ent , Comp < MindComponent > ( ent ) , Comp < CharacterComponent > ( ent ) ) ;
64+ return ( ent , Comp < MindComponent > ( ent ) , Comp < ESCharacterComponent > ( ent ) ) ;
6565 }
6666
6767 /// <summary>
6868 /// Hires a cast, and integrates relationships between all of the characters.
6969 /// </summary>
70- public void GenerateCast ( int count , ProducerComponent ? producer = null )
70+ public void GenerateCast ( int count , ESProducerComponent ? producer = null )
7171 {
7272 producer ??= GetProducer ( ) ;
7373
74- var preEvt = new PreCastGenerateEvent ( producer ) ;
74+ var preEvt = new ESPreCastGenerateEvent ( producer ) ;
7575 RaiseLocalEvent ( ref preEvt ) ;
7676
7777 var newCharacters = new List < EntityUid > ( ) ;
@@ -82,43 +82,43 @@ public void GenerateCast(int count, ProducerComponent? producer = null)
8282 newCharacters . Add ( newCrew ) ;
8383 }
8484
85- var psgEvt = new PostShipGenerateEvent ( producer ) ;
85+ var psgEvt = new ESPostShipGenerateEvent ( producer ) ;
8686 RaiseLocalEvent ( ref psgEvt ) ;
8787
8888 foreach ( var group in producer . SocialGroups )
8989 {
90- var comp = EnsureComp < SocialGroupComponent > ( group ) ;
90+ var comp = EnsureComp < ESSocialGroupComponent > ( group ) ;
9191 if ( comp . Integrated )
9292 continue ;
9393
9494 var ent = ( group , comp ) ;
9595
96- var pre = new SocialGroupPreIntegrationEvent ( ent ) ;
96+ var pre = new ESSocialGroupPreIntegrationEvent ( ent ) ;
9797 RaiseLocalEvent ( ref pre ) ;
9898
9999 IntegrateRelationshipGroup ( comp . RelativeContext , comp . Members ) ;
100100 comp . Integrated = true ;
101101
102- var post = new SocialGroupPostIntegrationEvent ( ent ) ;
102+ var post = new ESSocialGroupPostIntegrationEvent ( ent ) ;
103103 RaiseLocalEvent ( ref post ) ;
104104 }
105105
106106 IntegrateRelationshipGroup ( producer . IntercrewContext , newCharacters ) ;
107107
108- var postEvt = new PostCastGenerateEvent ( producer ) ;
108+ var postEvt = new ESPostCastGenerateEvent ( producer ) ;
109109 RaiseLocalEvent ( ref postEvt ) ;
110110 }
111111}
112112
113113[ ToolshedCommand , AdminCommand ( AdminFlags . Round ) ]
114114public sealed class CastCommand : ToolshedCommand
115115{
116- private AuditionsSystem ? _auditions ;
116+ private ESAuditionsSystem ? _auditions ;
117117
118118 [ CommandImplementation ( "generate" ) ]
119119 public IEnumerable < string > Generate ( int crewSize = 10 )
120120 {
121- _auditions ??= GetSys < AuditionsSystem > ( ) ;
121+ _auditions ??= GetSys < ESAuditionsSystem > ( ) ;
122122
123123 var stopwatch = new Stopwatch ( ) ;
124124 stopwatch . Start ( ) ;
@@ -131,8 +131,8 @@ public IEnumerable<string> Generate(int crewSize = 10)
131131 [ CommandImplementation ( "view" ) ]
132132 public IEnumerable < string > View ( [ PipedArgument ] EntityUid castMember )
133133 {
134- _auditions ??= GetSys < AuditionsSystem > ( ) ;
135- if ( ! EntityManager . TryGetComponent < CharacterComponent > ( castMember , out var character ) )
134+ _auditions ??= GetSys < ESAuditionsSystem > ( ) ;
135+ if ( ! EntityManager . TryGetComponent < ESCharacterComponent > ( castMember , out var character ) )
136136 {
137137 yield return "Invalid cast member object (did not have CharacterComponent)!" ;
138138 }
@@ -158,7 +158,7 @@ public IEnumerable<string> View([PipedArgument] EntityUid castMember)
158158 [ CommandImplementation ( "viewAll" ) ]
159159 public IEnumerable < string > ViewAll ( )
160160 {
161- _auditions ??= GetSys < AuditionsSystem > ( ) ;
161+ _auditions ??= GetSys < ESAuditionsSystem > ( ) ;
162162 var producer = _auditions . GetProducer ( ) ;
163163 foreach ( var character in producer . Characters )
164164 {
@@ -174,28 +174,28 @@ public IEnumerable<string> ViewAll()
174174/// Fires prior to this social group's relationships being integrated.
175175/// </summary>
176176[ ByRefEvent , PublicAPI ]
177- public readonly record struct SocialGroupPreIntegrationEvent ( Entity < SocialGroupComponent > Group ) ;
177+ public readonly record struct ESSocialGroupPreIntegrationEvent ( Entity < ESSocialGroupComponent > Group ) ;
178178
179179/// <summary>
180180/// Fires after this social group's relationships have been integrated.
181181/// </summary>
182- [ ByRefEvent ]
183- public readonly record struct SocialGroupPostIntegrationEvent ( Entity < SocialGroupComponent > Group ) ;
182+ [ ByRefEvent , PublicAPI ]
183+ public readonly record struct ESSocialGroupPostIntegrationEvent ( Entity < ESSocialGroupComponent > Group ) ;
184184
185185/// <summary>
186186/// Fires prior to any generation events (captain group, crew groups, etc).
187187/// </summary>
188- [ ByRefEvent ]
189- public readonly record struct PreCastGenerateEvent ( ProducerComponent Producer ) ;
188+ [ ByRefEvent , PublicAPI ]
189+ public readonly record struct ESPreCastGenerateEvent ( ESProducerComponent Producer ) ;
190190
191191/// <summary>
192192/// Fires after the primary generation events (captain group, crew group, etc) but before integration of relationships.
193193/// </summary>
194- [ ByRefEvent ]
195- public readonly record struct PostShipGenerateEvent ( ProducerComponent Producer ) ;
194+ [ ByRefEvent , PublicAPI ]
195+ public readonly record struct ESPostShipGenerateEvent ( ESProducerComponent Producer ) ;
196196
197197/// <summary>
198198/// Fires after all relationships have been integrated.
199199/// </summary>
200- [ ByRefEvent ]
201- public readonly record struct PostCastGenerateEvent ( ProducerComponent Producer ) ;
200+ [ ByRefEvent , PublicAPI ]
201+ public readonly record struct ESPostCastGenerateEvent ( ESProducerComponent Producer ) ;
0 commit comments