Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yona-TYT committed Aug 12, 2021
1 parent 75fd7a6 commit b8a237b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions class/class_basic_chapter.nut
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,9 @@ class basic_chapter
local target = square_x(coord.x,coord.y).get_halt()
local target_list = square_x(coord.x,coord.y).get_halt_list()



if (!halt) return translate("The schedule is not correct.")
local t_list = halt.get_tile_list()
local t2_list = targ_t.is_water() ? get_tiles_near_factory(t_list) : target.get_tile_list()
local t2_list = targ_t.is_water() ? get_tiles_near_stations(t_list) : target.get_tile_list()
local c_buld1 = targ_t.is_water() ? coord : t2_list[0].find_object(mo_building).get_pos()
local c_buld2 = targ_t.is_water() ? coord : t_list[0].find_object(mo_building).get_pos()

Expand Down Expand Up @@ -2373,7 +2371,7 @@ class basic_chapter
if(tmpsw[j]==0){
//if(max == 1 && t.is_water()) return check_water_tile(result, tile_list[0], pos, j)
if(wt == wt_water && t.is_water()){
local area = get_tiles_near_factory(tile_list)
local area = get_tiles_near_stations(tile_list)
for(local i=0;i<area.len();i++){
local t_water = my_tile(area[i])
//gui.add_message(""+t_water.x+","+t_water.y+"")
Expand Down Expand Up @@ -2413,7 +2411,7 @@ class basic_chapter
return 0
}

function get_tiles_near_factory(tile_list)
function get_tiles_near_stations(tile_list)
{
local cov = settings.get_station_coverage()
local area = []
Expand Down
6 changes: 2 additions & 4 deletions scenario.nut
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Can NOT be used in network game !
*/
const version = 1601
const version = 1610
map.file = "tutorial.sve"
scenario_name <- "Tutorial Scenario"
scenario.short_description = scenario_name
Expand Down Expand Up @@ -72,10 +72,8 @@ persistent.current_cov <- 0
current_cov <- 0
cov_sw <- true
correct_cov <- true
//----------------------------------------------------------------

sch_flag <- false //Bandera para schedule

//----------------------------------------------------------------
tile_delay <- 2 //delay for mark tiles
tile_delay_list <- 2
gui_delay <- true //delay for open win
Expand Down

0 comments on commit b8a237b

Please sign in to comment.