From: PatR Date: Wed, 8 Feb 2023 00:47:42 +0000 (-0800) Subject: generic objects refinement X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=042d40faac6602128da94d02aebbb8f75b49c3b8;p=nethack generic objects refinement Give generic objects a name as well as a description to avoid some potential object formatting problems. Also remove the 'unique' flag from them to avoid confusion. Not exhaustively tested. --- diff --git a/include/objects.h b/include/objects.h index c605b90c1..ddebbc9b2 100644 --- a/include/objects.h +++ b/include/objects.h @@ -67,8 +67,8 @@ #endif /* OBJECTS_DESCR_INIT || OBJECTS_INIT || OBJECTS_ENUM */ #define GENERIC(desc, class, gen_enum) \ - OBJECT(OBJ(NoDes, desc), \ - BITS(0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, P_NONE, 0), \ + OBJECT(OBJ("generic " desc, desc), \ + BITS(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, P_NONE, 0), \ 0, class, 0, 0, 0, 0, 0, 0, 0, 0, 0, CLR_GRAY, gen_enum) /* dummy object[0] -- description [2nd arg] *must* be NULL */ diff --git a/win/share/monsters.txt b/win/share/monsters.txt index eaad2c876..7825cd811 100644 --- a/win/share/monsters.txt +++ b/win/share/monsters.txt @@ -1,5 +1,5 @@ # monsters.txt - tile defintions for monsters -# Note too: lines beginning with '# tile ' are not comments; other +# Note: lines beginning with '# tile ' are not comments; other # lines beginning with '#' are. . = (71, 108, 108) A = (0, 0, 0) diff --git a/win/share/objects.txt b/win/share/objects.txt index ed25ad164..318c99ee8 100644 --- a/win/share/objects.txt +++ b/win/share/objects.txt @@ -1,5 +1,5 @@ # objects.txt - tile defintions for objects -# Note too: lines beginning with '# tile ' are not comments; other +# Note: lines beginning with '# tile ' are not comments; other # lines beginning with '#' are. . = (71, 108, 108) A = (0, 0, 0) @@ -49,7 +49,8 @@ Z = (195, 195, 195) CKKKKKKKKKKJAA.. .AAAAAAAAAAAA... } -# tile 1 (strange) +#_ after "strange object" come 17 generic objects, one for each object class +# tile 1 (strange / generic strange) #_ right/close square bracket { ................ @@ -69,7 +70,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 2 (weapon) +# tile 2 (weapon / generic weapon) #_ right/close parenthesis { ................ @@ -89,7 +90,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 3 (armor) +# tile 3 (armor / generic armor) #_ left/open square bracket { ................ @@ -109,7 +110,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 4 (ring) +# tile 4 (ring / generic ring) #_ circle rather than equal sign { ................ @@ -129,7 +130,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 5 (amulet) +# tile 5 (amulet / generic amulet) #_ double quote { ................ @@ -149,7 +150,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 6 (tool) +# tile 6 (tool / generic tool) #_ left/open parenthesis { ................ @@ -169,7 +170,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 7 (food) +# tile 7 (food / generic food) #_ percent sign (almost) { ................ @@ -189,7 +190,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 8 (potion) +# tile 8 (potion / generic potion) #_ exclamation point { ................ @@ -209,7 +210,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 9 (scroll) +# tile 9 (scroll / generic scroll) #_ question mark (almost) { ................ @@ -229,7 +230,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 10 (spellbook) +# tile 10 (spellbook / generic spellbook) #_ plus sign { ................ @@ -249,7 +250,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 11 (wand) +# tile 11 (wand / generic wand) #_ slash { ................ @@ -269,7 +270,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 12 (coin) +# tile 12 (coin / generic coin) #_ dollar sign { ................ @@ -289,7 +290,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 13 (gem) +# tile 13 (gem / generic gem) #_ asterisk { ................ @@ -309,8 +310,8 @@ Z = (195, 195, 195) ................ ................ } -# tile 14 (large rock) -#_ backtick/grave accent +# tile 14 (large rock / generic large rock) +#_ backtick/grave accent [boulder and statue] { ................ ................ @@ -329,7 +330,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 15 (iron ball) +# tile 15 (iron ball / generic iron ball) #_ zero { ................ @@ -349,7 +350,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 16 (iron chain) +# tile 16 (iron chain / generic iron chain) #_ underscore (ugh) { ................ @@ -369,7 +370,7 @@ Z = (195, 195, 195) ................ ................ } -# tile 17 (venom) +# tile 17 (venom / generic venom) #_ period { ................ diff --git a/win/share/other.txt b/win/share/other.txt index 4f04ed718..55726672b 100644 --- a/win/share/other.txt +++ b/win/share/other.txt @@ -1,5 +1,5 @@ # other.txt - tile defintions for 'other' (walls, furniture, explosions) -# Note too: lines beginning with '# tile ' are not comments; other +# Note: lines beginning with '# tile ' are not comments; other # lines beginning with '#' are. . = (71, 108, 108) A = (0, 0, 0)