@@ -248,7 +248,7 @@ public boolean hasEnv(int env){
248248 }
249249
250250 public float buildRadius (Team team ){
251- return enemyCoreBuildRadius + teams .get (team ).extraCoreBuildRadius ;
251+ return ! teams . get ( team ). protectCores ? 0f : enemyCoreBuildRadius + teams .get (team ).extraCoreBuildRadius ;
252252 }
253253
254254 public float unitBuildSpeed (Team team ){
@@ -299,6 +299,10 @@ public boolean isBanned(UnitType unit){
299299 public static class TeamRule {
300300 /** Whether, when AI is enabled, ships should be spawned from the core. TODO remove / unnecessary? */
301301 public boolean aiCoreSpawn = true ;
302+ /** Whether the core no-build radius/polygonal protection applies to this team, unprotected teams are ignored by team assigner */
303+ public boolean protectCores = true ;
304+ /** Whether the placeRangeCheck applies to this team */
305+ public boolean checkPlacement = true ;
302306 /** If true, blocks don't require power or resources. */
303307 public boolean cheat ;
304308 /** If true, the core is always filled to capacity with all items. */
@@ -345,8 +349,18 @@ public static class TeamRule{
345349 /** Extra spacing added to the no-build zone around the core. */
346350 public float extraCoreBuildRadius = 0f ;
347351
348-
349352 //build cost disabled due to technical complexity
353+
354+ //for reading from json
355+ public TeamRule (){
356+ }
357+
358+ public TeamRule (Team team ){
359+ if (team == Team .derelict ){
360+ protectCores = false ;
361+ checkPlacement = false ;
362+ }
363+ }
350364 }
351365
352366 /** A simple map for storing TeamRules in an efficient way without hashing. */
@@ -355,7 +369,7 @@ public static class TeamRules implements JsonSerializable{
355369
356370 public TeamRule get (Team team ){
357371 TeamRule out = values [team .id ];
358- return out == null ? (values [team .id ] = new TeamRule ()) : out ;
372+ return out == null ? (values [team .id ] = new TeamRule (team )) : out ;
359373 }
360374
361375 @ Override
0 commit comments