equal
deleted
inserted
replaced
51 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_BUOY | CMD_AUTO | CMD_MSG(STR_9835_CAN_T_POSITION_BUOY_HERE)); |
51 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_BUOY | CMD_AUTO | CMD_MSG(STR_9835_CAN_T_POSITION_BUOY_HERE)); |
52 } |
52 } |
53 |
53 |
54 static void PlaceDocks_DemolishArea(TileIndex tile) |
54 static void PlaceDocks_DemolishArea(TileIndex tile) |
55 { |
55 { |
56 VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea); |
56 VpStartPlaceSizing(tile, VPM_X_AND_Y, GUI_PlaceProc_DemolishArea); |
57 } |
57 } |
58 |
58 |
59 static void PlaceDocks_BuildCanal(TileIndex tile) |
59 static void PlaceDocks_BuildCanal(TileIndex tile) |
60 { |
60 { |
61 VpStartPlaceSizing(tile, VPM_X_OR_Y); |
61 VpStartPlaceSizing(tile, VPM_X_OR_Y, GUI_PlaceProc_None); |
62 } |
62 } |
63 |
63 |
64 static void PlaceDocks_BuildLock(TileIndex tile) |
64 static void PlaceDocks_BuildLock(TileIndex tile) |
65 { |
65 { |
66 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_LOCK | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_LOCKS)); |
66 DoCommandP(tile, 0, 0, CcBuildDocks, CMD_BUILD_LOCK | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_LOCKS)); |
145 case WE_PLACE_OBJ: |
145 case WE_PLACE_OBJ: |
146 _place_proc(e->we.place.tile); |
146 _place_proc(e->we.place.tile); |
147 break; |
147 break; |
148 |
148 |
149 case WE_PLACE_DRAG: { |
149 case WE_PLACE_DRAG: { |
150 VpSelectTilesWithMethod(e->we.place.pt.x, e->we.place.pt.y, e->we.place.userdata); |
150 VpSelectTilesWithMethod(e->we.place.pt.x, e->we.place.pt.y, e->we.place.select_method); |
151 return; |
151 return; |
152 } |
152 } |
153 |
153 |
154 case WE_PLACE_MOUSEUP: |
154 case WE_PLACE_MOUSEUP: |
155 if (e->we.place.pt.x != -1) { |
155 if (e->we.place.pt.x != -1) { |
156 if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions |
156 switch (e->we.place.select_method) { |
157 GUIPlaceProcDragXY(e); |
157 case VPM_X_AND_Y: |
158 } else if (e->we.place.userdata == VPM_X_OR_Y) { |
158 GUIPlaceProcDragXY(e); |
159 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS)); |
159 break; |
|
160 case VPM_X_OR_Y: |
|
161 DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS)); |
|
162 break; |
|
163 default: break; |
160 } |
164 } |
161 } |
165 } |
162 break; |
166 break; |
163 |
167 |
164 case WE_ABORT_PLACE_OBJ: |
168 case WE_ABORT_PLACE_OBJ: |