]> granicus.if.org Git - nethack/commitdiff
github pull request #417 - disclosing apron text
authorPatR <rankin@nethack.org>
Mon, 14 Dec 2020 11:30:58 +0000 (03:30 -0800)
committerPatR <rankin@nethack.org>
Mon, 14 Dec 2020 11:30:58 +0000 (03:30 -0800)
Adopt the patch to show the writing on any alchemy smocks in
hero's inventory during end of game disclosure.

I also added one more saying among the choices for alchemy
smock/apron.  It's based on a T-shirt descibed in a movie.
(I remember the description of the text but I don't remember
noticing anybody wearing the T-shirt that lead to that.)
Since so many of the smock quotes are about cooking, it seems
better to add it as an alchemy quote instead of just another
T-shirt where there'd be no context to explain it.

Closes #417

include/extern.h
src/objnam.c
src/read.c

index b8f6faaa063406e1ba5c770afe9ea151eb92d594..f771e0766af76b9ec1a1dbc53107af6d0f5e23dd 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 extern.h        $NHDT-Date: 1607561572 2020/12/10 00:52:52 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.928 $ */
+/* NetHack 3.7 extern.h        $NHDT-Date: 1607945415 2020/12/14 11:30:15 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.932 $ */
 /* Copyright (c) Steve Creps, 1988.                              */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -2119,6 +2119,7 @@ E long NDECL(random);
 
 E void FDECL(learnscroll, (struct obj *));
 E char *FDECL(tshirt_text, (struct obj *, char *));
+E char *FDECL(apron_text, (struct obj *, char *));
 E const char *FDECL(candy_wrapper_text, (struct obj *));
 E void FDECL(assign_candy_wrapper, (struct obj *));
 E int NDECL(doread);
index 0daa19c9a02bd4afc23062609ea48f624c27fba0..9efcd4fc69bb8bb7d9ec05178f9e18dc2387b92a 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 objnam.c        $NHDT-Date: 1606765213 2020/11/30 19:40:13 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.307 $ */
+/* NetHack 3.7 objnam.c        $NHDT-Date: 1607945434 2020/12/14 11:30:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.308 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2011. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -753,7 +753,10 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
            players who aren't aware that something readable is present */
         switch (obj->otyp) {
         case T_SHIRT:
-            Sprintf(eos(buf), " with text \"%s\"", tshirt_text(obj, tmpbuf));
+        case ALCHEMY_SMOCK:
+            Sprintf(eos(buf), " with text \"%s\"",
+                    (obj->otyp == T_SHIRT) ? tshirt_text(obj, tmpbuf)
+                                           : apron_text(obj, tmpbuf));
             break;
         case CANDY_BAR:
             lbl = candy_wrapper_text(obj);
index 49bc07ce75b6e0d8d5c2d47c0d75fa59a9561387..0c41973aa2047ed67b75b8ad7dc3d32fc7b0db88 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 read.c  $NHDT-Date: 1607200174 2020/12/05 20:29:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.204 $ */
+/* NetHack 3.7 read.c  $NHDT-Date: 1607945439 2020/12/14 11:30:39 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.205 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -18,7 +18,6 @@ static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 };
 
 static boolean FDECL(learnscrolltyp, (SHORT_P));
 static char *FDECL(erode_obj_text, (struct obj *, char *));
-static char *FDECL(apron_text, (struct obj *, char *));
 static void FDECL(stripspe, (struct obj *));
 static void FDECL(p_glow1, (struct obj *));
 static void FDECL(p_glow2, (struct obj *, const char *));
@@ -118,7 +117,7 @@ char *buf;
         "Meat is Mordor",
         "Minetown Better Business Bureau",
         "Minetown Watch",
- "Ms. Palm's House of Negotiable Affection -- A Very Reputable House Of Disrepute",
+ "Ms. Palm's House of Negotiable Affection--A Very Reputable House Of Disrepute",
         "Protection Racketeer",
         "Real men love Crom",
         "Somebody stole my Mojo!",
@@ -157,7 +156,7 @@ char *buf;
     return erode_obj_text(tshirt, buf);
 }
 
-static char *
+char *
 apron_text(apron, buf)
 struct obj *apron;
 char *buf;
@@ -172,6 +171,13 @@ char *buf;
         "If you can't stand the heat, get out of Gehennom!",
         "If we weren't meant to eat animals, why are they made out of meat?",
         "If you don't like the food, I'll stab you",
+        /* In the movie "The Sum of All Fears", a Russian worker in a weapons
+           facility wears a T-shirt that a translator says reads, "I am a
+           bomb technician, if you see me running ... try to catch up."
+           In nethack, the quote is far more suitable to an alchemy smock
+           (particularly since so many of these others are about cooking)
+           than a T-shirt and is paraphrased to simplify/shorten it. */
+        "If you see me running, try to keep up...",
     };
 
     Strcpy(buf, apron_msgs[apron->o_id % SIZE(apron_msgs)]);