Skip to content

Add missing documentation for all the shared hooks (and some other) + Fix some inaccuracies #482

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Winkarst-cpu
Copy link
Contributor

No description provided.

Copy link
Contributor

@Fer3D Fer3D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Do not change or delete existing hook names; it can break a lot of code.

@Winkarst-cpu
Copy link
Contributor Author

🚫 Do not change or delete existing hook names; it can break a lot of code.

Will see what Alex will say because having two different hook names with completely same meaning is bad.

@offlegaz2
Copy link
Contributor

🚫 Do not change or delete existing hook names; it can break a lot of code.

Will see what Alex will say because having two different hook names with completely same meaning is bad.

Imagine developer writing plugin for Helix with use of area hooks and then updating his framework after your commit. What will be his reaction?

@Lucasgood5
Copy link
Contributor

🚫 Do not change or delete existing hook names; it can break a lot of code.

Will see what Alex will say because having two different hook names with completely same meaning is bad.

Imagine developer writing plugin for Helix with use of area hooks and then updating his framework after your commit. What will be his reaction?

Exactly.

@Winkarst-cpu
In case we would want to change this hook, We may wanna left it but tag it as depreacated for some while before removing it.
could simply by adding documentation and an ErrorNoHaltWithStack("___ is decreacated, use ___ instead").

Comment on lines -660 to -662
--- @realm client
function OnAreaChanged(oldID, newID)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--- @realm client
function OnAreaChanged(oldID, newID)
end
--- @realm client
--- @deprecated
function OnAreaChanged(oldID, newID)
end

function PLUGIN:OnAreaChanged(oldID, newID)
local client = LocalPlayer()
function PLUGIN:OnPlayerAreaChanged(client, oldID, newID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function PLUGIN:OnAreaChanged(oldID, newID)
local client = LocalPlayer()
function PLUGIN:OnPlayerAreaChanged(client, oldID, newID)
function PLUGIN:OnAreaChanged(oldID, newID)
local client = LocalPlayer()
ErrorNoHaltWithStack("OnAreaChanged(oldID, newID) is deprecated, use OnPlayerAreaChanged(client, oldID, newID) instead")
PLUGIN:OnPlayerAreaChanged(client, oldID, newID)
end
function PLUGIN:OnPlayerAreaChanged(client, oldID, newID)

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.

4 participants