Skip to content

Commit febaba3

Browse files
Merge pull request #8 from toontown-archipelago/removeBuildingStoreMethod
Added remove building store method
2 parents bef69cf + 8846711 commit febaba3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

panda/src/toontown/dna/dnaStorage.cxx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ void DNAStorage::store_suit_block_num_floors(const int block_number, const int n
402402
SuitBlockMap DNAStorage::get_suit_blocks() const {
403403
return _suit_blocks_map;
404404
}
405-
406405
////////////////////////////////////////////////////////////////////
407406
// Function: is_suit_block
408407
// Access: Public
@@ -411,7 +410,15 @@ SuitBlockMap DNAStorage::get_suit_blocks() const {
411410
bool DNAStorage::is_suit_block(int block_number) const {
412411
return _suit_blocks_map.find(block_number) != _suit_blocks_map.end();
413412
}
414-
413+
////////////////////////////////////////////////////////////////////
414+
// Function: remove_suit_block
415+
// Access: Public
416+
// Description: Remove a block number in the SuitBlocks map + num_floors counterpart
417+
////////////////////////////////////////////////////////////////////
418+
void DNAStorage::remove_suit_block(const int block_number) {
419+
_suit_blocks_map.erase(block_number);
420+
_suit_block_num_floors_map.erase(block_number);
421+
}
415422
////////////////////////////////////////////////////////////////////
416423
// Function: get_suit_block_track
417424
// Access: Public

panda/src/toontown/dna/dnaStorage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class EXPCL_TOONTOWN DNAStorage {
9999
int remove_suit_point(PT(DNASuitPoint));
100100
void store_suit_block(const int block_number, const std::string& dept);
101101
void store_suit_block_num_floors(const int block_number, const int num_floors);
102+
void remove_suit_block(const int block_number);
102103
void store_block_number(const std::string &block, const std::string &zone_id);
103104
void store_block_door_pos_hpr(const std::string& block, const LPoint3f& pos, const LPoint3f& hpr);
104105
void store_block_sign_transform(const std::string& block, const LMatrix4f& mat);

0 commit comments

Comments
 (0)