Update bouncer for 1.4.5 (basic)#3173
Conversation
…alidation to prevent abnormal
…sequent validations
This reverts commit 647e8ab.
fc7c978 to
c497f38
Compare
| } | ||
| }); | ||
|
|
||
| PlaceStyleCorrectors.Add(TileID.Grass, // it's TileID.ImmatureHerbs actually... |
There was a problem hiding this comment.
The key of PlaceStyleCorrectors is selectedItem.createTile (actualTileToBeCreated). In this case, it is TileID.Grass, but the requested tile is TileID.ImmatureHerbs.
| // 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Sorry, it seems my IDE automatically removed those strange spaces
| } | ||
| } | ||
|
|
||
| // Acorn Slingshot can only place saplings, reject any other tile placement |
There was a problem hiding this comment.
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), | |||
There was a problem hiding this comment.
Magic numbers in these args aren't very readable.
| args.Handled = true; | ||
| return; | ||
| } | ||
| // Handle placement action for Regrowth tools to ensure they only replant herbs on valid containers. |
There was a problem hiding this comment.
This and maybe other existing code ought to go in a helper method.
| } | ||
| } | ||
| else if (type == TileID.KiteAnchor) | ||
| { |
There was a problem hiding this comment.
Also here. This method is overall too long.
03cd1a0 to
88c3ab6
Compare
|
@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. |
|
No objections, looks good to me for now. |
|
No objections on the functionality. |
Update bouncer for 1.4.5 (basic)
Thanks to @xuyuwtu @Cjx8848 @1242509682 (WindFrost-CSFT/TShock).
Note
Test Needed