tModLoader / tModLoader.CodeAssist

Analyzer providing common tModLoader-modding-specific code fixes
MIT License
5 stars 3 forks source link

Typo on `ChangeMagicNumberToID` for 1910 ItemID `EldMelter` but should be `ElfMelter` #15

Open Setnour6 opened 1 year ago

Setnour6 commented 1 year ago

Version

Latest 1.4.4-preview

OS

Windows

Platform

Steam

This bug affects

Mod capability as a Modder

Description

Nothing serious, this is pretty self-explanatory.

image

ELD? it's actually ELF.

Log File

not required

Steps to reproduce

  1. make a mod item
  2. do something like this maybe: image or just make something using item IDs but the number instead of ItemID.ThisItem or something like that.

Expected Behavior

The magic number changing works and nothing else happens

Actual Behavior

the magic changing works but I receive error CS0117 ItemID does not contain a definition for EldMelter

Reproduction frequency

100% of the time

Additional Information

I can't access that information, so I can't change it myself

JavidPack commented 1 year ago

I've moved this to the CodeAssist github.

It's a bit annoying to fix because it used to be EldMelter and CodeAssist is supposed to work for multiple versions of tModLoader, but that will probably have to change.

Setnour6 commented 1 year ago

I've moved this to the CodeAssist github.

It's a bit annoying to fix because it used to be EldMelter and CodeAssist is supposed to work for multiple versions of tModLoader, but that will probably have to change.

You could implement a check to see which version of tModLoader is being used by the modder. If it's 1.4, then EldMelter should be changed to ElfMelter. I haven't used tModLoader 1.3 in a long time so I might need to test the magic number to ID thing there and see which case of El[?]Melter it leads to.

JavidPack commented 1 year ago

I've moved this to the CodeAssist github. It's a bit annoying to fix because it used to be EldMelter and CodeAssist is supposed to work for multiple versions of tModLoader, but that will probably have to change.

You could implement a check to see which version of tModLoader is being used by the modder. If it's 1.4, then EldMelter should be changed to ElfMelter. I haven't used tModLoader 1.3 in a long time so I might need to test the magic number to ID thing there and see which case of El[?]Melter it leads to.

There is already code for 1.3 vs 1.4. I just checked and the ElfMelter typo was fixed in 1.4.4, so it's still EldMelter in 1.4.3, so that's the issue. I'm not sure what options are available to check 1.4.3 vs 1.4.4

Setnour6 commented 1 year ago

I've moved this to the CodeAssist github. It's a bit annoying to fix because it used to be EldMelter and CodeAssist is supposed to work for multiple versions of tModLoader, but that will probably have to change.

You could implement a check to see which version of tModLoader is being used by the modder. If it's 1.4, then EldMelter should be changed to ElfMelter. I haven't used tModLoader 1.3 in a long time so I might need to test the magic number to ID thing there and see which case of El[?]Melter it leads to.

There is already code for 1.3 vs 1.4. I just checked and the ElfMelter typo was fixed in 1.4.4, so it's still EldMelter in 1.4.3, so that's the issue. I'm not sure what options are available to check 1.4.3 vs 1.4.4

The only idea I have is to do the code for 1.4.3 vs 1.4.4 in almost the same manner as 1.4.3, assuming that simply changing the typo for 1.4.3 might lead to more issues. I'm just guessing, I have no experience with code assist here.

Since you mentioned that it's fixed in 1.4.4, and that this issue is for version 1.4.4-preview (or was at the time), I guess this issue can be closed? I can't decide since it's also an issue for 1.4.3 as of the time I replied here.

JavidPack commented 1 year ago

No, the issue persists. When I was talking about it being fixed in 1.4.4, I mean the typo was fixed in the 1.4.4 Terraria source, not in CodeAssist. CodeAssist still needs to be updated.

I'll get to it eventually.

Setnour6 commented 1 year ago

No, the issue persists. When I was talking about it being fixed in 1.4.4, I mean the typo was fixed in the 1.4.4 Terraria source, not in CodeAssist. CodeAssist still needs to be updated.

I get it now.

I'll get to it eventually.

Sounds good!