1
0
Fork 0
mirror of https://github.com/goraph/17rooms.git synced 2024-06-29 02:44:57 +03:00

Merge pull request #17 from Oreolek/fixes_cleaned

Много мелких правок
This commit is contained in:
goraph 2021-05-07 00:11:23 +03:00 committed by GitHub
commit 18d6781cc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,8 @@
require "snapshots" require "snapshots"
mp.auto_animate = false mp.auto_animate = false
obj { global {
-"зубчатый ключ,ключ"; list_clothing = std.list {};
nam = "thooskey";
description = "Зубчатый ключ.";
-- found_in = 'room8_garderob';
} }
game : dict { game : dict {
@ -25,8 +22,6 @@ game : dict {
["легинсы/рд"] = 'легинсов'; ["легинсы/рд"] = 'легинсов';
["леггинсы/вн"] = 'леггинсы'; ["леггинсы/вн"] = 'леггинсы';
["легинсы/вн"] = 'легинсы'; ["легинсы/вн"] = 'легинсы';
["чёрный/рд"] = 'чёрного';
["чёрный/вн"] = 'чёрный';
["твидовый/рд"] = 'твидового'; ["твидовый/рд"] = 'твидового';
["твидовый/вн"] = 'твидовый'; ["твидовый/вн"] = 'твидовый';
} }
@ -52,7 +47,7 @@ Verb {
function room8_switch_temperature(temp, forced) function room8_switch_temperature(temp, forced)
local oldtemp = _('room8_garderob')._mode local oldtemp = _('room8_garderob')._mode
-- TODO: очень тяжёлый цикл, надо как-то оптимизировать -- 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 if (forced and v:where() ~= nil and v:where().nam == 'room8_control') then
return return
end end
@ -104,7 +99,7 @@ room {
snapshots:write('entersroom'); snapshots:write('entersroom');
end end
local description = ''; local description = '';
if here().hot() then if s.hot() then
description = [[Жарко. ]]; description = [[Жарко. ]];
end end
local clothes = '' local clothes = ''
@ -262,7 +257,9 @@ obj {
end end
return 'Стальной корпус от этого не разогреется, а костёр скорее сожжёт дом, чем отдельный электронный замок. Плохая идея.'; return 'Стальной корпус от этого не разогреется, а костёр скорее сожжёт дом, чем отдельный электронный замок. Плохая идея.';
end; end;
before_Unlock = 'Зубчатый ключ не подходит к электронному замку. Но в двери ты замечаешь замочную скважину. Попробуй отпереть саму дверь.'; before_Unlock = function(self, thing)
return 'Жаль, но электронный замок не открывается '..thing:noun('тв')..'. Хотя в двери ты замечаешь замочную скважину. Попробуй отпереть саму дверь.';
end;
found_in = 'room8_garderob'; found_in = 'room8_garderob';
before_Attack = 'Антивандальная защита замка состоит в том, что у него нет отверстий, а стальной корпус нельзя пробить.'; before_Attack = 'Антивандальная защита замка состоит в том, что у него нет отверстий, а стальной корпус нельзя пробить.';
before_Touch = function(s) before_Touch = function(s)
@ -409,7 +406,7 @@ clothing = Class {
-- Да, ты можешь писать "открыть крючок" потому что это синоним шкафа. -- Да, ты можешь писать "открыть крючок" потому что это синоним шкафа.
-- Но то, что крючки не смоделированы, должно намекать на их несущественность. -- Но то, что крючки не смоделированы, должно намекать на их несущественность.
obj { obj {
-"шкаф,гардероб/мр|крючки/мн|крючок|одежда/жр,но"; -"шкаф,гардероб/мр,но|крючки/мн,но|крючок/мр,но|одежда/жр,но";
nam = 'room8_clothes'; nam = 'room8_clothes';
before_Receive = function(self, thing) before_Receive = function(self, thing)
if not thing:has('clothing') then if not thing:has('clothing') then
@ -517,7 +514,7 @@ clothing {
}: attr 'worn,concealed'; }: attr 'worn,concealed';
clothing { clothing {
-"штаны/ср,мч"; -"штаны/ср,мч,мн";
nam = 'room8_pants'; nam = 'room8_pants';
part = 'bottom'; part = 'bottom';
mode = 'neutral'; mode = 'neutral';
@ -528,7 +525,7 @@ clothing {
}: attr 'worn'; }: attr 'worn';
clothing { clothing {
-"шорты/ср,мч"; -"шорты/ср,мч,мн";
nam = 'room8_shorts'; nam = 'room8_shorts';
part = 'bottom'; part = 'bottom';
mode = 'hot'; mode = 'hot';
@ -539,7 +536,7 @@ clothing {
} }
clothing { clothing {
-"зимние штаны,штаны,щтаны/ср,мч"; -"зимние штаны,штаны,щтаны/ср,мч,мн";
nam = 'room8_winterpants'; nam = 'room8_winterpants';
part = 'bottom'; part = 'bottom';
mode = 'cold'; mode = 'cold';
@ -599,7 +596,7 @@ clothing {
} }
clothing { clothing {
-"твидовый пиджак,пиджак/мр"; -"твидовый пиджак,пиджак/мр,но";
nam = 'room8_winter_formalсoat'; nam = 'room8_winter_formalсoat';
description = 'Чёрный твидовый пиджак. Очень тёплый.'; description = 'Чёрный твидовый пиджак. Очень тёплый.';
level = 3; level = 3;
@ -611,7 +608,7 @@ clothing {
} }
clothing { clothing {
-"чёрный пиджак,черный пиджак,пиджак/мр"; -"чёрный пиджак,черный пиджак,пиджак/мр,но";
nam = 'room8_formalcoat'; nam = 'room8_formalcoat';
paired_hot = 'room8_formalvest'; paired_hot = 'room8_formalvest';
paired_cold = 'room8_winter_formalсoat'; paired_cold = 'room8_winter_formalсoat';
@ -735,7 +732,7 @@ clothing {
} }
clothing { clothing {
-"тёплая рубашка/жр"; -"тёплая рубашка/жр,но";
nam = 'room8_warmshirt'; nam = 'room8_warmshirt';
part = 'top'; part = 'top';
level = 2; level = 2;
@ -758,7 +755,7 @@ clothing {
} }
clothing { clothing {
-"лёгкая рубашка,рубашка/жр"; -"лёгкая рубашка,рубашка/жр,но";
nam = 'room8_lightwear'; nam = 'room8_lightwear';
part = 'top'; part = 'top';
level = 2; level = 2;
@ -1024,3 +1021,9 @@ clothing {
mode = 'cold'; mode = 'cold';
description = 'Серая спортивная толстовка с длинными рукавами.'; description = 'Серая спортивная толстовка с длинными рукавами.';
} }
std.for_each_obj(function(v)
if (v.check_inventory ~= nil and v.getlevel ~= nil) then
list_clothing:add(v)
end
end)