… | |
… | |
911 | * object will have no environment. If the object previously had an |
911 | * object will have no environment. If the object previously had an |
912 | * environment, the x and y coordinates will be updated to |
912 | * environment, the x and y coordinates will be updated to |
913 | * the previous environment. |
913 | * the previous environment. |
914 | */ |
914 | */ |
915 | void |
915 | void |
916 | object::remove_slow () |
916 | object::do_remove () |
917 | { |
917 | { |
918 | object *tmp, *last = 0; |
918 | object *tmp, *last = 0; |
919 | object *otmp; |
919 | object *otmp; |
920 | |
920 | |
921 | if (QUERY_FLAG (this, FLAG_REMOVED)) |
921 | if (QUERY_FLAG (this, FLAG_REMOVED)) |
… | |
… | |
2578 | { |
2578 | { |
2579 | char flagdesc[512]; |
2579 | char flagdesc[512]; |
2580 | char info2[256 * 4]; |
2580 | char info2[256 * 4]; |
2581 | char *p = info; |
2581 | char *p = info; |
2582 | |
2582 | |
2583 | p += snprintf (p, 512, "{cnt:%d,uuid:<1,%" PRIx64 ">,name:\"%s\"%s%s,flags:[%s],type:%d}", |
2583 | p += snprintf (p, 512, "{cnt:%d,uuid:<1.%" PRIx64 ">,name:\"%s\"%s%s,flags:[%s],type:%d}", |
2584 | count, uuid.seq, |
2584 | count, uuid.seq, |
2585 | &name, |
2585 | &name, |
2586 | title ? "\",title:\"" : "", |
2586 | title ? "\",title:\"" : "", |
2587 | title ? (const char *)title : "", |
2587 | title ? (const char *)title : "", |
2588 | flag_desc (flagdesc, 512), type); |
2588 | flag_desc (flagdesc, 512), type); |
… | |
… | |
2615 | { |
2615 | { |
2616 | return map ? map->region (x, y) |
2616 | return map ? map->region (x, y) |
2617 | : region::default_region (); |
2617 | : region::default_region (); |
2618 | } |
2618 | } |
2619 | |
2619 | |
|
|
2620 | const materialtype_t * |
|
|
2621 | object::dominant_material () const |
|
|
2622 | { |
|
|
2623 | if (materialtype_t *mat = name_to_material (materialname)) |
|
|
2624 | return mat; |
|
|
2625 | |
|
|
2626 | // omfg this is slow, this has to be temporary :) |
|
|
2627 | shstr unknown ("unknown"); |
|
|
2628 | |
|
|
2629 | return name_to_material (unknown); |
|
|
2630 | } |
|
|
2631 | |