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

Darkrp changes remove same named functions even if they're not from the darkrp lib #1983

Open
wrefgtzweve opened this issue Jan 18, 2025 · 2 comments · May be fixed by #1990
Open

Darkrp changes remove same named functions even if they're not from the darkrp lib #1983

wrefgtzweve opened this issue Jan 18, 2025 · 2 comments · May be fixed by #1990
Labels

Comments

@wrefgtzweve
Copy link
Contributor

I was trying to make my own ply:getMoney function for a sf currency integration with SF, it works but it gets automatically removed from the documentation as the docs don't explicitly check if the doc was from darkrp or another library

local ent_methods = docs.Types.Entity.methods
ent_methods.doorIndex = nil
ent_methods.isLocked = nil
ent_methods.getDoorOwner = nil
ent_methods.getKeysTitle = nil
ent_methods.isDoor = nil
ent_methods.isKeysOwned = nil
ent_methods.isKeysOwnedBy = nil
ent_methods.isMoneyBag = nil
ent_methods.getMoneyAmount = nil
ent_methods.getShipmentCount = nil
ent_methods.getShipmentContentsIndex = nil
ent_methods.getShipmentContents = nil
local ply_methods = docs.Types.Player.methods
ply_methods.keysUnOwnAll = nil
ply_methods.teamBanTimeLeft = nil
ply_methods.requestMoney = nil
ply_methods.giveMoney = nil
ply_methods.isInRoom = nil
ply_methods.canAfford = nil
ply_methods.canKeysLock = nil
ply_methods.canKeysUnlock = nil
ply_methods.getDarkRPVar = nil
ply_methods.getJobTable = nil
ply_methods.getPocketItems = nil
ply_methods.getWantedReason = nil
ply_methods.hasDarkRPPrivilege = nil
ply_methods.isArrested = nil
ply_methods.isChief = nil
ply_methods.isCook = nil
ply_methods.isCP = nil
ply_methods.isHitman = nil
ply_methods.isMayor = nil
ply_methods.isMedic = nil
ply_methods.isWanted = nil
ply_methods.getMoney = nil

@thegrb93
Copy link
Owner

I don't like the darkrp methods being entity methods in the first place. getMoney should've been darkrp.getMoney(ply). I'd suggest doing that for yours too so there aren't function name clashes

@thegrb93
Copy link
Owner

We could update the darkrp lib to change the entity methods to darkrp methods.

@thegrb93 thegrb93 added the bug label Jan 19, 2025
@thegrb93 thegrb93 linked a pull request Jan 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants