--- deliantra/Deliantra/Deliantra.pm 2006/02/12 04:50:24 1.15 +++ deliantra/Deliantra/Deliantra.pm 2006/02/21 21:37:01 1.16 @@ -269,6 +269,67 @@ *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; } +sub arch_edit_sections { +# if (edit_type == IGUIConstants.TILE_EDIT_NONE) +# edit_type = 0; +# else if (edit_type != 0) { +# // all flags from 'check_type' must be unset in this arch because they get recalculated now +# edit_type &= ~check_type; +# } +# +# } +# if ((check_type & IGUIConstants.TILE_EDIT_MONSTER) != 0 && +# getAttributeValue("alive", defarch) == 1 && +# (getAttributeValue("monster", defarch) == 1 || +# getAttributeValue("generator", defarch) == 1)) { +# // Monster: monsters/npcs/generators +# edit_type |= IGUIConstants.TILE_EDIT_MONSTER; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_WALL) != 0 && +# arch_type == 0 && getAttributeValue("no_pass", defarch) == 1) { +# // Walls +# edit_type |= IGUIConstants.TILE_EDIT_WALL; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_CONNECTED) != 0 && +# getAttributeValue("connected", defarch) != 0) { +# // Connected Objects +# edit_type |= IGUIConstants.TILE_EDIT_CONNECTED; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_EXIT) != 0 && +# arch_type == 66 || arch_type == 41 || arch_type == 95) { +# // Exit: teleporter/exit/trapdoors +# edit_type |= IGUIConstants.TILE_EDIT_EXIT; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_TREASURE) != 0 && +# getAttributeValue("no_pick", defarch) == 0 && (arch_type == 4 || +# arch_type == 5 || arch_type == 36 || arch_type == 60 || +# arch_type == 85 || arch_type == 111 || arch_type == 123 || +# arch_type == 124 || arch_type == 130)) { +# // Treasure: randomtreasure/money/gems/potions/spellbooks/scrolls +# edit_type |= IGUIConstants.TILE_EDIT_TREASURE; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_DOOR) != 0 && +# arch_type == 20 || arch_type == 23 || arch_type == 26 || +# arch_type == 91 || arch_type == 21 || arch_type == 24) { +# // Door: door/special door/gates + keys +# edit_type |= IGUIConstants.TILE_EDIT_DOOR; +# } +# if ((check_type & IGUIConstants.TILE_EDIT_EQUIP) != 0 && +# getAttributeValue("no_pick", defarch) == 0 && ((arch_type >= 13 && +# arch_type <= 16) || arch_type == 33 || arch_type == 34 || +# arch_type == 35 || arch_type == 39 || arch_type == 70 || +# arch_type == 87 || arch_type == 99 || arch_type == 100 || +# arch_type == 104 || arch_type == 109 || arch_type == 113 || +# arch_type == 122 || arch_type == 3)) { +# // Equipment: weapons/armour/wands/rods +# edit_type |= IGUIConstants.TILE_EDIT_EQUIP; +# } +# +# return(edit_type); +# +# +} + $CACHEDIR ||= "$ENV{HOME}/.crossfire"; init $CACHEDIR;