Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Stardew Valley 1.2, streamline build process, and simplify code #2

Merged
merged 8 commits into from Apr 28, 2017
Merged

Update for Stardew Valley 1.2, streamline build process, and simplify code #2

merged 8 commits into from Apr 28, 2017

Conversation

Pathoschild
Copy link
Contributor

@Pathoschild Pathoschild commented Apr 25, 2017

GateOpener doesn't work in the latest version of SMAPI. Players see this error:

A mod failed handling the GameEvents.FourthUpdateTick event:
System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<Microsoft.Xna.Framework.Vector2> StardewValley.Character.getAdjacentTiles()'.
at GateOpener.GateOpenerMainClass.Event_Update(Object sender, EventArgs e)
at StardewModdingAPI.Framework.InternalExtensions.SafelyRaisePlainEvent(IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, EventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 46

This pull request mainly...

  • Updates the code for Stardew Valley 1.2.
  • Formats and simplifies the code a bit (e.g. using SMAPI features or C# 7 where possible).
  • Migrates the project to the mod build package.
    This automates references (so we no longer need to change reference paths in the .csproj), lets us compile the mod on Linux/Mac/Windows without changes, and simplifies debugging from Visual Studio.
  • Switches to a build task to automatically package the mod into the Mods folder that works on Linux/Mac/Windows.
  • Updates and expands the readme.

If the changes all look good, can you release GateOpener-1.1.zip for players to use?

@mralbobo
Copy link
Owner

You missing a local commit by any chance?
Does not compile...

@Pathoschild
Copy link
Contributor Author

@mralbobo What error are you getting?

@mralbobo
Copy link
Owner

mralbobo commented Apr 28, 2017

Quite a few actually, mostly syntax errors.

The first one:
Severity Code Description Project File Line Suppression State
Error CS1003 Syntax error, ',' expected GateOpener C:\Users\mralbobo\repos\GateOpener\ChestPooling\GateOpenerMain.cs 50 Active

if (!location.objects.TryGetValue(pos, out StardewValley.Object obj))

Don't think this is valid syntax (I could be wrong, but it is complaining...):
if (Game1.currentLocation is BuildableGameLocation location)

@Pathoschild
Copy link
Contributor Author

It sounds like you don't have Visual Studio 2017 (or an equivalent IDE on Linux/Mac), so you can't compile C# 7. Do you want me to add a commit to remove any C# 7 features?

@mralbobo
Copy link
Owner

I'll update from 2015 first and see how that goes...

@mralbobo
Copy link
Owner

That did it. Also did terrible terrible git things (rewriting history).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants