MCPcopy Create free account
hub / github.com/NetHack/NetHack / shop_string

Function shop_string

src/dungeon.c:3440–3455  ·  view source on GitHub ↗

short shop description */

Source from the content-addressed store, hash-verified

3438
3439/* short shop description */
3440staticfn const char *
3441shop_string(int rtype)
3442{
3443 extern const struct shclass shtypes[]; /* defined in shknam.c */
3444 int shoptype = rtype - SHOPBASE; /* convert room type to shop type */
3445 const char *str = "shop?"; /* catchall */
3446
3447 if (shoptype < 0) {
3448 str = "untended shop";
3449 } else if (shtypes[shoptype].annotation) {
3450 str = shtypes[shoptype].annotation;
3451 } else if (shtypes[shoptype].name) {
3452 str = shtypes[shoptype].name;
3453 }
3454 return str;
3455}
3456
3457/* if player knows about the mastermind tune, append it to Castle annotation;
3458 if drawbridge has been destroyed, flags.castletune will be zero */

Callers 1

print_mapseenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected