intra:: create/manage portal maps from the map editor

This commit is contained in:
Zeno Rogue 2022-10-27 00:01:32 +02:00
parent a83228cd15
commit f4282e1118
2 changed files with 29 additions and 0 deletions

View File

@ -661,6 +661,25 @@ EX string portal_help =
"Non-Euclidean Geometries' for some portals that work.\n\n"
;
EX void become_menu() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen();
dialog::init(XLAT("Become a portal map"));
dialog::addHelp(XLAT(portal_help));
dialog::addItem(XLAT("yes, that's what I want"), 'y');
dialog::add_action([] {
intra::become();
intra::start();
game_keys_scroll = true;
mapeditor::drawplayer = false;
popScreen();
pushScreen(show_portals);
});
dialog::addBack();
dialog::display();
}
int edit_spin;
EX void world_list() {

View File

@ -3242,6 +3242,16 @@ EX namespace mapeditor {
add_edit(game_keys_scroll);
dialog::addInfo(XLAT("hint: shift+A to enter the map editor"));
if(WDIM == 3 && !intra::in) {
dialog::addBoolItem(XLAT("become a portal map"), intra::in, 'm');
dialog::add_action_push(intra::become_menu);
}
if(WDIM == 3 && intra::in) {
dialog::addItem(XLAT("manage portals"), 'm');
dialog::add_action_push(intra::show_portals);
}
dialog::addItem(XLAT("change the pattern/color of new Canvas cells"), 'c');
dialog::add_action_push(patterns::showPrePatternNoninstant);