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
Conversation
if(reagents.total_volume) | ||
if (ishuman(M)) | ||
var/mob/living/carbon/human/H = M | ||
if(H.species.chem_flags & NO_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.
Don't like the copy paste of this block, put it into its own proc.
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.
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
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 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.
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.
Fair point, and good spot on the weirdness going on there. Sorted now
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 |
IIRC a creature's reagent container can only hold like 300u? |
A human can hold 1000u |
Can eat 50u pills anyway, no particular difference on that bit. |
What about the lids? Did you change it or they're still the same? |
The same as usual. For lids, you click it in-hand. For drinking, you click on your or anothers sprite |
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 |
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) |
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.
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
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.
Isnt that what the above reagents.reaction(get turf(h), touch)
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.
Does?
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.
Yes, ignore goofball.
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.
goof ya goof
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>") |
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.
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)]") |
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.
Done, but it might get a bit obnoxious
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.
No, I meant remove the LAssailant stuff as well - add_attacklogs does that too.
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.
???
if(!iscarbon(user)) | ||
M.LAssailant = null | ||
else | ||
M.LAssailant = user |
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.
So, 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.
Yes.
fork broke, head to #12719 |
Reapproach of #10631 , now with more integrated suggestions, and less sipping from chempacks
Fixes #10614
馃啈