-
Notifications
You must be signed in to change notification settings - Fork 17
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
feature: Replace all Ok. messages with useful messages #46 #178
Conversation
I have one comment/thought on a few of these (apologies if I ramble). Some of the spells like detect invis generally can only be cast on yourself, however they had code in them that would seem to support a case where they were changed to be cast on others. Here's a snippet and below my comment:
In the above, the victim is generally the character but then there's the extra block for if the target of the spell was ever opened to be able to cast on others. printf_to_char using the victims name directly could 'out' the victim if they're cloaked because it always shows their name. Using an ACT function or whatever the equivalent in this version would fix that. Imagine a player who might be cloaked as a vampire or put a mask on as a swashbuckler where you wouldn't see "Blake is here" but rather "A swashbuckler is here.". The act message would take care of these scenarios (the old function/macro that used to handle this was PERS, I'd have to lookup what it is here). An example of where a printf with the If an immortal is Wizi in the room and cast a spell you would see "Blake utters the words 'detect invis'" instead of "(An Imm) utters the words 'detect invis'". This isn't so much an issue on immortal commands. |
Here's an example with printf's from this pull request I just put in, the immortal sees the person no matter what but the player will see an item taken by whatever PERS_AW returns (that could be the imms name, or if they're wizi (An Imm)):
Thumbs up on the "wizhelp" changes also. Being able to see the level of the commands are highly useful. |
@rhoxie21 @blakepell Just a heads up, work & home life is keeping me extremely busy this week, so I'll have to review all of these contributions more seriously this weekend - I'll just drop some quick comments before I go to bed... By the way, a VERY LARGE update is in the works that I want to release this weekend. It's taken a while because a lot of the database loading has been effected, so there's been a lot to test. Many, many cool things are coming soon :D Well, at least I think they're cool ;) |
@rhoxie21 Thanks for taking care of the wiz commands issue, I'll merge it this weekend. I like that change to wizhelp, I vote we toss it in. |
Hmm, that's an interesting case. One of the original goals of the project was to keep the gameplay as vanilla as possible, but maybe this could be a compilation flag, or at least something more easily configurable. I've seen other spells like "word of recall" that have the same case (seriously, why would you ever use this spell?).
Good call - I just created an issue to address this: #179
Agree! :) |
Good stuff, thanks for the comments; updated to act so the context is handled when the player maybe cloaked, etc... |
Looks great @rhoxie21. :) |
@blakepell - Thanks! What next? :P |
src/wiz_im.c
Outdated
@@ -55,13 +55,13 @@ DEFINE_DO_FUN (do_wizhelp) { | |||
if (cmd_table[cmd].level >= LEVEL_HERO && | |||
cmd_table[cmd].level <= char_get_trust (ch) && cmd_table[cmd].show) | |||
{ | |||
printf_to_char (ch, "%-12s", cmd_table[cmd].name); | |||
printf_to_char(ch, "(%2d) %-12s", cmd_table[cmd].level, cmd_table[cmd].name); | |||
if (++col % 6 == 0) |
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.
@rhoxie21 If we have the wiz levels levels in here, I think the number of commands per line will need to be reduced to fit an 80-column terminal. Everything else still fits in 80 columns, so I think it should be a rule.
This looks good to me:
- Reduce command space from 12 chars to 11
- Show 5 commands per row instead of 6
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.
Corrected!
src/wiz_l1.c
Outdated
wiznetf (ch, NULL, WIZ_PENALTIES, WIZ_SECURE, 0, | ||
"$N denies access to %s", victim->name); | ||
send_to_char ("Ok.\n\r", ch); | ||
printf_to_char(ch, "$s has been denied and will be escorted out.\n\r", victim->name); |
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.
Typo: should be "%s", not "$s"
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.
@Synival - ugh! Resolved this and validated.
<20hp 100m 100mv> Test has been denied and will be escorted out.
Test has left the game.
src/wiz_l3.c
Outdated
@@ -55,7 +55,7 @@ DEFINE_DO_FUN (do_disconnect) { | |||
for (d = descriptor_list; d != NULL; d = d->next) { | |||
if (d->descriptor == desc) { | |||
close_socket (d); | |||
send_to_char ("Ok.\n\r", ch); | |||
printf_to_char(ch, "%s has been disconnected.\n\r", d->descriptor); |
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 currently crashes D: "%s" is for a string, d->descriptor is of type sh_int. Something like this would work:
printf_to_char (ch, "Connection #%d has been disconnected.\n\r", d->descriptor);
// Connection #8 has been disconnected.
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.
Corrected!
src/wiz_l4.c
Outdated
@@ -359,7 +359,7 @@ DEFINE_DO_FUN (do_oload) { | |||
obj_give_to_char (obj, ch); | |||
else | |||
obj_give_to_room (obj, ch->in_room); | |||
send_to_char ("Ok.\n\r", ch); | |||
printf_to_char(ch, "You created %p!\n\r", obj); |
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.
<1010hp 1000m 1000mv> load obj 3001
You created 0x7f3ccc236d70!
We can probably use an object name here 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.
Resorted to using obj->short_desc
<20hp 100m 100mv> You created a bottle of beer!
@rhoxie21 I found a few bugs in your changes but everything is otherwise good 👍 As soon as those are patched, I'll merge the PR :) |
@Synival - corrected the items; I will be more thorough in my validation post change. Setting up docker with a few more player files so I can test a bit quicker. |
@rhoxie21 Looks good :) Merging pull request! |
Addressing issue #46 and had also made one small change to wizhelp; let me know if you want me to take that out...