Add event group limit

This commit is contained in:
GriffinR
2025-02-16 15:31:20 -05:00
parent 7fc985fc1d
commit ac8db41299
10 changed files with 107 additions and 84 deletions

View File

@@ -319,6 +319,7 @@ public:
this->unusedTileNormal = 0x3014;
this->unusedTileCovered = 0x0000;
this->unusedTileSplit = 0x0000;
this->maxEventsPerGroup = 255;
this->identifiers.clear();
this->readKeys.clear();
}
@@ -388,6 +389,7 @@ public:
int collisionSheetWidth;
int collisionSheetHeight;
QList<uint32_t> warpBehaviors;
int maxEventsPerGroup;
protected:
virtual QString getConfigFilepath() override;

View File

@@ -110,9 +110,9 @@ public:
DraggablePixmapItem *addEventPixmapItem(Event *event);
void removeEventPixmapItem(Event *event);
bool eventLimitReached(Map *, Event::Type);
bool canAddEvents(const QList<Event*> &events);
void selectMapEvent(DraggablePixmapItem *item, bool toggle = false);
DraggablePixmapItem *addNewEvent(Event::Type type);
Event *addNewEvent(Event::Type type);
void updateSelectedEvents();
void duplicateSelectedEvents();
void redrawAllEvents();
@@ -185,7 +185,6 @@ public:
void shouldReselectEvents();
void scaleMapView(int);
static void openInTextEditor(const QString &path, int lineNum = 0);
bool eventLimitReached(Event::Type type);
void setCollisionGraphics();
public slots:

View File

@@ -218,7 +218,6 @@ private slots:
void on_actionMove_triggered();
void on_actionMap_Shift_triggered();
void addNewEvent(Event::Type type);
void tryAddEventTab(QWidget * tab);
void displayEventTabs();
void updateSelectedEvents();

View File

@@ -245,7 +245,7 @@ public:
static int getMapDataSize(int width, int height);
static bool mapDimensionsValid(int width, int height);
bool calculateDefaultMapSize();
static int getMaxObjectEvents();
int getMaxEvents(Event::Group group);
static QString getEmptyMapsecName();
static QString getMapGroupPrefix();
@@ -263,6 +263,8 @@ private:
void ignoreWatchedFileTemporarily(QString filepath);
void recordFileChange(const QString &filepath);
int maxEventsPerGroup;
int maxObjectEvents;
static int num_tiles_primary;
static int num_tiles_total;
static int num_metatiles_primary;
@@ -270,7 +272,6 @@ private:
static int num_pals_total;
static int max_map_data_size;
static int default_map_dimension;
static int max_object_events;
signals:
void fileChanged(const QString &filepath);