mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Rename set/getCameraShakeLevel to set/getCameraDrunkLevel

Open Unde-R opened this issue 5 years ago • 11 comments

In addition to what Lpsd said in #1197 I renamed: Both ( setCameraShakeLevel & getCameraShakeLevel ) to ( setCameraDrunkLevel & getCameraDrunkLevel )

Unde-R avatar Aug 22 '20 17:08 Unde-R

There are other things you need to do when renaming functions, like:

  • keeping the original name around
  • marking the old name as deprecated, so it can be auto upgraded

I'll write some documentation for this and send you a link here.

qaisjp avatar Aug 22 '20 18:08 qaisjp

Sure thing mate

Unde-R avatar Aug 22 '20 18:08 Unde-R

Instructions added here: https://github.com/multitheftauto/mtasa-blue/wiki/Lua-API#how-to-rename-functions

qaisjp avatar Aug 22 '20 20:08 qaisjp

Feel free to request any other changes ^^

Unde-R avatar Aug 22 '20 22:08 Unde-R

https://github.com/multitheftauto/mtasa-blue/blob/15b2ec72367c1a4226b5afebb7d38b113ca34022/Server/mods/deathmatch/logic/CResourceChecker.Data.h#L211 How I can get the current version so I can add it here?

Unde-R avatar Aug 28 '20 22:08 Unde-R

This is the number that appears on https://buildinfo.mtasa.com.

The number increments per-commit, but only appears on the website after the next nightly is built.

So, unfortunately this is multi-step. (Which is why everyone forgets about it.)

This one needs to get merged, then you need to wait a day, and then you need to send a PR with the version number.

(But we probably won't merge this before 1.5.8? I don't know.)

qaisjp avatar Aug 29 '20 12:08 qaisjp

Ah alright ty

Unde-R avatar Aug 29 '20 12:08 Unde-R

I'm not quite sure whats the problem with shake level?

Pirulax avatar Dec 06 '20 09:12 Pirulax

I'm not quite sure whats the problem with shake level?

Well gta named it drunkLevel

Unde-R avatar Dec 06 '20 09:12 Unde-R

thnx for the commits @StrixG

Unde-R avatar Dec 06 '20 09:12 Unde-R

Well okay. I'm not quite sure if the old function needs to be deprecated tho. They both achieve the same thing. Its like std::string::length() and std::string::size() they achieve the same thing, but have different names for convenience. Perhaps we could keep both functions?

Pirulax avatar Dec 06 '20 09:12 Pirulax