From f7c5ea1cad8574771f69bacd41a6f2a7b536fdac Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 7 May 2021 02:26:52 +0700 Subject: [PATCH 1/3] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B,=20=D1=87?= =?UTF-8?q?=D0=B0=D1=81=D1=82=D1=8C=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Множественное число для шорт и штанов - Пиджак не должен быть живым, только потому что он чёрный - Ускорение --- room8.lua | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/room8.lua b/room8.lua index 4eb3973..2af9474 100644 --- a/room8.lua +++ b/room8.lua @@ -1,6 +1,10 @@ require "snapshots" mp.auto_animate = false +global { + list_clothing = std.list {}; +} + obj { -"зубчатый ключ,ключ"; nam = "thooskey"; @@ -25,8 +29,6 @@ game : dict { ["легинсы/рд"] = 'легинсов'; ["леггинсы/вн"] = 'леггинсы'; ["легинсы/вн"] = 'легинсы'; - ["чёрный/рд"] = 'чёрного'; - ["чёрный/вн"] = 'чёрный'; ["твидовый/рд"] = 'твидового'; ["твидовый/вн"] = 'твидовый'; } @@ -52,7 +54,7 @@ Verb { function room8_switch_temperature(temp, forced) local oldtemp = _('room8_garderob')._mode -- TODO: очень тяжёлый цикл, надо как-то оптимизировать - std.for_each_obj(function(v) + list_clothing:for_each(function(v) if (forced and v:where() ~= nil and v:where().nam == 'room8_control') then return end @@ -104,7 +106,7 @@ room { snapshots:write('entersroom'); end local description = ''; - if here().hot() then + if s.hot() then description = [[Жарко. ]]; end local clothes = '' @@ -409,7 +411,7 @@ clothing = Class { -- Да, ты можешь писать "открыть крючок" потому что это синоним шкафа. -- Но то, что крючки не смоделированы, должно намекать на их несущественность. obj { - -"шкаф,гардероб/мр|крючки/мн|крючок|одежда/жр,но"; + -"шкаф,гардероб/мр,но|крючки/мн,но|крючок/мр,но|одежда/жр,но"; nam = 'room8_clothes'; before_Receive = function(self, thing) if not thing:has('clothing') then @@ -517,7 +519,7 @@ clothing { }: attr 'worn,concealed'; clothing { - -"штаны/ср,мч"; + -"штаны/ср,мч,мн"; nam = 'room8_pants'; part = 'bottom'; mode = 'neutral'; @@ -528,7 +530,7 @@ clothing { }: attr 'worn'; clothing { - -"шорты/ср,мч"; + -"шорты/ср,мч,мн"; nam = 'room8_shorts'; part = 'bottom'; mode = 'hot'; @@ -539,7 +541,7 @@ clothing { } clothing { - -"зимние штаны,штаны,щтаны/ср,мч"; + -"зимние штаны,штаны,щтаны/ср,мч,мн"; nam = 'room8_winterpants'; part = 'bottom'; mode = 'cold'; @@ -599,7 +601,7 @@ clothing { } clothing { - -"твидовый пиджак,пиджак/мр"; + -"твидовый пиджак,пиджак/мр,но"; nam = 'room8_winter_formalсoat'; description = 'Чёрный твидовый пиджак. Очень тёплый.'; level = 3; @@ -611,7 +613,7 @@ clothing { } clothing { - -"чёрный пиджак,черный пиджак,пиджак/мр"; + -"чёрный пиджак,черный пиджак,пиджак/мр,но"; nam = 'room8_formalcoat'; paired_hot = 'room8_formalvest'; paired_cold = 'room8_winter_formalсoat'; @@ -735,7 +737,7 @@ clothing { } clothing { - -"тёплая рубашка/жр"; + -"тёплая рубашка/жр,но"; nam = 'room8_warmshirt'; part = 'top'; level = 2; @@ -758,7 +760,7 @@ clothing { } clothing { - -"лёгкая рубашка,рубашка/жр"; + -"лёгкая рубашка,рубашка/жр,но"; nam = 'room8_lightwear'; part = 'top'; level = 2; @@ -1024,3 +1026,9 @@ clothing { mode = 'cold'; description = 'Серая спортивная толстовка с длинными рукавами.'; } + +std.for_each_obj(function(v) + if (v.check_inventory ~= nil and v.getlevel ~= nil) then + list_clothing:add(v) + end +end) From eeeffd21392d9a7680f5c9b1068654384eae8efd Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 7 May 2021 02:35:24 +0700 Subject: [PATCH 2/3] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D1=8F=D0=B5=D0=BC?= =?UTF-8?q?=20=D0=B7=D1=83=D0=B1=D1=87=D0=B0=D1=82=D1=8B=D0=B9=20=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Может быть, починит проблему #16 --- room8.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/room8.lua b/room8.lua index 2af9474..cfc5b75 100644 --- a/room8.lua +++ b/room8.lua @@ -5,13 +5,6 @@ global { list_clothing = std.list {}; } -obj { - -"зубчатый ключ,ключ"; - nam = "thooskey"; - description = "Зубчатый ключ."; --- found_in = 'room8_garderob'; -} - game : dict { ["блузка/рд"] = 'блузки'; ["блузка/вн"] = 'блузку'; From 24afb49c92b559b946d3115142c45b70780be690 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 7 May 2021 02:41:06 +0700 Subject: [PATCH 3/3] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D1=80=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B7=D0=B0=D0=BC=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Точно чинит #16 --- room8.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/room8.lua b/room8.lua index cfc5b75..2d5aba2 100644 --- a/room8.lua +++ b/room8.lua @@ -257,7 +257,9 @@ obj { end return 'Стальной корпус от этого не разогреется, а костёр скорее сожжёт дом, чем отдельный электронный замок. Плохая идея.'; end; - before_Unlock = 'Зубчатый ключ не подходит к электронному замку. Но в двери ты замечаешь замочную скважину. Попробуй отпереть саму дверь.'; + before_Unlock = function(self, thing) + return 'Жаль, но электронный замок не открывается '..thing:noun('тв')..'. Хотя в двери ты замечаешь замочную скважину. Попробуй отпереть саму дверь.'; + end; found_in = 'room8_garderob'; before_Attack = 'Антивандальная защита замка состоит в том, что у него нет отверстий, а стальной корпус нельзя пробить.'; before_Touch = function(s)