Skip to content

Update bouncer for 1.4.5 (basic)#3173

Merged
hakusaro merged 36 commits intoPryaxis:general-develfrom
ACaiCat:general-devel
Feb 21, 2026
Merged

Update bouncer for 1.4.5 (basic)#3173
hakusaro merged 36 commits intoPryaxis:general-develfrom
ACaiCat:general-devel

Conversation

@ACaiCat
Copy link
Copy Markdown
Member

@ACaiCat ACaiCat commented Feb 6, 2026

Update bouncer for 1.4.5 (basic)

Thanks to @xuyuwtu @Cjx8848 @1242509682 (WindFrost-CSFT/TShock).

Note

Test Needed

Comment thread TShockAPI/Bouncer.cs
}
});

PlaceStyleCorrectors.Add(TileID.Grass, // it's TileID.ImmatureHerbs actually...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this comment mean?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key of PlaceStyleCorrectors is selectedItem.createTile (actualTileToBeCreated). In this case, it is TileID.Grass, but the requested tile is TileID.ImmatureHerbs.

Comment thread TShockAPI/Bouncer.cs Outdated
Comment thread TShockAPI/Bouncer.cs Outdated
Comment thread TShockAPI/Bouncer.cs Outdated
Comment thread TShockAPI/Bouncer.cs Outdated
// we should not use the client's spawnpoint value. This is because the spawnpoint
// value is not saved on the client when SSC is enabled. Hence, we have to assert
// the server-saved spawnpoint value until we can detect that the player has changed
// we should not use the client's spawnpoint value. This is because the spawnpoint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary changes contaminate the diff and slow the review process down by making it larger and harder to understand and change. in the future, please consider not changing arbitrary / random things like spaces after comments

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it seems my IDE automatically removed those strange spaces

@ACaiCat ACaiCat marked this pull request as draft February 18, 2026 14:04
@ACaiCat ACaiCat marked this pull request as ready for review February 18, 2026 17:01
@hakusaro hakusaro requested a review from bartico6 February 18, 2026 17:46
Comment thread TShockAPI/Bouncer.cs Outdated
}
}

// Acorn Slingshot can only place saplings, reject any other tile placement
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies the item itself can place acorns. Shouldn't the existance of an acorn projectile at the requested coordinates be checked for instead? Similar to how rope placement from rope coils is checked. Checking held item can cause incorrect rejection if the player switches items before the acorn lands.

@@ -369,13 +369,15 @@ private MatchResult MatchRemoval(TSPlayer player, TileRect rect)
private static readonly TileRectMatch[] Matches = new TileRectMatch[]
{
TileRectMatch.Placement(2, 3, TileID.TargetDummy, 54, 36, 18, 18),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic numbers in these args aren't very readable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also everywhere else?

Comment thread TShockAPI/Bouncer.cs
args.Handled = true;
return;
}
// Handle placement action for Regrowth tools to ensure they only replant herbs on valid containers.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and maybe other existing code ought to go in a helper method.

Comment thread TShockAPI/Bouncer.cs
}
}
else if (type == TileID.KiteAnchor)
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here. This method is overall too long.

@hakusaro
Copy link
Copy Markdown
Member

@ZakFahey @lost-werewolf I'm inclined to merge this with the intent of revising it after e.g., improving code quality of Bouncer in general but I think this is probably a minimum viable changeset for initial support. If you have objections, please raise them in the next 24 hours from this post.

@lost-werewolf
Copy link
Copy Markdown
Contributor

lost-werewolf commented Feb 20, 2026

No objections, looks good to me for now.

@ZakFahey
Copy link
Copy Markdown
Contributor

No objections on the functionality.

@hakusaro hakusaro merged commit a67d60c into Pryaxis:general-devel Feb 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants