Add clone objects

This commit is contained in:
GriffinR
2022-02-05 21:31:54 -05:00
committed by huderlem
parent 31f400e2c9
commit b01581dc4d
11 changed files with 289 additions and 221 deletions

View File

@@ -148,7 +148,7 @@ public:
this->enableHiddenItemQuantity = false;
this->enableHiddenItemRequiresItemfinder = false;
this->enableHealLocationRespawnData = false;
this->enableObjectEventInConnection = false;
this->enableEventCloneObject = false;
this->enableFloorNumber = false;
this->createMapTextFile = false;
this->enableTripleLayerMetatiles = false;
@@ -178,8 +178,8 @@ public:
bool getHiddenItemRequiresItemfinderEnabled();
void setHealLocationRespawnDataEnabled(bool enable);
bool getHealLocationRespawnDataEnabled();
void setObjectEventInConnectionEnabled(bool enable);
bool getObjectEventInConnectionEnabled();
void setEventCloneObjectEnabled(bool enable);
bool getEventCloneObjectEnabled();
void setFloorNumberEnabled(bool enable);
bool getFloorNumberEnabled();
void setCreateMapTextFileEnabled(bool enable);
@@ -206,7 +206,7 @@ private:
bool enableHiddenItemQuantity;
bool enableHiddenItemRequiresItemfinder;
bool enableHealLocationRespawnData;
bool enableObjectEventInConnection;
bool enableEventCloneObject;
bool enableFloorNumber;
bool createMapTextFile;
bool enableTripleLayerMetatiles;

View File

@@ -14,6 +14,7 @@ class EventType
{
public:
static QString Object;
static QString CloneObject;
static QString Warp;
static QString Trigger;
static QString WeatherTrigger;
@@ -23,6 +24,16 @@ public:
static QString HealLocation;
};
class EventGroup
{
public:
static QString Object;
static QString Warp;
static QString Coord;
static QString Bg;
static QString Heal;
};
class DraggablePixmapItem;
class Project;
class Event
@@ -68,6 +79,7 @@ public:
static Event* createNewEvent(QString, QString, Project*);
static Event* createNewObjectEvent(Project*);
static Event* createNewCloneObjectEvent(Project*, QString);
static Event* createNewWarpEvent(QString);
static Event* createNewHealLocationEvent(QString);
static Event* createNewTriggerEvent(Project*);
@@ -75,8 +87,11 @@ public:
static Event* createNewSignEvent(Project*);
static Event* createNewHiddenItemEvent(Project*);
static Event* createNewSecretBaseEvent(Project*);
static bool isValidType(QString event_type);
static QString typeToGroup(QString event_type);
OrderedJson::object buildObjectEventJSON();
OrderedJson::object buildCloneObjectEventJSON(const QMap<QString, QString> &);
OrderedJson::object buildWarpEventJSON(const QMap<QString, QString> &);
OrderedJson::object buildTriggerEventJSON();
OrderedJson::object buildWeatherTriggerEventJSON();
@@ -86,7 +101,7 @@ public:
void setPixmapFromSpritesheet(QImage, int, int, bool);
int getPixelX();
int getPixelY();
QMap<QString, bool> getExpectedFields();
QStringList getExpectedFields();
void readCustomValues(QJsonObject values);
void addCustomValuesTo(OrderedJson::object *obj);
void setFrameFromMovement(QString);

View File

@@ -60,7 +60,7 @@ public:
QMap<QString, int> mapSectionNameToValue;
QMap<int, QString> mapSectionValueToName;
QMap<QString, EventGraphics*> eventGraphicsMap;
QStringList gfxNames;
QMap<QString, int> gfxDefines;
QStringList songNames;
QStringList itemNames;
QStringList flagNames;

View File

@@ -11,6 +11,7 @@ public:
explicit NewEventToolButton(QWidget *parent = nullptr);
QString getSelectedEventType();
QAction *newObjectAction;
QAction *newCloneObjectAction;
QAction *newWarpAction;
QAction *newHealLocationAction;
QAction *newTriggerAction;
@@ -20,6 +21,7 @@ public:
QAction *newSecretBaseAction;
public slots:
void newObject();
void newCloneObject();
void newWarp();
void newHealLocation();
void newTrigger();