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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can now drink from chemistry bottles and beakers #12605

Closed
wants to merge 3 commits into from
Closed

Can now drink from chemistry bottles and beakers #12605

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 26, 2016

Reapproach of #10631 , now with more integrated suggestions, and less sipping from chempacks

Fixes #10614

馃啈

  • rscadd: Can now drink from chem bottles, beakers, etc.
  • rscadd: The amount you drink from these bottles/beakers depends on their set transfer rate
  • rscadd: If you attempt to force feed somebody from a beaker, the time required scales with the amount you are trying to transfer
  • rscadd: To splash a person, or yourself, with the contents of a beaker, you must be in any intent but help

if(reagents.total_volume)
if (ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.chem_flags & NO_DRINK)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't like the copy paste of this block, put it into its own proc.

Copy link
Author

Choose a reason for hiding this comment

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

What, like check_drink(H)?

Seems a bit odd for something so specific, but I guess we could have it if anyone adds, say, being able to remove tongues, or jaws

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean the entire code for drinking - it's down in imbibe() as well. Anything you write twice in a way that it has to be the same in both cases should be a proc.

Copy link
Author

Choose a reason for hiding this comment

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

Fair point, and good spot on the weirdness going on there. Sorted now

@FudgePucker
Copy link
Contributor

I don't know about letting players drink 100 units at a time. That seems like you can put in 100000 units of antitoxin to powergame

@kilozombie
Copy link
Contributor

IIRC a creature's reagent container can only hold like 300u?

@Sprok0
Copy link
Contributor

Sprok0 commented Nov 26, 2016

A human can hold 1000u

@Allspice
Copy link
Contributor

Can eat 50u pills anyway, no particular difference on that bit.

@ghost ghost changed the title Can now drink from regular bottles Can now drink from chemistry bottles and beakers Nov 27, 2016
@Intigracy Intigracy added Balance Potentially going to upset people as it changes balance of the game. Content Adds something. Neat! labels Nov 27, 2016
@Zth--
Copy link
Contributor

Zth-- commented Nov 27, 2016

What about the lids? Did you change it or they're still the same?

@ghost
Copy link
Author

ghost commented Nov 27, 2016

The same as usual. For lids, you click it in-hand. For drinking, you click on your or anothers sprite

@Zth--
Copy link
Contributor

Zth-- commented Nov 27, 2016

I'm asking because I do everything with the "Z" key. I drink alcohol with the Z key, and put beaker's lid with the Z key. I guess the default will still be the lid for beakers.

Don't get me wrong, it has sense to be this way, I just wasn't sure if you changed it or not

@ghost
Copy link
Author

ghost commented Nov 27, 2016

Z is attack_self IIRC, so should still work

reagents.reaction(get_turf(H), TOUCH)
H.visible_message("<span class='warning'>The contents in [src] fall through and splash onto the ground, what a mess!</span>")
reagents.remove_any(amount_per_transfer_from_this)
Copy link
Contributor

Choose a reason for hiding this comment

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

make it react with the ground below it first, if I chug thermite as a skeleton and it falls to the ground I should be able to light it

Copy link
Author

Choose a reason for hiding this comment

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

Isnt that what the above reagents.reaction(get turf(h), touch)

Copy link
Author

Choose a reason for hiding this comment

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

Does?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, ignore goofball.

Copy link
Author

Choose a reason for hiding this comment

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

goof ya goof

@kol1th
Copy link
Contributor

kol1th commented Nov 28, 2016

I love you 馃憤


user.visible_message("<span class='danger'>[user] feeds [M] \the [src].</span>", "<span class='danger'>You feed [M] \the [src].</span>")

M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace from this down to setting LAssailant with a call to add_attacklogs, it handles all the stuff for you.


user.visible_message("<span class='danger'>[user] feeds [M] \the [src].</span>", "<span class='danger'>You feed [M] \the [src].</span>")

add_attacklogs(user, M, "force-fed", src, "amount:[amount_per_transfer_from_this], container containing [reagentlist(src)]")
Copy link
Author

Choose a reason for hiding this comment

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

Done, but it might get a bit obnoxious

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I meant remove the LAssailant stuff as well - add_attacklogs does that too.

Copy link
Author

Choose a reason for hiding this comment

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

???

if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
Copy link
Author

Choose a reason for hiding this comment

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

So, this

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@ComicIronic ComicIronic added the Conflicts Conflicts with something. label Dec 4, 2016
@ghost ghost mentioned this pull request Dec 9, 2016
@ghost
Copy link
Author

ghost commented Dec 10, 2016

fork broke, head to #12719

@ghost ghost closed this Dec 10, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Balance Potentially going to upset people as it changes balance of the game. Conflicts Conflicts with something. Content Adds something. Neat!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEATURE REQUEST: DRINKING FROM BOTTLES
9 participants