diff --git a/forest.lua b/forest.lua --- a/forest.lua +++ b/forest.lua @@ -37,38 +37,38 @@ global { obj { nam = 'raspberry_pie'; - disp = translate(forest_locale, 'raspberry_pie'); - inv = translate(forest_locale, 'raspberry_pie_inv'); + disp = translate("forest_locale", 'raspberry_pie'); + inv = translate("forest_locale", 'raspberry_pie_inv'); } obj { nam = 'flower'; - disp =translate(forest_locale, 'flower'); - inv = translate(forest_locale, 'flower_inv'); + disp =translate("forest_locale", 'flower'); + inv = translate("forest_locale", 'flower_inv'); } obj { nam = 'lock'; - disp = translate(forest_locale, 'lock'); - disp2 = translate(forest_locale, 'lock_disp2'); - disp3 = translate(forest_locale, 'lock_disp3'); - inv = translate(forest_locale, 'lock_inv'); + disp = translate("forest_locale", 'lock'); + disp2 = translate("forest_locale", 'lock_disp2'); + disp3 = translate("forest_locale", 'lock_disp3'); + inv = translate("forest_locale", 'lock_inv'); } obj { nam = 'old_map'; - disp = translate(forest_locale, 'old_map_disp'); - disp2 = translate(forest_locale, 'old_map_disp2'); - disp3 = translate(forest_locale, 'old_map_disp3'); + disp = translate("forest_locale", 'old_map_disp'); + disp2 = translate("forest_locale", 'old_map_disp2'); + disp3 = translate("forest_locale", 'old_map_disp3'); inv = function(s) + p(translate_now("forest_locale", 'old_map_inv');); if village_visited then + p(translate_now("forest_locale", 'old_map_inv_visited')); if _('fly_west_from_village'):disabled() then - return translate_now(forest_locale, 'old_map_inv_visited'); - else - return translate_now(forest_locale, 'old_map_inv_visited_2'); + p(translate_now("forest_locale", 'old_map_inv_visited_village')); end; else - return translate_now(forest_locale, 'old_map_inv_not_visited'); + p(translate_now("forest_locale", 'old_map_inv_not_visited')); end; end; } @@ -76,12 +76,12 @@ obj { room { nam = 'above_forest'; pic = 'images/above_forest.png'; - disp = translate(forest_locale, 'above_forest'); + disp = translate("forest_locale", 'above_forest'); theme = 'main'; decor = function(s) - p(translate_now(forest_locale, 'above_forest_decor')); + p(translate_now("forest_locale", 'above_forest_decor')); if not village_visited then - p(translate_now(forest_locale, 'above_forest_decor_village')); + p(translate_now("forest_locale", 'above_forest_decor_village')); end; end; enter = function(s) @@ -92,40 +92,40 @@ room { stop_menu(); end; if here():from()^'forest_glade' then - pr(translate_now(forest_locale, 'above_forest_enter')); + pr(translate_now("forest_locale", 'above_forest_enter')); end; snd.music('sound/bgm_forest.ogg'); end; way = { - path {"#down", translate(forest_locale, 'transition_land'), 'forest_glade'}:disable(); - path {"#north", translate(forest_locale, 'transition_north_along_road'), 'above_near_village'}; + path {"#down", translate("forest_locale", 'transition_land'), 'forest_glade'}:disable(); + path {"#north", translate("forest_locale", 'transition_north_along_road'), 'above_near_village'}; } }:with { obj { nam = '#thicket'; - act = translate(forest_locale, 'above_forest_thicket_act'); + act = translate("forest_locale", 'above_forest_thicket_act'); }; obj { nam = '#road'; act = function(s) - pr(translate_now(forest_locale, 'above_forest_road_act')); + pr(translate_now("forest_locale", 'above_forest_road_act')); if not village_visited then - pr(translate_now(forest_locale, 'above_forest_road_act_village')); + pr(translate_now("forest_locale", 'above_forest_road_act_village')); end; end; }; obj { nam = '#powerlines'; - act = translate(forest_locale, 'above_forest_powerlines_act'); + act = translate("forest_locale", 'above_forest_powerlines_act'); }; obj { nam = '#glade'; act = function(s) - pr(translate_now(forest_locale, 'above_forest_glade_act')); + pr(translate_now("forest_locale", 'above_forest_glade_act')); if _'#down':disabled() then _'#down':enable(); - pr(translate_now(forest_locale, 'above_forest_glade_act_first')); + pr(translate_now("forest_locale", 'above_forest_glade_act_first')); end; end; }; @@ -144,27 +144,27 @@ room { return 'images/forest_glade.png;images/forest_glade_flower.png@269,201'; end; end; - disp = translate(forest_locale, 'forest_glade'); + disp = translate("forest_locale", 'forest_glade'); theme = 'main'; - onenter = translate(forest_locale, 'forest_glade_enter'); - decor = translate(forest_locale, 'forest_glade_decor'); + onenter = translate("forest_locale", 'forest_glade_enter'); + decor = translate("forest_locale", 'forest_glade_decor'); way = { - path {'#up', translate(forest_locale, 'transition_fly'), 'above_forest'}; + path {'#up', translate("forest_locale", 'transition_fly'), 'above_forest'}; } }: with { obj { nam = '#thicket'; - act = translate(forest_locale, 'forest_glade_thicket'); + act = translate("forest_locale", 'forest_glade_thicket'); }; obj { nam = '#birds'; - act = translate(forest_locale, 'forest_glade_birds'); + act = translate("forest_locale", 'forest_glade_birds'); }; obj { nam = '#grass'; act = function(s) _'#flowers':enable(); - return translate_now(forest_locale, 'forest_glade_grass'); + return translate_now("forest_locale", 'forest_glade_grass'); end; }; obj { @@ -174,9 +174,9 @@ room { if s.state == 0 then take('flower'); s.state = 1; - return translate_now(forest_locale, 'forest_glade_flowers_first'); + return translate_now("forest_locale", 'forest_glade_flowers_first'); else - return translate_now(forest_locale, 'forest_glade_flowers'); + return translate_now("forest_locale", 'forest_glade_flowers'); end; end; }:disable(); @@ -184,36 +184,36 @@ room { room { nam = 'above_near_village'; - disp = translate(forest_locale, 'above_near_village'); + disp = translate("forest_locale", 'near_village'); pic = 'images/above_near_village.png'; theme = 'main'; onenter = function(s) if here()^'near_village' then - return translate_now(forest_locale, 'above_near_village_enter'); + return translate_now("forest_locale", 'above_near_village_enter'); end; end; - decor = translate(forest_locale, 'above_near_village_decor'); + decor = translate("forest_locale", 'above_near_village_decor'); way = { - path {"#south", translate(forest_locale, 'transition_south_along_road'), 'above_forest'}; - path {"#down", translate(forest_locale, 'transition_land'), 'near_village'}; - path {"#north", translate(forest_locale, 'transition_north_to_the_village'), 'above_village'}; + path {"#south", translate("forest_locale", 'transition_south_along_road'), 'above_forest'}; + path {"#down", translate("forest_locale", 'transition_land'), 'near_village'}; + path {"#north", translate("forest_locale", 'transition_north_to_the_village'), 'above_village'}; } }: with { obj { nam = '#road'; - act = translate(forest_locale, 'above_near_village_road'); + act = translate("forest_locale", 'above_near_village_road'); }; obj { nam = '#thicket'; - act = translate(forest_locale, 'above_near_village_thicket'); + act = translate("forest_locale", 'above_near_village_thicket'); }; obj { nam = '#village'; act = function(s) - pr(translate_now(forest_locale, 'above_near_village_village')); + pr(translate_now("forest_locale", 'above_near_village_village')); if not village_visited then village_visited = true; - pr(translate_now(forest_locale, 'village_unvisited')); + pr(translate_now("forest_locale", 'village_unvisited')); end; end; }; @@ -226,30 +226,30 @@ room { room { nam = 'above_village'; pic = 'images/above_village.png'; - disp = translate(forest_locale, 'above_village'); + disp = translate("forest_locale", 'above_village'); theme = 'main'; - decor = translate(forest_locale, 'above_village_decor'); + decor = translate("forest_locale", 'above_village_decor'); way = { - path {"#south", translate(forest_locale, 'transition_south_along_road'), 'above_near_village'}; - path {"#down", translate(forest_locale, 'transition_land'), 'village_no_way'}; - path {"fly_west_from_village", translate(forest_locale, 'transition_west'), 'above_west'}:disable(); + path {"#south", translate("forest_locale", 'transition_south_along_road'), 'above_near_village'}; + path {"#down", translate("forest_locale", 'transition_land'), 'village_no_way'}; + path {"fly_west_from_village", translate("forest_locale", 'transition_west'), 'above_west'}:disable(); } }: with { obj { nam = '#thicket'; - act = translate(forest_locale, 'above_village_thicket'); + act = translate("forest_locale", 'above_village_thicket'); }; obj { nam = '#road'; - act = translate(forest_locale, 'above_village_road'); + act = translate("forest_locale", 'above_village_road'); }; obj { nam = '#village'; act = function(s) - pr(translate_now(forest_locale, 'above_village_village')); + pr(translate_now("forest_locale", 'above_village_village')); if not village_visited then village_visited = true; - pr(translate_now(forest_locale, 'village_unvisited')); + pr(translate_now("forest_locale", 'village_unvisited')); end; end; }; @@ -261,61 +261,61 @@ room { obj { nam = 'sun'; - act = translate(forest_locale, 'sun'); + act = translate("forest_locale", 'sun'); }; obj { nam = 'sun_transformed'; - act = translate(forest_locale, 'sun_transformed'); + act = translate("forest_locale", 'sun_transformed'); }; obj { nam = 'clouds'; - act = translate(forest_locale, 'clouds'); + act = translate("forest_locale", 'clouds'); }; obj { nam = 'wind'; - act = translate(forest_locale, 'wind'); + act = translate("forest_locale", 'wind'); }; obj { nam = 'mountains'; - act = translate(forest_locale, 'mountains'); + act = translate("forest_locale", 'mountains'); }; room { nam = 'above_west'; - disp = translate(forest_locale, 'above_west'); + disp = translate("forest_locale", 'above_west'); pic = 'images/above_west.png'; theme = 'main'; - decor = translate(forest_locale, 'above_west_decor'); + decor = translate("forest_locale", 'above_west_decor'); way = { - path {"#east", translate(forest_locale, 'transition_east_to_the_village'), 'above_village'}; - path {"#west", translate(forest_locale, 'transition_west_to_the_crater'), 'above_crater'}:disable(); + path {"#east", translate("forest_locale", 'transition_east_to_the_village'), 'above_village'}; + path {"#west", translate("forest_locale", 'transition_west_to_the_crater'), 'above_crater'}:disable(); } }: with { obj { nam = '#village'; - act = translate(forest_locale, 'above_west_village'); + act = translate("forest_locale", 'above_west_village'); }; obj { nam = '#mountains'; - act = translate(forest_locale, 'above_west_mountains'); + act = translate("forest_locale", 'above_west_mountains'); }; obj { nam = '#mountaintops'; - act = translate(forest_locale, 'above_west_mountaintops'); + act = translate("forest_locale", 'above_west_mountaintops'); }; obj { nam = '#mountainslopes'; - act = translate(forest_locale, 'above_west_mountainslopes'); + act = translate("forest_locale", 'above_west_mountainslopes'); }; obj { nam = '#crater'; act = function(s) _'#west':enable(); - return translate_now(forest_locale, 'above_west_crater'); + return translate_now("forest_locale", 'above_west_crater'); end; }; 'clouds'; @@ -328,33 +328,33 @@ room { theme = 'main'; onenter = function(s) if here()^'inside_crater_glade' then - p(translate_now(forest_locale, 'above_crater_enter')); + p(translate_now("forest_locale", 'above_crater_enter')); end; end; - disp = translate(forest_locale, 'above_crater'); - decor = translate(forest_locale, 'above_crater_decor'); + disp = translate("forest_locale", 'above_crater'); + decor = translate("forest_locale", 'above_crater_decor'); way = { - path {"#east", translate(forest_locale, 'transition_east'), 'above_west'}; - path {"#down", translate(forest_locale, 'transition_land'), 'inside_crater_glade'}:disable(); + path {"#east", translate("forest_locale", 'transition_east'), 'above_west'}; + path {"#down", translate("forest_locale", 'transition_land'), 'inside_crater_glade'}:disable(); } }: with { obj { nam = '#crater'; - act = translate(forest_locale, 'above_crater_crater'); + act = translate("forest_locale", 'above_crater_crater'); }; obj { nam = '#tower'; - act = translate(forest_locale, 'above_crater_tower'); + act = translate("forest_locale", 'above_crater_tower'); }; obj { nam = '#trees'; - act = translate(forest_locale, 'above_crater_trees'); + act = translate("forest_locale", 'above_crater_trees'); }; obj { nam = '#glade'; act = function(s) _'#down':enable(); - return translate_now(forest_locale, 'above_crater_glade'); + return translate_now("forest_locale", 'above_crater_glade'); end; }; 'wind'; @@ -366,9 +366,9 @@ room { nam = 'village_no_way'; onenter = function(s) if solarscale_with_me then - p(translate_now(forest_locale, 'village_no_way_solarscale')); + p(translate_now("forest_locale", 'village_no_way_solarscale')); else - p(translate_now(forest_locale, 'village_no_way_alone')); + p(translate_now("forest_locale", 'village_no_way_alone')); end; return false; end; @@ -376,35 +376,35 @@ room { room { nam = 'near_village'; - disp = translate(forest_locale, 'near_village'); + disp = translate("forest_locale", 'near_village'); pic = 'images/near_village.png'; theme = 'main'; onenter = function(s) if here()^'above_near_village' then - p(translate_now(forest_locale, 'near_village_enter')); + p(translate_now("forest_locale", 'near_village_enter')); end; end; - decor = translate(forest_locale, 'near_village_decor'); + decor = translate("forest_locale", 'near_village_decor'); way = { - path {"#up", translate(forest_locale, 'transition_fly'), 'above_near_village'}; - path {"#north", translate(forest_locale, 'transition_north_to_the_village'), 'village_south'}; + path {"#up", translate("forest_locale", 'transition_fly'), 'above_near_village'}; + path {"#north", translate("forest_locale", 'transition_north_to_the_village'), 'village_south'}; } }: with { obj { nam = '#road'; - act = translate(forest_locale, 'near_village_road'); + act = translate("forest_locale", 'near_village_road'); }; obj { nam = '#forest'; - act = translate(forest_locale, 'near_village_forest'); + act = translate("forest_locale", 'near_village_forest'); }; obj { nam = '#village'; act = function(s) - p(translate_now(forest_locale, 'near_village_village')); + p(translate_now("forest_locale", 'near_village_village')); if not village_visited then village_visited = true; - p(translate_now(forest_locale, 'village_unvisited')); + p(translate_now("forest_locale", 'village_unvisited')); end; end; }; @@ -414,44 +414,44 @@ room { room { nam = 'village_south'; - disp = translate(forest_locale, 'village_south'); + disp = translate("forest_locale", 'village_south'); pic='images/village_south.png'; theme = 'main'; enter = function(s) if not village_visited then village_visited = true; - p(translate_now(forest_locale, 'village_unvisited')); + p(translate_now("forest_locale", 'village_unvisited')); end; end; nofollow = function(s) if here():from()^'near_village' then - return translate_now(forest_locale, 'village_south_follow'); + return translate_now("solarscale_locale", 'follow_refuse') .. ' ' ..translate_now("solarscale_locale", 'follow_refuse_village'); else return true; end; end; - decor = translate(forest_locale, 'village_south_decor'); + decor = translate("forest_locale", 'village_south_decor'); way = { - path {'#south', translate(forest_locale, 'transition_south_to_the_forest'), 'near_village'}; - path {'#in', translate(forest_locale, 'transition_inside_hut'), 'foresters_hut'}; - path {'#north', translate(forest_locale, 'transition_north_to_the_townhall'), 'village_center'}; + path {'#south', translate("forest_locale", 'transition_south_to_the_forest'), 'near_village'}; + path {'#in', translate("forest_locale", 'transition_inside_hut'), 'foresters_hut'}; + path {'#north', translate("forest_locale", 'transition_north_to_the_townhall'), 'village_center'}; }; }:with { obj { nam = '#road'; - act = translate(forest_locale, 'village_south_road'); + act = translate("forest_locale", 'village_south_road'); }; obj { nam = '#village'; - act = translate(forest_locale, 'village_south_village'); + act = translate("forest_locale", 'village_south_village'); }; obj { nam = '#foresters_car'; - act = translate(forest_locale, 'village_south_car'); + act = translate("forest_locale", 'village_south_car'); }; obj { nam = '#foresters_hut_out'; - act = translate(forest_locale, 'village_south_hut'); + act = translate("forest_locale", 'village_south_hut'); }; 'sun_transformed'; 'clouds'; @@ -469,91 +469,91 @@ room { end; theme = 'main'; nofollow = true; - disp = translate(forest_locale, 'foresters_hut'); + disp = translate("forest_locale", 'foresters_hut'); enter = function(s) if s.state == 0 then s.state = 1; - return translate_now(forest_locale, 'foresters_hut_enter'); + return translate_now("forest_locale", 'foresters_hut_enter'); end; end; - decor = translate(forest_locale, 'foresters_hut_decor'); + decor = translate("forest_locale", 'foresters_hut_decor'); way = { - path {'#out', translate(forest_locale, 'transition_out'), 'village_south'}; + path {'#out', translate("forest_locale", 'transition_out'), 'village_south'}; } }:with { obj { nam = '#sofa'; - act = translate(forest_locale, 'foresters_hut_sofa'); + act = translate("forest_locale", 'foresters_hut_sofa'); }; obj { nam = '#cupboard'; - act = translate(forest_locale, 'foresters_hut_cupboard'); + act = translate("forest_locale", 'foresters_hut_cupboard'); }; obj { nam = '#table'; - act = translate(forest_locale, 'foresters_hut_table'); + act = translate("forest_locale", 'foresters_hut_table'); }; obj { nam = '#chairs'; - act = translate(forest_locale, 'foresters_hut_chairs'); + act = translate("forest_locale", 'foresters_hut_chairs'); }; obj { nam = '#radio'; - act = translate(forest_locale, 'foresters_hut_radio'); + act = translate("forest_locale", 'foresters_hut_radio'); }; obj { bought = false; nam = 'forester'; - dsc = translate(forest_locale, 'foresters_hut_forester'); + dsc = translate("forest_locale", 'foresters_hut_forester'); act = function(s) walkin('forester_dlg'); end; used = function(s, o) if o^'raspberry_pie' then - return translate_now(forest_locale, 'foresters_hut_forester_pie'); + return translate_now("forest_locale", 'foresters_hut_forester_pie'); else - return translate_now(forest_locale, 'foresters_hut_not_interested'); + return translate_now("forest_locale", 'foresters_hut_not_interested'); end; end; }; obj { nam = 'rope'; - disp = translate(forest_locale, 'foresters_hut_rope_disp'); - dsc = translate(forest_locale, 'foresters_hut_rope'); + disp = translate("forest_locale", 'foresters_hut_rope_disp'); + dsc = translate("forest_locale", 'foresters_hut_rope'); act = function(s) if _('forester').bought then - p(translate_now(forest_locale, 'foresters_hut_rope_taken')); + p(translate_now("forest_locale", 'foresters_hut_rope_taken')); take('rope') else - p(translate_now(forest_locale, 'foresters_hut_rope_not_taken')); + p(translate_now("forest_locale", 'foresters_hut_rope_not_taken')); end; end; - inv = translate(forest_locale, 'foresters_hut_rope_inv'); + inv = translate("forest_locale", 'foresters_hut_rope_inv'); }; } dlg { nam = 'forester_dlg'; - disp = translate(forest_locale, 'forester_dlg_disp'); + disp = translate("forest_locale", 'forester_dlg_disp'); theme = 'main'; pic = 'images/characters/forester.png'; - enter = translate(forest_locale, 'forester_dlg_enter'); + enter = translate("forest_locale", 'forester_dlg_enter'); phr = { - {translate(forest_locale, 'common_dlg_greet'), translate(forest_locale, 'forester_dlg_greet_response'), - {translate(forest_locale, 'common_dlg_places'), translate(forest_locale, 'forester_dlg_places_response')}; + {translate("forest_locale", 'common_dlg_greet'), translate("forest_locale", 'forester_dlg_greet_response'), + {translate("forest_locale", 'common_dlg_places'), translate("forest_locale", 'forester_dlg_places_response')}; }, - {cond=function(s) return where('rope') and where('rope')^'foresters_hut' and not _('forester').bought end, translate(forest_locale, 'forester_dlg_rope'), function(s) - p(translate_now(forest_locale, 'forester_dlg_rope_response')); + {cond=function(s) return where('rope') and where('rope')^'foresters_hut' and not _('forester').bought end, translate("forest_locale", 'forester_dlg_rope'), function(s) + p(translate_now("forest_locale", 'forester_dlg_rope_response')); raspberry_pie_status = 1; end}, - {cond=function(s) return have 'raspberry_pie' end, translate(forest_locale, 'forester_dlg_pie'), function(s) + {cond=function(s) return have 'raspberry_pie' end, translate("forest_locale", 'forester_dlg_pie'), function(s) remove('raspberry_pie', pl); - p(translate_now(forest_locale, 'forester_dlg_pie_response')); + p(translate_now("forest_locale", 'forester_dlg_pie_response')); raspberry_pie_status = 2; _('forester').bought = 1; end}, - {true, translate(forest_locale, 'forester_dlg_farewell'), function(s) - p(translate_now(forest_locale, 'forester_dlg_farewell_response')); + {true, translate("forest_locale", 'common_dlg_bye'), function(s) + p(translate_now("forest_locale", 'forester_dlg_farewell_response')); walkout(); end} } @@ -564,51 +564,51 @@ room { nofollow = true; pic = 'images/village_center.png'; theme = 'main'; - disp = translate(forest_locale, 'village_center'); + disp = translate("forest_locale", 'village_center'); decor = function(s) - p(translate_now(forest_locale, 'village_center_decor')); - p(translate_now(forest_locale, 'village_all_decor')); + p(translate_now("forest_locale", 'village_center_decor')); + p(translate_now("forest_locale", 'village_all_decor')); end; way = { - path {translate(forest_locale, 'transition_south_to_hut'), 'village_south'}; - path {'#down', translate(forest_locale, 'transition_inside_well'), 'inside_well'}:disable(); - path {translate(forest_locale, 'transition_inside_town_hall'), 'townhall'}; - path {translate(forest_locale, 'transition_inside_tavern'), 'tavern'}; - path {translate(forest_locale, 'transition_north_to_library'), 'village_north'}; + path {translate("forest_locale", 'transition_south_to_hut'), 'village_south'}; + path {'#down', translate("forest_locale", 'transition_inside_well'), 'inside_well'}:disable(); + path {translate("forest_locale", 'transition_inside_town_hall'), 'townhall'}; + path {translate("forest_locale", 'transition_inside_tavern'), 'tavern'}; + path {translate("forest_locale", 'transition_north_to_library'), 'village_north'}; }; }: with { obj { nam = '#townhall'; - act = translate(forest_locale, 'village_center_townhall'); + act = translate("forest_locale", 'village_center_townhall'); }; obj { nam = '#music'; - act = translate(forest_locale, 'village_center_music'); + act = translate("forest_locale", 'village_center_music'); }; obj { nam = '#tavern'; - act = translate(forest_locale, 'village_center_tavern'); + act = translate("forest_locale", 'village_center_tavern'); }; obj { nam = '#library'; - act = translate(forest_locale, 'village_center_library'); + act = translate("forest_locale", 'village_center_library'); }; obj { known = false; nam = 'village_well'; dsc = function(s) - p(translate_now(forest_locale, 'village_well_dsc')); + p(translate_now("forest_locale", 'village_well_dsc')); if _('inside_well').state then - p(translate_now(forest_locale, 'village_well_dsc_rope')); + p(translate_now("forest_locale", 'village_well_dsc_rope')); end; end; act = function(s) if s.known then _'#down':enable(); - p(translate_now(forest_locale, 'village_well_act_key')); + p(translate_now("forest_locale", 'village_well_act_key')); else - p(translate_now(forest_locale, 'village_well_act')); + p(translate_now("forest_locale", 'village_well_act')); end; end; used = function(s, o) @@ -616,7 +616,7 @@ room { _'#down':enable(); _('inside_well').state = true; remove('rope', pl); - p(translate_now(forest_locale, 'village_well_used')); + p(translate_now("forest_locale", 'village_well_used')); else return false; end; @@ -625,23 +625,23 @@ room { obj { nam = 'maid'; dsc = function(s) - p(translate_now(forest_locale, 'village_maid_dsc')); + p(translate_now("forest_locale", 'village_maid_dsc')); if _('maid_dlg').flower then - p(translate_now(forest_locale, 'village_maid_flower')); + p(translate_now("forest_locale", 'village_maid_flower')); end; end; act = function(s) if _('maid_dlg').flower and (raspberry_pie_status == 0 or raspberry_pie_status == 2) then - return translate_now(forest_locale, 'village_maid_act'); + return translate_now("forest_locale", 'maid_dlg_enter') .. ' ' .. translate_now("forest_locale", 'village_maid_act_no_dlg'); else walkin('maid_dlg'); end; end; used = function(s, o) if o^'flower' then - return translate_now(forest_locale, 'village_maid_used_flower'); + return translate_now("forest_locale", 'village_maid_used_flower'); else - return translate_now(forest_locale, 'village_maid_used_other'); + return translate_now("forest_locale", 'village_maid_used_other'); end; end; }; @@ -651,7 +651,7 @@ room { dlg { nam = 'maid_dlg'; - disp = translate(forest_locale, 'maid_dlg'); + disp = translate("forest_locale", 'maid_dlg'); theme = 'main'; pic = function(s) if s.flower then @@ -665,86 +665,88 @@ dlg { work_asked = false; pie_asked = false; enter = function(s) + p(translate_now("forest_locale", 'maid_dlg_enter')); if _('maid_dlg').flower then - return translate_now(forest_locale, 'maid_dlg_enter_flower'); + p(translate_now("forest_locale", 'maid_dlg_enter_with_flower')); + p(translate_now("forest_locale", 'village_maid_flower')); else - return translate_now(forest_locale, 'maid_dlg_enter_no_flower'); + p(translate_now("forest_locale", 'maid_dlg_enter_no_flower')); end; end; phr = { - {cond=function(s) return not _('maid_dlg').flower end, translate(forest_locale, 'common_dlg_greet'), translate(forest_locale, 'maid_dlg_greet_response'), - {translate(forest_locale, 'common_dlg_places'), translate(forest_locale, 'maid_dlg_places_response'), - {translate(forest_locale, 'maid_dlg_places_like'), translate(forest_locale, 'maid_dlg_places_like_response'), only=true, + {cond=function(s) return not _('maid_dlg').flower end, translate("forest_locale", 'common_dlg_greet'), translate("forest_locale", 'maid_dlg_greet_response'), + {translate("forest_locale", 'common_dlg_places'), translate("forest_locale", 'maid_dlg_places_response'), + {translate("forest_locale", 'maid_dlg_places_like'), translate("forest_locale", 'maid_dlg_places_like_response'), only=true, { cond=function(s) return have 'flower' end, - translate(forest_locale, 'maid_dlg_flower'), + translate("forest_locale", 'maid_dlg_flower'), function(s) _('maid_dlg').flower = 1; remove('flower', pl); - p(translate_now(forest_locale, 'maid_dlg_flower_response')); + p(translate_now("forest_locale", 'maid_dlg_flower_response')); end }; { - translate(forest_locale, 'maid_dlg_silent'), - translate(forest_locale, 'maid_dlg_silent_response') + translate("common_locale", 'dlg_keep_silent'), + translate("forest_locale", 'maid_dlg_silent_response') } }; }; }; - {cond=function(s) return not _('maid_dlg').work_asked end, translate(forest_locale, 'maid_dlg_tavern'), function(s) + {cond=function(s) return not _('maid_dlg').work_asked end, translate("forest_locale", 'maid_dlg_tavern'), function(s) _('maid_dlg').work_asked = true; - return translate_now(forest_locale, 'maid_dlg_tavern_response'); + return translate_now("forest_locale", 'maid_dlg_tavern_response'); end}; { cond=function(s) return _('maid_dlg').pie_asked and have 'flower' end, - translate(forest_locale, 'maid_dlg_flower'), + translate("forest_locale", 'maid_dlg_flower'), function(s) _('maid_dlg').flower = 1; remove('flower', pl); raspberry_pie_status = 2; take 'raspberry_pie' - p(translate_now(forest_locale, 'maid_dlg_pie_response')); + p(translate_now("forest_locale", 'maid_dlg_pie_response')); end }; { cond=function(s) return _('maid_dlg').work_asked and not _('maid_dlg').pie_asked and _('maid_dlg').flower and raspberry_pie_status == 1; end; - translate(forest_locale, 'maid_dlg_pie'), + translate("forest_locale", 'maid_dlg_pie'), function(s) raspberry_pie_status = 2; take 'raspberry_pie' - p(translate_now(forest_locale, 'maid_dlg_pie_response')); + p(translate_now("forest_locale", 'maid_dlg_pie_response')); end; }; { cond=function(s) return _('maid_dlg').work_asked and not _('maid_dlg').pie_asked and not _('maid_dlg').flower and raspberry_pie_status == 1; end; - translate(forest_locale, 'maid_dlg_pie'), - translate(forest_locale, 'maid_dlg_pie_fail_response'), only=true, + translate("forest_locale", 'maid_dlg_pie'), + translate("forest_locale", 'maid_dlg_pie_fail_response'), only=true, { - translate(forest_locale, 'maid_dlg_no_money'), function(s) + translate("forest_locale", 'maid_dlg_no_money'), function(s) _('maid_dlg').pie_asked = 1; - p(translate_now(forest_locale, 'maid_dlg_no_money_response')); + p(translate_now("forest_locale", 'maid_dlg_no_money_response')); end, only=true, { cond=function(s) return have 'flower' end, - translate(forest_locale, 'maid_dlg_flower'), + translate("forest_locale", 'maid_dlg_flower'), function(s) _('maid_dlg').flower = 1; remove('flower', pl); raspberry_pie_status = 2; take('raspberry_pie'); - p(translate_now(forest_locale, 'maid_dlg_pie_response')); + p(translate_now("forest_locale", 'maid_dlg_pie_response')); end }; - {translate(forest_locale, 'maid_dlg_flower_agree'), translate(forest_locale, 'maid_dlg_flower_agree_response')}; - {translate(forest_locale, 'maid_dlg_flower_think'), translate(forest_locale, 'maid_dlg_flower_think_response')}; + {translate("forest_locale", 'maid_dlg_flower_agree'), translate("forest_locale", 'maid_dlg_flower_agree_response')}; + {translate("forest_locale", 'maid_dlg_flower_think'), translate("forest_locale", 'maid_dlg_flower_think_response')}; }, { - translate(forest_locale, 'maid_dlg_pie_ask'), translate(forest_locale, 'maid_dlg_pie_ask_response') + translate("forest_locale", 'maid_dlg_pie_ask'), translate("forest_locale", 'maid_dlg_pie_ask_response') } }; { - translate(forest_locale, 'maid_dlg_bye'), function(s) - p(translate_now(forest_locale, 'maid_dlg_bye_response')); + translate("forest_locale", 'maid_dlg_bye'), function(s) + p(translate_now("forest_locale", 'maid_dlg_bye_response')); walkout(); end } @@ -760,41 +762,41 @@ room { return 'images/tavern.png;images/tavern_pie.png@181,124'; end; end; - disp = translate(forest_locale, 'tavern'); + disp = translate("forest_locale", 'tavern'); theme = 'main'; nofollow = true; - decor = translate(forest_locale, 'tavern_decor'); + decor = translate("forest_locale", 'tavern_decor'); way = { - path {'#outside', translate(forest_locale, 'transition_out'), 'village_center'}; + path {'#outside', translate("forest_locale", 'transition_out'), 'village_center'}; }; }: with { obj { nam = '#windows'; - act = translate(forest_locale, 'tavern_windows'); + act = translate("forest_locale", 'tavern_windows'); }; obj { nam = '#tables'; - act = translate(forest_locale, 'tavern_tables'); + act = translate("forest_locale", 'tavern_tables'); }; obj { nam = '#walls'; - act = translate(forest_locale, 'tavern_walls'); + act = translate("forest_locale", 'tavern_walls'); }; obj { nam = '#lights'; - act = translate(forest_locale, 'tavern_lights'); + act = translate("forest_locale", 'tavern_lights'); }; obj { nam = '#fireplace'; - act = translate(forest_locale, 'tavern_fireplace'); + act = translate("forest_locale", 'tavern_fireplace'); }; obj { nam = '#cauldron'; - act = translate(forest_locale, 'tavern_cauldron'); + act = translate("forest_locale", 'tavern_cauldron'); }; obj { nam = 'tavernkeeper'; - dsc = translate(forest_locale, 'tavern_keeper'); + dsc = translate("forest_locale", 'tavern_keeper'); act = function(s) walkin 'tavernkeeper_dlg' end; @@ -804,20 +806,20 @@ room { dlg { nam = 'tavernkeeper_dlg'; noinv = true; - title = translate(forest_locale, 'tavernkeeper_dlg'); + title = translate("forest_locale", 'tavernkeeper_dlg'); pic = 'images/characters/tavernkeeper.png'; theme = 'main'; - enter = translate(forest_locale, 'tavernkeeper_dlg_enter'); + enter = translate("forest_locale", 'tavernkeeper_dlg_enter'); phr = { - {translate(forest_locale, 'common_dlg_greet'), translate(forest_locale, 'tavernkeeper_dlg_greet_response'), - {translate(forest_locale, 'tavernkeeper_dlg_money'), translate(forest_locale, 'tavernkeeper_dlg_money_response')}; - {translate(forest_locale, 'common_dlg_places'), translate(forest_locale, 'tavernkeeper_dlg_places_response')}; + {translate("forest_locale", 'common_dlg_greet'), translate("forest_locale", 'tavernkeeper_dlg_greet_response'), + {translate("forest_locale", 'tavernkeeper_dlg_money'), translate("forest_locale", 'tavernkeeper_dlg_money_response')}; + {translate("forest_locale", 'common_dlg_places'), translate("forest_locale", 'tavernkeeper_dlg_places_response')}; }; - {cond=function(s) return raspberry_pie_status == 1; end, translate(forest_locale, 'tavernkeeper_dlg_pie'), translate(forest_locale, 'tavernkeeper_dlg_pie_response'), - {translate(forest_locale, 'tavernkeeper_dlg_pie_2'), translate(forest_locale, 'tavernkeeper_dlg_pie_response_2')} + {cond=function(s) return raspberry_pie_status == 1; end, translate("forest_locale", 'tavernkeeper_dlg_pie'), translate("forest_locale", 'tavernkeeper_dlg_pie_response'), + {translate("forest_locale", 'tavernkeeper_dlg_pie_2'), translate("forest_locale", 'tavernkeeper_dlg_pie_response_2')} }; - {true, translate(forest_locale, 'tavernkeeper_dlg_bye'), function(s) - p(translate_now(forest_locale, 'tavernkeeper_dlg_bye_response')); + {true, translate("forest_locale", 'common_dlg_bye'), function(s) + p(translate_now("forest_locale", 'tavernkeeper_dlg_bye_response')); walkout(); end}; }; @@ -827,52 +829,52 @@ room { nam = 'townhall'; pic='images/townhall.png'; theme = 'main'; - title = translate(forest_locale, 'townhall'); + title = translate("forest_locale", 'townhall'); nofollow = true; - decor = translate(forest_locale, 'townhall_decor'); + decor = translate("forest_locale", 'townhall_decor'); onexit = function(s) if have 'oil' then - p(translate_now(forest_locale, 'townhall_onexit')); + p(translate_now("forest_locale", 'townhall_onexit')); return false; end; end; way = { - path {'#out', translate(forest_locale, 'transition_out'), 'village_center'}; + path {'#out', translate("forest_locale", 'transition_out'), 'village_center'}; }; }: with { obj { nam = '#ceiling'; - act = translate(forest_locale, 'townhall_ceiling'); + act = translate("forest_locale", 'townhall_ceiling'); }; obj { nam = '#chandelier'; - act = translate(forest_locale, 'townhall_chandelier'); + act = translate("forest_locale", 'townhall_chandelier'); }; obj { nam = '#curtains'; - act = translate(forest_locale, 'townhall_curtains'); + act = translate("forest_locale", 'townhall_curtains'); }; obj { nam = '#table'; - act = translate(forest_locale, 'townhall_table'); + act = translate("forest_locale", 'townhall_table'); }; obj { nam = '#chairs'; - act = translate(forest_locale, 'townhall_chairs'); + act = translate("forest_locale", 'townhall_chairs'); }; obj { nam = '#head'; - act = translate(forest_locale, 'townhall_head'); + act = translate("forest_locale", 'townhall_head'); }; obj { flask = true; nam = 'cabinet'; - dsc = translate(forest_locale, 'townhall_cabinet'); + dsc = translate("forest_locale", 'townhall_cabinet'); act = function(s) if s.flask then - return translate_now(forest_locale, 'townhall_cabinet_act_oil'); + return translate_now("forest_locale", 'townhall_cabinet_act_oil'); else - return translate_now(forest_locale, 'townhall_cabinet_act'); + return translate_now("forest_locale", 'townhall_cabinet_act'); end; end; used = function(s, o) @@ -880,30 +882,30 @@ room { s.flask = true; remove(o, pl); put(o, 'townhall'); - return translate_now(forest_locale, 'townhall_cabinet_used_oil'); + return translate_now("forest_locale", 'townhall_cabinet_used_oil'); end; end; }:with { obj { nam = 'records'; - act = translate(forest_locale, 'townhall_cabinet_records'); + act = translate("forest_locale", 'townhall_cabinet_records'); }; obj { nam = 'parts'; - act = translate(forest_locale, 'townhall_cabinet_parts'); + act = translate("forest_locale", 'townhall_cabinet_parts'); }; obj { nam = 'oil'; - disp = translate(forest_locale, 'townhall_cabinet_oil'); + disp = translate("forest_locale", 'townhall_cabinet_oil'); tak = function(s) _('cabinet').flask = false; - return translate_now(forest_locale, 'townhall_cabinet_oil_tak'); + return translate_now("forest_locale", 'townhall_cabinet_oil_tak'); end; - inv = translate(forest_locale, 'townhall_cabinet_oil_inv'); + inv = translate("forest_locale", 'townhall_cabinet_oil_inv'); }; obj { nam = 'record_player'; - act = translate(forest_locale, 'townhall_cabinet_record_player'); + act = translate("forest_locale", 'townhall_cabinet_record_player'); }; }; } @@ -914,23 +916,23 @@ room { nam = 'inside_well'; theme = 'tower'; pic = 'images/oldwell.png'; - disp = translate(forest_locale, 'inside_well'); + disp = translate("forest_locale", 'inside_well'); onenter = function(s) if not s.state then - p(translate_now(forest_locale, 'inside_well_enter')); + p(translate_now("forest_locale", 'inside_well_enter')); return false; end; end; - decor = translate(forest_locale, 'inside_well_decor'); + decor = translate("forest_locale", 'inside_well_decor'); way = { - path {translate(forest_locale, 'transition_up'), 'village_center'}; + path {translate("forest_locale", 'transition_up'), 'village_center'}; } }:with { obj { nam = 'loose_rock'; - dsc = translate(forest_locale, 'inside_well_loose_rock'); + dsc = translate("forest_locale", 'inside_well_loose_rock'); act = function(s) - p(translate_now(forest_locale, 'inside_well_loose_rock_act')); + p(translate_now("forest_locale", 'inside_well_loose_rock_act')); take('hidden_key'); s:disable(); end; @@ -939,46 +941,46 @@ room { obj { nam = 'hidden_key'; - disp = translate(forest_locale, 'hidden_key_disp'); - disp2 = translate(forest_locale, 'hidden_key_disp2'); - disp3 = translate(forest_locale, 'hidden_key_disp3'); - inv = translate(forest_locale, 'hidden_key_inv'); + disp = translate("forest_locale", 'hidden_key_disp'); + disp2 = translate("forest_locale", 'hidden_key_disp2'); + disp3 = translate("forest_locale", 'hidden_key_disp3'); + inv = translate("forest_locale", 'hidden_key_inv'); } room { nam = 'village_north'; pic = 'images/village_north.png'; - disp = translate(forest_locale, 'village_north'); + disp = translate("forest_locale", 'village_north'); theme = 'main'; nofollow = true; decor = function(s) - p(translate_now(forest_locale, 'village_north_decor')); - p(translate_now(forest_locale, 'village_all_decor')); + p(translate_now("forest_locale", 'village_north_decor')); + p(translate_now("forest_locale", 'village_all_decor')); end; way = { - path {'#south', translate(forest_locale, 'transition_south_to_town_hall'), 'village_center'}; - path {'#in', translate(forest_locale, 'transition_inside_library'), 'library'}; + path {'#south', translate("forest_locale", 'transition_south_to_town_hall'), 'village_center'}; + path {'#in', translate("forest_locale", 'transition_inside_library'), 'library'}; }; }: with { obj { nam = '#village'; - act = translate(forest_locale, 'village_north_village'); + act = translate("forest_locale", 'village_north_village'); }; obj { nam = '#road'; - act = translate(forest_locale, 'village_north_road'); + act = translate("forest_locale", 'village_north_road'); }; obj { nam = '#forest'; - act = translate(forest_locale, 'village_north_forest'); + act = translate("forest_locale", 'village_north_forest'); }; obj { nam = '#library'; - act = translate(forest_locale, 'village_north_library'); + act = translate("forest_locale", 'village_north_library'); }; obj { nam = '#mountains'; - act = translate(forest_locale, 'village_north_mountains'); + act = translate("forest_locale", 'village_north_mountains'); }; 'sun_transformed'; 'clouds'; @@ -987,53 +989,53 @@ room { room { nam = 'library'; pic = 'images/library.png'; - disp = translate(forest_locale, 'library'); + disp = translate("forest_locale", 'library'); theme = 'main'; nofollow = true; - decor = translate(forest_locale, 'library_decor'); + decor = translate("forest_locale", 'library_decor'); way = { - path {'#out', translate(forest_locale, 'transition_out'), 'village_north'}; - path {'library_hidden_path', translate(forest_locale, 'transition_to_hidden_room'), 'library_hidden_room'}:disable(); + path {'#out', translate("forest_locale", 'transition_out'), 'village_north'}; + path {'library_hidden_path', translate("forest_locale", 'transition_to_hidden_room'), 'library_hidden_room'}:disable(); }; }:with { obj { nam = 'librarian'; - dsc = translate(forest_locale, 'library_librarian'); + dsc = translate("forest_locale", 'library_librarian'); act = function(s) walkin 'librarian_dlg' end; used = function(s, o) if o^'box' then - return translate_now(forest_locale, 'library_librarian_used_box'); + return translate_now("forest_locale", 'library_librarian_used_box'); else - return translate_now(forest_locale, 'library_librarian_used_other'); + return translate_now("forest_locale", 'library_librarian_used_other'); end; end; }; obj { nam = '#tables'; - act = translate(forest_locale, 'library_tables'); + act = translate("forest_locale", 'library_tables'); }; obj { nam = '#chairs'; - act = translate(forest_locale, 'library_chairs'); + act = translate("forest_locale", 'library_chairs'); }; obj { nam = '#lamps'; - act = translate(forest_locale, 'library_lamps'); + act = translate("forest_locale", 'library_lamps'); }; obj { nam = '#windows'; - act = translate(forest_locale, 'library_windows'); + act = translate("forest_locale", 'library_windows'); }; obj { state = 0; nam = 'library_shelves'; act = function(s) if s.state == 0 then - p(translate_now(forest_locale, 'library_shelves_act_first')); + p(translate_now("forest_locale", 'library_shelves_act_first')); else - p(translate_now(forest_locale, 'library_shelves_act')); + p(translate_now("forest_locale", 'library_shelves_act')); end; end; }, @@ -1041,7 +1043,7 @@ room { nam = 'library_the_shelf'; act = function(s) if _'library_shelves'.state == 0 then - p(translate_now(forest_locale, 'library_the_shelf_act', {word=library_word})); + p(translate_now("forest_locale", 'library_the_shelf_act', {word=library_word})); end; _'library_shelves'.state = 1; walkin('library_shelf_puzzle'); @@ -1058,12 +1060,12 @@ room { room { nam = 'library_notice_inside'; pic = 'images/library.png'; - disp = translate(forest_locale, 'library'); + disp = translate("forest_locale", 'library'); theme = 'main'; nofollow = true; - decor = translate(forest_locale, 'library_notice_inside_decor'); + decor = translate("forest_locale", 'library_notice_inside_decor'); way = { - path {translate(common_locale, 'back'), 'library'}; + path {translate("common_locale", 'back'), 'library'}; }; } @@ -1073,25 +1075,25 @@ dlg { pic = 'images/characters/librarian.png'; theme = 'main'; noinv = true; - title = translate(forest_locale, 'librarian_dlg'); + title = translate("forest_locale", 'librarian_dlg'); enter = function(s) seen_ring_librarian = true; - return translate_now(forest_locale, 'librarian_dlg_enter'); + return translate_now("forest_locale", 'librarian_dlg_enter'); end; phr = { - {translate(forest_locale, 'common_dlg_greet'), translate(forest_locale, 'librarian_dlg_greet_response'), - {translate(forest_locale, 'common_dlg_places'), translate(forest_locale, 'librarian_dlg_places_response'), - {translate(forest_locale, 'librarian_dlg_library'), translate(forest_locale, 'librarian_dlg_library_response')}; - {translate(forest_locale, 'librarian_dlg_library_old'), translate(forest_locale, 'librarian_dlg_library_old_response')}; + {translate("forest_locale", 'common_dlg_greet'), translate("forest_locale", 'librarian_dlg_greet_response'), + {translate("forest_locale", 'common_dlg_places'), translate("forest_locale", 'librarian_dlg_places_response'), + {translate("forest_locale", 'librarian_dlg_library'), translate("forest_locale", 'librarian_dlg_library_response')}; + {translate("forest_locale", 'librarian_dlg_library_old'), translate("forest_locale", 'librarian_dlg_library_old_response')}; }, - {translate(forest_locale, 'librarian_dlg_ring'), translate(forest_locale, 'librarian_dlg_ring_response')} + {translate("forest_locale", 'librarian_dlg_ring'), translate("forest_locale", 'librarian_dlg_ring_response')} }, - {cond=function(s) return seen_ring_box; end, translate(forest_locale, 'librarian_dlg_ring_look'), function(s) + {cond=function(s) return seen_ring_box; end, translate("forest_locale", 'librarian_dlg_ring_look'), function(s) _('village_well').known = 1; - return translate_now(forest_locale, 'librarian_dlg_ring_look_response'); + return translate_now("forest_locale", 'librarian_dlg_ring_look_response'); end}; - {true, translate(forest_locale, 'librarian_dlg_bye'), function(s) - p(translate_now(forest_locale, 'librarian_dlg_bye_response')); + {true, translate("forest_locale", 'common_dlg_bye'), function(s) + p(translate_now("forest_locale", 'librarian_dlg_bye_response')); walkout(); end} } @@ -1101,10 +1103,12 @@ function book(number) return obj { book = number; nam = 'book_' .. tostring(number); - disp = translate(forest_locale, 'library_shelf_book_disp', {number=number}); - dsc = translate(forest_locale, 'library_shelf_book_dsc', {number=number}); - tak = translate(forest_locale, 'library_shelf_book_tak'); - inv = translate(forest_locale, 'library_shelf_book_inv'); + disp = translate("forest_locale", 'library_shelf_book_disp', {number=number}); + dsc = function(s) + return '{"' .. translate_now("forest_locale", 'library_shelf_book_disp', {number=number}) .. '"}'; + end; + tak = translate("forest_locale", 'library_shelf_book_tak'); + inv = translate("forest_locale", 'library_shelf_book_inv'); used = function(s, o) if o.book and where(s)^'shelf' then local t = _'shelf'.obj; @@ -1118,14 +1122,14 @@ function book(number) remove(o, pl); _'shelf'.obj:add(o, idx); - p(translate_now(forest_locale, 'library_shelf_puzzle_used_book')); + p(translate_now("forest_locale", 'library_shelf_puzzle_used_book')); if #t == 9 then for i = 1, 9 do if library_book_map[t[i].book] ~= i then return; end; end; - p(translate_now(forest_locale, 'library_shelf_puzzle_used_book_success')); + p(translate_now("forest_locale", 'library_shelf_puzzle_used_book_success')); disable 'library_shelves' enable 'library_hidden_path' walkout() @@ -1140,11 +1144,11 @@ end; room { nam = 'library_shelf_puzzle'; nofollow = true; - disp = translate(forest_locale, 'library'); + disp = translate("forest_locale", 'library'); theme = 'main'; onexit = function(s) if have('book_1') or have('book_2') or have('book_3') or have('book_4') or have('book_5') or have('book_6') or have('book_7') or have('book_8')or have('book_9') then - p(translate_now(forest_locale, 'leave_books_message')); + p(translate_now("forest_locale", 'leave_books_message')); return false; end; end; @@ -1156,7 +1160,7 @@ room { return pic; end; way = { - path {'#back', translate(forest_locale, 'transition_away_from_bookstand'), 'library'}; + path {'#back', translate("forest_locale", 'transition_away_from_bookstand'), 'library'}; }; }:with { obj { @@ -1164,21 +1168,21 @@ room { dsc = function(s) local count = #s.obj; if count > 1 then - p(translate_now(forest_locale, 'library_shelf_puzzle_shelf_multiple')); + p(translate_now("forest_locale", 'library_shelf_puzzle_shelf_multiple')); elseif count == 1 then - p(translate_now(forest_locale, 'library_shelf_puzzle_shelf_single')); + p(translate_now("forest_locale", 'library_shelf_puzzle_shelf_single')); else - p(translate_now(forest_locale, 'library_shelf_puzzle_shelf_none')); + p(translate_now("forest_locale", 'library_shelf_puzzle_shelf_none')); end; end; act = function(s) - return translate_now(forest_locale, 'library_shelf_puzzle_shelf_act', {word=library_word}); + return translate_now("forest_locale", 'library_shelf_puzzle_shelf_act', {word=library_word}); end; used = function(s, o) if o.book then remove(o, pl); _'shelf'.obj:add(o); - p(translate_now(forest_locale, 'library_shelf_puzzle_used_book')); + p(translate_now("forest_locale", 'library_shelf_puzzle_used_book')); if #s.obj == 9 then for i = 1, 9 do @@ -1186,7 +1190,7 @@ room { return; end; end; - p(translate_now(forest_locale, 'library_shelf_puzzle_used_book_success')); + p(translate_now("forest_locale", 'library_shelf_puzzle_used_book_success')); disable 'library_shelves' enable 'library_hidden_path' walkout() @@ -1217,41 +1221,41 @@ room { return 'images/library_hidden_room.png'; end; end; - disp = translate(forest_locale, 'library_hidden_room'); + disp = translate("forest_locale", 'library_hidden_room'); theme = 'main'; nofollow = true; - decor = translate(forest_locale, 'library_hidden_room_decor'); + decor = translate("forest_locale", 'library_hidden_room_decor'); way = { - path {translate(forest_locale, 'transition_to_main_hall'), 'library'}; + path {translate("forest_locale", 'transition_to_main_hall'), 'library'}; }; }:with { obj { nam = '#table'; - act = translate(forest_locale, 'library_hidden_room_table'); + act = translate("forest_locale", 'library_hidden_room_table'); }; obj { oiled = false; opened = false; lock_taken = false; nam = 'box'; - disp = translate(forest_locale, 'box_disp'); - disp2 = translate(forest_locale, 'box_disp2'); - disp3 = translate(forest_locale, 'box_disp3'); - dsc = translate(forest_locale, 'box_dsc'); - tak = translate(forest_locale, 'box_tak'); + disp = translate("forest_locale", 'box_disp'); + disp2 = translate("forest_locale", 'box_disp2'); + disp3 = translate("forest_locale", 'box_disp3'); + dsc = translate("forest_locale", 'box_dsc'); + tak = translate("forest_locale", 'box_tak'); inv = function(s) seen_ring_box = true; if s.lock_taken then - p(translate_now(forest_locale, 'box_inv_without_lock')); + p(translate_now("forest_locale", 'box_inv_without_lock')); elseif s.opened then s.lock_taken = true; - p(translate_now(forest_locale, 'box_inv_take_lock')); + p(translate_now("forest_locale", 'box_inv_take_lock')); take('lock'); remove('box', pl); else - p(translate_now(forest_locale, 'box_inv')); + p(translate_now("forest_locale", 'box_inv')); if seen_ring_librarian then - p(translate_now(forest_locale, 'box_inv_known')); + p(translate_now("forest_locale", 'box_inv_known')); end; end; end; @@ -1260,16 +1264,16 @@ room { if s.oiled then s.opened = true; take('map'); - p(translate_now(forest_locale, 'box_used_key_success')); + p(translate_now("forest_locale", 'box_used_key_success')); else - p(translate_now(forest_locale, 'box_used_key_failed')); + p(translate_now("forest_locale", 'box_used_key_failed')); end; elseif o^'oil' then if not s.oiled then s.oiled = true; - p(translate_now(forest_locale, 'box_used_key_oil')); + p(translate_now("forest_locale", 'box_used_key_oil')); else - p(translate_now(forest_locale, 'box_used_key_oil2')); + p(translate_now("forest_locale", 'box_used_key_oil2')); end; end; end; @@ -1278,11 +1282,11 @@ room { obj { nam = 'map'; - disp = translate(forest_locale, 'map_disp'); - disp2 = translate(forest_locale, 'map_disp2'); - disp3 = translate(forest_locale, 'map_disp3'); + disp = translate("forest_locale", 'map_disp'); + disp2 = translate("forest_locale", 'map_disp2'); + disp3 = translate("forest_locale", 'map_disp3'); inv = function(s) - p(translate_now(forest_locale, 'map_inv')); + p(translate_now("forest_locale", 'map_inv')); _('fly_west_from_village'):enable(); end; } @@ -1290,42 +1294,42 @@ obj { room { nam = 'inside_crater_glade'; pic = 'images/inside_crater_glade.png'; - disp = translate(forest_locale, 'inside_crater_glade'); + disp = translate("forest_locale", 'inside_crater_glade'); theme = 'main'; onenter = function(s) if here()^'above_crater' then - p(translate_now(forest_locale, 'inside_crater_glade_on_enter')); + p(translate_now("forest_locale", 'inside_crater_glade_on_enter')); end; end; - decor = translate(forest_locale, 'inside_crater_glade_decor'); + decor = translate("forest_locale", 'inside_crater_glade_decor'); way = { - path {translate(forest_locale, 'transition_fly'), "above_crater"}; - path {translate(forest_locale, 'transition_along_the_path'), "inside_crater_path"}; + path {translate("forest_locale", 'transition_fly'), "above_crater"}; + path {translate("forest_locale", 'transition_along_the_path'), "inside_crater_path"}; } }: with { obj { nam = '#forest'; - act = translate(forest_locale, 'inside_crater_glade_forest'); + act = translate("forest_locale", 'inside_crater_glade_forest'); }; obj { nam = '#oak'; - act = translate(forest_locale, 'inside_crater_glade_oak'); + act = translate("forest_locale", 'inside_crater_glade_oak'); }; obj { nam = '#grass'; - act = translate(forest_locale, 'inside_crater_glade_grass'); + act = translate("forest_locale", 'inside_crater_glade_grass'); }; obj { nam = '#path'; - act = translate(forest_locale, 'inside_crater_glade_path'); + act = translate("forest_locale", 'inside_crater_glade_path'); }; obj { nam = '#tower'; - act = translate(forest_locale, 'inside_crater_glade_tower'); + act = translate("forest_locale", 'inside_crater_glade_tower'); }; obj { nam = '#crater'; - act = translate(forest_locale, 'inside_crater_glade_crater'); + act = translate("forest_locale", 'inside_crater_glade_crater'); }; } @@ -1338,46 +1342,46 @@ room { end; return p; end; - disp = translate(forest_locale, 'inside_crater_path'); + disp = translate("forest_locale", 'inside_crater_path'); theme = 'main'; - decor = translate(forest_locale, 'inside_crater_path_decor'); + decor = translate("forest_locale", 'inside_crater_path_decor'); exit = function(s, t) if t^'crater_near_tower' and seen('solarscale', s) then remove('solarscale', where('solarscale')); - p(translate_now(forest_locale, 'inside_crater_path_exit')); + p(translate_now("forest_locale", 'inside_crater_path_exit')); end; end; way = { - path {translate(forest_locale, 'transition_to_glade'), "inside_crater_glade"}; - path {translate(forest_locale, 'transition_to_tower'), "crater_near_tower"}; + path {translate("forest_locale", 'transition_to_glade'), "inside_crater_glade"}; + path {translate("forest_locale", 'transition_to_tower'), "crater_near_tower"}; }; }: with { obj { nam = '#grass'; - act = translate(forest_locale, 'inside_crater_path_grass'); + act = translate("forest_locale", 'inside_crater_path_grass'); }; obj { nam = '#crater'; - act = translate(forest_locale, 'inside_crater_path_crater') + act = translate("forest_locale", 'inside_crater_path_crater') }; obj { nam = '#trees'; - act = translate(forest_locale, 'inside_crater_path_trees') + act = translate("forest_locale", 'inside_crater_path_trees') }; obj { nam = '#tower'; - act = translate(forest_locale, 'inside_crater_path_tower') + act = translate("forest_locale", 'inside_crater_path_tower') }; obj { nam = '#stump'; dsc = function(s) if seen('solarscale', here()) then - p(translate_now(forest_locale, 'inside_crater_path_stump_with_solarscale')); + p(translate_now("forest_locale", 'inside_crater_path_stump_with_solarscale')); else - p(translate_now(forest_locale, 'inside_crater_path_stump')); + p(translate_now("forest_locale", 'inside_crater_path_stump')); end; end; - act = translate(forest_locale, 'inside_crater_path_stump_act'); + act = translate("forest_locale", 'inside_crater_path_stump_act'); }; obj { nam = 'solarscale'; @@ -1389,55 +1393,55 @@ room { dlg { nam = 'solarscale_dlg'; - disp = translate(solarscale_locale, 'disp'); + disp = translate("solarscale_locale", 'disp'); theme = 'main'; pic = 'images/inside_crater_path.png;images/characters/solarscale.png'; - enter = translate(solarscale_locale, 'first_dlg_enter'); + enter = translate("solarscale_locale", 'first_dlg_enter'); convince = 0; open_q45 = false; phr = { - {only=true, '#q1', translate(solarscale_locale, 'first_dlg_dragon'), translate(solarscale_locale, 'first_dlg_dragon_response'), - {translate(solarscale_locale, 'first_dlg_dragon_admit'), function(s) + {only=true, '#q1', translate("solarscale_locale", 'first_dlg_dragon'), translate("solarscale_locale", 'first_dlg_dragon_response'), + {translate("solarscale_locale", 'first_dlg_dragon_admit'), function(s) _('solarscale_dlg').convince = _('solarscale_dlg').convince + 1; - return translate_now(solarscale_locale, 'first_dlg_dragon_admit_response'); + return translate_now("solarscale_locale", 'first_dlg_dragon_admit_response'); end}; - {translate(solarscale_locale, 'first_dlg_dragon_question'), translate(solarscale_locale, 'first_dlg_dragon_question_response')}; - {translate(solarscale_locale, 'first_dlg_dragon_decline'), function(s) + {translate("solarscale_locale", 'first_dlg_dragon_question'), translate("solarscale_locale", 'first_dlg_dragon_question_response')}; + {translate("solarscale_locale", 'first_dlg_dragon_decline'), function(s) _('solarscale_dlg').convince = _('solarscale_dlg').convince - 1; - return translate_now(solarscale_locale, 'first_dlg_dragon_decline_response'); + return translate_now("solarscale_locale", 'first_dlg_dragon_decline_response'); end}; }; - {only=true, '#q2', translate(solarscale_locale, 'first_dlg_about_map'), function(s) + {only=true, '#q2', translate("solarscale_locale", 'first_dlg_about_map'), function(s) _('solarscale_dlg').convince = _('solarscale_dlg').convince + 1; _('solarscale_ally').tower_know_discussed = true; - return translate_now(solarscale_locale, 'first_dlg_about_map_response'); + return translate_now("solarscale_locale", 'first_dlg_about_map_response'); end, - {translate(solarscale_locale, 'first_dlg_about_map_1'), translate(solarscale_locale, 'first_dlg_about_map_1_response')}; - {translate(solarscale_locale, 'first_dlg_about_map_2'), translate(solarscale_locale, 'first_dlg_about_map_1_response')}; - {translate(solarscale_locale, 'first_dlg_about_map_3'), function(s) + {translate("solarscale_locale", 'first_dlg_about_map_1'), translate("solarscale_locale", 'first_dlg_about_map_1_response')}; + {translate("solarscale_locale", 'first_dlg_about_map_2'), translate("solarscale_locale", 'first_dlg_about_map_1_response')}; + {translate("solarscale_locale", 'first_dlg_about_map_3'), function(s) disable('#q3'); _('solarscale_dlg').open_q45 = true; - return translate_now(solarscale_locale, 'first_dlg_about_map_3_response'); + return translate_now("solarscale_locale", 'first_dlg_about_map_3_response'); end}; }; - {'#q3', translate(solarscale_locale, 'first_dlg_unusual'), function(s) + {'#q3', translate("solarscale_locale", 'first_dlg_unusual'), function(s) _('solarscale_dlg').open_q45 = true; - return translate_now(solarscale_locale, 'first_dlg_unusual_response'); + return translate_now("solarscale_locale", 'first_dlg_unusual_response'); end}; - {cond=function(s) return _('solarscale_dlg').open_q45 end, '#q4', translate(solarscale_locale, 'first_dlg_tower'), translate(solarscale_locale, 'first_dlg_tower_response')}; - {cond=function(s) return _('solarscale_dlg').open_q45 end, '#q5', translate(solarscale_locale, 'first_dlg_tower_join'), function(s) + {cond=function(s) return _('solarscale_dlg').open_q45 end, '#q4', translate("solarscale_locale", 'first_dlg_tower'), translate("solarscale_locale", 'first_dlg_tower_response')}; + {cond=function(s) return _('solarscale_dlg').open_q45 end, '#q5', translate("solarscale_locale", 'first_dlg_tower_join'), function(s) if _('solarscale_dlg').convince >= 3 then walkout(); solarscale_with_me = true; remove('solarscale', where('solarscale')); put('solarscale_ally', here()); lifeon(_'solarscale_ally'); - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_success_1'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_success_1'); else - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_fail'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_fail'); end; end; - {translate(solarscale_locale, 'first_dlg_tower_join_1'), function(s) + {translate("solarscale_locale", 'first_dlg_tower_join_1'), function(s) _('solarscale_dlg').convince = _('solarscale_dlg').convince + 1; if _('solarscale_dlg').convince >= 3 then walkout(); @@ -1445,13 +1449,13 @@ dlg { remove('solarscale', where('solarscale')); put('solarscale_ally', here()); lifeon(_'solarscale_ally'); - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_success_1'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_success_1'); else - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_fail_1'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_fail_1'); end; end;}; - {translate(solarscale_locale, 'first_dlg_tower_join_2'), translate(solarscale_locale, 'first_dlg_tower_join_response_2')}; - {translate(solarscale_locale, 'first_dlg_tower_join_3'), function(s) + {translate("solarscale_locale", 'first_dlg_tower_join_2'), translate("solarscale_locale", 'first_dlg_tower_join_response_2')}; + {translate("solarscale_locale", 'first_dlg_tower_join_3'), function(s) _('solarscale_dlg').convince = _('solarscale_dlg').convince + 1; if _('solarscale_dlg').convince >= 3 then walkout(); @@ -1459,27 +1463,27 @@ dlg { remove('solarscale', where('solarscale')); put('solarscale_ally', here()); lifeon(_'solarscale_ally'); - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_success_3'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_success_3'); else - return translate_now(solarscale_locale, 'first_dlg_tower_join_response_fail_3'); + return translate_now("solarscale_locale", 'first_dlg_tower_join_response_fail_3'); end; end;}; - {translate(solarscale_locale, 'first_dlg_tower_bye_thanks'), function(s) + {translate("solarscale_locale", 'first_dlg_tower_bye_thanks'), function(s) walkout(); remove('solarscale', where('solarscale')); - return translate_now(solarscale_locale, 'first_dlg_tower_bye_response'); + return translate_now("solarscale_locale", 'first_dlg_tower_bye_response'); end}; }; {'#q6', function(s) if not closed('#q3') then - return translate_now(solarscale_locale, 'first_dlg_tower_bye_no_time'); + return translate_now("solarscale_locale", 'first_dlg_tower_bye_no_time'); else - return translate_now(solarscale_locale, 'first_dlg_tower_bye_thanks'); + return translate_now("solarscale_locale", 'first_dlg_tower_bye_thanks'); end; end, function(s) walkout(); remove('solarscale', where('solarscale')); - return translate_now(solarscale_locale, 'first_dlg_tower_bye_response'); + return translate_now("solarscale_locale", 'first_dlg_tower_bye_response'); end}; } } @@ -1487,31 +1491,31 @@ dlg { room { nam = 'crater_near_tower'; pic = 'images/crater_near_tower.png'; - disp = translate(forest_locale, 'crater_near_tower'); + disp = translate("forest_locale", 'crater_near_tower'); theme = 'main'; - decor = translate(forest_locale, 'crater_near_tower_decor'); + decor = translate("forest_locale", 'crater_near_tower_decor'); enter = function(s) tower_seen = true; end; way = { - path {translate(forest_locale, 'transition_along_the_path'), "inside_crater_path"}; - path {translate(forest_locale, 'transition_inside_tower'), "tower_level_1"}; + path {translate("forest_locale", 'transition_along_the_path'), "inside_crater_path"}; + path {translate("forest_locale", 'transition_inside_tower'), "tower_level_1"}; }; }:with { obj { nam = '#tower'; - act = translate(forest_locale, 'crater_near_tower_tower'); + act = translate("forest_locale", 'crater_near_tower_tower'); }; obj { nam = '#grass'; - act = translate(forest_locale, 'crater_near_tower_grass'); + act = translate("forest_locale", 'crater_near_tower_grass'); }; obj { nam = '#trees'; - act = translate(forest_locale, 'crater_near_tower_trees'); + act = translate("forest_locale", 'crater_near_tower_trees'); }; obj { nam = '#sun'; - act = translate(forest_locale, 'crater_near_tower_sun'); + act = translate("forest_locale", 'crater_near_tower_sun'); }; }