Solaestas / Everglow

GNU General Public License v3.0
28 stars 4 forks source link

Add DevSteamID64 check #158

Closed Setnour6 closed 1 year ago

Setnour6 commented 1 year ago

because the test has succeeded, This PR has been created. This merges the Developer Steam Identification 64 method and overall function to master for the use of applying developer-only secrets or functions alongside any other declared SteamID64.

List<ulong> allDevSteamID64 = EverglowConfig.GetDevSteamID64();
if (SteamID64 == 76561198074262598 /*Cataclysmic Armageddon*/ || allDevSteamID64.Contains(SteamID64) && EverglowConfig.DebugMode)
{
    Main.NewText("Cataclysmic Armageddon's Long Lost Older Cousin Calamatious Annihilation the Corrupted Moth " + $"{Language.GetTextValue(Language.GetTextValue("Mods.Everglow.Common.Message.HasAwoken"))}", 175, 75, 255);
}
else
{
    Main.NewText($"{Language.GetTextValue("Mods.Everglow.NPCName.CorruptMoth")} {Language.GetTextValue("Mods.Everglow.Common.Message.HasAwoken")}", 175, 75, 255);
}

This code allows for gathering all listed Steam IDs efficiently, without Main.NewText being called upon multiple times.

Solaestas commented 1 year ago

I dislike checking SteamID

Setnour6 commented 1 year ago

I dislike checking SteamID

How come? Do you prefer config toggles instead?

Solaestas commented 1 year ago

because I think it's useless and may cause unexpected bugs varying with people. If you want to implement a debug-only function for testing, you can just build a special version, so there is no need to check SteamID or make config toggles. I can't figure out any benefits except for cheating in games after publishing

Setnour6 commented 1 year ago

because I think it's useless and may cause unexpected bugs varying with people.

Oh. When I tested it with Cataclysmic Armageddon's Secret, there weren't any bugs, but I see how other secret implementations may cause bugs.

If you want to implement a debug-only function for testing, you can just build a special version, so there is no need to check SteamID or make config toggles.

I do not know how to make a special version of a function for debugging. You can do it if you want to so the secret can be fully implemented with no issues.

I can't figure out any benefits except for cheating in games after publishing

I do not want the implementation to be used for cheating purposes, but I see how that could happen.

lace-wing commented 1 year ago

For your info, using SteamID can lead to potential security issues, as it's not exposed by Steam directly. And not all devs agreed to put their SteamID in a public place. In fact I didn't see you asking me or any of the devs for approvals.

If you want to show appreciation of someone, you can:

Setnour6 commented 1 year ago

For your info, using SteamID can lead to potential security issues, as it's not exposed by Steam directly. And not all devs agreed to put their SteamID in a public place.

I found the IDs on the profile URL on the Steam website, including mine. I didn't know that SteamIDs lead to security issues.

In fact I didn't see you asking me or any of the devs for approvals.

Sorry.

If you want to show appreciation of someone, you can:

  • include it in mod desc
  • send a message to that person to express your thoughts

It has been done already, both the mod description and sending a private message, in this case to Cataclysmic Armageddon.

I guess what can happen is that I can go with the "if your username is "this", you will see or get "that"" approach, which makes it so the player's name can activate secrets or easter eggs (think of the Last Prism colours in Terraria based on developer and tester player names, or old Calamity Mod accessories that do something depending on the player name). That does mean that anyone with said names can access it, but there is less of a security issue.

Solaestas commented 1 year ago

to be honest, i dont want to check steamid mainly due to the fact that recently i encounter a disastrous bug in another mod about steamid. the different behaviors between developer and player may cause some errors that are really hard to find(because it runs well for me but you keep crashing) and it is really useless, there are better alternatives

---Original--- From: @.> Date: Thu, May 11, 2023 23:52 PM To: @.>; Cc: "ye @.>;"State @.>; Subject: Re: [dfgasdfg/Everglow] Add DevSteamID64 check (PR #158)

For your info, using SteamID can lead to potential security issues, as it's not exposed by Steam directly. And not all devs agreed to put their SteamID in a public place.

I found the IDs on the profile URL on the Steam website, including mine.

In fact I didn't see you asking me or any of the devs for approvals.

Sorry.

If you want to show appreciation of someone, you can:

include it in mod desc

send a message to that person to express your thoughts

It has been done already, both the mod description and sending a private message, in this case to Cataclysmic Armageddon.

I guess what can happen is that I can go with the "if your username is "this", you will see or get "that"" approach, which makes it so the player's name can activate secrets or easter eggs (think of the Last Prism colours in Terraria based on developer and tester player names, or old Calamity Mod accessories that do something depending on the player name). That does mean that anyone with said names can access it, but there is less of a security issue.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

Setnour6 commented 1 year ago

to be honest, i dont want to check steamid mainly due to the fact that recently i encounter a disastrous bug in another mod about steamid. the different behaviors between developer and player may cause some errors that are really hard to find(because it runs well for me but you keep crashing) and it is really useless, there are better alternatives

The alternative I know is to have the secrets activate or apply to players that have the same name as the secret wants the name to be. If you have other alternatives or ideas to alternatives, please let me know.