-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add player contributed bounties #1112
base: master
Are you sure you want to change the base?
Conversation
@LoneWolfHT How to get and set player rankings? |
https://github.com/MT-CTF/capturetheflag/blob/master/mods/ctf/ctf_modebase/features.lua#L145 and |
@LoneWolfHT Not done yet but code review is welcome |
@LoneWolfHT It's ready. |
what abount bunties for a specific kill type? for example a bounty of 100 score if you kill binshady with a torch (maybe even across matches?) |
Such kills are easily achievable by non-noob players and specially experienced players. You simply make them 1HP with your sword and do the last hit with a flower or ladder or stick or whatever. |
@LoneWolfHT When will be the test session for this? |
Probably in a week or so unless my current work is much easier than expected |
I might be able to launch a test server myself. |
Why? |
It can be easily abused for things like rank farming, and mis-typing can be devastating to your rank |
Then maybe put a limit but still use the universal ranking score? |
With donations I opted to use the match score instead, I'd prefer if that convention was followed |
okay will do but I'm busy with other stuff for now. |
@LoneWolfHT PR is ready |
local current_mode = ctf_modebase:get_current_mode() | ||
for _, bounties in pairs(ctf_modebase.contributed_bounties) do | ||
for bounty_donator, bounty_amount in pairs(bounties["contributors"]) do | ||
current_mode.recent_rankings.add(bounty_donator, {score=bounty_amount}, true) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you returning the score to them before it's added to their main rankings? This is something I'll check in the final review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think so xD
Some things are still not resolved, and you committed a submodule change before pushing your changes again |
I did the remaining suggestions as well. Please let me know which one is still left. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You haven't resolved all of the conversations yet. It's hard for me to find new problems when I'm noticing old ones
Missed the last part of this. You don't waste my time by taking a while to fix things, and the PR isn't urgent, so don't feel rushed. |
Yeah I'd say so and GH's UI is not very good for such these stuff IMO.
Ah I feel rushed because I want to have the fun in game :) But I guess I should slow down if I am to do it right and well. |
Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
If you rebase this I think it's ready for a testing session |
This PR aims to add player contributed bounties(with10% fee). Task list:
/list_bounty