-
Notifications
You must be signed in to change notification settings - Fork 223
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
Barrel/well interaction rework. #4660
base: dev
Are you sure you want to change the base?
Conversation
Something has broken in the fill/pour interactions and now they aren't showing up on barrels. Augh. Issue for tomorrow. |
34a1b0b
to
c902464
Compare
c902464
to
bc7a147
Compare
DNM, need to check if this has clobbered hammer deconstruction. |
bc7a147
to
ec813f9
Compare
Ready to go. |
ec813f9
to
34331ff
Compare
…st for wells and barrels.
5ef919c
to
2a69ca1
Compare
// This is not ideal but I don't want to pass a callback through here as a param and call it. :( | ||
if(check_alt_interactions) | ||
if(!(choice.type in get_alt_interactions(user))) | ||
return TRUE | ||
else | ||
if(!(choice.type in get_standard_interactions(user))) | ||
return TRUE |
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.
maybe var/list/new_interactions = check_alt_interactions ? get_alt_interactions(user) : get_standard_interactions(user)
? that way you would only need one !(choice.type in new_interactions)
check. it wouldn't fix the coupling issue (it's a niche control flag) but it'd make the code marginally nicer
// This is not ideal but I don't want to pass a callback through here as a param and call it. :( | |
if(check_alt_interactions) | |
if(!(choice.type in get_alt_interactions(user))) | |
return TRUE | |
else | |
if(!(choice.type in get_standard_interactions(user))) | |
return TRUE | |
// This is not ideal but I don't want to pass a callback through here as a param and call it. :( | |
var/list/new_interactions = check_alt_interactions ? get_alt_interactions(user) : get_standard_interactions(user) | |
if(!(choice.type in new_interactions)) | |
return TRUE |
that said, it should probably use a callback, because someone might accidentally call it with standard interactions but use the alt interactions flag (or the opposite). but. meh. i might do it at some point
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 was not meant to be blocking, i was gonna approve until i noticed the soil plot thing
@@ -19,11 +19,6 @@ | |||
|
|||
var/obj/item/stack/material/brick/reinforced_with | |||
|
|||
/obj/machinery/portable_atmospherics/hydroponics/soil/get_alt_interactions(var/mob/user) | |||
. = ..() | |||
. -= /decl/interaction_handler/drink |
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.
was this moved? if so i can't find it, but you definitely shouldn't be able to wash your hands in or drink from a plot of soil. it's not got standing water, it's absorbed into the soil
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 I removed it thinking it was an addition. Will revert.
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.
still has wash hands. for that matter uhhh, i think all the reagent interactions except /decl/interaction_handler/empty_into
should be removed on this. that or can_be_poured_from
should return FALSE on soil trays, which should lead to uh. dip into and fill from being disabled. maybe wash hands should also check that and then we could pretty tidily solve it without needing a get_alt_interactions override at all?
@@ -19,11 +19,6 @@ | |||
|
|||
var/obj/item/stack/material/brick/reinforced_with | |||
|
|||
/obj/machinery/portable_atmospherics/hydroponics/soil/get_alt_interactions(var/mob/user) | |||
. = ..() | |||
. -= /decl/interaction_handler/drink |
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.
still has wash hands. for that matter uhhh, i think all the reagent interactions except /decl/interaction_handler/empty_into
should be removed on this. that or can_be_poured_from
should return FALSE on soil trays, which should lead to uh. dip into and fill from being disabled. maybe wash hands should also check that and then we could pretty tidily solve it without needing a get_alt_interactions override at all?
e9083bc
to
ff04371
Compare
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.
works for me
Description of changes
Really not sure about the implementation of this one. Going to pull it into Pyrelight volatile for testing over the weekend.
get_standard_interactions()
and calls it similarly to alt interactions at the root ofattackby()
andattack_hand()
.Why and what will this PR improve
We are at a point where the UX for some structures is getting stupid. Barrels and wells are the most obvious/severe example: if you have a half full bucket, and a half full well, and you click the bucket on the well, the interaction has to be mediated by flag checks and a toggle on the well atom, or workarounds like drag-drop.
This puts support in place for similar interactions in the future, and solves the immediate barrel/well issues.
Authorship
Myself.
Changelog
🆑
tweak: The way you interact with barrels and well has been significantly reworked; clicking with a bucket or tool should give a list of options to pick from. Please report bugs with this on the tracker.
/:cl: