34 } |
34 } |
35 |
35 |
36 |
36 |
37 static void PlaceDocks_Dock(TileIndex tile) |
37 static void PlaceDocks_Dock(TileIndex tile) |
38 { |
38 { |
39 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_DOCK | CMD_AUTO | CMD_MSG(STR_9802_CAN_T_BUILD_DOCK_HERE)); |
39 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_DOCK | CMD_MSG(STR_9802_CAN_T_BUILD_DOCK_HERE)); |
40 } |
40 } |
41 |
41 |
42 static void PlaceDocks_Depot(TileIndex tile) |
42 static void PlaceDocks_Depot(TileIndex tile) |
43 { |
43 { |
44 DoCommandP(tile, _ship_depot_direction, 0, CcBuildDocks, CMD_BUILD_SHIP_DEPOT | CMD_AUTO | CMD_MSG(STR_3802_CAN_T_BUILD_SHIP_DEPOT)); |
44 DoCommandP(tile, _ship_depot_direction, 0, CcBuildDocks, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_3802_CAN_T_BUILD_SHIP_DEPOT)); |
45 } |
45 } |
46 |
46 |
47 static void PlaceDocks_Buoy(TileIndex tile) |
47 static void PlaceDocks_Buoy(TileIndex tile) |
48 { |
48 { |
49 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_BUOY | CMD_AUTO | CMD_MSG(STR_9835_CAN_T_POSITION_BUOY_HERE)); |
49 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_BUOY | CMD_MSG(STR_9835_CAN_T_POSITION_BUOY_HERE)); |
50 } |
50 } |
51 |
51 |
52 static void PlaceDocks_DemolishArea(TileIndex tile) |
52 static void PlaceDocks_DemolishArea(TileIndex tile) |
53 { |
53 { |
54 VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea); |
54 VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea); |
59 VpStartPlaceSizing(tile, VPM_X_OR_Y); |
59 VpStartPlaceSizing(tile, VPM_X_OR_Y); |
60 } |
60 } |
61 |
61 |
62 static void PlaceDocks_BuildLock(TileIndex tile) |
62 static void PlaceDocks_BuildLock(TileIndex tile) |
63 { |
63 { |
64 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_LOCK | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_LOCKS)); |
64 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_LOCK | CMD_MSG(STR_CANT_BUILD_LOCKS)); |
65 } |
65 } |
66 |
66 |
67 |
67 |
68 enum { |
68 enum { |
69 DTW_CANAL = 3, |
69 DTW_CANAL = 3, |
158 case WE_PLACE_MOUSEUP: |
158 case WE_PLACE_MOUSEUP: |
159 if (e->we.place.pt.x != -1) { |
159 if (e->we.place.pt.x != -1) { |
160 if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions |
160 if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions |
161 GUIPlaceProcDragXY(e); |
161 GUIPlaceProcDragXY(e); |
162 } else if (e->we.place.userdata == VPM_X_OR_Y) { |
162 } else if (e->we.place.userdata == VPM_X_OR_Y) { |
163 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS)); |
163 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_MSG(STR_CANT_BUILD_CANALS)); |
164 } |
164 } |
165 } |
165 } |
166 break; |
166 break; |
167 |
167 |
168 case WE_ABORT_PLACE_OBJ: |
168 case WE_ABORT_PLACE_OBJ: |