… | |
… | |
267 | return if %ARCH; |
267 | return if %ARCH; |
268 | |
268 | |
269 | *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; |
269 | *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; |
270 | } |
270 | } |
271 | |
271 | |
|
|
272 | sub arch_edit_sections { |
|
|
273 | # if (edit_type == IGUIConstants.TILE_EDIT_NONE) |
|
|
274 | # edit_type = 0; |
|
|
275 | # else if (edit_type != 0) { |
|
|
276 | # // all flags from 'check_type' must be unset in this arch because they get recalculated now |
|
|
277 | # edit_type &= ~check_type; |
|
|
278 | # } |
|
|
279 | # |
|
|
280 | # } |
|
|
281 | # if ((check_type & IGUIConstants.TILE_EDIT_MONSTER) != 0 && |
|
|
282 | # getAttributeValue("alive", defarch) == 1 && |
|
|
283 | # (getAttributeValue("monster", defarch) == 1 || |
|
|
284 | # getAttributeValue("generator", defarch) == 1)) { |
|
|
285 | # // Monster: monsters/npcs/generators |
|
|
286 | # edit_type |= IGUIConstants.TILE_EDIT_MONSTER; |
|
|
287 | # } |
|
|
288 | # if ((check_type & IGUIConstants.TILE_EDIT_WALL) != 0 && |
|
|
289 | # arch_type == 0 && getAttributeValue("no_pass", defarch) == 1) { |
|
|
290 | # // Walls |
|
|
291 | # edit_type |= IGUIConstants.TILE_EDIT_WALL; |
|
|
292 | # } |
|
|
293 | # if ((check_type & IGUIConstants.TILE_EDIT_CONNECTED) != 0 && |
|
|
294 | # getAttributeValue("connected", defarch) != 0) { |
|
|
295 | # // Connected Objects |
|
|
296 | # edit_type |= IGUIConstants.TILE_EDIT_CONNECTED; |
|
|
297 | # } |
|
|
298 | # if ((check_type & IGUIConstants.TILE_EDIT_EXIT) != 0 && |
|
|
299 | # arch_type == 66 || arch_type == 41 || arch_type == 95) { |
|
|
300 | # // Exit: teleporter/exit/trapdoors |
|
|
301 | # edit_type |= IGUIConstants.TILE_EDIT_EXIT; |
|
|
302 | # } |
|
|
303 | # if ((check_type & IGUIConstants.TILE_EDIT_TREASURE) != 0 && |
|
|
304 | # getAttributeValue("no_pick", defarch) == 0 && (arch_type == 4 || |
|
|
305 | # arch_type == 5 || arch_type == 36 || arch_type == 60 || |
|
|
306 | # arch_type == 85 || arch_type == 111 || arch_type == 123 || |
|
|
307 | # arch_type == 124 || arch_type == 130)) { |
|
|
308 | # // Treasure: randomtreasure/money/gems/potions/spellbooks/scrolls |
|
|
309 | # edit_type |= IGUIConstants.TILE_EDIT_TREASURE; |
|
|
310 | # } |
|
|
311 | # if ((check_type & IGUIConstants.TILE_EDIT_DOOR) != 0 && |
|
|
312 | # arch_type == 20 || arch_type == 23 || arch_type == 26 || |
|
|
313 | # arch_type == 91 || arch_type == 21 || arch_type == 24) { |
|
|
314 | # // Door: door/special door/gates + keys |
|
|
315 | # edit_type |= IGUIConstants.TILE_EDIT_DOOR; |
|
|
316 | # } |
|
|
317 | # if ((check_type & IGUIConstants.TILE_EDIT_EQUIP) != 0 && |
|
|
318 | # getAttributeValue("no_pick", defarch) == 0 && ((arch_type >= 13 && |
|
|
319 | # arch_type <= 16) || arch_type == 33 || arch_type == 34 || |
|
|
320 | # arch_type == 35 || arch_type == 39 || arch_type == 70 || |
|
|
321 | # arch_type == 87 || arch_type == 99 || arch_type == 100 || |
|
|
322 | # arch_type == 104 || arch_type == 109 || arch_type == 113 || |
|
|
323 | # arch_type == 122 || arch_type == 3)) { |
|
|
324 | # // Equipment: weapons/armour/wands/rods |
|
|
325 | # edit_type |= IGUIConstants.TILE_EDIT_EQUIP; |
|
|
326 | # } |
|
|
327 | # |
|
|
328 | # return(edit_type); |
|
|
329 | # |
|
|
330 | # |
|
|
331 | } |
|
|
332 | |
272 | $CACHEDIR ||= "$ENV{HOME}/.crossfire"; |
333 | $CACHEDIR ||= "$ENV{HOME}/.crossfire"; |
273 | |
334 | |
274 | init $CACHEDIR; |
335 | init $CACHEDIR; |
275 | |
336 | |
276 | =head1 AUTHOR |
337 | =head1 AUTHOR |