Exemplo n.º 1
0
  /* Add a comment to an object description.		-CJS- */
  public static void scribe_object() {
    IntPointer item_val = new IntPointer();
    int j;
    String out_val, tmp_str;

    if (Treasure.inven_ctr > 0 || Treasure.equip_ctr > 0) {
      if (Moria1.get_item(item_val, "Which one? ", 0, Constants.INVEN_ARRAY_SIZE, "", "")) {
        tmp_str = Desc.objdes(Treasure.inventory[item_val.value()], true);
        out_val = String.format("Inscribing %s", tmp_str);
        IO.msg_print(out_val);
        if (!Treasure.inventory[item_val.value()].inscrip.isEmpty()) {
          out_val =
              String.format(
                  "Replace %s New inscription:", Treasure.inventory[item_val.value()].inscrip);
        } else {
          out_val = "Inscription: ";
        }
        j = 78 - tmp_str.length();
        if (j > 12) {
          j = 12;
        }
        IO.prt(out_val, 0, 0);
        if (!(out_val = IO.get_string(0, out_val.length(), j)).equals("")) {
          inscribe(Treasure.inventory[item_val.value()], out_val);
        }
      }
    } else {
      IO.msg_print("You are not carrying anything to inscribe.");
    }
  }