ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/build_map.C
(Generate patch)

Comparing deliantra/server/server/build_map.C (file contents):
Revision 1.55 by root, Tue Apr 6 04:24:29 2010 UTC vs.
Revision 1.56 by root, Sun Apr 11 00:34:06 2010 UTC

422 LOG (llevError, "apply_builder_floor: unable to find archetype %s.\n", &material->slaying); 422 LOG (llevError, "apply_builder_floor: unable to find archetype %s.\n", &material->slaying);
423 return; 423 return;
424 } 424 }
425 425
426 tmp = new_floor->instance (); 426 tmp = new_floor->instance ();
427 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 427 tmp->set_flag (FLAG_IS_BUILDABLE);
428 SET_FLAG (tmp, FLAG_UNIQUE); 428 tmp->set_flag (FLAG_UNIQUE);
429 SET_FLAG (tmp, FLAG_IS_FLOOR); 429 tmp->set_flag (FLAG_IS_FLOOR);
430 //tmp->type = FLOOR; 430 //tmp->type = FLOOR;
431 insert_ob_in_map_at (tmp, pl->map, above_floor, above_floor ? INS_BELOW_ORIGINATOR : INS_ON_TOP, x, y); 431 insert_ob_in_map_at (tmp, pl->map, above_floor, above_floor ? INS_BELOW_ORIGINATOR : INS_ON_TOP, x, y);
432 432
433 /* 433 /*
434 * Next step: make sure there are either walls or floors around the new square 434 * Next step: make sure there are either walls or floors around the new square
442 if (!tmp) 442 if (!tmp)
443 { 443 {
444 /* Must insert floor & wall */ 444 /* Must insert floor & wall */
445 tmp = new_floor->instance (); 445 tmp = new_floor->instance ();
446 /* Better make the floor unique */ 446 /* Better make the floor unique */
447 SET_FLAG (tmp, FLAG_UNIQUE); 447 tmp->set_flag (FLAG_UNIQUE);
448 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 448 tmp->set_flag (FLAG_IS_BUILDABLE);
449 //tmp->type = FLOOR; 449 //tmp->type = FLOOR;
450 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt); 450 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt);
451 /* Insert wall if exists. Note: if it doesn't, the map is weird... */ 451 /* Insert wall if exists. Note: if it doesn't, the map is weird... */
452 if (new_wall) 452 if (new_wall)
453 { 453 {
454 tmp = new_wall->instance (); 454 tmp = new_wall->instance ();
455 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 455 tmp->set_flag (FLAG_IS_BUILDABLE);
456 tmp->type = BUILDABLE_WALL; 456 tmp->type = BUILDABLE_WALL;
457 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt); 457 insert_ob_in_map_at (tmp, pl->map, 0, 0, xt, yt);
458 } 458 }
459 } 459 }
460 } 460 }
515 return; 515 return;
516 } 516 }
517 517
518 tmp = new_wall->instance (); 518 tmp = new_wall->instance ();
519 tmp->type = BUILDABLE_WALL; 519 tmp->type = BUILDABLE_WALL;
520 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 520 tmp->set_flag (FLAG_IS_BUILDABLE);
521 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y); 521 insert_ob_in_map_at (tmp, pl->map, 0, INS_ABOVE_FLOOR_ONLY, x, y);
522 522
523 /* If existing wall, remove it, no need to fix other walls */ 523 /* If existing wall, remove it, no need to fix other walls */
524 if (current_wall) 524 if (current_wall)
525 { 525 {
592 { 592 {
593 new_draw_info (NDI_UNIQUE, 0, pl, "You can't build here."); 593 new_draw_info (NDI_UNIQUE, 0, pl, "You can't build here.");
594 return; 594 return;
595 } 595 }
596 596
597 SET_FLAG (tmp, FLAG_IS_BUILDABLE); 597 tmp->set_flag (FLAG_IS_BUILDABLE);
598 SET_FLAG (tmp, FLAG_NO_PICK); 598 tmp->set_flag (FLAG_NO_PICK);
599 599
600 /* 600 /*
601 * Str 1 is a flag that the item [pedestal] should go below the floor. 601 * Str 1 is a flag that the item [pedestal] should go below the floor.
602 * Items under the floor on non-unique maps will not be saved, 602 * Items under the floor on non-unique maps will not be saved,
603 * so make the item itself unique in this situation. 603 * so make the item itself unique in this situation.
604 */ 604 */
605 insert_flag = item->stats.Str == 1 ? INS_BELOW_ORIGINATOR : INS_ABOVE_FLOOR_ONLY; 605 insert_flag = item->stats.Str == 1 ? INS_BELOW_ORIGINATOR : INS_ABOVE_FLOOR_ONLY;
606 if (insert_flag == INS_BELOW_ORIGINATOR && !pl->map->no_reset) 606 if (insert_flag == INS_BELOW_ORIGINATOR && !pl->map->no_reset)
607 SET_FLAG (tmp, FLAG_UNIQUE); 607 tmp->set_flag (FLAG_UNIQUE);
608 608
609 shstr_tmp connected; 609 shstr_tmp connected;
610 610
611 switch (tmp->type) 611 switch (tmp->type)
612 { 612 {
750 return; 750 return;
751 751
752 tmp2 = find_marked_object (pl); 752 tmp2 = find_marked_object (pl);
753 while (tmp) 753 while (tmp)
754 { 754 {
755 if (!QUERY_FLAG (tmp, FLAG_IS_BUILDABLE) && (tmp->type != SIGN || tmp->arch->archname != shstr_rune_mark)) 755 if (!tmp->flag [FLAG_IS_BUILDABLE] && (tmp->type != SIGN || tmp->arch->archname != shstr_rune_mark))
756 { 756 {
757 /* The item building function already has it's own special 757 /* The item building function already has it's own special
758 * checks for this 758 * checks for this
759 */ 759 */
760 if (!tmp2 || tmp2->subtype != ST_MAT_ITEM) 760 if (!tmp2 || tmp2->subtype != ST_MAT_ITEM)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines