summaryrefslogtreecommitdiff
path: root/order_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-10 18:16:08 +0000
committertron <tron@openttd.org>2004-12-10 18:16:08 +0000
commit5b0915e67774c9e8ac84d192cf6bd409286166ec (patch)
tree66a06b77592865f6aa9640d6c1ddd3648d89f2d3 /order_cmd.c
parent55bac62c5ac9a404f970fdfc1eccde155dea641c (diff)
downloadopenttd-5b0915e67774c9e8ac84d192cf6bd409286166ec.tar.xz
(svn r1009) -Feature: per-station vehicle lists
This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule. As side effect this gets rid of some global variables.
Diffstat (limited to 'order_cmd.c')
-rw-r--r--order_cmd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/order_cmd.c b/order_cmd.c
index e08448b18..9de4a8c18 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -62,6 +62,8 @@ int32 CmdInsertOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
}
}
+
+ RebuildVehicleLists();
}
return 0;
@@ -81,6 +83,8 @@ static int32 DecloneOrder(Vehicle *dst, uint32 flags)
dst->schedule_ptr = _ptr_to_next_order++;
InvalidateWindow(WC_VEHICLE_ORDERS, dst->index);
+
+ RebuildVehicleLists();
}
return 0;
}
@@ -126,6 +130,8 @@ int32 CmdDeleteOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
}
}
+
+ RebuildVehicleLists();
}
return 0;
@@ -240,6 +246,8 @@ int32 CmdCloneOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
InvalidateWindow(WC_VEHICLE_ORDERS, src->index);
InvalidateWindow(WC_VEHICLE_ORDERS, dst->index);
+
+ RebuildVehicleLists();
}
break;
}
@@ -281,6 +289,8 @@ int32 CmdCloneOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
memcpy(dst->schedule_ptr, src->schedule_ptr, (src->num_orders + 1) * sizeof(uint16));
InvalidateWindow(WC_VEHICLE_ORDERS, dst->index);
+
+ RebuildVehicleLists();
}
break;
}