Adding a ton of funcitonality to the builder's movement and build queue
This commit is contained in:
parent
a63cce53e2
commit
f05734e19b
31 changed files with 3104 additions and 339 deletions
|
|
@ -17,25 +17,31 @@ namespace TD.Gameplay
|
|||
/// <para><b>Rejection messages.</b> These are the strings shown on screen when the
|
||||
/// server rejects a placement. Kept here so designers can tune the wording without
|
||||
/// touching code.</para>
|
||||
///
|
||||
/// <para><b>Note on build-site visuals.</b> The green queued-ghost material and the
|
||||
/// constructing-stage material live on the <c>BuildSiteVisual</c> prefab, not here.
|
||||
/// Those materials are prefab-local (the build-site visual prefab references them
|
||||
/// directly), so promoting them to a shared settings asset would just add an
|
||||
/// indirection without simplifying anything.</para>
|
||||
/// </remarks>
|
||||
[CreateAssetMenu(fileName = "TowerPlacementSettings",
|
||||
menuName = "TD/Tower Placement Settings",
|
||||
order = 3)]
|
||||
public class TowerPlacementSettings : ScriptableObject
|
||||
{
|
||||
// ----- Ghost visuals -----------------------------------------------
|
||||
// ----- Cursor ghost visuals ---------------------------------------
|
||||
|
||||
[Header("Ghost Materials")]
|
||||
[Tooltip("Material applied to the placement ghost when placement is valid. " +
|
||||
[Header("Cursor Ghost Materials")]
|
||||
[Tooltip("Material applied to the cursor placement ghost when placement is valid. " +
|
||||
"Should be a transparent/unlit white material so the tower mesh is " +
|
||||
"recognizable but clearly distinct from a placed tower.")]
|
||||
public Material GhostValidMaterial;
|
||||
|
||||
[Tooltip("Material applied to the placement ghost when placement is invalid. " +
|
||||
[Tooltip("Material applied to the cursor placement ghost when placement is invalid. " +
|
||||
"Should be a transparent/unlit red material.")]
|
||||
public Material GhostInvalidMaterial;
|
||||
|
||||
// ----- Rejection messages ------------------------------------------
|
||||
// ----- Rejection messages -----------------------------------------
|
||||
|
||||
[Header("Rejection Messages")]
|
||||
[Tooltip("Shown when the server rejects a placement because tiles belong to " +
|
||||
|
|
@ -47,8 +53,8 @@ namespace TD.Gameplay
|
|||
public string MessageTileNotBuildable = "That location is not buildable.";
|
||||
|
||||
[Tooltip("Shown when the server rejects because a tile is already occupied " +
|
||||
"by an existing tower.")]
|
||||
public string MessageTileOccupied = "A tower already occupies that location.";
|
||||
"by an existing tower or by a queued/constructing build job.")]
|
||||
public string MessageTileOccupied = "A tower is already there or queued there.";
|
||||
|
||||
[Tooltip("Shown when the server rejects because the player cannot afford " +
|
||||
"the tower.")]
|
||||
|
|
@ -62,6 +68,10 @@ namespace TD.Gameplay
|
|||
"all valid paths through the player's zone.")]
|
||||
public string MessageBlocksPath = "That placement would block the path.";
|
||||
|
||||
[Tooltip("Shown when the server rejects because the builder's queue is full. " +
|
||||
"Player must cancel pending jobs or wait for one to complete.")]
|
||||
public string MessageJobLimitReached = "Builder queue is full.";
|
||||
|
||||
[Tooltip("Shown for unexpected server-side errors (invalid tower type, etc.). " +
|
||||
"Should rarely appear in normal play.")]
|
||||
public string MessageServerError = "Placement failed. Please try again.";
|
||||
|
|
@ -81,6 +91,7 @@ namespace TD.Gameplay
|
|||
case PlacementRejectionReason.InsufficientGold: return MessageInsufficientGold;
|
||||
case PlacementRejectionReason.OutOfRange: return MessageOutOfRange;
|
||||
case PlacementRejectionReason.BlocksPath: return MessageBlocksPath;
|
||||
case PlacementRejectionReason.JobLimitReached: return MessageJobLimitReached;
|
||||
case PlacementRejectionReason.InvalidTowerType:
|
||||
case PlacementRejectionReason.ServerError:
|
||||
default: return MessageServerError;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue