-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
adds /atom/proc/get_mob_owner() + blocks a delayed possession of item that's possessed by a player already #9128
Conversation
Fix to do:
|
Ready for review |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
code/modules/mob/inventory.dm
Outdated
@@ -209,7 +209,11 @@ | |||
return FALSE | |||
|
|||
//Puts the item into our active hand if possible. returns TRUE on success. | |||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE) | |||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE, offered=FALSE) | |||
if(!offered) // check if a clicked item is in possession of someone already unless it's offered. |
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.
this seems like a rather snowflake check for something used twice vs a proc used hundreds of places. just add this check to places setting offered = true instead.
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 wanted a cleaner way, but I couldn't find anything better than adding this snowflake because of how offer code works.
code/modules/mob/inventory.dm
Outdated
@@ -209,7 +209,11 @@ | |||
return FALSE | |||
|
|||
//Puts the item into our active hand if possible. returns TRUE on success. | |||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE) | |||
/mob/proc/put_in_active_hand(obj/item/I, forced = FALSE, ignore_animation = TRUE, offered=FALSE) | |||
if(!offered) // check if a clicked item is in possession of someone already unless it's offered. |
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.
Put in nactive hand should simply put the item in your active hand and not do any of this. Add the logic to offering instead.
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 really want to do a fancier way, but offer code isn't really compatible well with this.
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.
Needs to be done a better way that is more modularised and contained
I reversed TRUE and FALSE, and renamed it to |
and this really needs testmerge. The code is simple, but it affects extremely large amount of the game play, and I can't simulate all because of the excessive amount of the proc uses |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Neither of the outstanding reviews have been sufficiently addressed imo Marking as stale and adding a key as well since both requests for this are months old and the coder has not found a way to fulfil the request. 🔑 |
About The Pull Request
Bad news to players having high ping, but you'll no longer steal an item with your graced latency!
NOTE: This might need testmerge.
This is a simple code, but inherently affects the whole game in major scale.
Why It's Good For The Game
something... that shouldn't be a thing.
Testing Photographs and Procedure
Screenshots&Videos
get_mob_owner()
proc logic. (full track case)You have no issue to grab a thing
EMP is fine. (chameleon code change)
Note: I can't provide actual testing evidence because it needs two players to test.
Changelog
🆑
code: adds /atom/proc/get_mob_owner() - this returns a mob that possesses an atom (usually an item).
balance: Players with high latency will no longer be in favour of the latency grace. When an item is clicked by two players and it's held by a player's hand already, the another player (who has a high ping) will not steal the item immediately.
/:cl: