|
@@ -667,7 +667,7 @@ void Project::loadObjectPixmaps(QList<Event*> objects) {
|
667
|
667
|
object->pixmap = QPixmap(":/images/Entities_16x16.png").copy(16, 0, 16, 16);
|
668
|
668
|
} else if (event_type == "trap" || event_type == "trap_weather") {
|
669
|
669
|
object->pixmap = QPixmap(":/images/Entities_16x16.png").copy(32, 0, 16, 16);
|
670
|
|
- } else if (event_type == "sign" || event_type == "hidden item") {
|
|
670
|
+ } else if (event_type == "sign" || event_type == "event_hidden_item") {
|
671
|
671
|
object->pixmap = QPixmap(":/images/Entities_16x16.png").copy(48, 0, 16, 16);
|
672
|
672
|
}
|
673
|
673
|
|
|
@@ -768,7 +768,7 @@ void Project::saveMapEvents(Map *map) {
|
768
|
768
|
text += "\n";
|
769
|
769
|
}
|
770
|
770
|
|
771
|
|
- if (map->events["sign"].length() + map->events["hidden item"].length() > 0) {
|
|
771
|
+ if (map->events["sign"].length() + map->events["event_hidden_item"].length() > 0) {
|
772
|
772
|
text += QString("%1::\n").arg(map->bg_events_label);
|
773
|
773
|
for (Event *sign : map->events["sign"]) {
|
774
|
774
|
text += QString("\tbg_event %1").arg(sign->get("x"));
|
|
@@ -779,15 +779,12 @@ void Project::saveMapEvents(Map *map) {
|
779
|
779
|
text += QString(", %1").arg(sign->get("script_label"));
|
780
|
780
|
text += "\n";
|
781
|
781
|
}
|
782
|
|
- for (Event *item : map->events["hidden item"]) {
|
783
|
|
- text += QString("\tbg_event %1").arg(item->get("x"));
|
|
782
|
+ for (Event *item : map->events["event_hidden_item"]) {
|
|
783
|
+ text += QString("\tbg_hidden_item_event %1").arg(item->get("x"));
|
784
|
784
|
text += QString(", %1").arg(item->get("y"));
|
785
|
785
|
text += QString(", %1").arg(item->get("elevation"));
|
786
|
|
- text += QString(", %1").arg(item->get("type"));
|
787
|
|
- text += QString(", 0");
|
788
|
786
|
text += QString(", %1").arg(item->get("item"));
|
789
|
|
- text += QString(", %1").arg(item->get("item_unknown5"));
|
790
|
|
- text += QString(", %1").arg(item->get("item_unknown6"));
|
|
787
|
+ text += QString(", %1").arg(item->get("flag"));
|
791
|
788
|
text += "\n";
|
792
|
789
|
}
|
793
|
790
|
text += "\n";
|
|
@@ -924,7 +921,7 @@ void Project::readMapEvents(Map *map) {
|
924
|
921
|
}
|
925
|
922
|
|
926
|
923
|
QList<QStringList> *bgs = getLabelMacros(parse(text), map->bg_events_label);
|
927
|
|
- map->events["hidden item"].clear();
|
|
924
|
+ map->events["event_hidden_item"].clear();
|
928
|
925
|
map->events["sign"].clear();
|
929
|
926
|
for (QStringList command : *bgs) {
|
930
|
927
|
if (command.value(0) == "bg_event") {
|
|
@@ -936,23 +933,23 @@ void Project::readMapEvents(Map *map) {
|
936
|
933
|
bg->put("elevation", command.value(i++));
|
937
|
934
|
bg->put("type", command.value(i++));
|
938
|
935
|
i++;
|
939
|
|
- if (bg->is_hidden_item()) {
|
940
|
|
- bg->put("item", command.value(i++));
|
941
|
|
- bg->put("item_unknown5", command.value(i++));
|
942
|
|
- bg->put("item_unknown6", command.value(i++));
|
943
|
|
-
|
944
|
|
- bg->put("event_type", "hidden item");
|
945
|
|
- map->events["hidden item"].append(bg);
|
946
|
|
- } else {
|
947
|
|
- bg->put("script_label", command.value(i++));
|
948
|
|
- //sign_unknown7
|
949
|
|
-
|
950
|
|
- bg->put("event_type", "sign");
|
951
|
|
- map->events["sign"].append(bg);
|
952
|
|
- }
|
|
936
|
+ bg->put("script_label", command.value(i++));
|
|
937
|
+ //sign_unknown7
|
|
938
|
+ bg->put("event_type", "sign");
|
|
939
|
+ map->events["sign"].append(bg);
|
|
940
|
+ } else if (command.value(0) == "bg_hidden_item_event") {
|
|
941
|
+ Event *bg = new Event;
|
|
942
|
+ bg->put("map_name", map->name);
|
|
943
|
+ int i = 1;
|
|
944
|
+ bg->put("x", command.value(i++));
|
|
945
|
+ bg->put("y", command.value(i++));
|
|
946
|
+ bg->put("elevation", command.value(i++));
|
|
947
|
+ bg->put("item", command.value(i++));
|
|
948
|
+ bg->put("flag", command.value(i++));
|
|
949
|
+ bg->put("event_type", "event_hidden_item");
|
|
950
|
+ map->events["event_hidden_item"].append(bg);
|
953
|
951
|
}
|
954
|
952
|
}
|
955
|
|
-
|
956
|
953
|
}
|
957
|
954
|
|
958
|
955
|
QStringList Project::readCArray(QString text, QString label) {
|