@@ -34,7 +34,7 @@ You should have received a copy of the GNU General Public License
34
34
using System ;
35
35
using SilicaAdminMod ;
36
36
37
- [ assembly: MelonInfo ( typeof ( HQlessHumansLose ) , "[Si] HQless Humans Lose" , "1.2.8 " , "databomb" , "https://github.com/data-bomb/Silica" ) ]
37
+ [ assembly: MelonInfo ( typeof ( HQlessHumansLose ) , "HQless Humans Lose" , "1.2.9 " , "databomb" , "https://github.com/data-bomb/Silica" ) ]
38
38
[ assembly: MelonGame ( "Bohemia Interactive" , "Silica" ) ]
39
39
[ assembly: MelonOptionalDependencies ( "Admin Mod" ) ]
40
40
@@ -76,7 +76,7 @@ static void HandleTimerSendLostMessage(object? source, ElapsedEventArgs e)
76
76
lostMessageTimerExpired = true ;
77
77
}
78
78
79
- public static bool OneFactionEliminated ( )
79
+ public static bool OneFactionAlreadyEliminated ( )
80
80
{
81
81
int TeamsWithMajorStructures = 0 ;
82
82
for ( int i = 0 ; i < Team . Teams . Count ; i ++ )
@@ -89,13 +89,13 @@ public static bool OneFactionEliminated()
89
89
}
90
90
}
91
91
92
- if ( TeamsWithMajorStructures < 3 )
92
+ if ( TeamsWithMajorStructures < 2 )
93
93
{
94
- MelonLogger . Msg ( "OneFactionEliminated : true" ) ;
94
+ MelonLogger . Msg ( "OneFactionAlreadyEliminated : true" ) ;
95
95
return true ;
96
96
}
97
97
98
- MelonLogger . Msg ( "OneFactionEliminated : false" ) ;
98
+ MelonLogger . Msg ( "OneFactionAlreadyEliminated : false" ) ;
99
99
return false ;
100
100
}
101
101
@@ -107,7 +107,7 @@ public static void EliminateTeam(Team team)
107
107
MelonLogger . Msg ( "Eliminating team " + team . TeamName + " on versus mode " + versusMode . ToString ( ) ) ;
108
108
109
109
// are there still two remaining factions after this one is eliminated?
110
- if ( versusMode == MP_Strategy . ETeamsVersus . HUMANS_VS_HUMANS_VS_ALIENS && ! OneFactionEliminated ( ) )
110
+ if ( versusMode == MP_Strategy . ETeamsVersus . HUMANS_VS_HUMANS_VS_ALIENS && ! OneFactionAlreadyEliminated ( ) )
111
111
{
112
112
// destroy structures
113
113
for ( int i = 0 ; i < team . Structures . Count ; i ++ )
@@ -146,6 +146,8 @@ private static void DestroyAllUnits(Team team)
146
146
// introduce a delay so clients can see chat message after round ends
147
147
private static void DelayTeamLostMessage ( Team team )
148
148
{
149
+ MelonLogger . Msg ( "Starting delay lost timer for team " + team . TeamName ) ;
150
+
149
151
lostMessageTimerExpired = false ;
150
152
losingTeam = team ;
151
153
@@ -238,6 +240,8 @@ private static void Postfix(ConstructionSite __instance, bool __0)
238
240
return ;
239
241
}
240
242
243
+ MelonLogger . Msg ( "Structure construction destroyed: " + __instance . name ) ;
244
+
241
245
Team constructionSiteTeam = __instance . Team ;
242
246
String rootStructureMatchText = GetRootStructurePrefix ( constructionSiteTeam ) ;
243
247
if ( ! __instance . ToString ( ) . Contains ( rootStructureMatchText ) )
@@ -295,7 +299,7 @@ private static void Postfix(Team __instance)
295
299
#endif
296
300
private static class ApplyPatch_GetHasLost
297
301
{
298
- private static void Postfix ( StrategyTeamSetup __instance , bool __result )
302
+ private static void Postfix ( StrategyTeamSetup __instance , ref bool __result )
299
303
{
300
304
// only spend the CPU if the team is about to lose
301
305
if ( __result == true && GameMode . CurrentGameMode . GameOngoing )
@@ -316,7 +320,7 @@ private static void Postfix(StrategyTeamSetup __instance, bool __result)
316
320
#endif
317
321
private static class ApplyPatch_GetHasAnyMajorStructures
318
322
{
319
- private static void Postfix ( Team __instance , bool __result )
323
+ private static void Postfix ( Team __instance , ref bool __result )
320
324
{
321
325
// only spend the CPU if the team is about to lose
322
326
if ( __result == false && GameMode . CurrentGameMode . GameOngoing )
@@ -383,6 +387,8 @@ private static void Postfix(MP_Strategy __instance, Structure __0, EDamageType _
383
387
return ;
384
388
}
385
389
390
+ MelonLogger . Msg ( "Structure destroyed: " + __0 . name ) ;
391
+
386
392
Team structureTeam = __0 . Team ;
387
393
if ( structureTeam == null )
388
394
{
0 commit comments