… | |
… | |
38 | |
38 | |
39 | ob = GET_MAP_OB (map, x, y); |
39 | ob = GET_MAP_OB (map, x, y); |
40 | while (ob) |
40 | while (ob) |
41 | { |
41 | { |
42 | /* if ob is not a marking rune or floor, then check special cases */ |
42 | /* if ob is not a marking rune or floor, then check special cases */ |
43 | if (strcmp (ob->arch->archname, "rune_mark") && ob->type != FLOOR) |
43 | if (ob->arch->archname != shstr_rune_mark && ob->type != FLOOR) |
44 | { |
44 | { |
45 | switch (tmp->type) |
45 | switch (tmp->type) |
46 | { |
46 | { |
47 | case SIGN: |
47 | case SIGN: |
48 | case MAGIC_EAR: |
48 | case MAGIC_EAR: |
… | |
… | |
83 | rune = GET_MAP_OB (map, x, y); |
83 | rune = GET_MAP_OB (map, x, y); |
84 | while (rune) |
84 | while (rune) |
85 | { |
85 | { |
86 | next = rune->above; |
86 | next = rune->above; |
87 | |
87 | |
88 | if (rune->type == SIGN && !strcmp (rune->arch->archname, "rune_mark")) |
88 | if (rune->type == SIGN && rune->arch->archname == shstr_rune_mark) |
89 | rune->destroy (); |
89 | rune->destroy (); |
90 | |
90 | |
91 | rune = next; |
91 | rune = next; |
92 | } |
92 | } |
93 | } |
93 | } |
… | |
… | |
183 | object * |
183 | object * |
184 | get_connection_rune (object *pl, short x, short y) |
184 | get_connection_rune (object *pl, short x, short y) |
185 | { |
185 | { |
186 | object *rune = GET_MAP_OB (pl->map, x, y); |
186 | object *rune = GET_MAP_OB (pl->map, x, y); |
187 | |
187 | |
188 | while (rune && ((rune->type != SIGN) || (strcmp (rune->arch->archname, "rune_mark")))) |
188 | while (rune && (rune->type != SIGN || rune->arch->archname != shstr_rune_mark)) |
189 | rune = rune->above; |
189 | rune = rune->above; |
190 | |
190 | |
191 | return rune; |
191 | return rune; |
192 | } |
192 | } |
193 | |
193 | |
… | |
… | |
626 | insert_flag = INS_ABOVE_FLOOR_ONLY; |
626 | insert_flag = INS_ABOVE_FLOOR_ONLY; |
627 | |
627 | |
628 | connected = 0; |
628 | connected = 0; |
629 | switch (tmp->type) |
629 | switch (tmp->type) |
630 | { |
630 | { |
631 | case DOOR: |
631 | case DOOR: |
632 | case GATE: |
632 | case GATE: |
633 | case BUTTON: |
633 | case BUTTON: |
634 | case DETECTOR: |
634 | case DETECTOR: |
635 | case TIMED_GATE: |
635 | case TIMED_GATE: |
636 | case PEDESTAL: |
636 | case PEDESTAL: |
637 | case CF_HANDLE: |
637 | case CF_HANDLE: |
638 | case MAGIC_EAR: |
638 | case MAGIC_EAR: |
639 | case SIGN: |
639 | case SIGN: |
640 | /* Signs don't need a connection, but but magic mouths do. */ |
640 | /* Signs don't need a connection, but but magic mouths do. */ |
641 | if (tmp->type == SIGN && strcmp (tmp->arch->archname, "magic_mouth")) |
641 | if (tmp->type == SIGN && tmp->arch->archname != shstr_magic_mouth) |
642 | break; |
642 | break; |
643 | |
643 | |
644 | con_rune = get_connection_rune (pl, x, y); |
644 | con_rune = get_connection_rune (pl, x, y); |
645 | connected = find_or_create_connection_for_map (pl, x, y, con_rune); |
645 | connected = find_or_create_connection_for_map (pl, x, y, con_rune); |
646 | if (connected == -1) |
646 | if (connected == -1) |
647 | { |
647 | { |
648 | /* Player already informed of failure by the previous function */ |
648 | /* Player already informed of failure by the previous function */ |
649 | tmp->destroy (); |
649 | tmp->destroy (); |
650 | return; |
650 | return; |
651 | } |
651 | } |
652 | |
652 | |
653 | /* Remove marking rune */ |
653 | /* Remove marking rune */ |
654 | con_rune->destroy (); |
654 | con_rune->destroy (); |
655 | } |
655 | } |
656 | |
656 | |
657 | /* For magic mouths/ears, and signs, take the msg from a book of scroll */ |
657 | /* For magic mouths/ears, and signs, take the msg from a book of scroll */ |
658 | if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) |
658 | if ((tmp->type == SIGN) || (tmp->type == MAGIC_EAR)) |
659 | { |
659 | { |
… | |
… | |
767 | } |
767 | } |
768 | |
768 | |
769 | tmp2 = find_marked_object (pl); |
769 | tmp2 = find_marked_object (pl); |
770 | while (tmp) |
770 | while (tmp) |
771 | { |
771 | { |
772 | if (!QUERY_FLAG (tmp, FLAG_IS_BUILDABLE) && ((tmp->type != SIGN) || (strcmp (tmp->arch->archname, "rune_mark")))) |
772 | if (!QUERY_FLAG (tmp, FLAG_IS_BUILDABLE) && (tmp->type != SIGN || tmp->arch->archname != shstr_rune_mark)) |
773 | { |
773 | { |
774 | /* The item building function already has it's own special |
774 | /* The item building function already has it's own special |
775 | * checks for this |
775 | * checks for this |
776 | */ |
776 | */ |
777 | if ((!tmp2) || (tmp2->subtype != ST_MAT_ITEM)) |
777 | if ((!tmp2) || (tmp2->subtype != ST_MAT_ITEM)) |