Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Edits/BiomeGlobeDetour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ public override void UnloadEdits()

private static void Recipe_FindRecipes(OnRecipe.orig_FindRecipes orig, bool canDelayCheck)
{
if (Main.dedServ)
return;
Comment on lines +24 to +25
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

Copy link
Author

Choose a reason for hiding this comment

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

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

That's not overrided in the Edit class so I assumed the authors didn't want it this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why would Edit need to override it?

Copy link
Author

Choose a reason for hiding this comment

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

So inheriting classes could implement it...?

Copy link
Contributor

@ExterminatorX99 ExterminatorX99 Sep 2, 2022

Choose a reason for hiding this comment

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

IsLoadingEnabled is a virtual method on ILoadable
Edit implements ILoadable, therefore IsLoadingEnabled is available to override in Edit and classes that inherit from Edit

Player player = Main.LocalPlayer;

bool oldGraveyard = player.ZoneGraveyard;
bool oldSnow = player.ZoneSnow;
bool oldNearCampfire = player.adjTile[TileID.Campfire];
Expand Down