<commit_before>#include <phantasmal/phrase.h>
#include <phantasmal/map.h>
#include <phantasmal/log.h>
#include <phantasmal/exit.h>
#include <phantasmal/lpc_names.h>

inherit unq DTD_UNQABLE;
inherit ext EXIT;

#define PHR(x) PHRASED->new_simple_english_phrase(x)

static void create(varargs int clone) {
  ext::create(clone);
  unq::create(clone);
  if(clone) {
    bdesc = nil;
    ldesc = nil;
    edesc = nil;
  }
}

void destructed(int clone, varargs int looped) {
  object exit, exit2, room;
  if(clone) {
    exit = this_object();
    room = exit->get_from_location();
    EXITD->remove_exit(room, exit);
    unq::destructed(clone);
    ext::destructed(clone);
  }
}

void upgraded(varargs int clone) {
  ext::upgraded(clone);
  unq::upgraded(clone);
}

string to_unq_text(void) {
  return "  ~newexit{\n" + to_unq_flags() + "}\n";
}

void from_dtd_unq(mixed* unq) {
  int ctr;

  if(unq[0] != "newexit")
    error("Nie wygląda jak dane dla wyjścia!");

  for (ctr = 0; ctr < sizeof(unq[1]); ctr++) {
    from_dtd_tag(unq[1][ctr][0], unq[1][ctr][1]);
  }
}

/* function which returns an appropriate error message if this object
 * isn't a container or isn't open
 */
private string is_open_cont() {
  if (!is_container()) {
    return "Obiekt nie jest pojemnikiem!";
  }
  if (!is_open()) {
    return "Obiekt nie jest otwarty!";
  }
  return nil;
}

/*
 * Overrides of OBJECT stuff
 */
object get_brief(void) {
  object desc;

  desc = ::get_brief();
  if(!desc)
    return PHRASED->new_simple_english_phrase("exit");

  return desc;
}

object get_look(void) {
  object desc;

  desc = ::get_look();
  if(!desc)
    return EXITD->get_name_for_dir(direction);

  return desc;
}

string *get_nouns(int locale) {
  string *tmp, loc_str;<commit_msg>fixed info about exit<commit_after>#include <phantasmal/phrase.h>
#include <phantasmal/map.h>
#include <phantasmal/log.h>
#include <phantasmal/exit.h>
#include <phantasmal/lpc_names.h>

inherit unq DTD_UNQABLE;
inherit ext EXIT;

#define PHR(x) PHRASED->new_simple_english_phrase(x)

static void create(varargs int clone) {
  ext::create(clone);
  unq::create(clone);
  if(clone) {
    bdesc = nil;
    ldesc = nil;
    edesc = nil;
  }
}

void destructed(int clone, varargs int looped) {
  object exit, exit2, room;
  if(clone) {
    exit = this_object();
    room = exit->get_from_location();
    EXITD->remove_exit(room, exit);
    unq::destructed(clone);
    ext::destructed(clone);
  }
}

void upgraded(varargs int clone) {
  ext::upgraded(clone);
  unq::upgraded(clone);
}

string to_unq_text(void) {
  return "  ~newexit{\n" + to_unq_flags() + "}\n";
}

void from_dtd_unq(mixed* unq) {
  int ctr;

  if(unq[0] != "newexit")
    error("Nie wygląda jak dane dla wyjścia!");

  for (ctr = 0; ctr < sizeof(unq[1]); ctr++) {
    from_dtd_tag(unq[1][ctr][0], unq[1][ctr][1]);
  }
}

/* function which returns an appropriate error message if this object
 * isn't a container or isn't open
 */
private string is_open_cont() {
  if (!is_container()) {
    return "Obiekt nie jest pojemnikiem!";
  }
  if (!is_open()) {
    return "Obiekt nie jest otwarty!";
  }
  return nil;
}

/*
 * Overrides of OBJECT stuff
 */
object get_brief(void) {
  object desc;

  desc = ::get_brief();
  if(!desc)
    return PHRASED->new_simple_english_phrase("exit");

  return desc;
}

object get_look(void) {
  object desc;

  desc = ::get_look();
  if(!desc)
      desc = ::get_brief();

  return desc;
}

string *get_nouns(int locale) {
  string *tmp, loc_str;
{'fraction_non_alphanumeric': 0.15430861723446893, 'fraction_numerical': 0.004580589750930432, 'mean_word_length': 3.9211267605633804, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3808641', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1382, 'n_words': 306}