Welcome to the Builder Academy

Question BUG empty container writes garbage to obj keywords

More
05 May 2025 00:58 #10695 by zi
If I drank everything out of a barrel (or any drink container) it would then push the last thing I typed into they keywords (as an imm and as a player) or garbage characters (the dreaded half diamond question mark))!

 I'm positive I was the cause, but couldn't track it. so I grabbed a fresh copy of tba and.. the same thing happened.

I saw a thread in 2020 and it looks like the 2025 code is updated, but the problem persists. I attached what I did in the updated TBA as "drinking problem" and my bug report from the crash in my mud.

Anyone replicate/verify?
Attachments:

Please Log in or Create an account to join the conversation.

More
06 May 2025 02:27 #10696 by Rumble
Reproducable. I never liked this stock behavior. When you empty a liquid container it removes a keyword. So name_from_drinkcon is likely buggy.

Try removing this from do_drink:
/* Remove liquid keyword */
name_from_drinkcon(obj);

Probably a good idea for us to remove name_from_drinkcon completely.

Anyone see a reason to keep this?

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
The following user(s) said Thank You: zi

Please Log in or Create an account to join the conversation.

More
06 May 2025 20:59 - 06 May 2025 21:14 #10697 by thomas
The reason is that if you drink from a bottle of water, you can "drink water". Once the container is empty, it is just a bottle, and "drink water" makes no sense. Once you fill it with wine, "drink water" is misleading, and you want to be able to  "drink wine".

The problem seems to be that, instead of just altering _this instance_ of the container, it frees the prototype, too. I think it's an easy fix.

Edit: Indeed, it was:  github.com/tbamud/tbamud/pull/149
Last edit: 06 May 2025 21:14 by thomas.
The following user(s) said Thank You: zi

Please Log in or Create an account to join the conversation.

Time to create page: 0.224 seconds