| 282 | } |
| 283 | |
| 284 | static df::block_square_event_designation_priorityst *getPriorityEvent(df::map_block *block, bool write) |
| 285 | { |
| 286 | vector<df::block_square_event_designation_priorityst*> events; |
| 287 | Maps::SortBlockEvents(block, 0, 0, 0, 0, 0, 0, 0, &events); |
| 288 | if (events.empty()) |
| 289 | { |
| 290 | if (!write) |
| 291 | return NULL; |
| 292 | |
| 293 | auto event = df::allocate<df::block_square_event_designation_priorityst>(); |
| 294 | block->block_events.push_back((df::block_square_event*)event); |
| 295 | return event; |
| 296 | } |
| 297 | return events[0]; |
| 298 | } |
| 299 | |
| 300 | bool MapExtras::Block::setDesignationAt(df::coord2d p, df::tile_designation des, int32_t priority) |
| 301 | { |
no test coverage detected