From e157947b6ab3ff565fe5beabb78324820770c2a9 Mon Sep 17 00:00:00 2001 From: Jason Self Date: Thu, 17 Jun 2021 18:42:55 -0700 Subject: [PATCH] Import v6.12.5 of the Inform 6 standard library Modified to not print out the version of Inform and the version of the standard library in use in the game's banner. Also relicensed to AGPL per Section 4(c)(ii) of the Artistic License 2.0. --- english.h | 24 ++++++++++--- grammar.h | 28 ++++++++++----- infix.h | 4 +-- linklpa.h | 10 ++++-- parser.h | 103 ++++++++++++++++++++++++++++++++++++++++------------- readme.txt | 2 +- verblib.h | 64 ++++++++++++++++++++++++--------- version.h | 4 +-- 8 files changed, 177 insertions(+), 62 deletions(-) diff --git a/english.h b/english.h index 2b2da8b..6494b31 100644 --- a/english.h +++ b/english.h @@ -1,9 +1,9 @@ ! ============================================================================== ! ENGLISH: Language Definition File ! -! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 ! -! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2020 +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as @@ -332,7 +332,7 @@ Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1; ! ---------------------------------------------------------------------------- [ LanguageVerbLikesAdverb w; - if (w == 'look' or 'go' or 'push' or 'walk') + if (w == 'look' or 'go' or 'run' or 'leave' or 'l//' or 'push' or 'walk') rtrue; rfalse; ]; @@ -893,6 +893,13 @@ Constant LIBRARYV__TX = " Library v"; "didn't have"); " ", (the) x1, "."; 3: "Dropped."; + 4: CSubjectVerb(actor, false, false, "need to take", 0, 0, "had to take"); + print " ", (the) x1, " "; + if (x2 has container) + print "out"; + else + print "off"; + " of ", (the) x2, " before dropping ", (ItOrThem) x1, "."; } Eat: switch (n) { 1: CSubjectIs(x1,true); " plainly inedible."; @@ -1325,6 +1332,8 @@ Constant LIBRARYV__TX = " Library v"; 2: print "But "; CSubjectIsnt(x1,true,true); " there now."; 3: "Removed."; + 4: print "But "; + CSubjectIsnt(x1,true,true); " in or on anything."; } Restart: switch (n) { 1: print "Are you sure you want to restart? "; @@ -1477,8 +1486,6 @@ Constant LIBRARYV__TX = " Library v"; 11: CSubjectIs (x1,true); " fixed in place."; 12: CSubjectIs (actor,true); " carrying too many things already."; 13: "(putting ", (the) x1, " into ", (the) x2, " to make room)"; - 14: CSubjectVerb(actor, false, false, "should take", 0, 0, "should have taken"); - " ", (the) x1, " first."; } Taste: switch (n) { 1: CSubjectVerb(actor,true,false,"taste",0,"tastes","tasted"); " nothing unexpected."; @@ -1562,6 +1569,13 @@ Constant LIBRARYV__TX = " Library v"; 2: CSubjectIs (actor,true); " not holding ", (ThatOrThose) x1, "."; 3: CSubjectIs (actor,true); " already wearing ", (ThatOrThose) x1, "."; 4: CSubjectVerb(actor,false,false,"put on",0,"puts on","put on"); " ", (the) x1, "."; + 5: CSubjectVerb(actor, false, false, "need to take", 0, 0, "had to take"); + print " ", (the) x1, " "; + if (x2 has container) + print "out"; + else + print "off"; + " of ", (the) x2, " before wearing ", (ItOrThem) x1, "."; } ! Yes: see No. ]; diff --git a/grammar.h b/grammar.h index 4a47881..8e35909 100644 --- a/grammar.h +++ b/grammar.h @@ -1,7 +1,9 @@ ! ============================================================================== ! GRAMMAR: Grammar table entries for the standard verbs library. ! -! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 +! +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as @@ -223,6 +225,11 @@ Verb 'climb' 'scale' * noun -> Climb * 'up'/'over' noun -> Climb; +Verb 'carry' + * multi -> Take + * multiinside 'from'/'off' noun -> Remove + * 'inventory' -> Inv; + Verb 'close' 'cover' 'shut' * noun -> Close * 'up' noun -> Close @@ -243,7 +250,7 @@ Verb 'dig' Verb 'disrobe' 'doff' 'shed' - * held -> Disrobe; + * multi -> Disrobe; Verb 'drink' 'sip' 'swallow' * noun -> Drink; @@ -301,6 +308,11 @@ Verb 'go' 'run' 'walk' * 'in'/'inside' -> GoIn * 'into'/'in'/'inside'/'through' noun -> Enter; +Verb 'hold' + * multi -> Take + * multiinside 'from'/'off' noun -> Remove + * 'inventory' -> Inv; + Verb 'in' 'inside' * -> GoIn; @@ -380,7 +392,7 @@ Verb 'push' 'clear' 'move' 'press' 'shift' Verb 'put' * multiexcept 'in'/'inside'/'into' noun -> Insert * multiexcept 'on'/'onto' noun -> PutOn - * 'on' held -> Wear + * 'on' multiheld -> Wear * 'down' multiheld -> Drop * multiheld 'down' -> Drop; @@ -390,8 +402,8 @@ Verb 'read' * topic 'in' noun -> Consult; Verb 'remove' - * held -> Disrobe - * multi -> Take + * worn -> Disrobe + * multi -> Remove * multiinside 'from' noun -> Remove; Verb 'rub' 'clean' 'dust' 'polish' 'scrub' @@ -452,9 +464,9 @@ Verb 'switch' * 'on' noun -> SwitchOn * 'off' noun -> SwitchOff; -Verb 'take' 'carry' 'hold' +Verb 'take' * multi -> Take - * 'off' held -> Disrobe + * 'off' multiheld -> Disrobe * multiinside 'from'/'off' noun -> Remove * 'inventory' -> Inv; @@ -505,7 +517,7 @@ Verb 'wave' * 'at' noun -> WaveHands; Verb 'wear' 'don' - * held -> Wear; + * multiheld -> Wear; Verb 'yes' 'y//' * -> Yes; diff --git a/infix.h b/infix.h index e9b0e60..1962834 100644 --- a/infix.h +++ b/infix.h @@ -1,9 +1,9 @@ ! ============================================================================== ! INFIX: Support for the optional library debugger extension "Infix". ! -! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 ! -! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2020 +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as diff --git a/linklpa.h b/linklpa.h index 34055eb..364bf7d 100644 --- a/linklpa.h +++ b/linklpa.h @@ -1,9 +1,9 @@ ! ============================================================================== ! LINKLPA: Link declarations of common properties and attributes. ! -! Supplied for use with Inform 6 -- Release 6.12.4pre -- Serial number 200528 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 ! -! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2020 +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as @@ -19,7 +19,7 @@ ! License along with this program. If not, see ! https://gnu.org/licenses/ ! -! This file is automatically Included in your game file by "Parser". +! This file is automatically Included in your game file by "parser". ! ============================================================================== System_file; @@ -74,6 +74,10 @@ Attribute female; Attribute neuter; Attribute pluralname; +#Ifdef INFIX; +Attribute infix__watching; +#Endif; + ! ------------------------------------------------------------------------------ Property additive before NULL; diff --git a/parser.h b/parser.h index c5b184a..9ef53b1 100644 --- a/parser.h +++ b/parser.h @@ -1,9 +1,9 @@ ! ============================================================================== ! PARSER: Front end to parser. ! -! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 ! -! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2020 +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as @@ -15,9 +15,13 @@ ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Affero General Public License for more details. ! +! You should have received a copy of the GNU Affero General Public +! License along with this program. If not, see +! https://gnu.org/licenses/ +! ! In your game file, Include three library files in this order: ! Include "parser"; -! Include "berblib"; +! Include "verblib"; ! Include "grammar"; ! ! ------------------------------------------------------------------------------ @@ -66,7 +70,7 @@ System_file; ! ------------------------------------------------------------------------------ #Ifndef VN_1633; -Message fatalerror "*** Library 6.12.3 needs Inform v6.33 or later to work ***"; +Message fatalerror "*** Library 6.12.x needs Inform v6.33 or later to work ***"; #Endif; ! VN_ Include "version"; @@ -1505,7 +1509,7 @@ Object InformParser "(Inform Parser)" i = (~~i); #Endif; ! TARGET_ if (i == 0) { L__M(##Miscellany, 7); return 0; } - L__M(##Miscellany, 1); + L__M(##Miscellany, 6); return 1; ]; @@ -2237,7 +2241,7 @@ Object InformParser "(Inform Parser)" oops_from = 0; ! ...explain any inferences made (using the pattern)... - + ! This is where the parser replies (the sword) if things aren't clear. if (inferfrom ~= 0 && no_infer_message == false) { print "("; PrintCommand(inferfrom); print ")^"; } @@ -2381,13 +2385,7 @@ Object InformParser "(Inform Parser)" if (etype == NUMBER_PE) L__M(##Miscellany, 29); if (etype == CANTSEE_PE) { L__M(##Miscellany, 30); oops_from=saved_oops;} if (etype == TOOLIT_PE) L__M(##Miscellany, 31); - if (etype == NOTHELD_PE) { - if (parent(noun) has container) - L__M(##Take, 14, noun); - else - L__M(##Miscellany, 32, not_holding); - oops_from=saved_oops; - } + if (etype == NOTHELD_PE) { L__M(##Miscellany, 32, not_holding); oops_from=saved_oops; } if (etype == MULTI_PE) L__M(##Miscellany, 33); if (etype == MMULTI_PE) L__M(##Miscellany, 34); if (etype == VAGUE_PE) L__M(##Miscellany, 35, pronoun_word); @@ -2523,14 +2521,19 @@ Constant UNLIT_BIT = 32; indef_nspec_at = 0; ]; -[ Descriptors allows_multiple o x flag cto type m n; +[ Descriptors allows_multiple o x y flag cto type m n; ResetDescriptors(); if (wn > num_words) return 0; m = wn; for (flag=true : flag :) { o = NextWordStopped(); flag = false; - for (x=1 : x<=LanguageDescriptors-->0 : x=x+4) + for (x=1 : x<=LanguageDescriptors-->0 : x=x+4) { if (o == LanguageDescriptors-->x) { + ! Attempt to compensate for her-her confusion. + for (y = 1 : y<=LanguagePronouns-->0 : y=y+2) { + if (o == LanguagePronouns-->y) + jump PersonalPronoun; + } flag = true; type = LanguageDescriptors-->(x+2); if (type ~= DEFART_PK) indef_mode = true; @@ -2549,6 +2552,9 @@ Constant UNLIT_BIT = 32; if (type == light) indef_type = indef_type | LIT_BIT; if (type == -light) indef_type = indef_type | UNLIT_BIT; } + } + .PersonalPronoun; + if (o == OTHER1__WD or OTHER2__WD or OTHER3__WD) { indef_mode = 1; flag = 1; indef_type = indef_type | OTHER_BIT; @@ -2584,7 +2590,7 @@ Constant UNLIT_BIT = 32; if (actor ~= player) rtrue; if (obj has animate) rtrue; if (obj hasnt talkable) rfalse; - if (action_to_be == ##Ask or ##Answer or ##Tell or ##AskFor) rtrue; + if (action_to_be == ##Ask or ##Answer or ##Tell or ##AskFor or ##AskTo) rtrue; rfalse; ]; @@ -2669,7 +2675,7 @@ Constant UNLIT_BIT = 32; parsed_number = l; return GPR_NUMBER; CREATURE_TOKEN: - if (action_to_be == ##Answer or ##Ask or ##AskFor or ##Tell) + if (action_to_be == ##Answer or ##Ask or ##AskFor or ##AskTo or ##Tell) scope_reason = TALKING_REASON; TOPIC_TOKEN: @@ -2861,12 +2867,6 @@ Constant UNLIT_BIT = 32; #Endif; ! DEBUG l = NounDomain(actors_location, actor, token); if (l == REPARSE_CODE) return l; ! Reparse after Q&A - if ((metaclass(l) == Class || metaclass(l) == Object) && l ~= 1 && l notin actor && token == MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN) { - if (ImplicitTake(l)) { - etype = NOTHELD_PE; - jump FailToken; - } - } if (indef_wanted == 100 && l == 0 && number_matched == 0) l = 1; ! ReviseMulti if TAKE ALL FROM empty container @@ -3071,7 +3071,6 @@ Constant UNLIT_BIT = 32; ! allowing singulars (so that words like "six" are not swallowed up as ! Descriptors) - noun = l; ! Allow the noun to be mentioned by the *_PE error messages. if (allow_plurals && indef_guess_p == 1) { #Ifdef DEBUG; if (parser_trace >= 4) print " [Retrying singulars after failure ", etype, "]^"; @@ -3670,6 +3669,18 @@ Constant SCORE__DIVISOR = 20; } if (flag) { + if(match_length == 1) { + k = 0; + for (i=1 : i<=number_of_classes : i++) { + while ((match_classes-->k) ~= i or -i) k++; + j = match_list-->k; + + if(MatchWord(j, match_from)) { + no_infer_message = true; + return j; + } + } + } #Ifdef DEBUG; if (parser_trace >= 4) print " Unable to choose best group, so ask player.]^"; #Endif; ! DEBUG @@ -3939,6 +3950,50 @@ Constant SCORE__DIVISOR = 20; rtrue; ]; + +! ---------------------------------------------------------------------------- +! MatchWord matches a word to the name of an object. This is used to assume +! that an object simply named "key" is meant when the player types TAKE KEY +! rather than TAKE BRASS KEY. +! ---------------------------------------------------------------------------- + +[ MatchWord p_obj p_word_no len_name len_input start_input i; + + p_word_no--; + + PrintToBuffer(StorageForShortName, SHORTNAMEBUF_LEN, p_obj); + len_name = StorageForShortName --> 0; + + if(len_name > 9) { + for(i = 9 : i < len_name : i++) + if(StorageForShortName -> (WORDSIZE + i) == 32) rfalse; + len_name = 9; + } + +#Ifdef TARGET_ZCODE; + start_input = (parse + 2) -> (4 * p_word_no + 3); + len_input = (parse + 2) -> (4 * p_word_no + 2); + if(len_input > 9) len_input = 9; + if(len_name ~= len_input) rfalse; + for(i = 0 : i < len_name : i++) { + if(StorageForShortName -> (WORDSIZE + i) ~= buffer -> (start_input + i)) + rfalse; + } +#Ifnot; ! TARGET_GLULX + start_input = parse --> (((p_word_no+1) * 3)) - 2; + len_input = parse --> ((p_word_no+1) * 3 - 1); + if(len_input > 9) len_input = 9; + if(len_name ~= len_input) rfalse; + for(i = 0 : i < len_name : i++) { + if(StorageForShortName -> (WORDSIZE + i) ~= buffer -> (start_input + i + 2)) + rfalse; + } +#Endif; ! TARGET_ + + rtrue; +]; + + ! ---------------------------------------------------------------------------- ! PrintCommand reconstructs the command as it presently reads, from ! the pattern which has been built up diff --git a/readme.txt b/readme.txt index b6868b1..9cf4047 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -This directory contains version 6.12.4 of the Inform 6 standard +This directory contains version 6.12.5 of the Inform 6 standard library. It has been modified slightly to not print out the version of Inform and the version of the standard library in use in the game's banner. diff --git a/verblib.h b/verblib.h index c5e73a8..ff27fab 100644 --- a/verblib.h +++ b/verblib.h @@ -1,9 +1,9 @@ ! ============================================================================== ! VERBLIB: Front end to standard verbs library. ! -! Supplied for use with Inform 6 -- Release 6.12.4 -- Serial number 200718 +! Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605 ! -! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2020 +! Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021 ! ! This file is free software: you can redistribute it and/or modify ! it under the terms of the GNU Affero General Public License as @@ -17,7 +17,7 @@ ! ! You should have received a copy of the GNU Affero General Public ! License along with this program. If not, see -! https://gnu.org/licenses/ +! https://gnu.org/licenses/. ! ! In your game file, Include three library files in this order: ! Include "parser"; @@ -1678,8 +1678,8 @@ Constant ID_BIT $2000; ! Print object id after each entry action = k; } - if (item has scenery) return L__M(##Take, 10, item); if (item has static) return L__M(##Take, 11, item); + if (item has scenery) return L__M(##Take, 10, item); ! The item is now known to be available for taking. Is the player ! carrying too much? If so, possibly juggle items into the rucksack @@ -1770,8 +1770,8 @@ Constant ID_BIT $2000; ! Print object id after each entry ks = keep_silent; keep_silent = 2; AttemptToTakeObject(obj); keep_silent = ks; if (obj notin actor) rtrue; if (res == 0 && ~~keep_silent) - if (supcon) L__M(##Miscellany, 58, obj, supcon); - else L__M(##Miscellany, 26, obj); + if (supcon) return L__M(##Miscellany, 58, obj, supcon); + else return L__M(##Miscellany, 26, obj); rfalse; ]; @@ -1851,6 +1851,7 @@ Constant ID_BIT $2000; ! Print object id after each entry ! ---------------------------------------------------------------------------- [ TakeSub; + if (noun in actor && noun has worn) <>; if (onotheld_mode == 0 || noun notin actor) if (AttemptToTakeObject(noun)) return; if (AfterRoutines()) return; @@ -1862,11 +1863,19 @@ Constant ID_BIT $2000; ! Print object id after each entry [ RemoveSub i; i = parent(noun); if (i && i has container && i hasnt open && ImplicitOpen(i)) return L__M(##Remove, 1, i); - if (i ~= second) return L__M(##Remove, 2, noun); + if (noun has clothing) { + if (noun has worn) <>; + if (i && i has container or supporter) + jump RSSkip; + else + if (i == actor) return L__M(##Disrobe, 1, noun); + } + if (i hasnt container && i hasnt supporter) return L__M(##Remove, 4, noun); + if (i ~= second && second ~= nothing) return L__M(##Remove, 2, noun); if (i has animate) return L__M(##Take, 6, i, noun); + .RSSkip; if (AttemptToTakeObject(noun)) rtrue; - action = ##Remove; if (AfterRoutines()) return; action = ##Take; if (AfterRoutines()) return; if (keep_silent) return; @@ -1876,9 +1885,13 @@ Constant ID_BIT $2000; ! Print object id after each entry [ DropSub; if (noun == actor) return L__M(##PutOn, 4, noun); if (noun in parent(actor)) return L__M(##Drop, 1, noun); - if (noun notin actor && ~~ImplicitTake(noun)) return L__M(##Drop, 2, noun); if (noun has worn && no_implicit_actions) return L__M(##Disrobe, 4, noun); if (noun has worn && ImplicitDisrobe(noun)) return; + if (noun notin actor) { + if (no_implicit_actions) return L__M(##Drop, 4, noun, parent(noun)); + L__M(##Miscellany, 58, noun, parent(noun)); + } + move noun to parent(actor); if (AfterRoutines() || keep_silent) return; L__M(##Drop, 3, noun); @@ -1888,7 +1901,7 @@ Constant ID_BIT $2000; ! Print object id after each entry receive_action = ##PutOn; if (second == d_obj || actor in second) <>; if (parent(noun) == second) return L__M(##Drop, 1, noun); - if (noun notin actor && ImplicitTake(noun)) return L__M(##PutOn, 1, noun); + if (ImplicitTake(noun) && noun notin actor) return L__M(##PutOn, 1, noun); ancestor = CommonAncestor(noun, second); if (ancestor == noun) return L__M(##PutOn, 2, noun); @@ -1900,7 +1913,8 @@ Constant ID_BIT $2000; ! Print object id after each entry action = ##PutOn; } if (second hasnt supporter) return L__M(##PutOn, 3, second); - if (ancestor == actor) return L__M(##PutOn, 4, second); + + if (noun has worn && no_implicit_actions) return L__M(##Disrobe, 4, noun); if (noun has worn && ImplicitDisrobe(noun)) return; if (ObjectDoesNotFit(noun, second) || @@ -1925,7 +1939,7 @@ Constant ID_BIT $2000; ! Print object id after each entry receive_action = ##Insert; if (second == d_obj || actor in second) <>; if (parent(noun) == second) return L__M(##Drop, 1, noun); - if (noun notin actor && ImplicitTake(noun)) return L__M(##Insert, 1, noun); + if (ImplicitTake(noun) && noun notin actor) return L__M(##Insert, 1, noun); ancestor = CommonAncestor(noun, second); if (ancestor == noun) return L__M(##Insert, 5, noun); if (ObjectIsUntouchable(second)) return; @@ -1937,6 +1951,7 @@ Constant ID_BIT $2000; ! Print object id after each entry return L__M(##Insert, 3, second); } if (second hasnt container) return L__M(##Insert, 2, second); + if (noun has worn && no_implicit_actions) return L__M(##Disrobe, 4, noun); if (noun has worn && ImplicitDisrobe(noun)) return; if (ObjectDoesNotFit(noun, second) || @@ -2519,7 +2534,10 @@ Constant ID_BIT $2000; ! Print object id after each entry if (ObjectIsUntouchable(noun)) return; if (noun hasnt lockable) return L__M(##Unlock, 1, noun); if (noun hasnt locked) return L__M(##Unlock, 2, noun); - if (noun.with_key ~= second) return L__M(##Unlock, 3, second); + if ((noun.with_key ofclass Object && noun.with_key ~= second) || + (noun.with_key ofclass Routine && noun.with_key() ~= second) || + noun.with_key == nothing) + return L__M(##Unlock, 3, second); give noun ~locked; @@ -2532,7 +2550,10 @@ Constant ID_BIT $2000; ! Print object id after each entry if (noun hasnt lockable) return L__M(##Lock, 1, noun); if (noun has locked) return L__M(##Lock, 2 ,noun); if (noun has open && ImplicitClose(noun)) return L__M(##Lock, 3, noun); - if (noun.with_key ~= second) return L__M(##Lock, 4, second); + if ((noun.with_key ofclass Object && noun.with_key ~= second) || + (noun.with_key ofclass Routine && noun.with_key() ~= second) || + noun.with_key == nothing) + return L__M(##Lock, 4, second); give noun locked; if (AfterRoutines() || keep_silent) return; @@ -2590,7 +2611,8 @@ Constant ID_BIT $2000; ! Print object id after each entry [ DisrobeSub; if (ObjectIsUntouchable(noun)) return; - if (noun hasnt worn) return L__M(##Disrobe, 1, noun); + if (noun hasnt clothing) return L__M(##Disrobe,1, noun); + if (noun hasnt worn && noun has clothing) return L__M(##Disrobe, 1, noun); give noun ~worn; if (AfterRoutines() || keep_silent) return; @@ -2600,7 +2622,15 @@ Constant ID_BIT $2000; ! Print object id after each entry [ WearSub; if (ObjectIsUntouchable(noun)) return; if (noun hasnt clothing) return L__M(##Wear, 1, noun); - if (noun notin actor && ImplicitTake(noun)) return L__M(##Wear, 2, noun); + + if (noun notin actor && noun hasnt worn) { + if (IndirectlyContains(actor, noun) || parent(noun) has container or supporter) { + if (no_implicit_actions) return L__M(##Wear, 5, noun, parent(noun)); + L__M(##Miscellany, 58, noun, parent(noun)); + AttemptToTakeObject(noun); + } else + return L__M(##Wear, 2, noun, parent(noun)); + } if (noun has worn) return L__M(##Wear, 3, noun); give noun worn; @@ -2840,7 +2870,7 @@ Constant ID_BIT $2000; ! Print object id after each entry [ WaveSub; if (noun == player) return L__M(##Wave, 2 ,noun, second); if (noun == actor) return L__M(##Wave, 3, noun, second); - if (noun notin actor && ImplicitTake(noun)) return L__M(##Wave, 1, noun); + if (ImplicitTake(noun) && noun notin actor) return L__M(##Wave, 1, noun); L__M(##Wave, 2, noun, second); ]; diff --git a/version.h b/version.h index 7eb11f3..1ce9426 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ System_file; -Constant LibSerial "200718"; -Constant LibRelease "6.12.4"; +Constant LibSerial "210605"; +Constant LibRelease "6.12.5"; Constant LIBRARY_VERSION 612; Constant Grammar__Version 2; -- 2.31.1