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

cannot load "Tokens" mod #61

Open
gehoernchen opened this issue Aug 9, 2024 · 1 comment
Open

cannot load "Tokens" mod #61

gehoernchen opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gehoernchen
Copy link

gehoernchen commented Aug 9, 2024

Hi, I seem to have discovered a bug in the entrypoint stemming from a not-ideally-written Terraria mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2789445751

The mod is included in the TMOD_ENABLEDMODS env var but ends up not being loaded. I think the mechanic used in the entrypoint that finds the tmod files does not work here.

Contents of the mod's directory after it being downloaded:

drwxr-xr-x 1 root root  296 Aug  9 17:35 .
drwxr-xr-x 1 root root  360 Aug  9 17:42 ..
drwxr-xr-x 1 root root   22 Aug  9 17:35 2022.9
drwxr-xr-x 1 root root   22 Aug  9 17:35 2023.12
drwxr-xr-x 1 root root   22 Aug  9 17:35 2024.1
drwxr-xr-x 1 root root   22 Aug  9 17:35 2024.4
-rwxr-xr-x 1 root root   67 Aug  9 17:35 build.txt
-rwxr-xr-x 1 root root  284 Aug  9 17:35 description.txt
drwxr-xr-x 1 root root  782 Aug  9 17:35 DropConditions
-rwxr-xr-x 1 root root  886 Aug  9 17:35 icon.png
drwxr-xr-x 1 root root 2242 Aug  9 17:35 Items
drwxr-xr-x 1 root root   36 Aug  9 17:35 NPCs
drwxr-xr-x 1 root root  260 Aug  9 17:35 obj
drwxr-xr-x 1 root root   38 Aug  9 17:35 Properties
drwxr-xr-x 1 root root   32 Aug  9 17:35 Systems
-rwxr-xr-x 1 root root   87 Aug  9 17:35 Tokens.cs
-rwxr-xr-x 1 root root  513 Aug  9 17:35 Tokens.csproj
-rwxr-xr-x 1 root root 1117 Aug  9 17:35 Tokens.sln
drwxr-xr-x 1 root root   12 Aug  9 17:35 .vs
-rwxr-xr-x 1 root root  235 Aug  9 17:35 workshop.json

This leads to the entrypoint script, while collecting all mods, to collecting gibberish for this mod, because modname=$(ls -1 $(ls -d $modpath/$LINE/*/|tail -n 1) | sed -e 's/\.tmod$//') returns RecipeCreator.cs.

This is part of the entrypoint output:

[SYSTEM] Enabling 2789445751...
[SYSTEM] Enabled Debug
Tokens.csproj.nuget.dgspec.json
Tokens.csproj.nuget.g.props
Tokens.csproj.nuget.g.targets
project.assets.json
project.nuget.cache (2789445751)

This mod is then after that not being included during the "Finding Mods" phase and after that, leading to it not being loaded.

@JACOBSMILE
Copy link
Owner

Thanks for the pull request to help fix this. I will review and integrate into my next set of updates.

@JACOBSMILE JACOBSMILE self-assigned this Sep 1, 2024
@JACOBSMILE JACOBSMILE added the bug Something isn't working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants