Make creationrallypoints public. Required for custom rallypoint functionality

This commit is contained in:
Ivan Perez
2025-07-25 16:02:32 +09:00
committed by Matthias Mailänder
parent 07d3ab2613
commit 0c5e998e31

View File

@@ -178,7 +178,7 @@ namespace OpenRA.Mods.Common.Traits
readonly bool returnToCellOnCreation; readonly bool returnToCellOnCreation;
readonly bool returnToCellOnCreationRecalculateSubCell = true; readonly bool returnToCellOnCreationRecalculateSubCell = true;
readonly int creationActivityDelay; readonly int creationActivityDelay;
readonly CPos[] creationRallypoint; public readonly CPos[] CreationRallypoints;
#region IMove CurrentMovementTypes #region IMove CurrentMovementTypes
MovementType movementTypes; MovementType movementTypes;
@@ -301,7 +301,7 @@ namespace OpenRA.Mods.Common.Traits
} }
creationActivityDelay = init.GetValue<CreationActivityDelayInit, int>(0); creationActivityDelay = init.GetValue<CreationActivityDelayInit, int>(0);
creationRallypoint = init.GetOrDefault<RallyPointInit>()?.Value; CreationRallypoints = init.GetOrDefault<RallyPointInit>()?.Value;
} }
protected override void Created(Actor self) protected override void Created(Actor self)
@@ -1021,8 +1021,8 @@ namespace OpenRA.Mods.Common.Traits
Activity ICreationActivity.GetCreationActivity() Activity ICreationActivity.GetCreationActivity()
{ {
if (returnToCellOnCreation || creationRallypoint != null || creationActivityDelay > 0) if (returnToCellOnCreation || CreationRallypoints != null || creationActivityDelay > 0)
return new LeaveProductionActivity(self, creationActivityDelay, creationRallypoint, return new LeaveProductionActivity(self, creationActivityDelay, CreationRallypoints,
returnToCellOnCreation ? new ReturnToCellActivity(self, creationActivityDelay, returnToCellOnCreationRecalculateSubCell) : null); returnToCellOnCreation ? new ReturnToCellActivity(self, creationActivityDelay, returnToCellOnCreationRecalculateSubCell) : null);
return null; return null;