From: <aki...@us...> - 2007-09-18 17:27:52
|
Revision: 3128 http://gridarta.svn.sourceforge.net/gridarta/?rev=3128&view=rev Author: akirschbaum Date: 2007-09-18 10:27:52 -0700 (Tue, 18 Sep 2007) Log Message: ----------- Remove type 18 (altar) objects from connection view. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-09-18 17:26:01 UTC (rev 3127) +++ trunk/crossfire/ChangeLog 2007-09-18 17:27:52 UTC (rev 3128) @@ -1,5 +1,8 @@ 2007-09-18 Andreas Kirschbaum + * Remove type 18 (altar) objects from connection view. These + objects do not have a key string but an item name. + * Make connection view correctly check inventory objects. * Make map validator correctly check inventory objects. Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2007-09-18 17:26:01 UTC (rev 3127) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2007-09-18 17:27:52 UTC (rev 3128) @@ -165,7 +165,7 @@ mainView = view; final ConnectionControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell> connectionControl = new ConnectionControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell>(mainControl); - final LockedItemsControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell>(mainControl, 18, 20, 21, 31, 51, 52, 55, 64, 122); + final LockedItemsControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell> lockedItemsControl = new LockedItemsControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell>(mainControl, 20, 21, 31, 51, 52, 55, 64, 122); // gameObjectTextEditor contains the document for archtext editing final JScrollPane gameObjectTextEditor = new JScrollPane(archEdit); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-09-28 19:22:42
|
Revision: 3143 http://gridarta.svn.sourceforge.net/gridarta/?rev=3143&view=rev Author: akirschbaum Date: 2007-09-28 12:21:46 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Update archetypes and treasures. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/treasures Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-09-27 22:01:03 UTC (rev 3142) +++ trunk/crossfire/ChangeLog 2007-09-28 19:21:46 UTC (rev 3143) @@ -1,3 +1,7 @@ +2007-09-28 Andreas Kirschbaum + + * Update archetypes and treasures. + 2007-09-19 Andreas Kirschbaum * Add map validator "Suspicious connection": check for incorrect Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2007-09-27 22:01:03 UTC (rev 3142) +++ trunk/crossfire/resource/conf/archetypes 2007-09-28 19:21:46 UTC (rev 3143) @@ -116,7 +116,8 @@ exp 5 face idaten.111 animation idaten -speed 0.3 +anim_speed 3 +client_anim_random 1 exp 20 value 50000 weight 5000 @@ -183,7 +184,8 @@ exp 6 face speedboots.111 animation speedboots -speed 0.2 +anim_speed 5 +client_anim_random 1 value 50000 weight 5000 type 99 @@ -425,7 +427,8 @@ type 100 face god_finger.111 animation god_finger -speed .1 +anim_speed 10 +client_anim_random 1 Str 2 Dex -1 resist_physical 3 @@ -446,7 +449,8 @@ type 100 face shining_finger.111 animation shining_finger -speed .1 +anim_speed 10 +client_anim_random 1 Str 2 resist_physical 3 dam +3 @@ -466,7 +470,8 @@ title of fighting face gir_strcon.111 animation girdle_strcon -speed 0.1 +anim_speed 10 +client_anim_random 1 Str 1 Con 1 weight 2500 @@ -485,7 +490,8 @@ title of constitution face girdle_con.111 animation girdle_con -speed 0.1 +anim_speed 10 +client_anim_random 1 Con 2 weight 2500 value 85000 @@ -503,7 +509,8 @@ title of damage face girdle_dam.111 animation girdle_dam -speed 0.1 +anim_speed 10 +client_anim_random 1 dam 10 weight 2500 value 70000 @@ -521,7 +528,8 @@ title of strength face girdle_str.111 animation girdle_str -speed 0.1 +anim_speed 10 +client_anim_random 1 Str 2 weight 2500 value 80000 @@ -761,7 +769,8 @@ title of xray vision face helmetxray.111 animation helmet_of_xrays -speed 0.05 +anim_speed 20 +client_anim_random 1 type 34 weight 6000 ac 2 @@ -846,7 +855,8 @@ type 34 face wiz_hat.111 animation wiz_hat -speed 0.1 +anim_speed 10 +client_anim_random 1 last_sp 12 ac 1 Int 2 @@ -871,7 +881,8 @@ type 16 face Pdragonmail.111 animation Pdragon_mail -speed 0.2 +anim_speed 5 +client_anim_random 1 last_sp 13 ac 8 material 256 @@ -1140,7 +1151,8 @@ materialname mithril face mithril_ar.111 animation mithril_chainmail -speed 0.1 +anim_speed 10 +client_anim_random 1 ac 6 resist_physical 35 last_sp 18 @@ -1161,7 +1173,8 @@ materialname mithril face mithril_ar_ele.111 animation mithril_ar_ele -speed 0.3 +anim_speed 3 +client_anim_random 1 ac 4 resist_physical 40 resist_electricity 30 @@ -1267,7 +1280,8 @@ type 16 face robe_midnight.111 animation robe_midnight -speed 0.1 +anim_speed 10 +client_anim_random 1 ac 5 Dex 1 Int 2 @@ -1329,7 +1343,8 @@ type 16 face wdsm.111 animation wdsm -speed 0.1 +anim_speed 10 +client_anim_random 1 last_sp 13 cursed 1 startequip 1 @@ -1356,7 +1371,8 @@ materialname abyssium face DShield.111 animation DShield -speed 0.2 +anim_speed 5 +client_anim_random 1 msg There is a evil spirit in the shield. endmsg @@ -1382,7 +1398,8 @@ materialname abyssium face DShield.111 animation DShieldm -speed 0.2 +anim_speed 5 +client_anim_random 1 msg There is a strong evil spirit in the shield trying to dominate you. @@ -1410,7 +1427,8 @@ materialname abyssium face DShield.111 animation DShieldms -speed 0.25 +anim_speed 4 +client_anim_random 1 Cha -5 msg There is a powerful evil spirit in the @@ -1440,7 +1458,8 @@ materialname abyssium face DShield.111 animation DShields -speed 0.2 +anim_speed 5 +client_anim_random 1 msg There is a strong evil spirit in the shield trying to dominate you. @@ -1587,7 +1606,8 @@ material 256 face reflector.111 animation reflector -speed 0.25 +anim_speed 4 +client_anim_random 1 ac 3 resist_physical 5 reflect_spell 1 @@ -1704,7 +1724,7 @@ animation slotmachine1 is_animated 0 no_pick 1 -walk_on 1 +move_on walk client_type 25041 editor_folder connect/Casino end @@ -1718,7 +1738,7 @@ animation slotmachine2 is_animated 0 no_pick 1 -walk_on 1 +move_on walk client_type 25041 editor_folder connect/Casino end @@ -1732,7 +1752,7 @@ animation slotmachine3 is_animated 0 no_pick 1 -walk_on 1 +move_on walk client_type 25041 editor_folder connect/Casino end @@ -2531,7 +2551,7 @@ face hole.111 animation pit_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2560,7 +2580,7 @@ face hole_white-any-c-marble.111 animation pit_white-pink-c-marble_111_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2591,7 +2611,7 @@ face hole_white-any-c-marble.112 animation pit_white-pink-c-marble_112_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2622,7 +2642,7 @@ face hole_white-any-c-marble.113 animation pit_white-pink-c-marble_113_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2653,7 +2673,7 @@ face hole_white-any-c-marble.114 animation pit_white-pink-c-marble_114_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2682,7 +2702,7 @@ face hole_white-any-c-marble.111 animation pit_white-red-c-marble_111_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2713,7 +2733,7 @@ face hole_white-any-c-marble.112 animation pit_white-red-c-marble_112_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2744,7 +2764,7 @@ face hole_white-any-c-marble.113 animation pit_white-red-c-marble_113_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2775,7 +2795,7 @@ face hole_white-any-c-marble.114 animation pit_white-red-c-marble_114_open is_animated 0 -walk_on 1 +move_on walk wc 0 maxsp 1 editor_folder connect/Hole @@ -2785,7 +2805,7 @@ type 95 face trapdoor_1.111 animation trapdoor_1 -walk_on 1 +move_on walk no_pick 1 weight 100000 editor_folder connect/Hole @@ -2795,7 +2815,7 @@ type 95 face trapdoor_2.111 animation trapdoor_2 -walk_on 1 +move_on walk no_pick 1 weight 999999 editor_folder connect/Hole @@ -2805,7 +2825,7 @@ type 95 face trapdoor_3.111 animation trapdoor_3 -walk_on 1 +move_on walk no_pick 1 weight 1 editor_folder connect/Hole @@ -2815,7 +2835,7 @@ type 95 face trapdoor_4.111 animation trapdoor_4 -walk_on 1 +move_on walk no_pick 1 weight 120000 editor_folder connect/Hole @@ -2823,7 +2843,8 @@ Object spinner_-135 name spinner face spinner.11B -speed 1 +anim_speed 1 +client_anim_random 1 type 90 no_pick 1 sp 3 @@ -2834,7 +2855,8 @@ Object spinner_-90 name spinner face spinner.11B -speed 1 +anim_speed 1 +client_anim_random 1 type 90 no_pick 1 sp 2 @@ -2845,7 +2867,8 @@ Object spinner_-45 name spinner face spinner.11B -speed 0.5 +anim_speed 2 +client_anim_random 1 type 90 no_pick 1 sp 1 @@ -2856,7 +2879,8 @@ Object spinner_45 name spinner face spinner.111 -speed 0.5 +anim_speed 2 +client_anim_random 1 type 90 no_pick 1 sp -1 @@ -2867,7 +2891,8 @@ Object spinner_90 name spinner face spinner.111 -speed 1 +anim_speed 1 +client_anim_random 1 type 90 no_pick 1 sp -2 @@ -2878,7 +2903,8 @@ Object spinner_135 name spinner face spinner.111 -speed 1 +anim_speed 1 +client_anim_random 1 type 90 no_pick 1 sp -3 @@ -2889,7 +2915,8 @@ Object spinner_180 name spinner face spinner.11B -speed 1 +anim_speed 1 +client_anim_random 1 type 90 no_pick 1 sp 4 @@ -2906,7 +2933,7 @@ food 10 animation altar no_pick 1 -walk_on 1 +move_on walk editor_folder connect end Object button_plate @@ -2919,8 +2946,8 @@ is_animated 0 no_pick 1 weight 1000000 -walk_on 1 -walk_off 1 +move_on walk +move_off walk editor_folder connect end Object button_small @@ -2933,8 +2960,8 @@ is_animated 0 no_pick 1 weight 1 -walk_on 1 -walk_off 1 +move_on walk +move_off walk editor_folder connect end Object check_inv @@ -2943,9 +2970,9 @@ type 64 face check_inv.111 no_pick 1 -walk_on 1 -walk_off 1 -slaying setme +move_on walk +move_off walk +slaying set_individual_value last_sp 1 editor_folder connect end @@ -3197,8 +3224,8 @@ face pedestal.112 animation pedestal no_pick 1 -walk_on 1 -walk_off 1 +move_on walk +move_off walk editor_folder connect end Object stwall_closed_1 @@ -3245,7 +3272,7 @@ animation altar_trigger is_animated 0 no_pick 1 -walk_on 1 +move_on walk editor_folder connect end Object button_trigger @@ -3256,8 +3283,8 @@ is_animated 0 exp 30 no_pick 1 -walk_on 1 -walk_off 1 +move_on walk +move_off walk weight 1 editor_folder connect end @@ -3281,8 +3308,8 @@ is_animated 0 exp 30 no_pick 1 -walk_on 1 -walk_off 1 +move_on walk +move_off walk editor_folder connect end Object westcwall_closed_1 @@ -3561,7 +3588,8 @@ type 66 face s_barrack_u.x11 animation s_barrack_up -speed -0.1 +anim_speed 1 +client_anim_random 10 no_pick 1 editor_folder construct/Snow end @@ -3571,7 +3599,8 @@ type 66 face s_barrack_u.x11 animation s_barrack_up_2 -speed -0.1 +anim_speed 1 +client_anim_random 10 y 1 no_pick 1 editor_folder construct/Snow @@ -3763,24 +3792,6 @@ client_type 25012 editor_folder construct/Treehouse end -More -Object treefort3_1 -name treefort -type 66 -face treefort.211 -no_pick 1 -x 1 -editor_folder construct/Treehouse -end -More -Object treefort3_2 -name treefort -type 66 -face treefort2.x11 -no_pick 1 -y 1 -editor_folder construct/Treehouse -end Object treehouse name treehouse type 66 @@ -3794,7 +3805,8 @@ type 66 face barrack_l.x11 animation barrack_long -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 client_type 25012 editor_folder construct/barrack @@ -3805,7 +3817,8 @@ type 66 face barrack_l.x11 animation barrack_long_2 -speed -0.1 +anim_speed 10 +client_anim_random 1 x 1 no_pick 1 editor_folder construct/barrack @@ -3823,7 +3836,8 @@ type 66 face barrack_u.x11 animation barrack_up -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 client_type 25012 editor_folder construct/barrack @@ -3834,7 +3848,8 @@ type 66 face barrack_u.x11 animation barrack_up_2 -speed -0.1 +anim_speed 10 +client_anim_random 1 y 1 no_pick 1 editor_folder construct/barrack @@ -4049,7 +4064,8 @@ name castle type 66 face castle_a.x11 -speed -0.300 +anim_speed 3 +client_anim_random 1 animation castle_a no_pick 1 client_type 25012 @@ -4126,7 +4142,8 @@ name castle type 66 face castle_a_northwest.x11 -speed -0.300 +anim_speed 3 +client_anim_random 1 animation castle_a_northwest no_pick 1 client_type 25012 @@ -4167,7 +4184,8 @@ name castle type 66 face castle_a_western.x11 -speed -0.300 +anim_speed 3 +client_anim_random 1 animation castle_a_western no_pick 1 client_type 25012 @@ -4261,9 +4279,9 @@ face fountain.111 type 67 animation fountain -walk_on 1 -speed 0.50 +move_on walk no_pick 1 +anim_speed 2 client_anim_random 1 editor_folder construct/fountain end @@ -5513,7 +5531,8 @@ type 66 face keep.x11 animation keep -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 client_type 25012 editor_folder construct/keep @@ -5523,7 +5542,8 @@ type 66 face keep.x11 animation keep_2 -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 x 1 editor_folder construct/keep @@ -5533,7 +5553,8 @@ type 66 face keep.x11 animation keep_3 -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 y 1 editor_folder construct/keep @@ -5543,7 +5564,8 @@ type 66 face keep.x11 animation keep_4 -speed -0.1 +anim_speed 10 +client_anim_random 1 no_pick 1 x 1 y 1 @@ -5561,7 +5583,7 @@ name bridge face s_bridge1.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -5569,7 +5591,7 @@ name bridge face s_bridge1a.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -5577,7 +5599,7 @@ name bridge face s_bridge1b.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -5585,7 +5607,7 @@ name bridge face s_bridge2.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -5593,7 +5615,7 @@ name bridge face s_bridge2a.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -5601,7 +5623,7 @@ name bridge face s_bridge2b.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct end @@ -6147,7 +6169,8 @@ type 66 face wizard_tower.x11 animation wizard_tower -speed -0.3000 +anim_speed 3 +client_anim_random 1 no_pick 1 client_type 25012 editor_folder construct/tower @@ -6158,6 +6181,8 @@ type 66 face wizard_tower.x11 animation wizard_tower2 +anim_speed 3 +client_anim_random 1 y 1 no_pick 1 editor_folder construct/tower @@ -6166,7 +6191,7 @@ name bridge face a_bridge1.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct/town end @@ -6174,7 +6199,7 @@ name bridge face a_bridge2.111 type 67 -walk_on 1 +move_on walk no_pick 1 editor_folder construct/town end @@ -8165,7 +8190,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 10 Cha 20 @@ -9778,14 +9803,15 @@ face darkforest.111 no_pick 1 is_floor 1 -walk_on 1 +move_on walk smoothlevel 136 client_type 25012 editor_folder exit end Object exit face exit.111 -speed 0.5 +anim_speed 2 +client_anim_random 1 type 66 no_pick 1 animation exit @@ -9796,7 +9822,8 @@ Object fogexit name mysterious fog face fog.111 -speed 0.2 +anim_speed 5 +client_anim_random 1 type 66 no_pick 1 animation fogexit @@ -9828,7 +9855,8 @@ slaying /city/city hp 15 sp 19 -speed 0.3 +anim_speed 3 +client_anim_random 1 type 66 no_pick 1 animation perm_magic_portal @@ -9985,7 +10013,8 @@ Object whirlwind_exit name whirl wind face stalkergen.111 -speed 0.2 +anim_speed 5 +client_anim_random 1 type 66 no_pick 1 animation whirlwind_exit @@ -10551,6 +10580,8 @@ value 500 magic 3 animation u_horn +anim_speed 2 +client_anim_random 1 type 15 nrof 1 name_pl unicorn horns @@ -10779,7 +10810,7 @@ food 10 animation goldfloor no_pick 1 -walk_on 1 +move_on walk is_floor 1 editor_folder floor end @@ -10796,7 +10827,7 @@ food 10 animation goldfloor2 no_pick 1 -walk_on 1 +move_on walk is_floor 1 editor_folder floor end @@ -12911,7 +12942,7 @@ monster 1 move_type walk alive 1 -attacktype 1048577 +attacktype 257 Str 30 Con 30 Dex 30 @@ -13427,7 +13458,8 @@ face burningtail.111 weapontype 6 animation burningtail -speed 0.1 +anim_speed 10 +client_anim_random 1 material 256 dam 40 weight 10000 @@ -13456,7 +13488,8 @@ endmsg is_animated 1 ac 4 -speed 0.2 +anim_speed 5 +client_anim_random 1 nrof 1 startequip 1 type 33 @@ -13483,7 +13516,8 @@ type 100 face glovesofsun.111 animation glovesofsun -speed 0.25 +anim_speed 4 +client_anim_random 1 material 8 weight 900 value 20000 @@ -13597,7 +13631,8 @@ type 16 face mithril_ar_ele.111 animation mithril_ar_ele -speed 0.3 +anim_speed 3 +client_anim_random 1 ac 4 resist_physical 40 resist_electricity 40 @@ -13656,7 +13691,8 @@ face spear_ixalovh.111 weapontype 5 animation spear_ixalovh -speed -0.02 +anim_speed 10 +client_anim_random 1 Pow 1 sp 1 material 256 @@ -13683,7 +13719,8 @@ animation tear_gaea nrof 1 level 10 -speed 0.25 +anim_speed 4 +client_anim_random 1 type 5 sp 35 weight 10 @@ -14504,7 +14541,7 @@ face mountain1.111 type 67 race /terrain/mountain -walk_on 1 +move_on walk no_pick 1 blocksview 1 is_hilly 1 @@ -14518,7 +14555,7 @@ face mountain2.111 type 67 race /terrain/mountain -walk_on 1 +move_on walk no_pick 1 is_hilly 1 slow_move 10 @@ -14532,7 +14569,7 @@ face mountain3.111 type 67 race /terrain/mountain -walk_on 1 +move_on walk no_pick 1 blocksview 1 is_hilly 1 @@ -14624,7 +14661,7 @@ face s_mountain.111 type 67 race /terrain/mountain -walk_on 1 +move_on walk no_pick 1 blocksview 1 is_hilly 1 @@ -14662,7 +14699,7 @@ type 66 face phole_3.111 no_pick 1 -walk_on 1 +move_on walk client_type 25012 editor_folder ground/Pstone end @@ -14819,7 +14856,7 @@ face cforest1.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14830,7 +14867,7 @@ face cforest2.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14841,7 +14878,7 @@ face cforest3.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14852,7 +14889,7 @@ face cforest4.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14862,7 +14899,7 @@ face cforest5.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14872,7 +14909,7 @@ face cforest6.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -14902,7 +14939,7 @@ face drifts.111 type 67 race /terrain/hills -walk_on 1 +move_on walk is_hilly 1 no_pick 1 slow_move 3 @@ -14914,7 +14951,7 @@ type 102 subtype 7 level 1 -walk_on 1 +move_on walk wc -30 lifesave 1 name strange looking ice @@ -14933,7 +14970,7 @@ face glacier.111 type 67 race /terrain/mountain -walk_on 1 +move_on walk is_hilly 1 no_pick 1 slow_move 15 @@ -14946,7 +14983,6 @@ Object ice name ice face ice.111 -walk_on 1 slow_move 8 no_pick 1 smoothlevel 22 @@ -14972,7 +15008,7 @@ name small pond type 67 race /terrain/plains -walk_on 1 +move_on walk face ipond.111 no_pick 1 is_floor 1 @@ -15063,7 +15099,7 @@ face spalms1.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 2 is_wooded 1 @@ -15075,7 +15111,7 @@ face spalms2.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 2 is_wooded 1 @@ -15084,7 +15120,7 @@ Object brush face brush.111 type 67 -walk_on 1 +move_on walk race /terrain/plains no_pick 1 slow_move 2 @@ -15097,7 +15133,7 @@ Object cyanbrush face cyanbrush.111 type 67 -walk_on 1 +move_on walk race /terrain/plains no_pick 1 slow_move 2 @@ -15111,7 +15147,7 @@ face darkforest.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 5 is_wooded 1 @@ -15125,7 +15161,7 @@ face evergreens.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -15139,7 +15175,7 @@ face evergreens_2.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -15152,7 +15188,7 @@ face jungle_1.111 type 67 race /terrain/jungle -walk_on 1 +move_on walk no_pick 1 blocksview 1 slow_move 5 @@ -15167,7 +15203,7 @@ face jungle_2.111 type 67 race /terrain/jungle -walk_on 1 +move_on walk no_pick 1 slow_move 5 is_wooded 1 @@ -15231,7 +15267,7 @@ face treed_hills.111 type 67 race /terrain/hills -walk_on 1 +move_on walk is_hilly 1 no_pick 1 is_wooded 1 @@ -15245,7 +15281,7 @@ face woods_1.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15259,7 +15295,7 @@ face woods_2.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15273,7 +15309,7 @@ face woods_3.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15287,7 +15323,7 @@ face woods_4.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15300,7 +15336,7 @@ face woods_5.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15335,7 +15371,7 @@ face beach.111 type 67 race /terrain/desert -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 0 @@ -15358,7 +15394,8 @@ name sea of blood name_pl sea of blood smoothlevel 29 -speed 0.2 +anim_speed 5 +client_anim_sync 1 move_block all no_pick 1 is_water 1 @@ -15375,7 +15412,7 @@ Object chaos type 102 subtype 7 -walk_on 1 +move_on walk level 1 wc -30 lifesave 1 @@ -15392,7 +15429,7 @@ Object major_chaos type 102 subtype 7 -walk_on 1 +move_on walk level 1 wc -30 lifesave 1 @@ -15431,7 +15468,7 @@ face cmarsh.111 type 67 race /terrain/swamp -walk_on 1 +move_on walk no_pick 1 is_water 1 slow_move 20 @@ -15444,7 +15481,7 @@ face cyangrass.111 type 67 race /terrain/plains -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15456,7 +15493,7 @@ name cyangrass face cyangrass.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15468,7 +15505,7 @@ name small pond type 67 race /terrain/plains -walk_on 1 +move_on walk face cyangrasspond.111 no_pick 1 is_water 1 @@ -15480,7 +15517,8 @@ face deep_sea.111 animation deep_sea smoothlevel 17 -speed 0.2 +anim_speed 5 +client_anim_sync 1 move_block all no_pick 1 is_water 1 @@ -15496,7 +15534,7 @@ animation deep_swamp no_pick 1 is_water 1 -walk_on 1 +move_on walk slow_move 5 is_wooded 1 smoothlevel 8 @@ -15507,7 +15545,7 @@ face desert.111 type 67 race /terrain/desert -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15543,7 +15581,7 @@ Object farmland face farmland.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 is_wooded 1 @@ -15622,7 +15660,8 @@ end Object glue face glue.111 -speed -0.06 +anim_speed 15 +client_anim_random 1 animation glue no_pick 1 slow_move 4 @@ -15633,7 +15672,7 @@ face grass.111 type 67 race /terrain/plains -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15646,7 +15685,7 @@ name grass face grass.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15659,7 +15698,7 @@ name small pond type 67 race /terrain/plains -walk_on 1 +move_on walk face grasspond.111 no_pick 1 is_water 1 @@ -15672,7 +15711,7 @@ face hills.111 type 67 race /terrain/hills -walk_on 1 +move_on walk is_hilly 1 no_pick 1 slow_move 3 @@ -15686,7 +15725,7 @@ face hillsrocky.111 type 67 race /terrain/hills -walk_on 1 +move_on walk is_hilly 1 no_pick 1 slow_move 2 @@ -15699,7 +15738,7 @@ type 102 subtype 7 level 1 -walk_on 1 +move_on walk wc -30 name lava face lava.111 @@ -15718,7 +15757,7 @@ type 102 subtype 7 level 1 -walk_on 1 +move_on walk wc -30 lifesave 1 name lava @@ -15738,7 +15777,7 @@ face marsh.111 type 67 race /terrain/swamp -walk_on 1 +move_on walk no_pick 1 is_water 1 slow_move 15 @@ -15752,7 +15791,7 @@ face dunes.111 type 67 race /terrain/desert -walk_on 1 +move_on walk no_pick 1 slow_move 1 is_wooded 1 @@ -15764,7 +15803,7 @@ name earth face earth.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15776,7 +15815,7 @@ face fernsdense.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 3 is_wooded 1 @@ -15786,7 +15825,7 @@ face fernssparse.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 2 is_wooded 1 @@ -15796,7 +15835,7 @@ face forestsparse.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 2 is_wooded 1 @@ -15806,7 +15845,7 @@ name dying grass face grass_br_gr.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15818,7 +15857,7 @@ name brown grass face grassbrown.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15830,7 +15869,7 @@ name dark grass face grassdark.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15842,7 +15881,7 @@ name medium grass face grassmedium.111 type 67 -walk_on 1 +move_on walk is_floor 1 no_pick 1 slow_move 1 @@ -15862,7 +15901,7 @@ face palms.111 type 67 race /terrain/forest -walk_on 1 +move_on walk no_pick 1 slow_move 2 is_wooded 1 @@ -15874,7 +15913,8 @@ name oil ocean name_pl oil ocean smoothlevel 16 -speed 0.1 +anim_speed 10 +client_anim_sync 1 move_block all no_pick 1 is_water 1 @@ -15891,7 +15931,8 @@ name ultra viscous oil name_pl ultra viscous oil smoothlevel 16 -speed 0.01 +anim_speed 10 +client_anim_sync 1 no_pick 1 is_water 1 is_floor 1 @@ -15904,7 +15945,8 @@ name quicksilver sea name_pl quicksilver sea smoothlevel 16 -speed 0.35 +anim_speed 3 +client_anim_sync 1 move_block all no_pick 1 is_water 1 @@ -15915,25 +15957,25 @@ Object sea face sea.111 animation sea -speed 0.2 move_block all -boat no_pick 1 is_water 1 is_floor 1 smoothlevel 20 client_anim_sync 1 +anim_speed 5 editor_folder ground end Object sea1 name sea face sea.111 animation sea1 -speed 0.2 no_pick 1 is_water 1 is_floor 1 smoothlevel 20 client_anim_sync 1 +anim_speed 5 editor_folder ground end Object sea_nw @@ -16025,7 +16067,8 @@ face shallow_sea.111 animation shallow_sea smoothlevel 19 -speed 0.2 +anim_speed 5 +client_anim_sync 1 move_block all no_pick 1 is_water 1 @@ -16036,7 +16079,8 @@ Object spider_web name spider web face spider_web.111 -speed -0.01 +anim_speed 20 +client_anim_sync 1 animation spider_web no_pick 1 slow_move 7 @@ -16067,7 +16111,7 @@ face swamp.111 type 67 race /terrain/swamp -walk_on 1 +move_on walk no_pick 1 is_water 1 slow_move 3 @@ -16116,7 +16160,7 @@ name thorns face thorns.111 no_pick 1 -walk_on 1 +move_on walk is_wooded 1 slow_move 3 attacktype 1 @@ -16664,7 +16708,8 @@ nrof 1 face clock.111 animation clock -speed -0.05 +anim_speed 20 +client_anim_random 1 weight 80000 value 100 material 20 @@ -16678,7 +16723,8 @@ nrof 1 face clock_ag.111 animation clock_ag -speed -0.05 +anim_speed 20 +client_anim_random 1 weight 320000 value 52890 material 20 @@ -16693,7 +16739,8 @@ nrof 1 face clock_cw.111 animation clock_cw -speed -0.05 +anim_speed 20 +client_anim_random 1 weight 80000 value 1400 material 20 @@ -16709,7 +16756,8 @@ nrof 1 face clock_grand.111 animation clock_grand -speed -0.05 +anim_speed 20 +client_anim_random 1 weight 80000 value 500 material 20 @@ -16726,7 +16774,7 @@ exp 30 face harpsichord1.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16739,7 +16787,7 @@ exp 30 face harpsichord1.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16752,7 +16800,7 @@ exp 30 face harpsichord1.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16766,7 +16814,7 @@ exp 30 face harpsichord1.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end @@ -16778,7 +16826,7 @@ exp 30 face harpsichord2.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16791,7 +16839,7 @@ exp 30 face harpsichord2.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16804,7 +16852,7 @@ exp 30 face harpsichord2.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16818,7 +16866,7 @@ exp 30 face harpsichord2.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end @@ -16830,7 +16878,7 @@ exp 30 face harpsichord3.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16843,7 +16891,7 @@ exp 30 face harpsichord3.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16856,7 +16904,7 @@ exp 30 face harpsichord3.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16870,7 +16918,7 @@ exp 30 face harpsichord3.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end @@ -16882,7 +16930,7 @@ exp 30 face harpsichord4.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16895,7 +16943,7 @@ exp 30 face harpsichord4.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16908,7 +16956,7 @@ exp 30 face harpsichord4.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end More @@ -16922,7 +16970,7 @@ exp 30 face harpsichord4.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder indoor end @@ -17216,7 +17264,8 @@ level 1 face dust_effect.111 animation dust_effect -speed 1 +anim_speed 1 +client_anim_random 1 attacktype 4194304 wc -3 dam 1 @@ -17274,7 +17323,8 @@ title of fixed mercury face fix_mercury.111 animation fix_mercury -speed 0.5 +anim_speed 2 +client_anim_random 1 material 512 materialname mercury value 400 @@ -17425,12 +17475,12 @@ type 73 value 280 resist_fire -100 - weight 500 name_pl bottles client_type 642 editor_folder inorganic end + Object phil_sulphur name pile title of philosophical sulphur @@ -17439,17 +17489,17 @@ animation phil_sulphur material 64 type 73 -speed -0.35 +anim_speed 3 +client_anim_random 1 value 110 resist_fire -100 - resist_acid 100 - weight 500 name_pl piles client_type 642 editor_folder inorganic end + Object phil_phosphorus name pile title of philosophical phosphorus @@ -17457,19 +17507,19 @@ nrof 1 animation phil_phosphorus material 64 -speed -0.45 +anim_speed 2 +client_anim_random 1 type 73 value 350 resist_fire -100 resist_electricity -100 - resist_acid 100 - weight 1000 name_pl piles client_type 642 editor_folder inorganic end + Object phil_salt name pile title of philosophical salt @@ -17478,7 +17528,8 @@ animation phil_salt material 64 type 73 -speed -0.30 +anim_speed 3 +client_anim_random 1 value 80 weight 500 name_pl piles @@ -17703,7 +17754,8 @@ face amethyst.111 animation amethyst nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 126 weight 50 material 64 @@ -17780,7 +17832,8 @@ type 60 animation emerald nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 160 weight 50 identified 1 @@ -17795,7 +17848,8 @@ face gem.111 animation gem nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 400 weight 50 material 64 @@ -18010,7 +18064,8 @@ face mithril.111 animation mithril nrof 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 value 800 weight 50 material 2 @@ -18068,7 +18123,8 @@ type 60 animation pearl nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 50 weight 50 material 64 @@ -18174,7 +18230,8 @@ type 60 animation ruby nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 200 weight 50 identified 1 @@ -18188,7 +18245,8 @@ type 60 animation sapphire nrof 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 value 185 weight 50 identified 1 @@ -18741,6 +18799,7 @@ client_type 1102 editor_folder light end + Object torch_1 name torch face torch_lit1.111 @@ -18752,11 +18811,13 @@ value 0 weight 500 speed 0.15 +client_anim_random 1 glow_radius 3 name_pl torches client_type 1102 editor_folder light end + Object dim_torch name torch face torch_lit2.111 @@ -18768,12 +18829,14 @@ value 0 weight 500 speed 0.15 +client_anim_random 1 glow_radius 2 is_lightable 1 name_pl torches client_type 1102 editor_folder light end + Object burnt_torch name burnt out torch face torch_unlit.111 @@ -19166,7 +19229,8 @@ type 24 face bagpipe.111 animation bagpipe -speed -0.3 +anim_speed 3 +client_anim_random 1 weight 3000 value 1000 editor_folder misc/Bagpipe @@ -19177,7 +19241,7 @@ type 102 subtype 7 level 1 -walk_on 1 +move_on walk lifesave 1 wc -30 dam 3 @@ -19187,6 +19251,7 @@ no_pick 1 editor_folder misc/Camp end + Object campfire_talking name talking campfire randomitems campfire_talking @@ -19195,10 +19260,12 @@ animation campfire_talking glow_radius 2 no_pick 1 -speed -0.3 +anim_speed 3 +client_anim_random 1 is_animated 1 editor_folder misc/Camp end + Object campfire_say type 116 subtype 6 @@ -19670,7 +19737,8 @@ Object forge face forge.111 animation forge -speed -0.2 +anim_speed 5 +client_anim_random 1 glow_radius 1 no_pick 1 type 122 @@ -19747,7 +19815,8 @@ name The Luggage face luggage.111 animation luggage -speed 0.5 +anim_speed 2 +client_anim_random 1 type 122 material 2 value 100000 @@ -20142,7 +20211,8 @@ Object stove face stove.111 animation stove -speed -0.2 +anim_speed 5 +client_anim_random 1 glow_radius 1 no_pick 1 type 122 @@ -20334,7 +20404,8 @@ Object brazier face brazier.111 animation brazier -speed -0.2 +anim_speed 5 +client_anim_random 1 glow_radius 3 no_pick 1 move_block all @@ -20473,7 +20544,8 @@ is_animated 1 material 2 value 2500 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice name_pl chalices client_type 2030 @@ -20488,13 +20560,15 @@ material 2 materialname silver value 1200 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_sil name chalice name_pl chalices client_type 2030 editor_folder misc end + Object chalice_cop face chalice_cop.111 type 60 @@ -20504,13 +20578,15 @@ material 2 materialname copper value 500 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_cop name chalice name_pl chalices client_type 2030 editor_folder misc end + Object chalice_bro face chalice_bro.111 type 60 @@ -20520,13 +20596,15 @@ material 2 materialname bronze value 700 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_bro name chalice name_pl chalices client_type 2030 editor_folder misc end + Object chalice_iro face chalice_iro.111 type 60 @@ -20536,13 +20614,15 @@ material 2 materialname iron value 200 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_iro name chalice name_pl chalices client_type 2030 editor_folder misc end + Object chalice_tin face chalice_tin.111 type 60 @@ -20552,13 +20632,15 @@ material 2 materialname tin value 50 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_tin name chalice name_pl chalices client_type 2030 editor_folder misc end + Object chalice_plat face chalice_plat.111 type 60 @@ -20568,7 +20650,8 @@ material 2 materialname platinum value 5000 -speed 0.2 +anim_speed 5 +client_anim_random 1 animation chalice_plat name chalice name_pl chalices @@ -20730,7 +20813,8 @@ name chandelier face chandelier_2.111 animation chandelier_2 -speed -0.30 +anim_speed 3 +client_anim_random 1 glow_radius 4 no_pick 1 editor_folder misc @@ -20740,7 +20824,8 @@ name chandelier face chandelier_2_copper.111 animation chandelier_2_copper -speed -0.30 +anim_speed 3 +client_anim_random 1 glow_radius 4 no_pick 1 editor_folder misc @@ -20807,7 +20892,8 @@ Object dice face dice.111 animation dice -speed -0.2 +anim_speed 5 +client_anim_random 1 name dice nrof 1 is_animated 1 @@ -20818,7 +20904,8 @@ Object fireplace face fireplace.111 animation fireplace -speed -0.2 +anim_speed 5 +client_anim_random 1 glow_radius 2 no_pick 1 move_block all @@ -20828,7 +20915,8 @@ Object firepot face firepot.111 animation firepot -speed -0.30 +anim_speed 3 +client_anim_random 1 no_pick 1 move_block all glow_radius 3 @@ -20859,7 +20947,7 @@ exp 30 face grand_piano_black.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20872,7 +20960,7 @@ exp 30 face grand_piano_black.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20885,7 +20973,7 @@ exp 30 face grand_piano_black.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20899,7 +20987,7 @@ exp 30 face grand_piano_black.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end @@ -20911,7 +20999,7 @@ exp 30 face grand_piano_white.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20924,7 +21012,7 @@ exp 30 face grand_piano_white.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20937,7 +21025,7 @@ exp 30 face grand_piano_white.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end More @@ -20951,7 +21039,7 @@ exp 30 face grand_piano_white.x11 no_pick 1 -walk_on 1 +move_on walk editor_folder misc end @@ -20984,7 +21072,8 @@ name hanging firepot face hangingfirepot.111 animation hangingfirepot -speed -0.30 +anim_speed 3 +client_anim_random 1 glow_radius 3 no_pick 1 editor_folder misc @@ -21410,7 +21499,8 @@ is_animated 1 no_pick 1 move_block all -speed -0.1 +anim_speed 10 +client_anim_random 1 animation thewheel_short_ccwise-back editor_folder misc/thewheel end @@ -21422,7 +21512,8 @@ is_animated 1 no_pick 1 move_block all -speed -0.1 +anim_speed 10 +client_anim_random 1 animation thewheel_tall_ccwise-back editor_folder misc/thewheel end @@ -21433,7 +21524,8 @@ name the wheel is_animated 1 no_pick 1 -speed -0.1 +anim_speed 10 +client_anim_random 1 animation thewheel_tall_2_ccwise-back editor_folder misc/thewheel end @@ -21445,7 +21537,8 @@ material 144 value 0 weight 3000 -speed 0.1 +anim_speed 10 +client_anim_random 1 name_pl torches of cyan light client_type 1103 editor_folder misc @@ -21458,7 +21551,8 @@ material 144 value 0 weight 3000 -speed 0.1 +anim_speed 10 +client_anim_random 1 name_pl torches of indigo light client_type 1103 editor_folder misc @@ -21471,7 +21565,8 @@ material 144 value 0 weight 3000 -speed 0.1 +anim_speed 10 +client_anim_random 1 name_pl torches of vermilion light client_type 1103 editor_folder misc @@ -37841,8 +37936,9 @@ face burning_fountain.111 type 67 animation burning_fountain -walk_on 1 -speed 0.50 +move_on walk +anim_speed 2 +client_anim_random 1 no_pick 1 editor_folder planes/fire end @@ -38391,7 +38487,8 @@ face burningwall_0.111 animation burningwall_0 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38402,7 +38499,8 @@ face burningwall_1.111 animation burningwall_1_2 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38413,7 +38511,8 @@ face burningwall_2.111 animation burningwall_1_4 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38424,7 +38523,8 @@ face burningwall_3.111 animation burningwall_2_2_1 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38435,7 +38535,8 @@ face burningwall_4.111 animation burningwall_1_1 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38446,7 +38547,8 @@ face burningwall_5.111 animation burningwall_2_1_1 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38457,7 +38559,8 @@ face burningwall_6.111 animation burningwall_2_2_2 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38468,7 +38571,8 @@ face burningwall_7.111 animation burningwall_3_2 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38479,7 +38583,8 @@ face burningwall_8.111 animation burningwall_1_3 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38490,7 +38595,8 @@ face burningwall_9.111 animation burningwall_2_2_4 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38501,7 +38607,8 @@ face burningwall_A.111 animation burningwall_2_1_2 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38512,7 +38619,8 @@ face burningwall_B.111 animation burningwall_3_1 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38523,7 +38631,8 @@ face burningwall_C.111 animation burningwall_2_2_3 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38534,7 +38643,8 @@ face burningwall_D.111 animation burningwall_3_4 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38545,7 +38655,8 @@ face burningwall_E.111 animation burningwall_3_3 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38556,7 +38667,8 @@ face burningwall_F.111 animation burningwall_4 is_animated 1 -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 blocksview 1 @@ -38569,7 +38681,7 @@ type 102 subtype 7 level 30000 -walk_on 1 +move_on walk is_floor 1 is_animated 1 speed 0.15 @@ -38589,7 +38701,8 @@ face flamingtower.x11 animation flaming_tower is_animated 1 -speed 0.5 +anim_speed 2 +client_anim_random 1 no_pick 1 client_type 25012 editor_folder planes/fire @@ -38601,7 +38714,8 @@ face flamingtower.x11 animation flaming_tower_2 is_animated 1 -speed 0.5 +anim_speed 2 +client_anim_random 1 no_pick 1 y 1 editor_folder planes/fire @@ -39152,18 +39266,21 @@ face lava_sea.111 name lava animation lava_sea -speed 0.2 +anim_speed 5 +client_anim_random 1 move_block all no_pick 1 is_water 1 is_floor 1 editor_folder planes/fire/lava end + Object lava_sea1 name lava face lava_sea.111 animation lava_sea1 -speed 0.2 +anim_speed 5 +client_anim_random 1 no_pick 1 is_water 1 is_floor 1 @@ -39179,7 +39296,7 @@ Object magma face magma.111 animation magma -walk_on 1 +move_on walk is_floor 1 is_animated 1 speed 0.15 @@ -40175,7 +40292,7 @@ end Object halfling_player name halfling -randomitems halfling_player +randomitems halfling_player_items face halfling.151 msg Halflings are another sub-race of humankind, @@ -40229,7 +40346,7 @@ Object human_player name human race human -randomitems human_player +randomitems human_player_items face human.151 msg Humans are the generalists of the races. @@ -41065,8 +41182,8 @@ client_type 651 editor_folder potion end -Object potion_invulnerability -name potion of invulnerability +Object potion_shielding +name potion of shielding nrof 1 face potioninv.111 type 5 @@ -41075,7 +41192,7 @@ weight 2000 value 10000 resist_physical 90 -name_pl potions of invulnerability +name_pl potions of shielding on_use_yield potion_empty client_type 651 editor_folder potion @@ -42453,10 +42570,12 @@ no_pick 1 face lava.111 animation alchemy_diamond_converter -speed 0.4 -walk_on 1 +anim_speed 2 +client_anim_random 1 +move_on walk editor_folder shop end + Object alchemy_ruby_converter name alchemy bath: create ruby other_arch ruby @@ -42466,10 +42585,12 @@ no_pick 1 face lava.111 animation alchemy_ruby_converter -speed 0.4 -walk_on 1 +anim_speed 2 +client_anim_random 1 +move_on walk editor_folder shop end + Object alchemy_pearl_converter name alchemy bath: create pearl other_arch pearl @@ -42479,8 +42600,9 @@ no_pick 1 face lava.111 animation alchemy_pearl_converter -speed 0.4 -walk_on 1 +anim_speed 2 +client_anim_random 1 +move_on walk editor_folder shop end Object bank @@ -42564,7 +42686,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object pearl_converter @@ -42575,7 +42697,7 @@ food 5 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object ruby_converter @@ -42586,7 +42708,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object silver_converter @@ -42597,7 +42719,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object gold_converter @@ -42608,7 +42730,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object platinum_converter @@ -42620,7 +42742,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object platinum_converter2 @@ -42631,7 +42753,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object jade_converter @@ -42642,7 +42764,7 @@ type 103 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object create_Pdragon_mail @@ -42653,7 +42775,7 @@ slaying dragon_scale food 60 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_dragon_mail @@ -42664,7 +42786,7 @@ slaying dragon_scale food 5 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_blue_dragon_mail @@ -42675,7 +42797,7 @@ slaying blue_dragon_scale food 5 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_green_dragon_mail @@ -42686,7 +42808,7 @@ slaying green_dragon_scale food 5 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_dragon_shield @@ -42697,7 +42819,7 @@ slaying dragon_scale food 1 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_eyeshield @@ -42708,7 +42830,7 @@ slaying beholdereye food 1 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_mithril_ar_ele @@ -42719,7 +42841,7 @@ slaying mithril food 500 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object create_serpent_cloak @@ -42730,7 +42852,7 @@ slaying serp_skin food 3 no_pick 1 -walk_on 1 +move_on walk editor_folder shop end Object food_table @@ -42741,7 +42863,7 @@ type 103 no_pick 1 face table_2.111 -walk_on 1 +move_on walk editor_folder shop end Object dragon_steak_table @@ -42752,7 +42874,7 @@ type 103 no_pick 1 face table_2.111 -walk_on 1 +move_on walk editor_folder shop end Object waybread_table @@ -42763,7 +42885,7 @@ type 103 no_pick 1 face table_2.111 -walk_on 1 +move_on walk editor_folder shop end Object booze_table @@ -42774,7 +42896,7 @@ type 103 no_pick 1 face table_2.111 -walk_on 1 +move_on walk editor_folder shop end Object identify_table @@ -42784,7 +42906,7 @@ type 139 no_pick 1 face conv.111 -walk_on 1 +move_on walk editor_folder shop end Object smith @@ -46455,7 +46577,7 @@ type 102 subtype 7 level 1 -walk_on 1 +move_on walk wc -30 stand_still 1 name vitriol pool @@ -48195,6 +48317,8 @@ no_pick 1 slow_move 7 material 128 +anim_speed 10 +client_anim_random 1 editor_folder spell/Cone end Object turn_undead @@ -49813,7 +49937,7 @@ level 0 is_animated 0 no_pick 1 -walk_on 1 +move_on walk editor_folder spell/Misc end Object spell_alchemy @@ -50589,7 +50713,7 @@ animation poison_fog is_used_up 1 is_animated 1 -walk_on 1 +move_on walk move_type fly_low no_pick 1 speed 0.2 @@ -50877,7 +51001,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 other_arch spell_magic_drain editor_folder spell/Rune @@ -50893,7 +51017,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 Cha 20 editor_folder spell/Rune @@ -50907,7 +51031,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 32770 no_magic 1 dam 1 @@ -50928,7 +51052,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 3 dam 90 Cha 20 @@ -50949,7 +51073,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 10 dam 1 Cha 20 @@ -50970,7 +51094,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 90 Cha 20 @@ -50991,7 +51115,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51009,7 +51133,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 131072 dam 400 Cha 20 @@ -51029,7 +51153,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 6 dam 30 Cha 20 @@ -51050,7 +51174,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51069,7 +51193,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51088,7 +51212,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 6 dam 90 Cha 20 @@ -51109,7 +51233,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 6 dam 90 Cha 20 @@ -51129,7 +51253,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 18 dam 35 Cha 20 @@ -51150,7 +51274,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51169,7 +51293,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51188,7 +51312,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 1 editor_folder spell/Rune end @@ -51207,7 +51331,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 10 dam 90 Cha 20 @@ -51228,7 +51352,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51247,7 +51371,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 20 editor_folder spell/Rune end @@ -51266,7 +51390,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk Cha 1 editor_folder spell/Rune end @@ -51284,7 +51408,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 10 dam 40 Cha 20 @@ -51305,7 +51429,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk editor_folder spell/Rune end Object rune_summon_air_elemental @@ -51324,7 +51448,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 dam 90 Cha 20 @@ -51347,7 +51471,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 dam 90 Cha 20 @@ -51370,7 +51494,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 dam 90 Cha 20 @@ -51393,7 +51517,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 dam 90 Cha 20 @@ -51416,7 +51540,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 2 dam 90 Cha 20 @@ -51437,7 +51561,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk other_arch spell_transference editor_folder spell/Rune end @@ -52741,7 +52865,8 @@ Object staff face staff.111 animation staff -speed -0.1 +anim_speed 10 +client_anim_random 1 type 109 value 50 weight 2500 @@ -52756,7 +52881,8 @@ Object wand face wand.111 animation wand -speed -0.1 +anim_speed 10 +client_anim_random 1 type 109 value 50 weight 2300 @@ -52795,7 +52921,8 @@ name fire face burnout.111 animation fire_permanent -speed 1 +anim_speed 1 +client_anim_random 1 no_pick 1 editor_folder spell end @@ -52857,14 +52984,6 @@ skill missile weapons editor_folder system/ability end -Object ability_summon_fire -name summon fire -type 110 -invisible 1 -no_drop 1 -sp 10 -editor_folder system/ability -end Object blocked face blocked.111 blocksview 1 @@ -53190,7 +53309,8 @@ nrof 1 face collar.111 animation collar -speed .3 +anim_speed 3 +client_anim_random 1 type 39 material 12 weight 500 @@ -53226,7 +53346,8 @@ material 2 resist_drain 100 nrof 1 -speed 0.1 +anim_speed 10 +client_anim_random 1 client_type 390 body_finger -1 item_power 4 @@ -53303,7 +53424,8 @@ name dragon face dragon.x71 type 66 -speed 0.4 +anim_speed 2 +client_anim_random 1 animation dragon_exit no_pick 1 client_type 25012 @@ -53502,7 +53624,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 90 Cha 20 @@ -53522,7 +53644,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 50 Cha 20 @@ -53542,7 +53664,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1025 dam 10 Cha 20 @@ -53562,7 +53684,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 40 Cha 15 @@ -53582,7 +53704,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 20 Cha 20 @@ -53602,7 +53724,7 @@ is_animated 0 invisible 1 no_pick 1 -walk_on 1 +move_on walk attacktype 1 dam 90 Cha 20 @@ -59467,7 +59589,8 @@ type 15 face CSword.113 animation CSword -speed 0.3 +anim_speed 3 +client_anim_random 1 material 2 weight 20000 Str 1 @@ -59505,7 +59628,8 @@ type 15 face darkblade.111 animation darkblade -speed 0.2 +anim_speed 5 +client_anim_random 1 Cha -1 Con 2 hp 1 @@ -59533,7 +59657,8 @@ type 15 face demonbane.111 animation demonbane -speed 0.2 +anim_speed 5 +client_anim_random 1 material 2 dam 11 magic 3 @@ -59554,7 +59679,8 @@ name_pl daggers of fortune face dagger_f.111 animation dagger_f -speed .2 +anim_speed 5 +client_anim_random 1 Cha 4 dam 2 luck 3 @@ -59581,7 +59707,8 @@ weapontype 7 face frost_hammer.111 animation frost_hammer -speed .4 +anim_speed 2 +client_anim_random 1 material 256 materialname glacium dam 10 @@ -59603,7 +59730,8 @@ nrof 1 animation lamestar weapontype 7 -speed 0.2 +anim_speed 5 +client_anim_random 1 type 15 last_sp 9 face firestar.111 @@ -59625,7 +59753,8 @@ title named Fearless animation firestar weapontype 7 -speed 0.30 +anim_speed 3 +client_anim_random 1 type 15 last_sp 9 face firestar.111 @@ -59652,7 +59781,8 @@ type 15 face gram.111 animation gram -speed 0.1 +anim_speed 10 +client_anim_random 1 material 2 dam 18 exp 1 @@ -59676,7 +59806,8 @@ nrof 1 face holyave.111 animation holy_avenger -speed 0.2 +anim_speed 5 +client_anim_random 1 last_sp 9 dam 15 type 15 @@ -59727,7 +59858,8 @@ Str 2 Con 2 dam 30 -speed 0.250000 +anim_speed 4 +client_anim_random 1 type 15 resist_cold 75 attacktype 5 @@ -59751,7 +59883,8 @@ type 15 face masamune.111 animation masamune -speed .2 +anim_speed 5 +client_anim_random 1 slaying undead last_sp 3 Str 2 @@ -59782,7 +59915,8 @@ type 15 face sting.111 animation sting -speed 0.1 +anim_speed 10 +client_anim_random 1 material 2 dam 5 magic 3 @@ -59819,7 +59953,8 @@ attacktype 65 weapontype 1 value 175000 -speed 0.1 +anim_speed 10 +client_anim_random 1 animation uw_sword name_pl Belzebub's swords client_type 100 @@ -59835,7 +59970,8 @@ type 15 face uk_sd.111 animation uk_sd -speed .4 +anim_speed 2 +client_anim_random 1 material 2 Str 2 Dex 2 @@ -59966,7 +60102,8 @@ type 15 face firebrand.111 animation firebrand -speed 0.25 +anim_speed 4 +client_anim_random 1 material 2 dam 9 weight 22000 @@ -60029,7 +60166,8 @@ type 15 face magi_staff.111 animation magi_staff -speed .2 +anim_speed 5 +client_anim_random 1 material 16 weapontype 8 resist_magic 30 @@ -60101,7 +60239,8 @@ slaying skull face skullcleav.111 animation skullcleaver -speed 0.1 +anim_speed 10 +client_anim_random 1 last_sp 11 type 15 weight 32000 @@ -60592,7 +60731,8 @@ type 14 nrof 1 animation magic_bow -speed 0.1 +anim_speed 10 +client_anim_random 1 material 16 face magic_bow.111 magic 7 @@ -61113,6 +61253,8 @@ client_type 145 body_arm -2 skill two handed weapons +anim_speed 5 +client_anim_random 1 editor_folder weapon/misc end Object sickle1 Modified: trunk/crossfire/resource/conf/treasures =================================================================== --- trunk/crossfire/resource/conf/treasures 2007-09-27 22:01:03 UTC (rev 3142) +++ trunk/crossfire/resource/conf/treasures 2007-09-28 19:21:46 UTC (rev 3143) @@ -6,7 +6,7 @@ # # This file contains various treasures, with generation rules. # -# $Id: treasures 5784 2007-03-17 13:07:00Z ryo_saeba $ +# $Id: treasures 7256 2007-09-27 04:02:42Z rjtanner $ # # As of version 0.91.1, what this file was extended to handle list # re-linking and generation of only 1 item on that list. This does away @@ -1270,7 +1270,7 @@ end # uncommon artifacts treasureone uncommon_artifacts - arch potion_invulnerability + arch potion_shielding chance 5 more arch mjoellnir @@ -1350,6 +1350,15 @@ nrof 9 chance 30 more + arch minor_potion_restoration + chance 15 + more + arch medium_potion_restoration + chance 10 + more + arch major_potion_restoration + chance 5 + more arch potion_restoration chance 5 more @@ -6064,12 +6073,12 @@ treasure gnome_player_items arch skill_praying end -treasure halfling_player +treasure halfling_player_items arch skill_stealing more arch skill_hide end -treasure human_player +treasure human_player_items list random_knowledge end treasure northman_player_items @@ -6389,7 +6398,7 @@ arch potion_cold2 chance 1 more - arch potion_invulnerability + arch potion_shielding chance 5 more arch potion_aethereality This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-09-28 21:24:16
|
Revision: 3144 http://gridarta.svn.sourceforge.net/gridarta/?rev=3144&view=rev Author: akirschbaum Date: 2007-09-28 14:24:16 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Update list of special treasure lists. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CFTreasureListTree.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-09-28 19:21:46 UTC (rev 3143) +++ trunk/crossfire/ChangeLog 2007-09-28 21:24:16 UTC (rev 3144) @@ -1,5 +1,7 @@ 2007-09-28 Andreas Kirschbaum + * Update list of special treasure lists. + * Update archetypes and treasures. 2007-09-19 Andreas Kirschbaum Modified: trunk/crossfire/src/cfeditor/CFTreasureListTree.java =================================================================== --- trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2007-09-28 19:21:46 UTC (rev 3143) +++ trunk/crossfire/src/cfeditor/CFTreasureListTree.java 2007-09-28 21:24:16 UTC (rev 3144) @@ -64,7 +64,9 @@ specialTreasureLists.put("Devourers", godFolder); specialTreasureLists.put("Sorig", godFolder); specialTreasureLists.put("Ruggilli", godFolder); + specialTreasureLists.put("Ixalovh", godFolder); specialTreasureLists.put("Gaea", godFolder); + specialTreasureLists.put("Valkyrie", godFolder); specialTreasureLists.put("Mostrai", godFolder); specialTreasureLists.put("Lythander", godFolder); specialTreasureLists.put("Gnarg", godFolder); @@ -74,14 +76,18 @@ specialTreasureLists.put("dragon_ability_poison", dragonFolder); specialTreasureLists.put("troll_player_items", playerFolder); specialTreasureLists.put("gnome_player_items", playerFolder); + specialTreasureLists.put("halfling_player_items", playerFolder); + specialTreasureLists.put("human_player_items", playerFolder); specialTreasureLists.put("dwarf_player_items", playerFolder); specialTreasureLists.put("half_orc_player_items", playerFolder); specialTreasureLists.put("elf_player_items", playerFolder); + specialTreasureLists.put("fenx_player_items", playerFolder); specialTreasureLists.put("wraith_player_items", playerFolder); specialTreasureLists.put("northman_player_items", playerFolder); specialTreasureLists.put("fireborn_player_items", playerFolder); specialTreasureLists.put("quetzalcoatl_player_items", playerFolder); specialTreasureLists.put("dragon_player_items", playerFolder); + specialTreasureLists.put("serpentman_player_items", playerFolder); return specialTreasureLists; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-09-28 21:30:04
|
Revision: 3145 http://gridarta.svn.sourceforge.net/gridarta/?rev=3145&view=rev Author: akirschbaum Date: 2007-09-28 14:30:03 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Make WorldMaker script work again. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/scripts.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-09-28 21:24:16 UTC (rev 3144) +++ trunk/crossfire/ChangeLog 2007-09-28 21:30:03 UTC (rev 3145) @@ -1,5 +1,7 @@ 2007-09-28 Andreas Kirschbaum + * Make WorldMaker script work again. + * Update list of special treasure lists. * Update archetypes and treasures. Modified: trunk/crossfire/resource/conf/scripts.xml =================================================================== --- trunk/crossfire/resource/conf/scripts.xml 2007-09-28 21:24:16 UTC (rev 3144) +++ trunk/crossfire/resource/conf/scripts.xml 2007-09-28 21:30:03 UTC (rev 3145) @@ -27,11 +27,11 @@ if (!mapFile.exists()) { return false; } - if (pictureFile.exists() && pictureFile.lastModified() >= map.lastModified()) { + if (pictureFile.exists() && pictureFile.lastModified() >= mapFile.lastModified()) { return false; } print("converting " + mapFile + " to " + pictureFile + "."); - map = mainControl.openMapFile(mapFile, false); + map = mainControl.getMapManager().openMapFile(mapFile, false); if (map == null) { return false; } @@ -43,7 +43,9 @@ return false; } } finally { - mainControl.closeMapWithoutView(map); + if (map.nViews() <= 0) { + mainControl.getMapManager().closeLevel(map); + } } return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-04 21:54:36
|
Revision: 3150 http://gridarta.svn.sourceforge.net/gridarta/?rev=3150&view=rev Author: akirschbaum Date: 2007-10-04 14:54:39 -0700 (Thu, 04 Oct 2007) Log Message: ----------- Fix connection map validator: markers are no targets. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-04 21:44:47 UTC (rev 3149) +++ trunk/crossfire/ChangeLog 2007-10-04 21:54:39 UTC (rev 3150) @@ -1,3 +1,7 @@ +2007-10-04 Andreas Kirschbaum + + * Fix connection map validator: markers are no targets. + 2007-09-29 Andreas Kirschbaum * Fix connection map validator: recognize triggers as sources. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-04 21:44:47 UTC (rev 3149) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-04 21:54:39 UTC (rev 3150) @@ -304,7 +304,6 @@ Archetype.TYPE_HANDLE, Archetype.TYPE_INVENTORY_CHECKER, Archetype.TYPE_MAGIC_EAR, - Archetype.TYPE_MARKER, Archetype.TYPE_PEDESTAL, Archetype.TYPE_PEDESTAL_TRIGGER, Archetype.TYPE_TRAP, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-07 21:12:16
|
Revision: 3163 http://gridarta.svn.sourceforge.net/gridarta/?rev=3163&view=rev Author: akirschbaum Date: 2007-10-07 14:12:20 -0700 (Sun, 07 Oct 2007) Log Message: ----------- Fix connection map validator: recognize trigger buttons as sources. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gameobject/Archetype.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-07 21:09:12 UTC (rev 3162) +++ trunk/crossfire/ChangeLog 2007-10-07 21:12:20 UTC (rev 3163) @@ -1,3 +1,8 @@ +2007-10-07 Andreas Kirschbaum + + * Fix connection map validator: recognize trigger buttons as + sources. + 2007-10-04 Andreas Kirschbaum * Fix connection map validator: markers are no targets. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-07 21:09:12 UTC (rev 3162) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-07 21:12:20 UTC (rev 3163) @@ -309,6 +309,7 @@ Archetype.TYPE_TRAP, Archetype.TYPE_TRIGGER, Archetype.TYPE_TRIGGER_ALTAR, + Archetype.TYPE_TRIGGER_BUTTON, }, new int[] { Archetype.TYPE_CREATOR, Archetype.TYPE_DUPLICATOR, Modified: trunk/crossfire/src/cfeditor/gameobject/Archetype.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/Archetype.java 2007-10-07 21:09:12 UTC (rev 3162) +++ trunk/crossfire/src/cfeditor/gameobject/Archetype.java 2007-10-07 21:12:20 UTC (rev 3163) @@ -41,6 +41,8 @@ int TYPE_MAGIC_EAR = 29; + int TYPE_TRIGGER_BUTTON = 30; + int TYPE_TRIGGER_ALTAR = 31; int TYPE_PEDESTAL_TRIGGER = 32; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-07 21:28:32
|
Revision: 3164 http://gridarta.svn.sourceforge.net/gridarta/?rev=3164&view=rev Author: akirschbaum Date: 2007-10-07 14:28:33 -0700 (Sun, 07 Oct 2007) Log Message: ----------- Update bsh to version 2.0b4. Modified Paths: -------------- trunk/crossfire/build.xml Added Paths: ----------- trunk/crossfire/lib/bsh-classgen-2.0b4.jar trunk/crossfire/lib/bsh-commands-2.0b4.jar trunk/crossfire/lib/bsh-core-2.0b4.jar trunk/crossfire/lib/bsh-util-2.0b4.jar Removed Paths: ------------- trunk/crossfire/lib/bsh-classgen.jar trunk/crossfire/lib/bsh-commands.jar trunk/crossfire/lib/bsh-core.jar trunk/crossfire/lib/bsh-util.jar Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2007-10-07 21:12:20 UTC (rev 3163) +++ trunk/crossfire/build.xml 2007-10-07 21:28:33 UTC (rev 3164) @@ -135,10 +135,10 @@ <zipfileset src="../lib/log4j-1.2.13.jar" /> <zipfileset src="${lib.dir}/jdom.jar" excludes="META-INF/**" /> <zipfileset src="${lib.dir}/crimson.jar" excludes="META-INF/**" /> - <zipfileset src="${lib.dir}/bsh-core.jar" excludes="META-INF/**" /> - <zipfileset src="${lib.dir}/bsh-commands.jar" excludes="META-INF/**" /> - <zipfileset src="${lib.dir}/bsh-classgen.jar" excludes="META-INF/**" /> - <zipfileset src="${lib.dir}/bsh-util.jar" excludes="META-INF/**" /> + <zipfileset src="${lib.dir}/bsh-core-2.0b4.jar" excludes="META-INF/**" /> + <zipfileset src="${lib.dir}/bsh-commands-2.0b4.jar" excludes="META-INF/**" /> + <zipfileset src="${lib.dir}/bsh-classgen-2.0b4.jar" excludes="META-INF/**" /> + <zipfileset src="${lib.dir}/bsh-util-2.0b4.jar" excludes="META-INF/**" /> <zipgroupfileset dir="../lib/" includes="japi-*.jar" /> <!-- creating the manifest --> <manifest> Added: trunk/crossfire/lib/bsh-classgen-2.0b4.jar =================================================================== (Binary files differ) Property changes on: trunk/crossfire/lib/bsh-classgen-2.0b4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/crossfire/lib/bsh-classgen.jar =================================================================== (Binary files differ) Added: trunk/crossfire/lib/bsh-commands-2.0b4.jar =================================================================== (Binary files differ) Property changes on: trunk/crossfire/lib/bsh-commands-2.0b4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/crossfire/lib/bsh-commands.jar =================================================================== (Binary files differ) Added: trunk/crossfire/lib/bsh-core-2.0b4.jar =================================================================== (Binary files differ) Property changes on: trunk/crossfire/lib/bsh-core-2.0b4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/crossfire/lib/bsh-core.jar =================================================================== (Binary files differ) Added: trunk/crossfire/lib/bsh-util-2.0b4.jar =================================================================== (Binary files differ) Property changes on: trunk/crossfire/lib/bsh-util-2.0b4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/crossfire/lib/bsh-util.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-07 22:13:03
|
Revision: 3166 http://gridarta.svn.sourceforge.net/gridarta/?rev=3166&view=rev Author: akirschbaum Date: 2007-10-07 15:13:04 -0700 (Sun, 07 Oct 2007) Log Message: ----------- Add MapValidator script. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/scripts.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-07 22:09:54 UTC (rev 3165) +++ trunk/crossfire/ChangeLog 2007-10-07 22:13:04 UTC (rev 3166) @@ -1,5 +1,8 @@ 2007-10-07 Andreas Kirschbaum + * Add MapValidator script: run the map validator for all maps in a + directory, or for all maps. + * Fix connection map validator: recognize trigger buttons as sources. Modified: trunk/crossfire/resource/conf/scripts.xml =================================================================== --- trunk/crossfire/resource/conf/scripts.xml 2007-10-07 22:09:54 UTC (rev 3165) +++ trunk/crossfire/resource/conf/scripts.xml 2007-10-07 22:13:04 UTC (rev 3166) @@ -1,6 +1,114 @@ <?xml version="1.0" encoding="UTF-8"?> <scripts> <script> + <name>MapValidator</name> + <code><![CDATA[import java.io.File; +import java.util.Iterator; +import net.sf.gridarta.gameobject.GameObject; +import net.sf.gridarta.map.validation.ErrorCollector; +import net.sf.gridarta.map.validation.ValidationError; + +void checkMap(File mapFile, String mapPath) { + map = mainControl.getMapManager().openMapFile(mapFile, false); + if (map == null) { + print(mapPath + ":"); + print("- cannot load map file"); + return; + } + ErrorCollector errorCollector; + try { + errorCollector = mainControl.runMapValidation(map.getMapModel()); + } finally { + if (map.nViews() <= 0) { + mainControl.getMapManager().closeLevel(map); + } + } + + StringBuffer sb = new StringBuffer(); + int numberOfErrors = 0; + Iterator it = errorCollector.iterator(); + while (it.hasNext()) { + ValidationError validationError = it.next(); + + if (errorLimit > 0 && numberOfErrors >= errorLimit) { + print("- <skipping more errors>"); + break; + } + + if (numberOfErrors == 0) { + print(mapPath + ":"); + } + numberOfErrors++; + + sb.setLength(0); + sb.append("- "); + + sb.append(validationError); + + GameObject gameObject = validationError.getGameObject(); + if (gameObject != null) { + sb.append(" [").append(gameObject.getBestName()).append(']'); + } + + String parameter = validationError.getParameter(); + if (parameter != null) { + sb.append(" [").append(parameter).append(']'); + } + + print(sb); + } +} + +void checkDirectory(File mapFile, String mapPath) { + File[] files = mapFile.listFiles(); + for (File file : files) { + String name = file.getName(); + if (!name.equals(".svn") && !name.equals("README")) { + checkMaps(file, mapPath + "/" + file.getName()); + } + } +} + +void checkMaps(File mapFile, String mapPath) { + if (mapFile.isDirectory()) { + checkDirectory(mapFile, mapPath); + } else if (mapFile.isFile()) { + checkMap(mapFile, mapPath); + } +} + +if (baseDirectory == null || baseDirectory.length() <= 0) { + baseDirectory = "/"; +} +print("Checking maps below " + baseDirectory + "..."); +if (baseDirectory.endsWith("/")) { + baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1); +} + +checkMaps(new File(mainControl.getMapDefaultFolder() + baseDirectory), baseDirectory); + +print("Done.");]]></code> + <mode> + <autoboot>false</autoboot> + <bash>true</bash> + <filter>false</filter> + </mode> + <parameter> + <name>baseDirectory</name> + <description>Base Directory</description> + <type>java.lang.String</type> + <value>/</value> + </parameter> + <parameter> + <name>errorLimit</name> + <description>Maximum number of errors to show for each map; 0=show all errors</description> + <type>java.lang.Integer</type> + <value>20</value> + <minimum>0</minimum> + <maximum>2147483647</maximum> + </parameter> + </script> + <script> <name>WorldMaker</name> <code><![CDATA[import java.io.*; import cfeditor.IGUIConstants; @@ -206,3 +314,4 @@ </parameter> </script> </scripts> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-09 07:44:17
|
Revision: 3191 http://gridarta.svn.sourceforge.net/gridarta/?rev=3191&view=rev Author: akirschbaum Date: 2007-10-09 00:44:21 -0700 (Tue, 09 Oct 2007) Log Message: ----------- Load pickmaps to <mapdir>/editor/pickmaps; remove built-in pickmaps. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/build.xml trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/IGUIConstants.java Removed Paths: ------------- trunk/crossfire/resource/pickmaps/ Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-09 07:34:22 UTC (rev 3190) +++ trunk/crossfire/ChangeLog 2007-10-09 07:44:21 UTC (rev 3191) @@ -1,3 +1,9 @@ +2007-10-09 Andreas Kirschbaum + + * Load pickmaps to <mapdir>/editor/pickmaps; remove built-in + pickmaps. This makes pickmaps work if Gridarta is run outside the + source directory. + 2007-10-08 Andreas Kirschbaum * Do not silently discard modified pickmaps when the user exits Modified: trunk/crossfire/build.xml =================================================================== --- trunk/crossfire/build.xml 2007-10-09 07:34:22 UTC (rev 3190) +++ trunk/crossfire/build.xml 2007-10-09 07:44:21 UTC (rev 3191) @@ -128,7 +128,6 @@ <fileset dir="."> <include name="${resource.dir}/HelpFiles/**"/> <include name="${resource.dir}/conf/**"/> - <include name="${resource.dir}/pickmaps/**"/> <include name="${resource.dir}/system/**"/> </fileset> <fileset dir="../src/app" excludes="**/*.java,**/package.html,**/overview.html" /> Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-09 07:34:22 UTC (rev 3190) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-09 07:44:21 UTC (rev 3191) @@ -1013,7 +1013,7 @@ /** {@inheritDoc} */ public File getPickmapDir() { - return new File(IGUIConstants.PICKMAP_DIR); + return new File(getMapDir(), IGUIConstants.PICKMAP_DIR); } } // class CMainControl Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-10-09 07:34:22 UTC (rev 3190) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-10-09 07:44:21 UTC (rev 3191) @@ -67,7 +67,7 @@ int DEF_PICKMAP_HEIGHT = 12; /** The directory that contains all pickmaps. */ - String PICKMAP_DIR = "resource/pickmaps"; + String PICKMAP_DIR = "editor/pickmaps"; String ARCH_FILE = "archetypes"; // file with all arches This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-10 17:39:50
|
Revision: 3199 http://gridarta.svn.sourceforge.net/gridarta/?rev=3199&view=rev Author: akirschbaum Date: 2007-10-10 10:39:50 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Make scripts work if Gridarta is run outside the source directory. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/action.properties trunk/crossfire/src/cfeditor/gui/script/ScriptEditor.java trunk/crossfire/src/cfeditor/gui/script/ScriptView.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_fr.properties trunk/crossfire/src/cfeditor/messages_sv.properties trunk/crossfire/src/cfeditor/script/ScriptController.java trunk/crossfire/src/cfeditor/script/ScriptModel.java trunk/crossfire/src/cfeditor/script/parameter/MapParameter.java trunk/crossfire/src/cfeditor/script/parameter/PluginParameter.java Removed Paths: ------------- trunk/crossfire/resource/conf/scripts.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/ChangeLog 2007-10-10 17:39:50 UTC (rev 3199) @@ -1,5 +1,14 @@ 2007-10-10 Andreas Kirschbaum + * Make scripts work if Gridarta is run outside the source + directory: + - Load scripts from <mapdir>/editor/scripts; remove built-in + scripts. + - Store scripts in separate .xml files instead in an aggregated + scripts.xml file. + - At application exit prompt for unsaved scripts. + - Remove "export plugins" function. + * Add map validator "Undefined archetype": checks that no game object references an undefined archetype. Deleted: trunk/crossfire/resource/conf/scripts.xml =================================================================== --- trunk/crossfire/resource/conf/scripts.xml 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/resource/conf/scripts.xml 2007-10-10 17:39:50 UTC (rev 3199) @@ -1,317 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scripts> - <script> - <name>MapValidator</name> - <code><![CDATA[import java.io.File; -import java.util.Iterator; -import net.sf.gridarta.gameobject.GameObject; -import net.sf.gridarta.map.validation.ErrorCollector; -import net.sf.gridarta.map.validation.ValidationError; - -void checkMap(File mapFile, String mapPath) { - map = mainControl.getMapManager().openMapFile(mapFile, false); - if (map == null) { - print(mapPath + ":"); - print("- cannot load map file"); - return; - } - ErrorCollector errorCollector; - try { - errorCollector = mainControl.runMapValidation(map.getMapModel()); - } finally { - if (map.nViews() <= 0) { - mainControl.getMapManager().closeLevel(map); - } - } - - StringBuffer sb = new StringBuffer(); - int numberOfErrors = 0; - Iterator it = errorCollector.iterator(); - while (it.hasNext()) { - ValidationError validationError = it.next(); - - if (errorLimit > 0 && numberOfErrors >= errorLimit) { - print("- <skipping more errors>"); - break; - } - - if (numberOfErrors == 0) { - print(mapPath + ":"); - } - numberOfErrors++; - - sb.setLength(0); - sb.append("- "); - - sb.append(validationError); - - GameObject gameObject = validationError.getGameObject(); - if (gameObject != null) { - sb.append(" [").append(gameObject.getBestName()).append(']'); - } - - String parameter = validationError.getParameter(); - if (parameter != null) { - sb.append(" [").append(parameter).append(']'); - } - - print(sb); - } -} - -void checkDirectory(File mapFile, String mapPath) { - File[] files = mapFile.listFiles(); - for (File file : files) { - String name = file.getName(); - if (!name.equals(".svn") && !name.equals("README")) { - checkMaps(file, mapPath + "/" + file.getName()); - } - } -} - -void checkMaps(File mapFile, String mapPath) { - if (mapFile.isDirectory()) { - checkDirectory(mapFile, mapPath); - } else if (mapFile.isFile()) { - checkMap(mapFile, mapPath); - } -} - -if (baseDirectory == null || baseDirectory.length() <= 0) { - baseDirectory = "/"; -} -print("Checking maps below " + baseDirectory + "..."); -if (baseDirectory.endsWith("/")) { - baseDirectory = baseDirectory.substring(0, baseDirectory.length() - 1); -} - -checkMaps(new File(mainControl.getMapDefaultFolder() + baseDirectory), baseDirectory); - -print("Done.");]]></code> - <mode> - <autoboot>false</autoboot> - <bash>true</bash> - <filter>false</filter> - </mode> - <parameter> - <name>baseDirectory</name> - <description>Base Directory</description> - <type>java.lang.String</type> - <value>/</value> - </parameter> - <parameter> - <name>errorLimit</name> - <description>Maximum number of errors to show for each map; 0=show all errors</description> - <type>java.lang.Integer</type> - <value>20</value> - <minimum>0</minimum> - <maximum>2147483647</maximum> - </parameter> - </script> - <script> - <name>WorldMaker</name> - <code><![CDATA[import java.io.*; -import cfeditor.IGUIConstants; -import java.io.IOException; -import javax.imageio.ImageIO; - -/* - * Functions declaration - */ -File getSimpleFilename(File mapFile) { - String mapFilename = mapFile.getPath(); - int i = mapFilename.lastIndexOf(File.separator); - if (i > 0) { - mapFilename = mapFilename.substring(i + 1); - } - return new File(mapFilename); -} - -File getPngImageFilename(File mapFile) { - return new File(Location + PictureDirectory + getSimpleFilename(mapFile) + ".png"); -} - -boolean updateMap(File mapFile, File pictureFile) { - if (!mapFile.exists()) { - return false; - } - if (pictureFile.exists() && pictureFile.lastModified() >= mapFile.lastModified()) { - return false; - } - print("converting " + mapFile + " to " + pictureFile + "."); - map = mainControl.getMapManager().openMapFile(mapFile, false); - if (map == null) { - return false; - } - try { - try { - ImageIO.write(map.getFullImage(), "png", pictureFile); - } catch (IOException ex) { - print("cannot write " + pictureFile + ": " + ex.getMessage()); - return false; - } - } finally { - if (map.nViews() <= 0) { - mainControl.getMapManager().closeLevel(map); - } - } - return true; -} - -boolean runCommand(String cmd) { - f = File.createTempFile("WMaker", ".sh"); - FileWriter out = new FileWriter(f); - out.write(cmd); - out.close(); - print("running " + cmd); - Process p = Runtime.getRuntime().exec("sh " + f.getAbsolutePath()); - p.waitFor(); - f.delete(); - return p.exitValue() == 0; -} - -/* - * Running code - */ -void checkDaList() { - DestWidth = TileWidth.intValue() * NumX.intValue(); - DestHeight = TileHeight.intValue() * NumY.intValue(); - - if (Location == null || Location.length() < 1) { - Location = mainControl.getMapDefaultFolder(); - print("autodetected location " + Location); - } - - print("World map will be " + DestWidth + "x" + DestHeight + " in size"); - if (!Location.endsWith(File.separator)) { - Location = Location + File.separator; - } - - if (!PictureDirectory.endsWith(File.separator)) { - PictureDirectory = PictureDirectory + File.separator; - } - new File(Location + PictureDirectory).mkdirs(); - - HashSet mapList = new HashSet(); - boolean firstRun = false; - if (new File(Location + PictureDirectory + WorldPicture + ".ppm").exists()) { - runCommand("cp " + Location + PictureDirectory + WorldPicture + ".ppm /tmp/tmp.ppm"); - } else { - runCommand("ppmmake \\#000 " + DestWidth + " " + DestHeight + " > /tmp/tmp.ppm"); - firstRun = true; - print("Creating images for the first time."); - } - - for (int x = 0; x < NumX.intValue(); x++) { - for (int y = 0; y < NumY.intValue(); y++) { - currentX = StartX.intValue() + x; - currentY = StartY.intValue() + y; - currentMap = new File(Location + MapFilename + "_" + currentX + "_" + currentY); - currentPicture = getPngImageFilename(currentMap); - didUpdate = updateMap(currentMap, currentPicture); - if ((didUpdate || firstRun) && currentPicture.exists()) { - runCommand("pngtopnm " + currentPicture + " | pnmscale -xysize " + TileWidth + " " + TileHeight + " > /tmp/ppm.tmp"); - sx = x * TileWidth.intValue(); - sy = y * TileHeight.intValue(); - runCommand("pnmpaste /tmp/ppm.tmp " + sx + " " + sy + " /tmp/tmp.ppm > /tmp/tmp.ppm1"); - runCommand("rm -f /tmp/tmp.ppm"); - runCommand("mv /tmp/tmp.ppm1 /tmp/tmp.ppm"); - } - } - } - runCommand("mv /tmp/tmp.ppm " + Location + PictureDirectory + WorldPicture + ".ppm"); - print("converting to png if possible.\n"); - runCommand("pnmtopng " + Location + PictureDirectory + WorldPicture + ".ppm > /tmp/tmp.png"); - runCommand("mv /tmp/tmp.png " + Location + PictureDirectory + WorldPicture + ".png"); -} - -checkDaList(); -print("Done!");]]></code> - <mode> - <autoboot>false</autoboot> - <bash>true</bash> - <filter>false</filter> - </mode> - <parameter> - <name>Location</name> - <description>Specify the map directory to use by this script. Leave empty for auto</description> - <type>java.lang.String</type> - <value /> - </parameter> - <parameter> - <name>MapFilename</name> - <description>This map file name will be appended to the 'Location' parameter and '_mapx_mapy' will be added at the end</description> - <type>java.lang.String</type> - <value>world/world</value> - </parameter> - <parameter> - <name>TileWidth</name> - <description>The width in pixel of each generate map image</description> - <type>java.lang.Integer</type> - <value>50</value> - <minimum>0</minimum> - <maximum>2000</maximum> - </parameter> - <parameter> - <name>TileHeight</name> - <description>The height in pixel of each generated map image</description> - <type>java.lang.Integer</type> - <value>50</value> - <minimum>0</minimum> - <maximum>2000</maximum> - </parameter> - <parameter> - <name>NumX</name> - <description>The number of maps along X axis to analyze</description> - <type>java.lang.Integer</type> - <value>30</value> - <minimum>0</minimum> - <maximum>50000</maximum> - </parameter> - <parameter> - <name>NumY</name> - <description>The number of maps along Y axis to analyze</description> - <type>java.lang.Integer</type> - <value>30</value> - <minimum>0</minimum> - <maximum>50000</maximum> - </parameter> - <parameter> - <name>StartX</name> - <description>The first coordinate along X axis to analyze</description> - <type>java.lang.Integer</type> - <value>100</value> - <minimum>0</minimum> - <maximum>50000</maximum> - </parameter> - <parameter> - <name>StartY</name> - <description>The first coordinate along Y axis to analyze</description> - <type>java.lang.Integer</type> - <value>100</value> - <minimum>0</minimum> - <maximum>50000</maximum> - </parameter> - <parameter> - <name>PictureDirectory</name> - <description>The subdirectory where to put pictures</description> - <type>java.lang.String</type> - <value>images</value> - </parameter> - <parameter> - <name>WorldPicture</name> - <description>The picture which will store the world map</description> - <type>java.lang.String</type> - <value>worldmap</value> - </parameter> - <parameter> - <name>CheckDelay</name> - <description>The delay in milliseconds between map checks</description> - <type>java.lang.Integer</type> - <value>15000</value> - <minimum>0</minimum> - <maximum>86400000</maximum> - </parameter> - </script> -</scripts> - Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -248,6 +248,7 @@ mainView = new CMainView(this); undoControl = new UndoControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell>(this); init(); + scriptControl.loadScripts(new File(getMapDir(), IGUIConstants.SCRIPTS_DIR)); recentManager = new RecentManager(this, (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent")); final long timeStart = System.currentTimeMillis(); @@ -835,7 +836,7 @@ /** Invoked when user wants to exit from the program. */ public void exit() { - if (ScriptEditControl.getInstance().closeAllTabs() && mapManager.closeAll() && mainView.getObjectChooser().getPickmapChooserControl().canExit()) { + if (ScriptEditControl.getInstance().closeAllTabs() && mapManager.closeAll() && mainView.getObjectChooser().getPickmapChooserControl().canExit() && scriptControl.canExit()) { doExit(); } } Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/CMainView.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -482,7 +482,7 @@ @Override protected void initActions() { ACTION_FACTORY.createActions(true, mainControl, "createNew", "open", "options", "exit", "gc", "onlineHelp", "tod", "about"); ACTION_FACTORY.createActions(true, this, "about"); - ACTION_FACTORY.createActions(true, mainControl.getScriptController().getView(), "editPlugins", "savePlugins", "exportPluginAs", "importPlugin"); + ACTION_FACTORY.createActions(true, mainControl.getScriptController().getView(), "editPlugins", "savePlugins", "importPlugin"); } /** {@inheritDoc} */ Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -69,6 +69,9 @@ /** The directory that contains all pickmaps. */ String PICKMAP_DIR = "editor/pickmaps"; + /** The directory that contains all scripts. */ + String SCRIPTS_DIR = "editor/scripts"; + String ARCH_FILE = "archetypes"; // file with all arches String PNG_FILE = "crossfire.0"; // file with all pngs Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/action.properties 2007-10-10 17:39:50 UTC (rev 3199) @@ -37,7 +37,7 @@ tools.menu=validateMap - gc analyze.menu= view.menu=- showMonster showExit showBackground showDoor showWall showEquipment showTreasure showConnected resetView - prevWindow nextWindow -plugins.menu=- editPlugins - savePlugins exportPluginAs importPlugin +plugins.menu=- editPlugins - savePlugins importPlugin window.menu=closeAll help.menu=onlineHelp tod about @@ -106,8 +106,6 @@ savePlugins.icon=SaveLevelAsSmallIcon -exportPluginAs.icon=SaveLevelSmallIcon - importPlugin.icon=ImportPluginSmallIcon Modified: trunk/crossfire/src/cfeditor/gui/script/ScriptEditor.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/script/ScriptEditor.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/gui/script/ScriptEditor.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -194,7 +194,7 @@ btn.setToolTipText("Export the specified plugin as XML (for distribution)"); btn.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { - getScript().getController().exportScript(getScript()); + getScript().getController().saveScriptAs(getScript(), false); } }); optionsTab.add(btn, gbc); Modified: trunk/crossfire/src/cfeditor/gui/script/ScriptView.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/script/ScriptView.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/gui/script/ScriptView.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -30,9 +30,6 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.Reader; import javax.swing.Action; import javax.swing.JComponent; import javax.swing.JDialog; @@ -166,52 +163,14 @@ } public void savePlugins() { - control.exportXML(); + control.saveAllScripts(); } - public void exportPluginAs() { - final JFileChooser choose = new JFileChooser(); - final FileFilter filter = new FileFilter() { - @Override public boolean accept(final File f) { - return f.isFile() && f.getName().endsWith(".xml"); - } - - @Override public String getDescription() { - return "XML script collection (*.xml)"; - } - }; - choose.setFileFilter(filter); - if (choose.showSaveDialog(control.getMainControl().getMainView()) == JFileChooser.APPROVE_OPTION) { - final File f = choose.getSelectedFile(); - control.exportXML(f); - } - } - public void importPlugin() { final JFileChooser choose = new JFileChooser(); - final FileFilter filter = new FileFilter() { - @Override public boolean accept(final File f) { - return f.isFile() && f.getName().endsWith(".xml") && f.exists() && f.canWrite(); - } - - @Override public String getDescription() { - return "XML script collection (*.xml)"; - } - }; - choose.setFileFilter(filter); + choose.setDialogTitle("import script"); if (choose.showOpenDialog(control.getMainControl().getMainView()) == JFileChooser.APPROVE_OPTION) { - final File f = choose.getSelectedFile(); - try { - // TODO:cher:using a reader is not a good idea because we cannot make sure the encoding is correct. - final Reader reader = new FileReader(f); - try { - control.importXML(reader, true); - } finally { - reader.close(); - } - } catch (final IOException ex) { - // TODO:cher:logging - } + control.importXML(choose.getSelectedFile(), true); } } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/messages.properties 2007-10-10 17:39:50 UTC (rev 3199) @@ -331,9 +331,6 @@ savePlugins.text=Save plugins savePlugins.mnemonic=S -exportPluginAs.text=Export plugins as... -exportPluginAs.mnemonic=X - importPlugin.text=Import a plugin... importPlugin.mnemonic=I @@ -432,6 +429,13 @@ editPopup.text=Edit Archetype +########## +# Plugins + +pluginConfirmSaveChanges.title=Save changes? +pluginConfirmSaveChanges.message=Do you want to save changes to plugin {0}? + + ####################### # Various Log Messages logExitWithExit=Exiting with System.exit(). Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2007-10-10 17:39:50 UTC (rev 3199) @@ -299,9 +299,6 @@ savePlugins.text=Plugins speichern savePlugins.mnemonic=S -exportPluginAs.text=Plugins exportieren... -exportPluginAs.mnemonic=E - importPlugin.text=Plugin importieren... importPlugin.mnemonic=I @@ -382,3 +379,10 @@ #################### # Archetype Chooser editPopup.text=Archetyp bearbeiten + + +########## +# Plugins + +pluginConfirmSaveChanges.title=\xC4nderungen sichern? +pluginConfirmSaveChanges.message=Wollen Sie die \xC4nderungen des Plugins {0} sichern? Modified: trunk/crossfire/src/cfeditor/messages_fr.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_fr.properties 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/messages_fr.properties 2007-10-10 17:39:50 UTC (rev 3199) @@ -300,9 +300,6 @@ #savePlugins.text= #savePlugins.mnemonic= -#exportPluginAs.text= -#exportPluginAs.mnemonic= - #importPlugin.text= #importPlugin.mnemonic= @@ -383,3 +380,10 @@ #################### # Archetype Chooser #editPopup.text= + + +########## +# Plugins + +#pluginConfirmSaveChanges.title=\xC4nderungen sichern? +#pluginConfirmSaveChanges.message= Modified: trunk/crossfire/src/cfeditor/messages_sv.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_sv.properties 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/messages_sv.properties 2007-10-10 17:39:50 UTC (rev 3199) @@ -298,9 +298,6 @@ #savePlugins.text= #savePlugins.mnemonic= -#exportPluginAs.text= -#exportPluginAs.mnemonic= - #importPlugin.text= #importPlugin.mnemonic= @@ -381,3 +378,10 @@ #################### # Archetype Chooser #editPopup.text= + + +########## +# Plugins + +pluginConfirmSaveChanges.title=Spara \xE4ndringar? +#pluginConfirmSaveChanges.message= Modified: trunk/crossfire/src/cfeditor/script/ScriptController.java =================================================================== --- trunk/crossfire/src/cfeditor/script/ScriptController.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/script/ScriptController.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -45,9 +45,11 @@ import javax.swing.JOptionPane; import javax.swing.event.EventListenerList; import javax.swing.filechooser.FileFilter; +import net.sf.japi.swing.ActionFactory; import org.apache.log4j.Logger; import org.jdom.Document; import org.jdom.Element; +import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; @@ -64,6 +66,9 @@ /** The Logger for printing log messages. */ private static final Logger log = Logger.getLogger(ScriptController.class); + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + private final Map<String, ScriptModel> scripts = new LinkedHashMap<String, ScriptModel>(); private final ScriptView view; @@ -73,16 +78,42 @@ private final CMainControl mainControl; - private final CResourceLoader scriptRsc; + /** + * The default directory for saving scripts. + */ + @Nullable private File scriptsDir = null; public ScriptController(final CMainControl mainControl) { view = new ScriptView(this); this.mainControl = mainControl; - scriptRsc = new CResourceLoader("scripts.xml"); - importXML(); } /** + * Load all files as scripts from the given directory. + * + * @param scriptsDir The directory to load. + */ + public void loadScripts(@NotNull final File scriptsDir) { + this.scriptsDir = scriptsDir; + + final File[] files = scriptsDir.listFiles(); + if (files == null) { + log.warn("Scripts directory not readable: " + scriptsDir); + return; + } + + final int scriptCount = scripts.size(); + for (final File scriptFile : files) { + if (scriptFile.isFile()) { + importXML(scriptFile, false); + } + } + if (log.isInfoEnabled()) { + log.info("Loaded " + (scripts.size() - scriptCount) + " scripts from " + scriptsDir); + } + } + + /** * Set the menu to add script commands to. Entries already present in the * menu are deleted. * @@ -123,22 +154,19 @@ fireScriptDeletedEvent(script); } - public void importXML() { - final Document d = CResourceLoader.getAggregateXML("scripts.xml", true, true, true); - importXML(d, true); - } - - public void importXML(final Reader source, final boolean override) { - final SAXBuilder builder = new SAXBuilder(false);/*non validating*/ - log.debug("Loading...."); + public void importXML(@NotNull final File script, final boolean override) { + final SAXBuilder builder = new SAXBuilder(false); /*non validating*/ try { - final Document scriptDoc = builder.build(source); - importXML(scriptDoc, override); - } catch (final Exception e) { + final Document d = builder.build(script); + importXML(d, script, override); + } catch (final JDOMException ex) { + log.warn(script + ": " + ex.getMessage()); + } catch (final IOException ex) { + log.warn(script + ": " + ex.getMessage()); } } - public void importXML(final Document doc, final boolean override) { + private void importXML(final Document doc, @Nullable final File file, final boolean override) { try { if (!doc.hasRootElement()) { log.info("No script found."); @@ -146,105 +174,151 @@ } final Element elt = doc.getRootElement(); - if ((!elt.getName().equalsIgnoreCase("scripts"))) { - log.warn("Problem reading xml scripts, need a root element named \"scripts\""); + if ((!elt.getName().equalsIgnoreCase("script"))) { + log.warn("Problem reading xml scripts, need a root element named \"script\""); return; } - final List<Element> scriptList = elt.getChildren("script"); - if (scriptList == null || scriptList.isEmpty()) { - log.info("no script found"); - return; - } - for (final Element o : scriptList) { - log.debug("Reading one script"); - final ScriptModel cScript = new ScriptModel(this); - cScript.fromXML(o); - log.debug("script: " + cScript.getName()); - if (override || !scripts.containsKey(cScript.getName())) { - if (log.isDebugEnabled()) { - log.debug("storing with code " + cScript.getCode()); - } - unRegister(cScript.getName()); - addScript(cScript); - register(cScript.getName()); - } else { - log.debug("not storing"); + final ScriptModel cScript = new ScriptModel(this); + cScript.fromXML(elt); + cScript.setFile(file); + log.debug("script: " + cScript.getName()); + if (override || !scripts.containsKey(cScript.getName())) { + if (log.isDebugEnabled()) { + log.debug("storing with code " + cScript.getCode()); } + + unRegister(cScript.getName()); + addScript(cScript); + register(cScript.getName()); + } else { + log.warn(file + ": ignoring duplicate script '" + cScript.getName() + "'"); } } catch (final Exception e) { e.printStackTrace(); } } - public void exportScript(final ScriptModel model) { - //show a dialog an propose a filename - final JFileChooser chooser = new JFileChooser(); - final FileFilter f = new FileFilter() { - @Override public boolean accept(final File f) { - return f.getName().endsWith(".xml"); + /** + * Save all unsaved scripts. + * + * @return Whether all scripts have been saved. + */ + public boolean saveAllScripts() { + for (final ScriptModel scriptModel : scripts.values()) { + if (!saveScript(scriptModel)) { + return false; } + } - @Override public String getDescription() { - return "cfeditor script (*.xml)"; - } - }; - chooser.setFileFilter(f); - final int result = chooser.showSaveDialog(null); - if (result == JFileChooser.APPROVE_OPTION) { - final Element root = new Element("scripts"); - final Document d = new Document(root); - root.addContent(model.toXML()); - final XMLOutputter out = new XMLOutputter(); - out.setFormat(Format.getPrettyFormat()); - try { - final Writer fw = new FileWriter(chooser.getSelectedFile()); - try { - out.output(d, fw); - } finally { - fw.close(); + return true; + } + + /** + * Prompt the user for all unsaved scripts. + * + * @return Whether no unsaved scripts remain. + */ + public boolean canExit() { + for (final ScriptModel scriptModel : scripts.values()) { + if (scriptModel.isModified()) { + final int result = ACTION_FACTORY.showConfirmDialog(mainControl.getMainView(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "pluginConfirmSaveChanges", scriptModel.getName()); + if (result == JOptionPane.YES_OPTION) { + if (!saveScript(scriptModel)) { + return false; + } + } else if (result == JOptionPane.CANCEL_OPTION || result == JOptionPane.CLOSED_OPTION) { + return false; } - } catch (final IOException e) { - e.printStackTrace(); } } + + return true; } - public void exportXML() { + /** + * Save one script. Does nothing if the script is unchanged. + * + * @param scriptModel The script to save. + * + * @return Whether the script has been saved, or if the script was not + * modified. + */ + public boolean saveScript(@NotNull final ScriptModel scriptModel) { + if (!scriptModel.isModified()) { + return true; + } + try { - exportXML(scriptRsc.getOutputStream()); - } catch (final IOException e) { - JOptionPane.showMessageDialog(mainControl.getMainView(), e.getLocalizedMessage(), "Script Error", JOptionPane.INFORMATION_MESSAGE); - e.printStackTrace(); + final File file = scriptModel.getFile(); + if (file != null) { + saveScript(scriptModel, file); + } else { + saveScriptAs(scriptModel, true); + } + } catch (final IOException ex) { + // XXX: notify user + return false; } + + scriptModel.resetModified(); + return true; } - public void exportXML(final OutputStream destination) { - final Element root = new Element("scripts"); - final Document d = new Document(root); - for (final ScriptModel sm : scripts.values()) { - root.addContent(sm.toXML()); + /** + * Prompt the user for a file name to save a script. The script is saved + * regardless whether the script is modified or not. + * + * @param scriptModel The script to save. + * + * @param updateScriptFile If set, update the script file to the save + * location. + * + * @return Whether the script has been saved. + */ + public boolean saveScriptAs(@NotNull final ScriptModel scriptModel, final boolean updateScriptFile) { + final JFileChooser chooser = new JFileChooser(); + chooser.setCurrentDirectory(scriptsDir); + chooser.setDialogTitle("save script " + scriptModel.getName()); + final int result = chooser.showSaveDialog(null); + if (result != JFileChooser.APPROVE_OPTION) { + return false; } - final XMLOutputter out = new XMLOutputter(); - out.setFormat(Format.getPrettyFormat()); + + final File file = chooser.getSelectedFile(); + if (updateScriptFile) { + scriptModel.setFile(file); + } + scriptsDir = file.getParentFile(); + try { - out.output(d, destination); - } catch (final IOException e) { - e.printStackTrace(); + saveScript(scriptModel, file); + } catch (final IOException ex) { + return false; } + + return true; } - public void exportXML(final File destination) { + /** + * Save a script to a given file. + * + * @param scriptModel The script to save. + * + * @param file The file to save to. + * + * @throws IOException If the file cannot be saved. + */ + public void saveScript(@NotNull final ScriptModel scriptModel, @NotNull final File file) throws IOException { + final FileOutputStream fos = new FileOutputStream(file); try { - final OutputStream w = new FileOutputStream(destination); - try { - exportXML(w); - } finally { - w.close(); - } - } catch (final Exception e) { - e.printStackTrace(); - //TODO handle using main controller + final Element root = scriptModel.toXML(); + final Document d = new Document(root); + final XMLOutputter out = new XMLOutputter(); + out.setFormat(Format.getPrettyFormat()); + out.output(d, fos); + } finally { + fos.close(); } } Modified: trunk/crossfire/src/cfeditor/script/ScriptModel.java =================================================================== --- trunk/crossfire/src/cfeditor/script/ScriptModel.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/script/ScriptModel.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -21,6 +21,7 @@ import cfeditor.script.parameter.PluginParameter; import cfeditor.script.parameter.PluginParameterFactory; +import java.io.File; import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -67,6 +68,17 @@ private final ScriptController control; + /** + * The location to save this script to; set to <code>null</code> if the + * script has no associated location. + */ + @Nullable private File file = null; + + /** + * Whether the script contents has been modified since last save. + */ + private boolean modified = false; + public ScriptModel(final ScriptController control) { this.control = control; } @@ -85,7 +97,12 @@ * @todo Maybe this should be moved to the constructor and the underlying field made final. */ public void setName(final String name) { + if (this.name.equals(name)) { + return; + } + this.name = name; + modified = true; notifyListeners(); } @@ -103,7 +120,12 @@ * @param code The code of this ScriptModel. */ public void setCode(final String code) { + if (this.code.equals(code)) { + return; + } + this.code = code; + modified = true; notifyListeners(); } @@ -114,7 +136,10 @@ */ public void setParamName(final int index, final String name) { try { - params.get(index).setName(name); + if (params.get(index).setName(name)) { + modified = true; + notifyListeners(); + } } catch (final Exception e) { } } @@ -153,10 +178,12 @@ */ public void setParamDescription(final int index, final String description) { try { - params.get(index).setDescription(description); + if (params.get(index).setDescription(description)) { + modified = true; + notifyListeners(); + } } catch (final Exception e) { } - notifyListeners(); } /** @@ -180,10 +207,12 @@ */ public void setParamValue(final int index, final Object value) { try { - params.get(index).setValue(value); + if (params.get(index).setValue(value)) { + modified = true; + notifyListeners(); + } } catch (final Exception e) { } - notifyListeners(); } public int getParametersCount() { @@ -207,11 +236,13 @@ public void newParameter() { final PluginParameter p = PluginParameterFactory.createParameter(); params.add(p); + modified = true; notifyListeners(); } public void removeParameter(final int index) { params.remove(index); + modified = true; notifyListeners(); } @@ -241,6 +272,7 @@ model.code = code; model.name = name; model.scriptType = scriptType; + model.modified = modified; for (final PluginParameter param : params) { model.addParameter((PluginParameter) param.clone()); } @@ -261,6 +293,7 @@ */ public void addParameter(final PluginParameter p) { params.add(p); + modified = true; notifyListeners(); } @@ -305,10 +338,19 @@ public void toggleScriptType(final int type, final boolean b) { if (b) { + if ((scriptType & type) == type) { + return; + } + scriptType |= type; } else { + if ((scriptType & type) == 0) { + return; + } + scriptType &= ~type; } + modified = true; notifyListeners(); } @@ -352,6 +394,7 @@ addParameter(p); } } + modified = false; } public Element toXML() { @@ -390,6 +433,7 @@ public void convertType(final int index, final String newType) { params.set(index, PluginParameterFactory.createParameter(newType, params.get(index).toXML())); + modified = true; notifyListeners(); } @@ -398,4 +442,44 @@ convertType(index, newType); } + /** + * Return whether the script contents has been modified since last save. + * + * @return Whether the script contents has been modified since last save. + */ + public boolean isModified() { + return modified; + } + + /** + * Mark the script as unmodified since last save. + */ + public void resetModified() { + if (!modified) { + return; + } + + modified = false; + notifyListeners(); + } + + /** + * Return the location to save this script to. + * + * @return The location to save to, or <code>null</code> if the script has + * no associated location. + */ + @Nullable public File getFile() { + return file; + } + + /** + * Set The location to save this script to. + * + * @param file The location; may be <code>null</code>. + */ + public void setFile(@Nullable final File file) { + this.file = file; + } + } // class ScriptModel Modified: trunk/crossfire/src/cfeditor/script/parameter/MapParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/script/parameter/MapParameter.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/script/parameter/MapParameter.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -71,12 +71,12 @@ return CMainControl.getInstance().getMapManager().getCurrentMap(); } - @Override public void setValue(final Object value) { + @Override public boolean setValue(final Object value) { if (value == null) { - super.setValue(null); + return super.setValue(null); } else { final MapControl map = (MapControl) value; - super.setValue(map.getMapModel().getMapArchObject().getMapName()); + return super.setValue(map.getMapModel().getMapArchObject().getMapName()); } } Modified: trunk/crossfire/src/cfeditor/script/parameter/PluginParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/script/parameter/PluginParameter.java 2007-10-10 17:19:08 UTC (rev 3198) +++ trunk/crossfire/src/cfeditor/script/parameter/PluginParameter.java 2007-10-10 17:39:50 UTC (rev 3199) @@ -57,24 +57,39 @@ return description; } - public void setDescription(final String description) { + public boolean setDescription(final String description) { + if (this.description == null ? description == null : this.description.equals(description)) { + return false; + } + this.description = description; + return true; } public String getName() { return name; } - public void setName(final String name) { + public boolean setName(final String name) { + if (this.name == null ? name == null : this.name.equals(name)) { + return false; + } + this.name = name; + return true; } public Object getValue() { return value; } - public void setValue(final Object value) { + public boolean setValue(final Object value) { + if (this.value == null ? value == null : this.value.equals(value)) { + return false; + } + this.value = value; + return true; } public Element toXML() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-10 19:36:14
|
Revision: 3207 http://gridarta.svn.sourceforge.net/gridarta/?rev=3207&view=rev Author: akirschbaum Date: 2007-10-10 12:36:17 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Make analyze menu work again. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CFilterControl.java trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/gui/script/parameter/FilterParameterView.java trunk/crossfire/src/cfeditor/script/parameter/FilterParameter.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/ChangeLog 2007-10-10 19:36:17 UTC (rev 3207) @@ -1,5 +1,7 @@ 2007-10-10 Andreas Kirschbaum + * Make analyze menu work again. + * Do not reset map modified flag when saving fails. * Make scripts work if Gridarta is run outside the source Modified: trunk/crossfire/src/cfeditor/CFilterControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CFilterControl.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/CFilterControl.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -56,7 +56,7 @@ public static final int MAX_HIGHLIGHT = 3; - private final NamedFilterList filterList = NamedFilterList.getDefaultList(); + private final NamedFilterList filterList; private final NamedFilterConfig filterOutConfig; @@ -75,7 +75,8 @@ * @param mapControl MapControl to create FilterControl for. * @param mainControl The main control. */ - public CFilterControl(@Nullable final MapControl mapControl, @NotNull final CMainControl mainControl) { + public CFilterControl(@Nullable final MapControl mapControl, @NotNull final CMainControl mainControl, NamedFilterList filterList) { + this.filterList = filterList; this.mainControl = mainControl; filterOutConfig = (NamedFilterConfig) filterList.createConfig(); highLightConfig = new NamedFilterConfig[]{ Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -19,6 +19,7 @@ package cfeditor; +import cfeditor.filter.NamedFilterList; import cfeditor.gameobject.Archetype; import cfeditor.gameobject.ArchetypeParser; import cfeditor.gameobject.ArchetypeSet; @@ -177,6 +178,8 @@ */ private final ArchetypeSet archetypeSet; + private final NamedFilterList defaultNamedFilterList; + /** The current script controller. */ private final ScriptController scriptControl; @@ -231,7 +234,7 @@ private final AutoValidator<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell> autoValidator; /** The filter control. */ - private final CFilterControl filterControl = new CFilterControl(null, this); + private final CFilterControl filterControl; /** The autojoin lists. */ public static final AutojoinLists<GameObject, MapArchObject, Archetype> autojoinLists = new AutojoinLists<GameObject, MapArchObject, Archetype>(); @@ -248,7 +251,6 @@ mainView = new CMainView(this); undoControl = new UndoControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell>(this); init(); - scriptControl.loadScripts(new File(getMapDir(), IGUIConstants.SCRIPTS_DIR)); recentManager = new RecentManager(this, (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "recent")); final long timeStart = System.currentTimeMillis(); @@ -262,6 +264,13 @@ mainView.getObjectChooser().getArchetypeChooserControl().setTabPaneEnabled(false); archetypeSet.loadArchetypes(archetypeParser); + defaultNamedFilterList = new NamedFilterList(); + filterControl = new CFilterControl(null, this, defaultNamedFilterList); + final JMenu menuAnalyze = (JMenu) ACTION_FACTORY.find(mainView.getJMenuBar(), "analyze"); + if (menuAnalyze != null) { + filterControl.createMenuEntries(menuAnalyze); + } + scriptControl.loadScripts(new File(getMapDir(), IGUIConstants.SCRIPTS_DIR)); mainView.setStatusText("Sorting..."); mainView.getObjectChooser().getArchetypeChooserControl().setTabPaneEnabled(true); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/CMainView.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -153,10 +153,6 @@ toolbarPanel.add(ACTION_FACTORY.createToolBar("main"), BorderLayout.NORTH); toolbarPanel.add(createCenterPanel(defwidth, defheight), BorderLayout.CENTER); setJMenuBar(ACTION_FACTORY.createMenuBar(true, "main")); - final JMenu menuAnalyze = (JMenu) ACTION_FACTORY.find(getJMenuBar(), "analyze"); - if (menuAnalyze != null) { - mainControl.getFilterControl().createMenuEntries(menuAnalyze); - } mainControl.getScriptController().setMenu((JMenu) ACTION_FACTORY.find(getJMenuBar(), "plugins")); lookAndFeelManager.init((JMenu) ACTION_FACTORY.find(getJMenuBar(), "view")); Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterList.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -59,12 +59,6 @@ private final EventListenerList listenerList = new EventListenerList(); - private static final NamedFilterList DEFAULT_LIST = new NamedFilterList(); - - public static NamedFilterList getDefaultList() { - return DEFAULT_LIST; - } - /** Create a new NameFilterList. */ public NamedFilterList() { subFilters = new LinkedHashMap<String, Filter>(); Modified: trunk/crossfire/src/cfeditor/gui/script/parameter/FilterParameterView.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/script/parameter/FilterParameterView.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/gui/script/parameter/FilterParameterView.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -28,11 +28,17 @@ public class FilterParameterView implements PluginParameterView { + private final NamedFilterList defaultFilterList; + + public FilterParameterView(final NamedFilterList defaultFilterList) { + this.defaultFilterList = defaultFilterList; + } + /* (non-Javadoc) * @see cfeditor.PluginParameterView#getValueComponent(java.lang.Object, cfeditor.PluginParameter) */ public JComponent getValueComponent(final Object value, final PluginParameter parameter) { - final JMenuItem mu = NamedFilterList.getDefaultList().createMenuEntry((FilterConfig) parameter.getValue()); + final JMenuItem mu = defaultFilterList.createMenuEntry((FilterConfig) parameter.getValue()); mu.setName("Choose filters"); return mu; // XXX: was mu.getToolbarComponent() with cfeditor.menu.BasicMenuEntry mu } Modified: trunk/crossfire/src/cfeditor/script/parameter/FilterParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/script/parameter/FilterParameter.java 2007-10-10 19:21:23 UTC (rev 3206) +++ trunk/crossfire/src/cfeditor/script/parameter/FilterParameter.java 2007-10-10 19:36:17 UTC (rev 3207) @@ -27,14 +27,17 @@ public class FilterParameter extends PluginParameter { - public FilterParameter() { + private final NamedFilterList defaultFilterList; + + public FilterParameter(final NamedFilterList defaultFilterList) { + this.defaultFilterList = defaultFilterList; parameterType = getParameterType(); } @Override public Object getValue() { Object o = super.getValue(); if (o == null) { - o = NamedFilterList.getDefaultList().createConfig(); + o = defaultFilterList.createConfig(); setValue(o); } return o; @@ -43,12 +46,12 @@ @Override public void fromXML(final Element e) { super.fromXML(e); final NamedFilterConfig conf = (NamedFilterConfig) getValue(); - NamedFilterList.getDefaultList().fromXML(e, conf); + defaultFilterList.fromXML(e, conf); } @Override public Element toXML() { final Element e = super.toXML(); - e.addContent(NamedFilterList.getDefaultList().toXML((NamedFilterConfig) getValue())); + e.addContent(defaultFilterList.toXML((NamedFilterConfig) getValue())); return e; } @@ -56,7 +59,7 @@ * @see cfeditor.PluginParameter#getView() */ @Override public PluginParameterView getView() { - return new FilterParameterView(); + return new FilterParameterView(defaultFilterList); } public static String getParameterType() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-13 08:36:25
|
Revision: 3223 http://gridarta.svn.sourceforge.net/gridarta/?rev=3223&view=rev Author: akirschbaum Date: 2007-10-13 01:36:26 -0700 (Sat, 13 Oct 2007) Log Message: ----------- Add map validator "Suspicious attribute value": check that attribute values are in a sensible interval. For now checks that gear providing sustenance is within [-20..+20]. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gameobject/Archetype.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-13 08:34:54 UTC (rev 3222) +++ trunk/crossfire/ChangeLog 2007-10-13 08:36:26 UTC (rev 3223) @@ -1,3 +1,9 @@ +2007-10-13 Andreas Kirschbaum + + * Add map validator "Suspicious attribute value": check that + attribute values are in a sensible interval. For now checks that + gear providing sustenance is within [-20..+20]. + 2007-10-11 Andreas Kirschbaum * Rename "Errors" tab into "Warnings" in game object attributes Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-13 08:34:54 UTC (rev 3222) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-10-13 08:36:26 UTC (rev 3223) @@ -77,6 +77,7 @@ import net.sf.gridarta.map.validation.DefaultErrorCollector; import net.sf.gridarta.map.validation.DelegatingMapValidator; import net.sf.gridarta.map.validation.ErrorCollector; +import net.sf.gridarta.map.validation.checks.AttributeRangeChecker; import net.sf.gridarta.map.validation.checks.ConnectedInsideContainerChecker; import net.sf.gridarta.map.validation.checks.ConnectionChecker; import net.sf.gridarta.map.validation.checks.ConnectedPickableChecker; @@ -305,7 +306,21 @@ */ private static DelegatingMapValidator<GameObject, MapArchObject, Archetype> createMapValidators() { final DelegatingMapValidator<GameObject, MapArchObject, Archetype> mapValidators = new DelegatingMapValidator<GameObject, MapArchObject, Archetype>(); + final AttributeRangeChecker<GameObject, MapArchObject, Archetype> attributeRangeChecker = new AttributeRangeChecker<GameObject, MapArchObject, Archetype>(); + // make sure sustenance is [-20..20]; amulet of Sustenance is +15 so +20 should be safe + attributeRangeChecker.add(Archetype.TYPE_WEAPON, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_AMULET, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_BOOTS, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_BRACERS, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_BRESTPLATE_ARMOR, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_CLOAK, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_GIRDLE, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_GLOVES, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_HELMET, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_RING, "food", "food bonus", -20, 20); + attributeRangeChecker.add(Archetype.TYPE_SHIELD, "food", "food bonus", -20, 20); mapValidators.add( + attributeRangeChecker, new ConnectedInsideContainerChecker(), new ConnectedPickableChecker(), new ConnectionChecker<GameObject, MapArchObject, Archetype>(new int[] { Modified: trunk/crossfire/src/cfeditor/gameobject/Archetype.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/Archetype.java 2007-10-13 08:34:54 UTC (rev 3222) +++ trunk/crossfire/src/cfeditor/gameobject/Archetype.java 2007-10-13 08:36:26 UTC (rev 3223) @@ -27,6 +27,10 @@ */ public interface Archetype extends net.sf.gridarta.gameobject.Archetype<GameObject, MapArchObject, Archetype> { + int TYPE_WEAPON = 15; + + int TYPE_BRESTPLATE_ARMOR = 16; + int TYPE_PEDESTAL = 17; int TYPE_ALTAR = 18; @@ -47,6 +51,12 @@ int TYPE_PEDESTAL_TRIGGER = 32; + int TYPE_SHIELD = 33; + + int TYPE_HELMET = 34; + + int TYPE_AMULET = 39; + int TYPE_TELEPORTER = 41; int TYPE_CREATOR = 42; @@ -63,8 +73,12 @@ int TYPE_MOOD_FLOOR = 65; + int TYPE_RING = 70; + int TYPE_DUPLICATOR = 83; + int TYPE_CLOAK = 87; + int TYPE_GATE = 91; int TYPE_BUTTON = 92; @@ -75,8 +89,16 @@ int TYPE_MAGIC_MOUTH = 98; + int TYPE_BOOTS = 99; + + int TYPE_GLOVES = 100; + int TYPE_SPELL = 101; + int TYPE_BRACERS = 104; + + int TYPE_GIRDLE = 113; + int TYPE_EVENT_CONNECTOR = 116; int TYPE_CONTAINER = 122; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-19 20:34:32
|
Revision: 3229 http://gridarta.svn.sourceforge.net/gridarta/?rev=3229&view=rev Author: akirschbaum Date: 2007-10-19 13:34:36 -0700 (Fri, 19 Oct 2007) Log Message: ----------- Update archetypes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/crossfire.0 Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-19 20:20:37 UTC (rev 3228) +++ trunk/crossfire/ChangeLog 2007-10-19 20:34:36 UTC (rev 3229) @@ -1,3 +1,7 @@ +2007-10-19 Andreas Kirschbaum + + * Update archetypes. + 2007-10-13 Andreas Kirschbaum * Add map validator "Suspicious attribute value": check that Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2007-10-19 20:20:37 UTC (rev 3228) +++ trunk/crossfire/resource/conf/archetypes 2007-10-19 20:34:36 UTC (rev 3229) @@ -39685,6 +39685,7 @@ sp 1 weight 1000 material 128 +body_head -1 client_type 270 editor_folder player/class/Wizardry end Modified: trunk/crossfire/resource/conf/crossfire.0 =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-26 07:26:39
|
Revision: 3232 http://gridarta.svn.sourceforge.net/gridarta/?rev=3232&view=rev Author: akirschbaum Date: 2007-10-26 00:26:40 -0700 (Fri, 26 Oct 2007) Log Message: ----------- Reject to load truncated map files; do not strip leading whitespace. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/MapArchObject.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-26 07:25:56 UTC (rev 3231) +++ trunk/crossfire/ChangeLog 2007-10-26 07:26:40 UTC (rev 3232) @@ -1,3 +1,8 @@ +2007-10-26 Andreas Kirschbaum + + * Reject to load truncated map files; do not strip leading + whitespace. + 2007-10-19 Andreas Kirschbaum * Update archetypes. Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-26 07:25:56 UTC (rev 3231) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-26 07:26:40 UTC (rev 3232) @@ -481,17 +481,23 @@ /** {@inheritDoc} */ public boolean parseMapArch(@NotNull final BufferedReader reader) throws IOException { - String line2; // input line, includes leading and trailing white space boolean loreflag = false; // flag for lore-text boolean archflag = false; // flag for arch<->end int width = 16; int height = 16; boolean msgflag = false; // flag for map-message - // read lines - boolean endReached = false; - while (!endReached && (line2 = reader.readLine()) != null) { - final String line = line2.trim(); + for (;;) { + final String tmp = reader.readLine(); + if (tmp == null) { + throw new IOException("unexpected end of file in map header"); + } + int endPos = tmp.length(); + while (endPos > 0 && tmp.charAt(endPos - 1) <= ' ') { + endPos--; + } + final String line = tmp.substring(0, endPos); + if (archflag) { // we are inside the map arch if (msgflag) { @@ -502,7 +508,7 @@ if (msgText.length() > 0) { addText("\n"); } - addText(line2); + addText(line); } } else if (loreflag) { // reading lore text: @@ -512,7 +518,7 @@ if (loreText.length() > 0) { addLore("\n"); } - addLore(line2); + addLore(line); } } else { // inside map arch, outside message @@ -522,7 +528,7 @@ if (line.equalsIgnoreCase(TAG_START_LORE)) { loreflag = true; } else if (line.equalsIgnoreCase("end")) { - endReached = true; + break; } else if (line.startsWith("name")) { setMapName(line.substring(line.indexOf(" ") + 1).trim()); } else if (line.startsWith("region")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-26 07:38:02
|
Revision: 3234 http://gridarta.svn.sourceforge.net/gridarta/?rev=3234&view=rev Author: akirschbaum Date: 2007-10-26 00:38:03 -0700 (Fri, 26 Oct 2007) Log Message: ----------- Make map loader more strict; complain about incorrect map headers. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/MapArchObject.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-26 07:35:55 UTC (rev 3233) +++ trunk/crossfire/ChangeLog 2007-10-26 07:38:03 UTC (rev 3234) @@ -1,5 +1,8 @@ 2007-10-26 Andreas Kirschbaum + * Make map loader more strict; complain about incorrect map + headers. + * Reject to load truncated map files; do not strip leading whitespace. Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-26 07:35:55 UTC (rev 3233) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-26 07:38:03 UTC (rev 3234) @@ -26,6 +26,7 @@ import java.util.Formatter; import net.sf.gridarta.Size2D; import net.sf.gridarta.map.AbstractMapArchObject; +import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; /** @@ -44,6 +45,9 @@ @SuppressWarnings({"HardcodedLineSeparator"}) public final class MapArchObject extends AbstractMapArchObject<MapArchObject> { + /** The Logger for printing log messages. */ + private static final Logger log = Logger.getLogger(MapArchObject.class); + // tags which appear in the map header private static final String TAG_START_LORE = "maplore"; @@ -529,43 +533,43 @@ loreflag = true; } else if (line.equalsIgnoreCase("end")) { break; - } else if (line.startsWith("name")) { + } else if (line.startsWith("name ")) { setMapName(line.substring(line.indexOf(" ") + 1).trim()); - } else if (line.startsWith("region")) { + } else if (line.startsWith("region ")) { setRegion(line.substring(line.indexOf(" ") + 1).trim()); - } else if (line.startsWith("width") || line.startsWith("x ")) { + } else if (line.startsWith("width ") || line.startsWith("x ")) { width = getLineValue(line); - } else if (line.startsWith("height") || line.startsWith("y ")) { + } else if (line.startsWith("height ") || line.startsWith("y ")) { height = getLineValue(line); - } else if (line.startsWith("enter_x") || line.startsWith("hp")) { + } else if (line.startsWith("enter_x ") || line.startsWith("hp")) { setEnterX(getLineValue(line)); - } else if (line.startsWith("enter_y") || line.startsWith("sp")) { + } else if (line.startsWith("enter_y ") || line.startsWith("sp")) { setEnterY(getLineValue(line)); - } else if (line.startsWith("reset_timeout") || line.startsWith("weight")) { + } else if (line.startsWith("reset_timeout ") || line.startsWith("weight ")) { setResetTimeout(getLineValue(line)); - } else if (line.startsWith("swap_time") || line.startsWith("value")) { + } else if (line.startsWith("swap_time ") || line.startsWith("value ")) { setSwapTime(getLineValue(line)); - } else if (line.startsWith("difficulty") || line.startsWith("level")) { + } else if (line.startsWith("difficulty ") || line.startsWith("level ")) { setDifficulty(getLineValue(line)); - } else if (line.startsWith("darkness") || line.startsWith("invisible")) { + } else if (line.startsWith("darkness ") || line.startsWith("invisible ")) { setDarkness(getLineValue(line)); - } else if (line.startsWith("fixed_resettime") || line.startsWith("stand_still")) { + } else if (line.startsWith("fixed_resettime ") || line.startsWith("stand_still ")) { if (getLineValue(line) != 0) { setFixedReset(true); } - } else if (line.startsWith("unique")) { + } else if (line.startsWith("unique ")) { if (getLineValue(line) != 0) { setUnique(true); } - } else if (line.startsWith("template")) { + } else if (line.startsWith("template ")) { if (getLineValue(line) != 0) { setTemplate(true); } - } else if (line.startsWith("outdoor")) { + } else if (line.startsWith("outdoor ")) { if (getLineValue(line) != 0) { setOutdoor(true); } - } else if (line.startsWith("nosmooth")) { + } else if (line.startsWith("nosmooth ")) { if (getLineValue(line) != 0) { setNosmooth(true); } @@ -579,28 +583,30 @@ } catch (final NumberFormatException e) { /* ignore (really?) */ } - } else if (line.startsWith("shopitems")) { + } else if (line.startsWith("shopitems ")) { setShopItems(line.substring(line.indexOf(" ") + 1).trim()); - } else if (line.startsWith("shoprace")) { + } else if (line.startsWith("shoprace ")) { setShopRace(line.substring(line.indexOf(" ") + 1).trim()); - } else if (line.startsWith("shopmin")) { + } else if (line.startsWith("shopmin ")) { setShopMin(getLineValue(line)); - } else if (line.startsWith("shopmax")) { + } else if (line.startsWith("shopmax ")) { setShopMax(getLineValue(line)); - } else if (line.startsWith("shopgreed")) { + } else if (line.startsWith("shopgreed ")) { setShopGreed(getLineValueAsDouble(line)); - } else if (line.startsWith("temp")) { + } else if (line.startsWith("temp ")) { setTemp(getLineValue(line)); - } else if (line.startsWith("pressure")) { + } else if (line.startsWith("pressure ")) { setPressure(getLineValue(line)); - } else if (line.startsWith("humid")) { + } else if (line.startsWith("humid ")) { setHumid(getLineValue(line)); - } else if (line.startsWith("windspeed")) { + } else if (line.startsWith("windspeed ")) { setWindspeed(getLineValue(line)); - } else if (line.startsWith("winddir")) { + } else if (line.startsWith("winddir ")) { setWinddir(getLineValue(line)); - } else if (line.startsWith("sky")) { + } else if (line.startsWith("sky ")) { setSky(getLineValue(line)); + } else { + log.warn("Unknown map arch attrib line:" + line); } } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-28 12:39:03
|
Revision: 3250 http://gridarta.svn.sourceforge.net/gridarta/?rev=3250&view=rev Author: akirschbaum Date: 2007-10-28 05:39:06 -0700 (Sun, 28 Oct 2007) Log Message: ----------- Allow multi-part objects in inventory. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-28 12:19:47 UTC (rev 3249) +++ trunk/crossfire/ChangeLog 2007-10-28 12:39:06 UTC (rev 3250) @@ -1,5 +1,8 @@ 2007-10-28 Andreas Kirschbaum + * Allow multi-part objects in inventory. This allows generators + spawning multi-part monsters. + * Suppress spurious error message "Multipart expansion for a GameObject inside a container requested." when loading maps with multi-parts in inventories. Modified: trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2007-10-28 12:19:47 UTC (rev 3249) +++ trunk/crossfire/src/cfeditor/gui/GameObjectAttributesPanel.java 2007-10-28 12:39:06 UTC (rev 3250) @@ -262,11 +262,6 @@ return; } - // no single tile? - if(arch.isMulti()) { - return; - } - GameObject inv = mainView.getSelectedSquareControl().getMapTileSelection(); if (inv == null) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-28 22:35:57
|
Revision: 3256 http://gridarta.svn.sourceforge.net/gridarta/?rev=3256&view=rev Author: akirschbaum Date: 2007-10-28 15:36:00 -0700 (Sun, 28 Oct 2007) Log Message: ----------- Update archetypes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes trunk/crossfire/resource/conf/crossfire.0 Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-28 16:48:22 UTC (rev 3255) +++ trunk/crossfire/ChangeLog 2007-10-28 22:36:00 UTC (rev 3256) @@ -1,5 +1,7 @@ 2007-10-28 Andreas Kirschbaum + * Update archetypes. + * Allow multi-part objects in inventory. This allows generators spawning multi-part monsters. Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2007-10-28 16:48:22 UTC (rev 3255) +++ trunk/crossfire/resource/conf/archetypes 2007-10-28 22:36:00 UTC (rev 3256) @@ -10797,6 +10797,23 @@ smoothlevel 29 editor_folder floor end +Object goldflagstone +name drop 10 gold coins +slaying goldcoin +msg +Click! +endmsg +type 18 +activate_on_push 1 +activate_on_release 1 +face goldflagstone.111 +food 10 +animation goldflagstone +no_pick 1 +move_on walk +is_floor 1 +editor_folder floor +end Object goldfloor name drop 10 gold coins slaying goldcoin @@ -15668,6 +15685,24 @@ material 32 editor_folder ground end +Object goldgrass +name drop 10 gold coins +slaying goldcoin +msg +Click! +endmsg +type 18 +activate_on_push 1 +activate_on_release 1 +face goldgrass.111 +food 10 +animation goldgrass +no_pick 1 +move_on walk +is_floor 1 +editor_folder ground +end + Object grass face grass.111 type 67 @@ -19582,7 +19617,7 @@ end Object close_desk name close the desk -face desk.111 +face close_desk.111 type 121 no_pick 1 no_drop 1 @@ -19606,7 +19641,7 @@ end Object close_wizdesk name close the desk -face wizdesk.111 +face close_wizdesk.111 type 121 no_pick 1 no_drop 1 @@ -19631,7 +19666,7 @@ end Object close_desk_cw name close the desk -face desk_cw.111 +face close_desk_cw.111 type 121 no_pick 1 no_drop 1 @@ -19656,7 +19691,7 @@ end Object close_dresser name in the dresser -face dresser.111 +face close_dresser.111 type 121 no_pick 1 no_drop 1 @@ -19679,7 +19714,7 @@ end Object close_dresser2 name in the dresser -face dresser2.111 +face close_dresser2.111 type 121 no_pick 1 no_drop 1 @@ -19703,7 +19738,7 @@ end Object close_dresser_cw name in the dresser -face dresser_cw.111 +face close_dresser_cw.111 type 121 no_pick 1 no_drop 1 @@ -19727,7 +19762,7 @@ end Object close_dresser2_cw name in the dresser -face dresser2_cw.111 +face close_dresser2_cw.111 type 121 no_pick 1 no_drop 1 @@ -19913,7 +19948,7 @@ end Object close_present_box_1 name close the box -face present_box_1.111 +face close_present_box_1.111 type 121 no_pick 1 no_drop 1 @@ -19937,7 +19972,7 @@ end Object close_present_box_2 name close the box -face present_box_2.111 +face close_present_box_2.111 type 121 no_pick 1 no_drop 1 @@ -19961,7 +19996,7 @@ end Object close_present_box_3 name close the box -face present_box_3.111 +face close_present_box_3.111 type 121 no_pick 1 no_drop 1 @@ -19985,7 +20020,7 @@ end Object close_present_box_4 name close the box -face present_box_4.111 +face close_present_box_4.111 type 121 no_pick 1 no_drop 1 @@ -20009,7 +20044,7 @@ end Object close_present_box_5 name close the box -face present_box_5.111 +face close_present_box_5.111 type 121 no_pick 1 no_drop 1 @@ -20033,7 +20068,7 @@ end Object close_present_box_6 name close the box -face present_box_6.111 +face close_present_box_6.111 type 121 no_pick 1 no_drop 1 @@ -20041,10 +20076,6 @@ editor_folder misc/Container end - - - - Object quiver name quiver title of arrows @@ -20140,7 +20171,7 @@ Object sarcophagus_container2 name sarcophagus other_arch close_sarcophagus_container -face sarcophagus.111 +face close_sarcophagus.111 type 122 material 0 materialname stone @@ -20178,7 +20209,7 @@ end Object close_schest name close the chest -face schest.111 +face close_schest.111 type 121 no_pick 1 no_drop 1 @@ -20431,7 +20462,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_1.111 sp 1 speed -0.1 move_block all @@ -20445,7 +20476,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_2.111 sp 2 speed -0.1 move_block all @@ -20459,7 +20490,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_3.111 sp 3 speed -0.1 move_block all @@ -20473,7 +20504,7 @@ level 1 activate_on_push 1 activate_on_release 1 -face cannon_0.111 +face cannon_4.111 sp 4 speed -0.1 move_block all @@ -20487,7 +20518,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_5.111 sp 5 speed -0.1 move_block all @@ -20501,7 +20532,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_6.111 sp 6 speed -0.1 move_block all @@ -20529,7 +20560,7 @@ activate_on_push 1 activate_on_release 1 level 1 -face cannon_0.111 +face cannon_8.111 sp 8 speed -0.1 move_block all @@ -50277,6 +50308,7 @@ duration_modifier 1 range_modifier 1 range_modifier 10 +range 2 maxgrace 10 no_drop 1 invisible 1 Modified: trunk/crossfire/resource/conf/crossfire.0 =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-30 17:55:56
|
Revision: 3260 http://gridarta.svn.sourceforge.net/gridarta/?rev=3260&view=rev Author: akirschbaum Date: 2007-10-30 10:55:14 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Remove support for map files with multi-part objects having explicit tail parts. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/io/CMapReader.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-30 07:26:55 UTC (rev 3259) +++ trunk/crossfire/ChangeLog 2007-10-30 17:55:14 UTC (rev 3260) @@ -1,3 +1,8 @@ +2007-10-30 Andreas Kirschbaum + + * Remove support for map files with multi-part objects having + explicit tail parts. (Remove support for "More" in map files.) + 2007-10-28 Andreas Kirschbaum * Update archetypes. Modified: trunk/crossfire/src/cfeditor/io/CMapReader.java =================================================================== --- trunk/crossfire/src/cfeditor/io/CMapReader.java 2007-10-30 07:26:55 UTC (rev 3259) +++ trunk/crossfire/src/cfeditor/io/CMapReader.java 2007-10-30 17:55:14 UTC (rev 3260) @@ -84,35 +84,24 @@ * @throws IOException when an I/O-error occured during file reading * @fixme I'm too long, make me shorter. * @todo Attributes not relevant during map parsing shouldn't be evaluated here, but in GameObject / ArchetypeParser instead. - * @todo Convince crossfire people of removing "More" as it seems to be pointless now. * @todo Find out whether effectively also trimming msg contents didn't break anything. */ - // Note for programmers from Daimonin: Crossfire still has to support "More" which was used for multipart objects in the past. @Override @Nullable protected GameObject readArch(@NotNull final String firstLine, @NotNull final Collection<GameObject> objects) throws IOException { String thisLine2 = firstLine; boolean msgflag = false; boolean archflag = false; - boolean archmore = false; GameObject gameObject = null; do { final String thisLine = thisLine2.trim(); if (!archflag) { - if (thisLine.startsWith("More")) { - // All arches started with "More" are ignored. We load only - // the heads and expand them according to the defaults. - archmore = true; - } else // format violation for better diff if (thisLine.startsWith("arch ")) { archflag = true; // from now on we are inside an arch - - if (!archmore) { - gameObject = new GameObject(); // create a new instance - gameObject.setArchetypeName(thisLine.substring(5).trim()); - } + gameObject = new GameObject(); // create a new instance + gameObject.setArchetypeName(thisLine.substring(5).trim()); } - } else if (!archmore) { - // here we are inside of an arch object (but not "More")... + } else { + // here we are inside of an arch object if (msgflag) { if (thisLine.startsWith("endmsg")) { msgflag = false; @@ -155,12 +144,6 @@ } else { gameObject.addObjectText(thisLine); } - } else { - // We are in a multipart tail arch ("more"), so we skip it: - if (thisLine.regionMatches(0, "end", 0, 3)) { - archflag = false; - archmore = false; - } } } while ((thisLine2 = readLine()) != null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-30 21:12:56
|
Revision: 3268 http://gridarta.svn.sourceforge.net/gridarta/?rev=3268&view=rev Author: akirschbaum Date: 2007-10-30 14:12:57 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Remove support for map files using obsolete attributes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/map/MapArchObject.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-30 19:53:19 UTC (rev 3267) +++ trunk/crossfire/ChangeLog 2007-10-30 21:12:57 UTC (rev 3268) @@ -1,5 +1,8 @@ 2007-10-30 Andreas Kirschbaum + * Remove support for map files using obsolete attributes: "x" + instead of "width", or "stand_still" instead of "fixed_resettime". + * Remove support for map files with multi-part objects having explicit tail parts. (Remove support for "More" in map files.) Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-30 19:53:19 UTC (rev 3267) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2007-10-30 21:12:57 UTC (rev 3268) @@ -537,23 +537,23 @@ setMapName(line.substring(line.indexOf(" ") + 1).trim()); } else if (line.startsWith("region ")) { setRegion(line.substring(line.indexOf(" ") + 1).trim()); - } else if (line.startsWith("width ") || line.startsWith("x ")) { + } else if (line.startsWith("width ")) { width = getLineValue(line); - } else if (line.startsWith("height ") || line.startsWith("y ")) { + } else if (line.startsWith("height ")) { height = getLineValue(line); - } else if (line.startsWith("enter_x ") || line.startsWith("hp")) { + } else if (line.startsWith("enter_x ")) { setEnterX(getLineValue(line)); - } else if (line.startsWith("enter_y ") || line.startsWith("sp")) { + } else if (line.startsWith("enter_y ")) { setEnterY(getLineValue(line)); - } else if (line.startsWith("reset_timeout ") || line.startsWith("weight ")) { + } else if (line.startsWith("reset_timeout ")) { setResetTimeout(getLineValue(line)); - } else if (line.startsWith("swap_time ") || line.startsWith("value ")) { + } else if (line.startsWith("swap_time ")) { setSwapTime(getLineValue(line)); - } else if (line.startsWith("difficulty ") || line.startsWith("level ")) { + } else if (line.startsWith("difficulty ")) { setDifficulty(getLineValue(line)); - } else if (line.startsWith("darkness ") || line.startsWith("invisible ")) { + } else if (line.startsWith("darkness ")) { setDarkness(getLineValue(line)); - } else if (line.startsWith("fixed_resettime ") || line.startsWith("stand_still ")) { + } else if (line.startsWith("fixed_resettime ")) { if (getLineValue(line) != 0) { setFixedReset(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-11-01 09:02:18
|
Revision: 3286 http://gridarta.svn.sourceforge.net/gridarta/?rev=3286&view=rev Author: akirschbaum Date: 2007-11-01 02:01:45 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Remove support for directions TOP and BOTTOM for map tiling. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/MapActions.java trunk/crossfire/src/cfeditor/action.properties trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_fr.properties trunk/crossfire/src/cfeditor/messages_sv.properties Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/ChangeLog 2007-11-01 09:01:45 UTC (rev 3286) @@ -1,3 +1,8 @@ +2007-11-01 Andreas Kirschbaum + + * Remove support for directions TOP and BOTTOM for map tiling; + these directions are not used by the Crossfire server. + 2007-10-31 Andreas Kirschbaum * Merge "Creator:" and "Date:" map headers into Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-11-01 09:01:45 UTC (rev 3286) @@ -90,11 +90,6 @@ /** The default map preview to use if no icon can be created. */ String DEFAULT_PREVIEW = "default_preview.png"; - @SuppressWarnings({"ConstantNamingConvention"}) - int TOP = 4; + int DIRECTIONS = 4; - int BOTTOM = 5; - - int DIRECTIONS = 6; - } // interface IGUIConstants Modified: trunk/crossfire/src/cfeditor/MapActions.java =================================================================== --- trunk/crossfire/src/cfeditor/MapActions.java 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/MapActions.java 2007-11-01 09:01:45 UTC (rev 3286) @@ -66,12 +66,12 @@ /** * Possible directions for "enter xxx map". */ - private final String[] directionsMap = {"enterNorthMap", "enterEastMap", "enterSouthMap", "enterWestMap", "enterUpperMap", "enterLowerMap"}; + private final String[] directionsMap = {"enterNorthMap", "enterEastMap", "enterSouthMap", "enterWestMap"}; /** * Possible directions for "enter xxx map". */ - private final int[] directionsDir = {CommonConstants.NORTH, CommonConstants.EAST, CommonConstants.SOUTH, CommonConstants.WEST, IGUIConstants.TOP, IGUIConstants.BOTTOM}; + private final int[] directionsDir = {CommonConstants.NORTH, CommonConstants.EAST, CommonConstants.SOUTH, CommonConstants.WEST}; /** Action for "grid visible". */ private final ToggleAction aGridVisible = (ToggleAction) ACTION_FACTORY.createToggle(true, "gridVisible", this); @@ -320,16 +320,6 @@ enterMap(CommonConstants.WEST); } - /** Action method for entering the upper map. */ - public void enterUpperMap() { - enterMap(IGUIConstants.TOP); - } - - /** Action method for entering the lower map. */ - public void enterLowerMap() { - enterMap(IGUIConstants.BOTTOM); - } - /** * Try to load the map where the specified map-tile path points to. Usually * this method can only be invoked when such a path exists. @@ -530,8 +520,6 @@ scrollto = new Rectangle(0, oldViewRect.y, oldViewRect.width, oldViewRect.height); } else if (direction == CommonConstants.WEST) { scrollto = new Rectangle(newViewSize.width - oldViewRect.width, oldViewRect.y, oldViewRect.width, oldViewRect.height); - } else if (direction == IGUIConstants.TOP || direction == IGUIConstants.BOTTOM) { - scrollto = new Rectangle(oldViewRect); } else { throw new AssertionError(); } Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/action.properties 2007-11-01 09:01:45 UTC (rev 3286) @@ -30,7 +30,7 @@ file.menu=createNew open recent close - save saveAs revert createImage - options - exit edit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll -map.menu=autoJoin - gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterUpperMap enterLowerMap tileShow - mapCreateView mapProperties +map.menu=autoJoin - gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties cursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes #pickmaps.menu: See gridarta resources.menu=collectArches - viewTreasurelists @@ -45,7 +45,7 @@ mapwindowFile.menu=save saveAs createImage - revert - close mapwindowEdit.menu=undo redo - clear cut copy paste - replace fillAbove fillBelow randFillAbove randFillBelow floodfill -mapwindowMap.menu=gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterUpperMap enterLowerMap tileShow - mapCreateView mapProperties +mapwindowMap.menu=gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties mapwindowCursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes mapwindowView.menu=showMonster showExit showBackground showDoor showWall showEquipment showTreasure showConnected resetView Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2007-11-01 09:01:45 UTC (rev 3286) @@ -289,8 +289,6 @@ panel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "mapEast")); panel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "mapSouth")); panel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "mapWest")); - panel.add(createPanelLine(fieldTilePath[4] = new JTextField(), 16, map.getTilePath(4), "mapTop")); - panel.add(createPanelLine(fieldTilePath[5] = new JTextField(), 16, map.getTilePath(5), "mapBottom")); return panel; } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/messages.properties 2007-11-01 09:01:45 UTC (rev 3286) @@ -82,8 +82,6 @@ mapWindSpeed=Wind speed mapWindDirection=Wind direction mapSkySetting=Sky setting -mapTop=Top -mapBottom=Bottom ##################### @@ -212,10 +210,6 @@ enterWestMap.text=Enter West Map enterWestMap.accel=ctrl pressed LEFT -enterUpperMap.text=Enter Upper Map - -enterLowerMap.text=Enter Lower Map - tileShow.text=Show adjacent tiled maps mapCreateView.text=Create View Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2007-11-01 09:01:45 UTC (rev 3286) @@ -80,8 +80,6 @@ mapWindSpeed=Windgeschwindigkeit mapWindDirection=Windrichtung mapSkySetting=Wetterbedingung -mapTop=Oben -mapBottom=Unten ##################### @@ -191,10 +189,6 @@ enterWestMap.text=Gehe zu West-Karte -enterUpperMap.text=Gehe zu oberer Karte - -enterLowerMap.text=Gehe zu unterer Karte - tileShow.text=Angrenzende Karten zeigen mapCreateView.text=Neue Kartenansicht Modified: trunk/crossfire/src/cfeditor/messages_fr.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_fr.properties 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/messages_fr.properties 2007-11-01 09:01:45 UTC (rev 3286) @@ -81,8 +81,6 @@ #mapWindSpeed= #mapWindDirection= #mapSkySetting= -#mapTop= -#mapBottom= ##################### @@ -192,10 +190,6 @@ enterWestMap.text=Aller Carte Ouest -#enterUpperMap.text= - -#enterLowerMap.text= - #tileShow.text= #mapCreateView.text= Modified: trunk/crossfire/src/cfeditor/messages_sv.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_sv.properties 2007-10-31 20:38:48 UTC (rev 3285) +++ trunk/crossfire/src/cfeditor/messages_sv.properties 2007-11-01 09:01:45 UTC (rev 3286) @@ -79,8 +79,6 @@ #mapWindSpeed= #mapWindDirection= #mapSkySetting= -#mapTop= -#mapBottom= ##################### @@ -190,10 +188,6 @@ enterWestMap.text=G\xE5 v\xE4st -#enterUpperMap.text= - -#enterLowerMap.text= - #tileShow.text= #mapCreateView.text= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-11-01 11:54:47
|
Revision: 3290 http://gridarta.svn.sourceforge.net/gridarta/?rev=3290&view=rev Author: akirschbaum Date: 2007-11-01 04:54:51 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Implement part of #1684641 (Automated or easier map linking). Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/action.properties trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_fr.properties trunk/crossfire/src/cfeditor/messages_sv.properties Added Paths: ----------- trunk/crossfire/src/cfeditor/gui/DirectionLayout.java trunk/crossfire/src/cfeditor/gui/map/MapTilePane.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/ChangeLog 2007-11-01 11:54:51 UTC (rev 3290) @@ -1,5 +1,7 @@ 2007-11-01 Andreas Kirschbaum + * Implement part of #1684641 (Automated or easier map linking). + * Remove support for directions TOP and BOTTOM for map tiling; these directions are not used by the Crossfire server. Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2007-11-01 11:54:51 UTC (rev 3290) @@ -36,6 +36,22 @@ */ int DOCU_VERSION = 2; + int TILE_PATH_NORTH = 0; + + int TILE_PATH_EAST = 1; + + int TILE_PATH_SOUTH = 2; + + int TILE_PATH_WEST = 3; + + int TILE_PATH_NORTHEAST = 4; + + int TILE_PATH_SOUTHEAST = 5; + + int TILE_PATH_SOUTHWEST = 6; + + int TILE_PATH_NORTHWEST = 7; + /** Default map size (both height and width). */ int DEF_MAPSIZE = 10; Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/src/cfeditor/action.properties 2007-11-01 11:54:51 UTC (rev 3290) @@ -53,6 +53,10 @@ # ToolBars main.toolbar=createNew open save saveAs - prevWindow nextWindow +mapTileRevert.icon=general/Undo16 +mapTileClear.icon=general/Remove16 +mapTileChoose.icon=general/Open16 + ####### # File Copied: trunk/crossfire/src/cfeditor/gui/DirectionLayout.java (from rev 3286, trunk/daimonin/src/daieditor/gui/DirectionLayout.java) =================================================================== --- trunk/crossfire/src/cfeditor/gui/DirectionLayout.java (rev 0) +++ trunk/crossfire/src/cfeditor/gui/DirectionLayout.java 2007-11-01 11:54:51 UTC (rev 3290) @@ -0,0 +1,455 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2007 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package cfeditor.gui; + +import cfeditor.IGUIConstants; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.LayoutManager2; +import java.io.Serializable; + +/** + * This class implements a layout that is similar to {@link BorderLayout} but implements those directions used in Daimonin. + * It provides eight directions. + * This LayoutManager respects the components preferred size for suggesting a preferred size to the container. + * This LayoutManager does not respect the components individual sizes when doing the overall layout. + * The overall layout is solely determined by the container's width and height. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +@SuppressWarnings({"EnumeratedConstantNamingConvention", "InstanceVariableNamingConvention"}) +public final class DirectionLayout implements LayoutManager2, Serializable { + + /** Serial Version. */ + private static final long serialVersionUID = 1L; + + /** + * The array to quickly find the direction enum constants for a daimonin direction. + * This must be outside the enum because enum instances are static itself, so referencing this from an enum constructor would be illegal if this + * were declared inside the enum. + */ + private static final Direction[] daimoninToDirectionMap = new Direction[8]; + //private static Map<Integer,Direction> daimoninToDirectionMap = new HashMap<Integer,Direction>(); + + /** + * The layout constraints. + * Variables with name <code>daimoninDirection</code> should be a valid direction for Daimonin: + * {@link #N}, + * {@link #E}, + * {@link #S}, + * {@link #W}, + * {@link #NE}, + * {@link #SE}, + * {@link #SW}, + * {@link #NW}. + * @todo this enum is somewhat generic, move it somewhere else + */ + @SuppressWarnings({"PublicInnerClass"}) + public enum Direction { + + /** North Layout Position. */ + N(IGUIConstants.TILE_PATH_NORTH), + + /** East Layout Position. */ + E(IGUIConstants.TILE_PATH_EAST), + + /** South Layout Position. */ + S(IGUIConstants.TILE_PATH_SOUTH), + + /** West Layout Position. */ + W(IGUIConstants.TILE_PATH_WEST), + + /** NorthEast Layout Position. */ + NE(IGUIConstants.TILE_PATH_NORTHEAST), + + /** SouthEast Layout Position. */ + SE(IGUIConstants.TILE_PATH_SOUTHEAST), + + /** SouthWest Layout Position. */ + SW(IGUIConstants.TILE_PATH_SOUTHWEST), + + /** NorthWest Layout Position. */ + NW(IGUIConstants.TILE_PATH_NORTHWEST); + + /** The direction number used in Daimonin. */ + private final int daimoninDirection; + + /** + * Enum constructor. + * @param daimoninDirection direction from Daimonin + */ + Direction(final int daimoninDirection) { + this.daimoninDirection = daimoninDirection; + daimoninToDirectionMap[daimoninDirection] = this; + //daimoninToDirectionMap.put(daimoninDirection, this); + } + + /** + * Get the Daimonin Direction. + * @return DaimoninDirection + */ + public int getDaimoninDirection() { + return daimoninDirection; + } + /** + * Get the Direction enum for a daimonin direction. + * @param daimoninDirection direction from Daimonin + * @return Direction enum for <var>daimoninDirection</var> + */ + public static Direction getDirectionFromDaimonin(final int daimoninDirection) { + return daimoninToDirectionMap[daimoninDirection]; + //return daimoninToDirectionMap.get(daimoninDirection); + } + + } // enum Direction + + /** + * Horizontal Gap. + * @serial include + */ + private int hgap; + + /** + * Vertical Gap. + * @serial include + */ + private int vgap; + + /** + * NorthWest Component. + * @serial include + */ + private Component cNW; + + /** + * North Component. + * @serial include + */ + private Component cN; + + /** + * NorthEast Component. + * @serial include + */ + private Component cNE; + + /** + * East Component. + * @serial include + */ + private Component cE; + + /** + * SouthEast Component. + * @serial include + */ + private Component cSE; + + /** + * South Component. + * @serial include + */ + private Component cS; + + /** + * SouthWest Component. + * @serial include + */ + private Component cSW; + + /** + * West Component. + * @serial include + */ + private Component cW; + + /** + * Center Component. + * @serial include + */ + private Component cC; + + /** Creates a DirectionLayout with zero gaps. */ + public DirectionLayout() { + this(0, 0); + } + + /** + * Creates a DirectionLayout with specified gaps. + * @param hgap horizontal gap between components + * @param vgap vertical gap between components + */ + public DirectionLayout(final int hgap, final int vgap) { + this.hgap = hgap; + this.vgap = vgap; + } + + /** + * Returns the horizontal gap between components. + * @return hgap + */ + public int getHgap() { + return hgap; + } + + /** + * Returns the vertical gap between components. + * @return vgap + */ + public int getVgap() { + return vgap; + } + + /** + * Sets the horizontal gap between components. + * @param hgap new horizontal gap between components + */ + public void setHgap(final int hgap) { + this.hgap = hgap; + } + + /** + * Sets the vertical gap between components. + * @param vgap new vertical gap between components + */ + public void setVgap(final int vgap) { + this.vgap = vgap; + } + + /** {@inheritDoc} */ + @SuppressWarnings({"ChainOfInstanceofChecks"}) + public void addLayoutComponent(final Component comp, final Object constraints) { + if (constraints == null) { + cC = comp; + return; + } + final Direction direction; + if (constraints instanceof Integer) { + direction = Direction.getDirectionFromDaimonin((Integer) constraints); + if (direction == null) { + throw new IllegalArgumentException("Illegal constraint number: " + constraints); + } + } else if (!(constraints instanceof Direction)) { + throw new IllegalArgumentException("DirectionLayout does not support " + constraints.getClass().getName() + " constraints."); + } else { + direction = (Direction) constraints; + } + synchronized (comp.getTreeLock()) { + switch (direction) { + case N: + cN = comp; + break; + case E: + cE = comp; + break; + case S: + cS = comp; + break; + case W: + cW = comp; + break; + case NE: + cNE = comp; + break; + case SE: + cSE = comp; + break; + case SW: + cSW = comp; + break; + case NW: + cNW = comp; + break; + default: + assert false; + break; + } + } + } + + /** {@inheritDoc} */ + public void addLayoutComponent(final String name, final Component comp) { + throw new IllegalArgumentException("DirectionLayout does not support String constraints."); + } + + /** {@inheritDoc} */ + @SuppressWarnings({"ObjectEquality", "AssignmentToNull"}) + public void removeLayoutComponent(final Component comp) { + synchronized (comp.getTreeLock()) { + if (cC == comp) { + cC = null; + } else if (cN == comp) { + cN = null; + } else if (cE == comp) { + cE = null; + } else if (cS == comp) { + cS = null; + } else if (cW == comp) { + cW = null; + } else if (cNE == comp) { + cNE = null; + } else if (cSE == comp) { + cSE = null; + } else if (cSW == comp) { + cSW = null; + } else if (cNW == comp) { + cNW = null; + } + } + } + + /** {@inheritDoc} */ + public Dimension minimumLayoutSize(final Container parent) { + synchronized (parent.getTreeLock()) { + final Dimension dim = new Dimension(0, 0); // return dimension + final Dimension empty = new Dimension(0, 0); // fallback if null component + final Dimension dC = cC == null ? empty : cC .getMinimumSize(); + final Dimension dN = cN == null ? empty : cN .getMinimumSize(); + final Dimension dE = cE == null ? empty : cE .getMinimumSize(); + final Dimension dS = cS == null ? empty : cS .getMinimumSize(); + final Dimension dW = cW == null ? empty : cW .getMinimumSize(); + final Dimension dNE = cNE == null ? empty : cNE.getMinimumSize(); + final Dimension dSE = cSE == null ? empty : cSE.getMinimumSize(); + final Dimension dSW = cSW == null ? empty : cSW.getMinimumSize(); + final Dimension dNW = cNW == null ? empty : cNW.getMinimumSize(); + dim.height = (hgap << 2) + dNW.height + max(dW.height, dN.height) + max(dSW.height, dC.height, dNE.height) + max(dS.height, dE.height) + dSE.height; + dim.width = max( + (vgap << 1) + dSW.width + max(dNW.width, dC.width, dSE.width) + dNE.width, + vgap + max(dW.width, dS.width) + max(dN.width, dE.width), + max(dNW.width, dSE.width)); + final Insets insets = parent.getInsets(); + dim.width += insets.left + insets.right; + dim.height += insets.top + insets.bottom; + return dim; + } + } + + /** {@inheritDoc} */ + public Dimension preferredLayoutSize(final Container parent) { + synchronized (parent.getTreeLock()) { + final Dimension dim = new Dimension(0, 0); // return dimension + final Dimension empty = new Dimension(0, 0); // fallback if null component + final Dimension dC = cC == null ? empty : cC .getPreferredSize(); + final Dimension dN = cN == null ? empty : cN .getPreferredSize(); + final Dimension dE = cE == null ? empty : cE .getPreferredSize(); + final Dimension dS = cS == null ? empty : cS .getPreferredSize(); + final Dimension dW = cW == null ? empty : cW .getPreferredSize(); + final Dimension dNE = cNE == null ? empty : cNE.getPreferredSize(); + final Dimension dSE = cSE == null ? empty : cSE.getPreferredSize(); + final Dimension dSW = cSW == null ? empty : cSW.getPreferredSize(); + final Dimension dNW = cNW == null ? empty : cNW.getPreferredSize(); + dim.height = (hgap << 2) + dNW.height + max(dW.height, dN.height) + max(dSW.height, dC.height, dNE.height) + max(dS.height, dE.height) + dSE.height; + dim.width = (vgap << 1) + dSW.width + max(dNW.width, dC.width, dSE.width) + dNE.width; + final Insets insets = parent.getInsets(); + dim.width += insets.left + insets.right; + dim.height += insets.top + insets.bottom; + return dim; + } + } + + /** {@inheritDoc} */ + public Dimension maximumLayoutSize(final Container target) { + return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); + } + + /** {@inheritDoc} */ + public float getLayoutAlignmentX(final Container target) { + return 0.5f; + } + + /** {@inheritDoc} */ + public float getLayoutAlignmentY(final Container target) { + return 0.5f; + } + + /** {@inheritDoc} */ + public void invalidateLayout(final Container target) { + /* Do Nothing, like BorderLayout. */ + } + + /** {@inheritDoc} */ + public void layoutContainer(final Container parent) { + synchronized (parent.getTreeLock()) { + final Dimension size = parent.getSize(); + final Insets padding = parent.getInsets(); + final int innerWidth = size.width - padding.left - padding.right; + final int innerHeight = size.height - padding.top - padding.bottom; + final int colWidth = (innerWidth - (hgap << 1)) / 3; + final int rowHeight = (innerHeight - (vgap << 2)) / 5; + int top = padding.top; + final int left = padding.left; + if (cNW != null) { + cNW.setBounds(left + colWidth + hgap, top, colWidth, rowHeight); + } + top += rowHeight + vgap; + if (cW != null) { + cW .setBounds(left + (colWidth + hgap >> 1), top, colWidth, rowHeight); + } + if (cN != null) { + cN .setBounds(left + ((colWidth + hgap) * 3 >> 1), top, colWidth, rowHeight); + } + top += rowHeight + vgap; + if (cSW != null) { + cSW.setBounds(left, top, colWidth, rowHeight); + } + if (cC != null) { + cC .setBounds(left + colWidth + hgap, top, colWidth, rowHeight); + } + if (cNE != null) { + cNE.setBounds(left + (colWidth + hgap << 1), top, colWidth, rowHeight); + } + top += rowHeight + vgap; + if (cS != null) { + cS .setBounds(left + (colWidth + hgap >> 1), top, colWidth, rowHeight); + } + if (cE != null) { + cE .setBounds(left + ((colWidth + hgap) * 3 >> 1), top, colWidth, rowHeight); + } + top += rowHeight + vgap; + if (cSE != null) { + cSE.setBounds(left + (colWidth + hgap), top, colWidth, rowHeight); + } + } + } + + /** {@inheritDoc} */ + @Override public String toString() { + return getClass().getName() + "[hgap=" + hgap + ",vgap=" + vgap + ']'; + } + + /** + * Helper method for returning the maximum of an unspecified number of arguments. + * (The class {@link Math} only provides max methods for 2 arguments. + * @param numbers Numbers to get maximum of + * @return maximum of numbers, which is {@link Integer#MIN_VALUE} in case no number was supplied. + */ + private static int max(final int... numbers) { + int ret = Integer.MIN_VALUE; + for (final int number : numbers) { + if (number > ret) { + ret = number; + } + } + return ret; + } + +} // class DirectionLayout Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2007-11-01 11:54:51 UTC (rev 3290) @@ -94,8 +94,6 @@ private final JCheckBox checkboxFixedReset = new JCheckBox(); // fixed reset - private final JTextField[] fieldTilePath = new JTextField[IGUIConstants.DIRECTIONS]; // tile paths - private final JTextField fieldShopitems = new JTextField(); // shopitems private final JFormattedTextField fieldShopgreed = new JFormattedTextField(); // shopgreed @@ -130,6 +128,12 @@ /** JButton for cancel. */ private final JButton cancelButton = new JButton(ACTION_FACTORY.createAction(false, "mapCancel", this)); + /** The MapTilePane. */ + private final MapTilePane mapTilePane; + + /** Wether the map tile pane was enabled. */ + private final boolean mapTilePaneEnabled; + /** * Creates a map-options dialog. * @param mainControl The controller of this dialog. @@ -164,9 +168,13 @@ final JPanel weatherPanel = createWeatherPanel(map); tabs.add(ACTION_FACTORY.getString("mapWeatherTabTitle"), weatherPanel); - final JPanel tilePanel = createTilePathPanel(map); + mapTilePane = new MapTilePane(mainControl, mapControl); + final JPanel tilePanel = createTilePathPanel(mapTilePane); tabs.add(ACTION_FACTORY.getString("mapTilesTabTitle"), tilePanel); + mapTilePaneEnabled = mapControl.getMapFile() != null; + tabs.setEnabledAt(tabs.indexOfComponent(tilePanel), mapTilePaneEnabled); + // The layoutHack is used because otherwise a tabbed pane isn't increased to its vertical size by some OptionPaneUI implementations. final JPanel layoutHack = new JPanel(new BorderLayout()); layoutHack.add(tabs); @@ -279,17 +287,12 @@ /** * Create the tile path panel. - * @param map MapArchObject to create tile path panel for. + * @param mapTilePane The <code>MapTilePane<code> contents. * @return Newly created tile path panel. */ - private JPanel createTilePathPanel(final MapArchObject map) { - final JPanel panel = new JPanel(new GridLayout(IGUIConstants.DIRECTIONS, 2)); - - panel.add(createPanelLine(fieldTilePath[0] = new JTextField(), 16, map.getTilePath(0), "mapNorth")); - panel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "mapEast")); - panel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "mapSouth")); - panel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "mapWest")); - + private static JPanel createTilePathPanel(final MapTilePane mapTilePane) { + final JPanel panel = new JPanel(new BorderLayout()); + panel.add(mapTilePane, BorderLayout.NORTH); return panel; } @@ -468,10 +471,7 @@ map.setWinddir(windDirection); map.setSky(skySetting); - // update tilepaths - for (int i = 0; i < IGUIConstants.DIRECTIONS; i++) { - map.setTilePath(i, fieldTilePath[i].getText()); - } + mapTilePane.modifyMapProperties(); map.endTransaction(); mapControl.getMapModel().endTransaction(); @@ -572,9 +572,7 @@ fieldWindDirection.setText(String.valueOf(map.getWinddir())); fieldSkySetting.setText(String.valueOf(map.getSky())); - for (int i = 0; i < 4; i++) { - fieldTilePath[i].setText(map.getTilePath(i)); - } + mapTilePane.restoreMapProperties(); } /** @@ -590,6 +588,9 @@ dialog.setResizable(true); dialog.setModal(false); dialog.setVisible(true); + if (!pane.mapTilePaneEnabled) { + ACTION_FACTORY.showOnetimeMessageDialog(dialog, WARNING_MESSAGE, "mapTilesNoMapFileNoMapTilePane"); + } } } // class MapPropertiesDialog Copied: trunk/crossfire/src/cfeditor/gui/map/MapTilePane.java (from rev 3289, trunk/daimonin/src/daieditor/gui/map/MapTilePane.java) =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapTilePane.java (rev 0) +++ trunk/crossfire/src/cfeditor/gui/map/MapTilePane.java 2007-11-01 11:54:51 UTC (rev 3290) @@ -0,0 +1,781 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2007 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package cfeditor.gui.map; + +import cfeditor.CMainControl; +import cfeditor.IGUIConstants; +import cfeditor.gui.DirectionLayout; +import cfeditor.map.MapArchObject; +import cfeditor.map.MapControl; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.util.Dictionary; +import java.util.Hashtable; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JSlider; +import javax.swing.JTextField; +import javax.swing.SwingConstants; +import javax.swing.border.CompoundBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import net.sf.gridarta.Size2D; +import net.sf.gridarta.gui.GUIConstants; +import net.sf.gridarta.io.IOUtils; +import net.sf.gridarta.io.PathManager; +import net.sf.japi.swing.ActionFactory; +import org.jetbrains.annotations.Nullable; + +/** + * A Panel for managing the tiling of maps. + * It creates a Panel for a map where the user can manage the tile paths. + * He can choose files to tile, attach tiles, clear all or individual tile paths and switch between relative and absolute paths. + * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public final class MapTilePane extends JPanel { + + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; + + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + + /** The mainControl to use. */ + private final CMainControl mainControl; + + /** The mapControl of the map in context. */ + private MapControl mapControl; + + /** The MapArchObject to show. */ + private MapArchObject map; + + /** The tile link names for the labels / borders. */ + private static final String[] tile_link_name = { + ACTION_FACTORY.getString("mapNorth"), + ACTION_FACTORY.getString("mapEast"), + ACTION_FACTORY.getString("mapSouth"), + ACTION_FACTORY.getString("mapWest"), + }; + + /** The tile links used for the attach map algorithm. */ + private static final int[][][] tileLink = new int[0][2][2]; + + static { + /* fine list of indirect links von maps around to other maps around us */ + } + + /** List with links used for reverse map linking. */ + private static final int[] rev_link = { + IGUIConstants.TILE_PATH_SOUTH, + IGUIConstants.TILE_PATH_WEST, + IGUIConstants.TILE_PATH_NORTH, + IGUIConstants.TILE_PATH_EAST, + }; + + /** Maps map direction to {@link DirectionLayout} direction. */ + private static final DirectionLayout.Direction[] directionMapping = { + DirectionLayout.Direction.NW, + DirectionLayout.Direction.NE, + DirectionLayout.Direction.SE, + DirectionLayout.Direction.SW, + }; + + /** Indices of next focus. */ + private static final int[] nextFocus = {1, 2, 3, 0}; + + /** The JTextFields with the tile paths. */ + private final TilePanel[] tilePaths = new TilePanel[directionMapping.length]; + + /** + * Create a MapTilePane. + * @param mainControl CMainControl to use for displaying dialogs, getting paths etc.. + */ + public MapTilePane(final CMainControl mainControl) { + this.mainControl = mainControl; + buildComponents(); + } + + /** + * Create a MapTilePane. + * @param mainControl CMainControl to use for displaying dialogs, getting paths etc.. + * @param mapControl MapControl of the map that's tiles are to be viewed / controlled + */ + public MapTilePane(final CMainControl mainControl, final MapControl mapControl) { + this(mainControl); + setMapControl(mapControl); + } + + /** + * Sets the mapControl for this MapTilePane. + * @param mapControl MapControl of the map that's tiles are to be viewed / controlled + */ + public void setMapControl(final MapControl mapControl) { + this.mapControl = mapControl; + map = mapControl.getMapModel().getMapArchObject(); + final File mapDir = mainControl.getMapDir(); + final File mapFile = mapControl.getMapFile(); + for (int i = 0; i < tilePaths.length; i++) { + tilePaths[i].setAbsoluteReference(mapDir); + tilePaths[i].setOriginal(map.getTilePath(i)); + tilePaths[i].setRelativeReference(mapFile); + } + } + + /** Builds the components of this panel. */ + private void buildComponents() { + setLayout(new GridBagLayout()); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.weightx = 1.0; + gbc.fill = GridBagConstraints.BOTH; + add(buildTilePanels(), gbc); + add(buildSubPanel(), gbc); + } + + /** + * Builds the tile panel. + * @return The newly built tile panel. + */ + private JPanel buildTilePanels() { + final JPanel tilePanels = new JPanel(new DirectionLayout()); + //JPanel tilePanels = new JPanel(new GridBagLayout()); + tilePanels.setBorder(new CompoundBorder(BorderFactory.createTitledBorder(ACTION_FACTORY.getString("mapTiles")), GUIConstants.DIALOG_BORDER)); + + for (int index = 0; index < tilePaths.length; index++) { + final JPanel tilePanel = tilePaths[index] = new TilePanel(index); + tilePanels.add(tilePanel, directionMapping[index]); + } + return tilePanels; + } + + /** + * Creates the subPanel that holds the buttons to attach maps or clear all paths. + * @return The newly built subPanel. + */ + private JPanel buildSubPanel() { + final JPanel subPanel = new JPanel(new GridBagLayout()); + subPanel.setBorder(new CompoundBorder(BorderFactory.createTitledBorder(ACTION_FACTORY.getString("mapControl")), GUIConstants.DIALOG_BORDER)); + final GridBagConstraints gbc = new GridBagConstraints(); + gbc.fill = GridBagConstraints.NONE; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + if (tileLink.length > 0) { + gbc.anchor = GridBagConstraints.EAST; + subPanel.add(new JButton(ACTION_FACTORY.createAction(true, "mapTilesAttach", this)), gbc); + } + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.anchor = tileLink.length > 0 ? GridBagConstraints.WEST : GridBagConstraints.CENTER; + subPanel.add(new JButton(ACTION_FACTORY.createAction(true, "mapTilesClear", this)), gbc); + return subPanel; + } + + /** + * A TilePanel displays exactly one direction for map tiling. + * It's basically an extended textfield with some additional buttons to make usage easier for users. + */ + public static final class TilePanel extends JPanel implements ActionListener { + + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; + + /** The original value. */ + private String original; + + /** The context reference for relative paths (file). */ + private File relativeReference; + + /** The context reference for absolute paths (file). */ + private File absoluteReference; + + /** The JTextField with the text. */ + private final JTextField textField; + + /** The direction. */ + private final int direction; + + /** The RASwitch. */ + private final RASwitch raSwitch; + + /** + * Create a TilePanel. + * @param direction Index, used to determine the direction and corresponding locale keys + */ + private TilePanel(final int direction) { + super(new GridBagLayout()); + this.direction = direction; + final TitledBorder border = new TitledBorder(tile_link_name[direction]); + border.setTitleJustification(TitledBorder.CENTER); + setBorder(border); + final GridBagConstraints gbc = new GridBagConstraints(); + textField = new JTextField(); + textField.setColumns(16); + textField.addActionListener(this); + + gbc.fill = GridBagConstraints.NONE; + add(iconButton("mapTileRevert"), gbc); + add(iconButton("mapTileClear"), gbc); + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.weightx = 1.0; + add(textField, gbc); + gbc.weightx = 0.0; + gbc.fill = GridBagConstraints.NONE; + raSwitch = new RASwitch(); + add(raSwitch, gbc); + add(iconButton("mapTileChoose"), gbc); + } + + /** + * Set the original value, which is used as initial value and for restoring it. + * This method also invokes {@link #setText(String,boolean)}. + * @param original original value, used as initial value and for restoring it. + */ + public void setOriginal(final String original) { + this.original = original; + mapTileRevert(); + } + + /** + * Set the context reference for relative paths. + * @param relativeReference file to reference for relative paths (context file or directory, not parent directory) + */ + public void setRelativeReference(final File relativeReference) { + try { + this.relativeReference = relativeReference.getCanonicalFile(); + } catch (final IOException e) { + this.relativeReference = relativeReference.getAbsoluteFile(); + } catch (final NullPointerException e) { + // occurs on unsaved maps where this method is invoked with null argument + } + } + + /** + * Set the context reference for absolute paths. + * @param absoluteReference file to reference for absolute paths (context file or directory, not parent directory) + */ + public void setAbsoluteReference(final File absoluteReference) { + try { + this.absoluteReference = absoluteReference.getCanonicalFile(); + } catch (final IOException e) { + this.absoluteReference = absoluteReference.getAbsoluteFile(); + } + } + + /** + * {@inheritDoc} + * Bound to the textField to update the relative/absolute state. + */ + public void actionPerformed(final ActionEvent e) { + raSwitch.updateRAState(); + ((MapTilePane) getParent()).tilePaths[nextFocus[direction]].textField.requestFocusInWindow(); + } + + /** + * Create a new JButton for reverting a path entry. + * @param key key to create button with icon for + * @return JButton for key + */ + private JButton iconButton(final String key) { + final JButton button = new JButton(ACTION_FACTORY.createAction(false, key, this)); + button.setMargin(new Insets(0, 0, 0, 0)); + return button; + } + + /** + * Action method for reverting to stored path. + */ + public void mapTileRevert() { + setText(original, false); + } + + /** + * Action method for deleting the path. + */ + public void mapTileClear() { + setText("", true); + } + + /** + * Action method for choosing the path. + */ + public void mapTileChoose() { + final JFileChooser chooser = new JFileChooser(relativeReference.getParentFile()); + final String oldFilename = getText(); + if (oldFilename != null && oldFilename.length() > 0) { + // Point the chooser on the current path tile file + final File oldFile; + if (oldFilename.startsWith("/")) { + oldFile = new File(absoluteReference, oldFilename.substring(1)); + } else { + oldFile = new File(relativeReference.getParentFile(), oldFilename); + } + chooser.setCurrentDirectory(oldFile.getParentFile()); + chooser.setSelectedFile(oldFile); + } + chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + chooser.setMultiSelectionEnabled(false); + chooser.setFileFilter(CMainControl.mapFileFilter); + final int returnVal = chooser.showOpenDialog(this); + if (returnVal == JFileChooser.APPROVE_OPTION) { + try { + final File selected = chooser.getSelectedFile(); + final String relPath = selected.getCanonicalPath().substring(absoluteReference.getCanonicalPath().length()).replace('\\', '/'); + setText(relPath, true); + } catch (final IOException ex) { + setText("Error: " + ex, true); + } + } + } + + /** + * Set the text. + * @param text Text to set + * @param keepRA If set, modify <code>text</code> to match the current + * RA state. + */ + public void setText(final String text, final boolean keepRA) { + textField.setText(text); + if (keepRA) { + raSwitch.stateChanged(null); + } else { + raSwitch.updateRAState(); + } + } + + /** + * Get the text. + * @return text + */ + public String getText() { + return textField.getText(); + } + + /** A JSlider that converts relative to absolute paths and vice versa. */ + private final class RASwitch extends JSlider implements ChangeListener { + + /** Serial Version UID. */ + private static final long serialVersionUID = 1L; + + /** Create RASwitch. */ + private RASwitch() { + super(SwingConstants.VERTICAL, 0, 1, 0); + final Dictionary<Integer, JComponent> pathLabelDict = new Hashtable<Integer, JComponent>(); + pathLabelDict.put(0, new JLabel("A")); + pathLabelDict.put(1, new JLabel("R")); + setToolTipText(ACTION_FACTORY.getString("mapTilePathMode.shortdescription")); + setLabelTable(pathLabelDict); + setPaintLabels(true); + setLabelTable(pathLabelDict); + addChangeListener(this); + setSnapToTicks(true); + setPreferredSize(getMinimumSize()); + } + + /** {@inheritDoc} */ + public void stateChanged(final ChangeEvent e) { + final String path = getText(); + if (path == null || relativeReference == null) { + return; + } + final String relRef = new StringBuilder().append('/').append(PathManager.absoluteToRelative(absoluteReference.getPath() + '/', relativeReference.getPath())).toString(); + if (getValue() == 0) { + textField.setText(PathManager.relativeToAbsolute(relRef, path)); + } else { + textField.setText(PathManager.absoluteToRelative(relRef, path)); + } + } + + /** Update the state of the slider. */ + private void updateRAState() { + final String path = getText(); + if (PathManager.isRelative(path)) { + setValue(1); + } else { + setValue(0); + } + } + + } // class RASwitch + + } // class TilePanel + + /** + * Action method for tiles attaching automatically. + */ + public void mapTilesAttach() { + attachTiledMap(); + } + + /** + * Action method for tiles clearing paths. + */ + public void mapTilesClear() { + for (int i = 0; i < tilePaths.length; i++) { + tilePaths[i].setText("", true); + } + } + + /** + * This method looks for all maps surrounding the current map and tries to perform the reverse attachment. + * @fixme If you think this method sucks for it's complexity, you're right. This method needs refactoring badly. + * @fixme I think this method might fail in case one of the other maps this map is linked to is currently loaded. This needs verification. + */ + void attachTiledMap() { + if (mapControl.getMapFile() == null) { // map is created but was never saved + ACTION_FACTORY.showMessageDialog(this, "mapErrorUnsaved"); + return; + } + final TileMapHeader[] tileHeaders = new TileMapHeader[tilePaths.length]; + + /* first action: we go around all links and try to load the maps */ + for (int i = 0; i < tilePaths.length; i++) { + final String path = tilePaths[i].getText(); + if (path == null || path.length() == 0) { + continue; + } + + /* lets test there is a map with this name & path */ + final String mapPath = getCanonicalTilePath(path); + if (mapPath == null) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorPath", path); + return; + } + /* run through all loaded maps and see we have a map with this path + * if unsaved, ask for stop or autosave + */ + final MapControl level = mainControl.getMapManager().getMapIfOpened(mapPath); + if (level != null) { // opened map in the editor ! + if (!ACTION_FACTORY.showQuestionDialog(this, "mapQueryLoaded")) { + return; + } + mainControl.getMapManager().saveMapIfOpened(mapPath); + } + + /* now lets check we have perhaps this map opened in the editor - force a "autosave" or stop */ + + /* at last load the map and its links */ + tileHeaders[i] = openMapFileHeader(path); + if (tileHeaders[i] == null || tileHeaders[i].mapArchObject == null) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorPath2", mapPath); + return; + } + tileHeaders[i].map = level; + } + + /* We have loaded all direct linked maps around our map. + * now, lets check free spaces. We try to "fill" them + * by checking the "side" path links of the loaded ones. + */ + boolean repeatFlag = true; + while (repeatFlag) { + repeatFlag = false; + for (int i = 0; i < tileHeaders.length; i++) { + if (tileHeaders[i] != null) { + for (int ii = 0; ii < 2; ii++) { + if (tileHeaders[tileLink[i][ii][0]] == null && tileHeaders[i].mapArchObject.getTilePath(tileLink[i][ii][1]).length() > 0) { + final String link = createTilePath(tileHeaders[i], tileHeaders[i].mapArchObject.getTilePath(tileLink[i][ii][1])); + /* lets test there is a map with this name & path */ + + final String mapPath = getCanonicalTilePath(link); + if (mapPath == null) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorPath", link); + return; + } + /* run through all loaded maps and see we have a map with this path + * if unsaved, ask for stop or autosave + */ + final MapControl level = mainControl.getMapManager().getMapIfOpened(mapPath); + if (level != null) { // opened map in the editor ! + if (!ACTION_FACTORY.showQuestionDialog(this, "mapQueryLoaded", level.getMapFileName())) { + return; + } + mainControl.getMapManager().saveMapIfOpened(mapPath); + } + + tileHeaders[tileLink[i][ii][0]] = openMapFileHeader(link); + if (tileHeaders[tileLink[i][ii][0]] != null) { // if now != null, we have successful loaded the linked map + tileHeaders[tileLink[i][ii][0]].map = level; + repeatFlag = true; + } else { + if (ACTION_FACTORY.showQuestionDialog(this, "mapErrorInvalid", tile_link_name[i], tileHeaders[i].linkPath, tile_link_name[tileLink[i][ii][0]], tile_link_name[tileLink[i][ii][1]], tileHeaders[i].mapArchObject.getTilePath(tileLink[i][ii][1]), link)) { + return; + } + } + } + } + } + } + } + /* now we have all maps around our starting map loaded. + * As next step we check all links so we are sure all is legal. + * is all ok, we set the new links and save our maps. + * We *also* must check loaded maps and set the links there too! + */ + { + final Size2D mapSize = map.getMapSize(); + for (int i = 0; i < tileHeaders.length; i++) { + final TileMapHeader tileHeader = tileHeaders[i]; + if (tileHeader != null) { + final MapArchObject otherMap = tileHeader.mapArchObject; + final Size2D otherMapSize = otherMap.getMapSize(); + if (!mapSize.equals(otherMapSize)) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorDifferentSize", mapControl.getMapFileName(), mapSize.getWidth(), mapSize.getHeight(), tileHeader.mapfile, otherMapSize.getWidth(), otherMapSize.getHeight()); + return; + } + for (int ii = 0; ii < 2; ii++) { + // TODO: check links + } + } + } + } + + /* finally... set the links! */ + for (int i = 0; i < tilePaths.length; i++) { + if (tileHeaders[i] != null) { + /* generate a valid path relativ to both map positions */ + try { + String link = getTilePath(mapControl.getMapFile().getCanonicalPath(), tileHeaders[i].mapfile.getCanonicalPath()); + /* set the link of our source map to the map around */ + tilePaths[i].setText(link, true); + /* generate again a valid path relativ to both map positions */ + link = getTilePath(tileHeaders[i].mapfile.getCanonicalPath(), mapControl.getMapFile().getCanonicalPath()); + tileHeaders[i].mapArchObject.setTilePath(rev_link[i], link == null ? "" : link); + if (tileHeaders[i].map != null) { // update links in load maps too + tileHeaders[i].map.getMapModel().getMapArchObject().setTilePath(rev_link[i], link == null ? "" : link); + } + } catch (final IOException e) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorFatalPath", e.getMessage()); + return; + } + } + } + + // all done! now we write all back + for (final TileMapHeader tileHeader : tileHeaders) { + if (tileHeader != null) { + try { + final BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tileHeader.mapfile), IOUtils.MAP_ENCODING)); + try { + mainControl.getGridartaObjectsFactory().newMapArchObjectParser().save(bufferedWriter, tileHeader.mapArchObject); + final String tail = tileHeader.maptail.toString().trim(); + if (tail.length() > 0) { + bufferedWriter.write(tail); + if (tail.lastIndexOf(0x0a) != tail.length() - 1) { + bufferedWriter.write("\n"); + } + } + } finally { + bufferedWriter.close(); + } + } catch (final IOException e) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorFatalWrite", e.getMessage()); + return; + } + } + } + } + + @Nullable private String getTilePath(final String base, final String link) { + int i = base.lastIndexOf("/"); + int ii = base.lastIndexOf(File.separator); + int pos = i; + if (ii > i) { + pos = ii; + } + + i = link.lastIndexOf("/"); + ii = link.lastIndexOf(File.separator); + int pos2 = i; + if (ii > i) { + pos2 = ii; + } + final String first; + final String second; + final String mapdir; + + try { + mapdir = mainControl.getMapDir().getCanonicalPath(); + first = base.substring(mapdir.length(), pos).trim(); + second = link.substring(mapdir.length(), pos2).trim(); + /*mainControl.showMessage("PATH", mapdir.length() + " - " + pos + "\n:: " + first + "\n:: " + second + "\n" + base + "\n" + link);*/ + } catch (final IOException e) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorFatalWrite", e.getMessage()); + return null; + } + + /* funny lame glitch in java... */ + String sep = File.separator; + if (sep.compareTo("\\") == 0) { + sep = "\\\\"; + } + + /* our map is in root - second is higher or same level */ + if (first.length() == 0) { + return link.substring(mapdir.length()).trim().replaceAll(sep, "/"); + } + /* same folder... we return the name without '/' */ + if (first.compareTo(second) == 0) { + return link.substring(pos2 + 1).trim().replaceAll(sep, "/"); + } + /* second is subfolder of first */ + if (second.startsWith(first)) { + return link.substring(pos + 1).trim().replaceAll(sep, "/"); + } + /* in any other case we return a absolute path */ + return link.substring(mapdir.length()).trim().replaceAll(sep, "/"); + } + + private static String createTilePath(final TileMapHeader map, final String linkPath) { + /* our link is a absolut call - not much to do */ + if (linkPath.startsWith(File.pathSeparator) || linkPath.startsWith("/")) { + return linkPath; + } + + /* is a relative call - so we must attach the folder part of map file name to it */ + final StringBuilder path = new StringBuilder(map.linkPath.substring(0, map.linkPath.length() - map.map.getMapFileName().length())); + if (!path.toString().endsWith("/") && !path.toString().endsWith(File.separator)) { + path.append(File.separator); + } + path.append(linkPath); + + /*mainControl.showMessage("Path", "map: " + map.link_path + "\nfilename: " + map.mapArchObject.getFileName() + "\nlink: " + link_path + "\nPATH: " + path);*/ + + return path.toString(); + } + + private String getCanonicalTilePath(final String path) { + final File newfile; + + if (path.startsWith(File.pathSeparator) || path.startsWith("/")) { + newfile = new File(mainControl.getMapDir().getAbsolutePath(), path.substring(1)); + } else { + newfile = new File(mapControl.getMapFile().getParent(), path); + } + + try { + return newfile.getCanonicalFile().toString(); + } catch (final IOException e) { + return newfile.getAbsoluteFile().toString(); + } + } + + @Nullable private TileMapHeader openMapFileHeader(final String path) { + final File newfile; + + if (path.startsWith(File.pathSeparator) || path.startsWith("/")) { + newfile = new File(mainControl.getMapDir().getAbsolutePath(), path.substring(1)); + } else { + newfile = new File(mapControl.getMapFile().getParent(), path); + } + TileMapHeader maphead; + + try { + maphead = loadMapFileHeader(newfile.getCanonicalFile()); + } catch (final IOException e) { + maphead = null; + // TODO handle this error + } + + if (maphead != null) { + maphead.mapfile = newfile; + maphead.linkPath = path; + } + + return maphead; + } + + @Nullable private TileMapHeader loadMapFileHeader(final File file) { + TileMapHeader maphead = null; + try { + final BufferedReader myInput = new BufferedReader(new InputStreamReader(new FileInputStream(file), IOUtils.MAP_ENCODING)); + try { + // first of all we read the map arch (if that fails we throw an exception) + final MapArchObject mapArchObject = new MapArchObject(); + mainControl.getGridartaObjectsFactory().newMapArchObjectParser().load(myInput, mapArchObject); + + maphead = new TileMapHeader(mapArchObject); + // now we store the map arches as tail + for (String thisLine; (thisLine = myInput.readLine()) != null;) { + maphead.maptail.append(thisLine).append('\n'); + } + } finally { + myInput.close(); + } + } catch (final IOException e) { + maphead = null; + /*mainControl.showMessage("Can't find map:", "Link: " + file.getName() + "\n" + e.getMessage());*/ + } + return maphead; + } + + /** Invoke this method if the dialog using this pane is confirmed with OK to write the information from this pane back to the map. */ + public void modifyMapProperties() { + for (int i = 0; i < tilePaths.length; i++) { + map.setTilePath(i, tilePaths[i].getText()); + } + } + + /** Restore settings from the map. */ + public void restoreMapProperties() { + for (int i = 0; i < tilePaths.length; i++) { + tilePaths[i].mapTileRevert(); + } + } + + // TODO: This class should get more responsibility. Several things from MapTilePane should be moved here. + private static final class TileMapHeader { + + private final MapArchObject mapArchObject; + + private String linkPath; + + private File mapfile; + + private final StringBuilder maptail; + + private MapControl map; // map loaded in editor + + TileMapHeader(final MapArchObject mapArchObject) { + this.mapArchObject = mapArchObject; + linkPath = null; + mapfile = null; + maptail = new StringBuilder(); + map = null; + } + + } // class TileMapHeader + +} // class MapTilePane Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/src/cfeditor/messages.properties 2007-11-01 11:54:51 UTC (rev 3290) @@ -82,6 +82,34 @@ mapWindSpeed=Wind speed mapWindDirection=Wind direction mapSkySetting=Sky setting +mapTiles=Paths for Map-Tiling +mapControl=Control Map-Tiling +mapTilesAttach.text=Attach Map +mapTilesAttach.shortdescription=Automatically attach the map in all possible directions +mapTilesClear.text=Clear Paths +mapTilesClear.shortdescription=Clear all path names +mapErrorUnsaved.title=Missing file path +mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! +mapErrorPath.title=Error creating map path +mapErrorPath.message=Please check if the map path exists and is correct: "{0}". +mapQueryLoaded.title=Map is loaded +mapQueryLoaded.message=The map {0} is opened in the editor.\nShould I autosave & update the map? +mapErrorPath2.title=Can''t find map +mapErrorPath2.message=Please check your map file path: "{0}". +mapErrorInvalid.title=Invalid tile link +mapErrorInvalid.message=In {0}: {1}\nthe link to {2} is invalid.\nLink to {3} is {4}\ngenerated link:{5}\nShould we stop attaching? +mapErrorFatalPath.title=Can''t get path +mapErrorFatalPath.message=Can''t get path\nFatal Error:\n{0} +mapErrorFatalWrite.title=Can''t write map +mapErrorFatalWrite.message=Can''t write map\nFatal Error:\n{0} +mapErrorDifferentSize.title=Different size +mapErrorDifferentSize.message=The maps you''re attaching have different sizes.\n{0} has size {1} # {2}, while\n{3} has size {4} # {5}.\nThis is hazardous for server and client and MUST BE FIXED! +mapTilesNoMapFileNoMapTilePane.title=Map tiles card unavailable +mapTilesNoMapFileNoMapTilePane.message=The map has no file name (it wasn''t saved yet).\nA map without filename cannot be attached to other maps.\nTherefore, the Map tiles card is unavailable. +mapTileRevert.shortdescription=Revert to stored path +mapTileClear.shortdescription=Delete path +mapTileChoose.shortdescription=Choose path to tile map +mapTilePathMode.shortdescription=Switch between relative and absolute path ##################### Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2007-11-01 11:27:50 UTC (rev 3289) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2007-11-01 11:54:51 UTC (rev 3290) @@ -80,6 +80,34 @@ mapWindSpeed=Windgeschwindigkeit mapWindDirection=Windrichtung mapSkySetting=Wetterbedingung +mapTiles=Pfade zum Verbinden von Karten +mapControl=Verbindungspfade steuern +mapTilesAttach.text=Karten verbinden +mapTilesAttach.shortdescription=Verbindet die Karte automatisch in allen Richtungen mit ihren benachbarten Karten. +mapTilesClear.text=Pfade l\xF6schen +mapTilesClear.shortdescription=L\xF6scht die Verbindungspfade zu den benachbarten Karten. +mapErrorUnsaved.title=Fehlender Dateipfad +mapErrorUnsaved.message=Kann ungespeicherte Karte nicht verbinden.\nDie Karte muss zuerst im Kartenverzeichnis gespeichert werden! +mapErrorPath.title=Fehler beim Erzeugen des Pfades +mapErrorPath.message=Bitte \xFCberpr\xFCfe, ob der Dateipfad zur Karte richtig ist: "{0}". +mapQueryLoaded.title=Karte ist ge\xF6ffnet +mapQueryLoaded.message=Die Karte {0} ist im Editor ge\xF6ffnet.\nSoll ich sie automatisch speichern und aktualisieren? +mapErrorPath2.title=Karte nicht gefunden +mapErrorPath2.message=Bitte \xFCberpr\xFCfe den Dateipfad f\xFCr die Karte: "{0}}". +mapErrorInvalid.title=Ung\xFCltiger Kartenpfad +mapErrorInvalid.message=In {0}: {1}\nder Pfad zu {2} ist ung\xFCltig.\nDer Pfad nach {3} ist {4}\nErzeugter Pfad:{5}\nVerbinden abbrechen? +mapErrorFatalPath.title=Fehler +mapErrorFatalPath.message=Fehler beim Erzeugen des Pfadnamens:\n{0} +mapErrorFatalWrite.title=Fehler beim Speichern +mapErrorFatalWrite.message=Die Karte kann nicht gespeichert werden:\n{0} +mapErrorDifferentSize.title=Unterschiedliche Gr\xF6\xDFe +mapErrorDifferentSize.message=Die verbundenen Karten sind nicht gleich gro\xDF.\n{0} hat die Gr\xF6\xDFe {1} # {2},\n{3} hat die Gr\xF6\xDFe {4} # {5}.\nDies ist nicht erlaubt. +mapTilesNoMapFileNoMapTilePane.title=Verbindungspfade nicht verf\xFCgbar +mapTilesNoMapFileNoMapTilePane.message=Die Karte wurde noch nicht gespeichert. Daher hat sie noch keinen Dateina... [truncated message content] |
From: <aki...@us...> - 2007-11-03 19:24:30
|
Revision: 3333 http://gridarta.svn.sourceforge.net/gridarta/?rev=3333&view=rev Author: akirschbaum Date: 2007-11-03 12:24:27 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Update archetypes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/archetypes Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-11-03 18:37:40 UTC (rev 3332) +++ trunk/crossfire/ChangeLog 2007-11-03 19:24:27 UTC (rev 3333) @@ -1,5 +1,7 @@ 2007-11-03 Andreas Kirschbaum + * Update archetypes. + * Implement #1713798 (Support objects nested in archetypes). 2007-11-01 Andreas Kirschbaum Modified: trunk/crossfire/resource/conf/archetypes =================================================================== --- trunk/crossfire/resource/conf/archetypes 2007-11-03 18:37:40 UTC (rev 3332) +++ trunk/crossfire/resource/conf/archetypes 2007-11-03 19:24:27 UTC (rev 3333) @@ -1,4 +1,5 @@ Object elvenboots +editor_folder armour/boots name elven boots name_pl elven boots client_type 290 @@ -12,9 +13,9 @@ stealth 1 item_power 3 body_foot -2 -editor_folder armour/boots end Object high_boots +editor_folder armour/boots name jack boots name_pl jack boots client_type 291 @@ -28,9 +29,9 @@ material 8 body_foot -2 gen_sp_armour 4 -editor_folder armour/boots end Object high_boots_b +editor_folder armour/boots name jack boots name_pl jack boots client_type 291 @@ -47,9 +48,9 @@ materialname black leather body_foot -2 gen_sp_armour 4 -editor_folder armour/boots end Object high_boots_b_d +editor_folder armour/boots name jack boots name_pl jack boots client_type 291 @@ -67,9 +68,9 @@ materialname black steel body_foot -2 gen_sp_armour 4 -editor_folder armour/boots end Object high_boots_w +editor_folder armour/boots name jack boots name_pl jack boots client_type 291 @@ -86,9 +87,9 @@ materialname white leather body_foot -2 gen_sp_armour 4 -editor_folder armour/boots end Object high_boots_w_l +editor_folder armour/boots name jack boots name_pl jack boots client_type 291 @@ -106,9 +107,9 @@ materialname white steel body_foot -2 gen_sp_armour 4 -editor_folder armour/boots end Object idaten +editor_folder armour/boots name Idaten boots name_pl Idaten boots client_type 290 @@ -126,9 +127,9 @@ resist_physical 3 body_foot -2 item_power 25 -editor_folder armour/boots end Object levitationboots +editor_folder armour/boots name levitation boots name_pl levitation boots client_type 290 @@ -143,11 +144,11 @@ body_foot -2 item_power 1 map_layer item -editor_folder armour/boots end Object low_boots -name shoes -name_pl shoes +editor_folder armour/boots +name pair of shoes +name_pl pairs of shoes client_type 291 face low_boots.111 value 25 @@ -159,9 +160,9 @@ material 8 body_foot -2 gen_sp_armour 1 -editor_folder armour/boots end Object sandals +editor_folder armour/boots name sandals name_pl sandals client_type 291 @@ -174,9 +175,9 @@ material 8 body_foot -2 gen_sp_armour 1 -editor_folder armour/boots end Object speedboots +editor_folder armour/boots name speed boots name_pl speed boots client_type 290 @@ -193,9 +194,9 @@ resist_physical 3 body_foot -2 item_power 6 -editor_folder armour/boots end Object bracers_ac +editor_folder armour/bracers nrof 1 name bracers name_pl bracers @@ -207,9 +208,9 @@ material 2 weight 3000 body_wrist -2 -editor_folder armour/bracers end Object bracers_dex +editor_folder armour/bracers nrof 1 name bracers name_pl bracers @@ -222,9 +223,9 @@ weight 3000 body_wrist -2 item_power 2 -editor_folder armour/bracers end Object cloak +editor_folder armour/cloak name cloak name_pl cloaks client_type 281 @@ -236,9 +237,9 @@ material 136 nrof 1 body_shoulder -1 -editor_folder armour/cloak end Object magic_resist +editor_folder armour/cloak name Cloak of Magic Resistance name_pl Cloaks of Magic Resistance client_type 280 @@ -255,9 +256,9 @@ resist_magic 95 body_shoulder -1 item_power 4 -editor_folder armour/cloak end Object oilskin +editor_folder armour/cloak name oilskin cloak name_pl oilskin cloaks client_type 280 @@ -274,9 +275,9 @@ magic -4 damned 1 body_shoulder -1 -editor_folder armour/cloak end Object serp_cloak +editor_folder armour/cloak name serpent cloak name_pl serpent cloaks client_type 280 @@ -291,9 +292,9 @@ nrof 1 body_shoulder -1 item_power 2 -editor_folder armour/cloak end Object b_gauntlets +editor_folder armour/gauntlets nrof 1 name gauntlets client_type 305 @@ -306,9 +307,9 @@ materialname bronze weight 1800 body_hand -2 -editor_folder armour/gauntlets end Object gauntlets +editor_folder armour/gauntlets nrof 1 name gauntlets client_type 305 @@ -320,9 +321,9 @@ material 2 weight 1800 body_hand -2 -editor_folder armour/gauntlets end Object gauntlets_dex +editor_folder armour/gauntlets nrof 1 name gauntlets client_type 305 @@ -336,9 +337,9 @@ weight 1800 body_hand -2 item_power 1 -editor_folder armour/gauntlets end Object gauntlets_str +editor_folder armour/gauntlets nrof 1 name gauntlets name_pl gauntlets @@ -353,9 +354,9 @@ weight 2000 body_hand -2 item_power 0 -editor_folder armour/gauntlets end Object gloves +editor_folder armour/gauntlets nrof 1 name gloves client_type 301 @@ -367,9 +368,9 @@ material 8 weight 100 body_hand -2 -editor_folder armour/gauntlets end Object gloves_b +editor_folder armour/gauntlets nrof 1 name gloves client_type 301 @@ -382,9 +383,9 @@ materialname black leather weight 100 body_hand -2 -editor_folder armour/gauntlets end Object gloves_w +editor_folder armour/gauntlets nrof 1 name gloves client_type 301 @@ -399,9 +400,9 @@ materialname white leather weight 100 body_hand -2 -editor_folder armour/gauntlets end Object gloves_w_l +editor_folder armour/gauntlets nrof 1 name gloves client_type 301 @@ -417,9 +418,9 @@ materialname white steel weight 200 body_hand -2 -editor_folder armour/gauntlets end Object god_finger +editor_folder armour/gauntlets nrof 1 name God Finger name_pl God Fingers @@ -439,9 +440,9 @@ weight 1800 body_hand -2 item_power 2 -editor_folder armour/gauntlets end Object shining_finger +editor_folder armour/gauntlets nrof 1 name Shining Finger name_pl Shining Fingers @@ -459,9 +460,9 @@ weight 1800 body_hand -2 item_power 1 -editor_folder armour/gauntlets end Object girdle_strcon +editor_folder armour/girdle nrof 1 type 113 name girdle @@ -479,9 +480,9 @@ material 8 body_waist -1 item_power 1 -editor_folder armour/girdle end Object girdle_con +editor_folder armour/girdle nrof 1 type 113 name girdle @@ -498,9 +499,9 @@ material 8 body_waist -1 item_power 1 -editor_folder armour/girdle end Object girdle_dam +editor_folder armour/girdle nrof 1 type 113 name girdle @@ -517,9 +518,9 @@ material 8 body_waist -1 item_power 1 -editor_folder armour/girdle end Object girdle_str +editor_folder armour/girdle nrof 1 type 113 name girdle @@ -536,9 +537,9 @@ material 8 body_waist -1 item_power 1 -editor_folder armour/girdle end Object a_helmet +editor_folder armour/helmet name helmet name_pl helmets client_type 271 @@ -552,9 +553,9 @@ material 2 body_head -1 gen_sp_armour 5 -editor_folder armour/helmet end Object b_full_helmet +editor_folder armour/helmet nrof 1 name full helmet name_pl full helmets @@ -569,9 +570,9 @@ materialname bronze body_head -1 gen_sp_armour 10 -editor_folder armour/helmet end Object b_helmet +editor_folder armour/helmet name helmet name_pl helmets client_type 271 @@ -586,9 +587,9 @@ materialname bronze body_head -1 gen_sp_armour 5 -editor_folder armour/helmet end Object b_horned_helmet +editor_folder armour/helmet nrof 1 name horned helmet name_pl horned helmets @@ -603,9 +604,9 @@ materialname bronze body_head -1 gen_sp_armour 2 -editor_folder armour/helmet end Object bighorned_helmet +editor_folder armour/helmet nrof 1 name horned helmet name_pl horned helmets @@ -619,9 +620,9 @@ material 18 body_head -1 gen_sp_armour 3 -editor_folder armour/helmet end Object crown +editor_folder armour/helmet name crown nrof 1 face crown.111 @@ -633,10 +634,10 @@ name_pl crowns client_type 271 body_head -1 -editor_folder armour/helmet end Object crown_r +editor_folder armour/helmet name crown nrof 1 face crown_r.111 @@ -648,10 +649,10 @@ name_pl crowns client_type 271 body_head -1 -editor_folder armour/helmet end Object crown_gray +editor_folder armour/helmet name crown nrof 1 face crown_gray.111 @@ -663,10 +664,10 @@ name_pl crowns client_type 271 body_head -1 -editor_folder armour/helmet end Object crown_white +editor_folder armour/helmet name crown nrof 1 face crown_white.111 @@ -678,10 +679,10 @@ name_pl crowns client_type 271 body_head -1 -editor_folder armour/helmet end Object crown_dark +editor_folder armour/helmet name crown nrof 1 face crown_dark.111 @@ -693,9 +694,9 @@ name_pl crowns client_type 271 body_head -1 -editor_folder armour/helmet end Object eyeglasses +editor_folder armour/helmet nrof 1 name eye glasses client_type 275 @@ -708,9 +709,9 @@ material 4 materialname glass body_head -1 -editor_folder armour/helmet end Object full_helmet +editor_folder armour/helmet nrof 1 name full helmet name_pl full helmets @@ -724,9 +725,9 @@ material 2 body_head -1 gen_sp_armour 10 -editor_folder armour/helmet end Object helmet +editor_folder armour/helmet name helmet name_pl helmets client_type 271 @@ -740,9 +741,9 @@ material 2 body_head -1 gen_sp_armour 5 -editor_folder armour/helmet end Object helmet_of_brilliance +editor_folder armour/helmet name helmet name_pl helmets client_type 270 @@ -759,9 +760,9 @@ sp 1 body_head -1 item_power 5 -editor_folder armour/helmet end Object helmet_of_xrays +editor_folder armour/helmet name helmet name_pl helmets client_type 270 @@ -780,9 +781,9 @@ xrays 1 body_head -1 item_power 3 -editor_folder armour/helmet end Object horned_helmet +editor_folder armour/helmet nrof 1 name horned helmet name_pl horned helmets @@ -796,9 +797,9 @@ material 18 body_head -1 gen_sp_armour 2 -editor_folder armour/helmet end Object kog +editor_folder armour/helmet name Kabuto of Geisya name_pl Kabutos of Geisya client_type 270 @@ -816,9 +817,9 @@ body_head -1 gen_sp_armour 5 item_power 4 -editor_folder armour/helmet end Object turban +editor_folder armour/helmet name turban name_pl turbans client_type 272 @@ -831,9 +832,9 @@ material 128 body_head -1 gen_sp_armour 1 -editor_folder armour/helmet end Object wig +editor_folder armour/helmet name wig name_pl wigs client_type 273 @@ -845,9 +846,9 @@ value 140 material 32 body_head -1 -editor_folder armour/helmet end Object wiz_hat +editor_folder armour/helmet name Wizard Hat name_pl Wizard Hats client_type 270 @@ -871,9 +872,9 @@ material 128 body_head -1 item_power 10 -editor_folder armour/helmet end Object Pdragon_mail +editor_folder armour/mail name Power Dragon Mail name_pl Power Dragon Mails client_type 251 @@ -897,9 +898,9 @@ body_torso -1 gen_sp_armour 9 item_power 12 -editor_folder armour/mail end Object b_plate_mail +editor_folder armour/mail nrof 1 name plate mail name_pl plate mails @@ -915,9 +916,9 @@ value 25 body_torso -1 gen_sp_armour 30 -editor_folder armour/mail end Object b_scale_mail +editor_folder armour/mail nrof 1 name scale mail name_pl scale mails @@ -933,9 +934,9 @@ value 8 body_torso -1 gen_sp_armour 10 -editor_folder armour/mail end Object chain_mail +editor_folder armour/mail nrof 1 name chain mail name_pl chain mails @@ -950,9 +951,9 @@ value 75 body_torso -1 gen_sp_armour 15 -editor_folder armour/mail end Object dragon_mail +editor_folder armour/mail name dragon mail name_pl dragon mails client_type 251 @@ -972,9 +973,9 @@ body_torso -1 gen_sp_armour 9 item_power 5 -editor_folder armour/mail end Object blue_dragon_mail +editor_folder armour/mail name blue dragon mail name_pl blue dragon mails client_type 251 @@ -994,9 +995,9 @@ body_torso -1 gen_sp_armour 9 item_power 5 -editor_folder armour/mail end Object green_dragon_mail +editor_folder armour/mail name green dragon mail name_pl green dragon mails client_type 251 @@ -1016,9 +1017,9 @@ body_torso -1 gen_sp_armour 9 item_power 5 -editor_folder armour/mail end Object dress1 +editor_folder armour/mail name dress name_pl dresses client_type 255 @@ -1033,9 +1034,9 @@ value 10000 material 128 body_torso -1 -editor_folder armour/mail end Object dress2 +editor_folder armour/mail name dress name_pl dresses client_type 255 @@ -1049,9 +1050,9 @@ value 3000 material 128 body_torso -1 -editor_folder armour/mail end Object dress3 +editor_folder armour/mail name dress name_pl dresses client_type 255 @@ -1064,9 +1065,9 @@ value 1000 material 128 body_torso -1 -editor_folder armour/mail end Object elven_robe +editor_folder armour/mail name Elven Robe name_pl Elven Robes client_type 256 @@ -1085,9 +1086,9 @@ material 128 body_torso -1 item_power 13 -editor_folder armour/mail end Object gale +editor_folder armour/mail name Gale Armour name_pl Gale Armours client_type 250 @@ -1105,9 +1106,9 @@ last_sp 50 body_torso -1 item_power 4 -editor_folder armour/mail end Object lapron +editor_folder armour/mail name apron name_pl aprons client_type 257 @@ -1122,9 +1123,9 @@ value 10 material 8 body_torso -1 -editor_folder armour/mail end Object leather_armour +editor_folder armour/mail nrof 1 name armour name_pl armours @@ -1139,9 +1140,9 @@ material 8 body_torso -1 gen_sp_armour 8 -editor_folder armour/mail end Object mithril_chainmail +editor_folder armour/mail nrof 1 name mithril chainmail name_pl mithril chainmails @@ -1161,9 +1162,9 @@ body_torso -1 gen_sp_armour 5 item_power 1 -editor_folder armour/mail end Object mithril_ar_ele +editor_folder armour/mail nrof 1 name mithril chainmail of lightning name_pl mithril chainmails of lightning @@ -1188,9 +1189,9 @@ body_torso -1 gen_sp_armour 2 item_power 9 -editor_folder armour/mail end Object plate_mail +editor_folder armour/mail nrof 1 name plate mail name_pl plate mails @@ -1205,9 +1206,9 @@ value 100 body_torso -1 gen_sp_armour 30 -editor_folder armour/mail end Object ring_mail +editor_folder armour/mail nrof 1 name hauberk name_pl hauberks @@ -1222,9 +1223,9 @@ value 60 body_torso -1 gen_sp_armour 15 -editor_folder armour/mail end Object ring_mail2 +editor_folder armour/mail nrof 1 name ring mail name_pl ring mails @@ -1239,9 +1240,9 @@ value 85 body_torso -1 gen_sp_armour 15 -editor_folder armour/mail end Object robe +editor_folder armour/mail name robe name_pl robes client_type 256 @@ -1254,9 +1255,9 @@ value 30 material 128 body_torso -1 -editor_folder armour/mail end Object robe2 +editor_folder armour/mail name robe name_pl robes client_type 256 @@ -1270,9 +1271,9 @@ value 9 material 128 body_torso -1 -editor_folder armour/mail end Object robe_midnight +editor_folder armour/mail name Midnight Robe name_pl Midnight Robes client_type 250 @@ -1301,9 +1302,9 @@ material 128 body_torso -1 item_power 25 -editor_folder armour/mail end Object scale_mail +editor_folder armour/mail nrof 1 name scale mail name_pl scale mails @@ -1318,9 +1319,9 @@ value 30 body_torso -1 gen_sp_armour 10 -editor_folder armour/mail end Object tunic +editor_folder armour/mail name shirt name_pl shirts client_type 256 @@ -1333,9 +1334,9 @@ value 3 material 128 body_torso -1 -editor_folder armour/mail end Object wdsm +editor_folder armour/mail name White Dragon Scale Mail name_pl White Dragon Scale Mails client_type 251 @@ -1359,9 +1360,9 @@ body_torso -1 gen_sp_armour 9 item_power 5 -editor_folder armour/mail end Object DShield +editor_folder armour/shield name Demonspawn Shield name_pl Demonspawn Shields client_type 260 @@ -1386,9 +1387,9 @@ value 50000 body_arm -1 item_power 5 -editor_folder armour/shield end Object DShieldm +editor_folder armour/shield name Demonspawn Shield name_pl Demonspawn Shields client_type 260 @@ -1415,9 +1416,9 @@ value 100000 body_arm -1 item_power 7 -editor_folder armour/shield end Object DShieldms +editor_folder armour/shield name Demonspawn Shield name_pl Demonspawn Shields client_type 260 @@ -1446,9 +1447,9 @@ value 300000 body_arm -1 item_power 10 -editor_folder armour/shield end Object DShields +editor_folder armour/shield name Demonspawn Shield name_pl Demonspawn Shields client_type 260 @@ -1475,9 +1476,9 @@ value 100000 body_arm -1 item_power 8 -editor_folder armour/shield end Object b_shield +editor_folder armour/shield name shield name_pl shields client_type 261 @@ -1491,9 +1492,9 @@ weight 15000 value 6 body_arm -1 -editor_folder armour/shield end Object b_small_shield +editor_folder armour/shield nrof 1 name small shield name_pl small shields @@ -1506,9 +1507,9 @@ material 2 materialname bronze body_arm -1 -editor_folder armour/shield end Object dragon_shield +editor_folder armour/shield name dragon shield name_pl dragon shields client_type 260 @@ -1526,9 +1527,9 @@ identified 1 body_arm -1 item_power 2 -editor_folder armour/shield end Object eyeshield +editor_folder armour/shield name eyeshield name_pl eyeshields client_type 260 @@ -1545,9 +1546,9 @@ identified 1 body_arm -1 item_power 2 -editor_folder armour/shield end Object frostshield +editor_folder armour/shield nrof 1 name Frost Shield name_pl Frost Shields @@ -1562,9 +1563,9 @@ weight 2000 value 100 material 18 -editor_folder armour/shield end Object high_shield +editor_folder armour/shield nrof 1 name high shield name_pl high shields @@ -1577,9 +1578,9 @@ value 24 material 2 body_arm -1 -editor_folder armour/shield end Object holy_shield +editor_folder armour/shield name holy shield name_pl holy shields client_type 260 @@ -1595,9 +1596,9 @@ resist_ghosthit 50 body_arm -1 item_power 6 -editor_folder armour/shield end Object reflector +editor_folder armour/shield name polished shield name_pl polished shields client_type 260 @@ -1615,9 +1616,9 @@ value 100000 body_arm -1 item_power 2 -editor_folder armour/shield end Object round_shield +editor_folder armour/shield nrof 1 name shield name_pl shields @@ -1630,9 +1631,9 @@ value 21 material 18 body_arm -1 -editor_folder armour/shield end Object shield +editor_folder armour/shield name shield name_pl shields client_type 261 @@ -1645,9 +1646,9 @@ weight 15000 value 22 body_arm -1 -editor_folder armour/shield end Object small_shield +editor_folder armour/shield nrof 1 name small shield name_pl small shields @@ -1659,9 +1660,9 @@ value 20 material 2 body_arm -1 -editor_folder armour/shield end Object spiked_shield +editor_folder armour/shield nrof 1 name spiked shield name_pl spiked shields @@ -1675,9 +1676,9 @@ value 21 material 18 body_arm -1 -editor_folder armour/shield end Object uw_shield +editor_folder armour/shield name Belzebub's shield name_pl Belzebub's shields client_type 260 @@ -1693,9 +1694,9 @@ resist_deplete 100 body_arm -1 item_power 5 -editor_folder armour/shield end Object wds +editor_folder armour/shield name White Dragon Shield name_pl White Dragon Shields client_type 260 @@ -1712,9 +1713,9 @@ identified 1 body_arm -1 item_power 4 -editor_folder armour/shield end Object slotmachine1 +editor_folder connect/Casino name slotmachine slaying goldcoin food 1 @@ -1726,9 +1727,9 @@ no_pick 1 move_on walk client_type 25041 -editor_folder connect/Casino end Object slotmachine2 +editor_folder connect/Casino name slotmachine slaying goldcoin food 1 @@ -1740,9 +1741,9 @@ no_pick 1 move_on walk client_type 25041 -editor_folder connect/Casino end Object slotmachine3 +editor_folder connect/Casino name slotmachine slaying goldcoin food 1 @@ -1754,9 +1755,9 @@ no_pick 1 move_on walk client_type 25041 -editor_folder connect/Casino end Object director_turn +editor_folder connect/Director name director face director.181 animation director_turn @@ -1768,9 +1769,9 @@ sp 8 maxsp 1 move_on walk fly_low -editor_folder connect/Director end Object director_1 +editor_folder connect/Director name director face director.111 animation director_1 @@ -1781,9 +1782,9 @@ no_pick 1 sp 1 move_on walk fly_low -editor_folder connect/Director end Object director_2 +editor_folder connect/Director name director face director.121 animation director_2 @@ -1794,9 +1795,9 @@ no_pick 1 sp 2 move_on walk fly_low -editor_folder connect/Director end Object director_3 +editor_folder connect/Director name director face director.131 animation director_3 @@ -1807,9 +1808,9 @@ no_pick 1 sp 3 move_on walk fly_low -editor_folder connect/Director end Object director_4 +editor_folder connect/Director name director face director.141 animation director_4 @@ -1820,9 +1821,9 @@ no_pick 1 sp 4 move_on walk fly_low -editor_folder connect/Director end Object director_5 +editor_folder connect/Director name director face director.151 animation director_5 @@ -1833,9 +1834,9 @@ no_pick 1 sp 5 move_on walk fly_low -editor_folder connect/Director end Object director_6 +editor_folder connect/Director name director face director.161 animation director_6 @@ -1846,9 +1847,9 @@ no_pick 1 sp 6 move_on walk fly_low -editor_folder connect/Director end Object director_7 +editor_folder connect/Director name director face director.171 animation director_7 @@ -1859,9 +1860,9 @@ no_pick 1 sp 7 move_on walk fly_low -editor_folder connect/Director end Object director_8 +editor_folder connect/Director name director face director.181 animation director_8 @@ -1872,9 +1873,9 @@ no_pick 1 sp 8 move_on walk fly_low -editor_folder connect/Director end Object mdoor_closed_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -1890,9 +1891,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object mdoor_closed_2 +editor_folder connect/Doors name stone door type 91 activate_on_push 1 @@ -1908,9 +1909,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object mdoor_open_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -1924,9 +1925,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object mdoor_open_2 +editor_folder connect/Doors name stone door type 91 activate_on_push 1 @@ -1940,9 +1941,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object odoorm2_closed_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -1958,9 +1959,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object odoorm2_open_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -1974,10 +1975,10 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object odoorm2bg_closed_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -1993,9 +1994,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object odoorm2bg_open_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -2009,10 +2010,10 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object odoorm2rw_closed_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -2028,9 +2029,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object odoorm2rw_open_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -2044,10 +2045,10 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object odoorn2_closed_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -2063,9 +2064,9 @@ wc 3 maxsp 0 dam 6 -editor_folder connect/Doors end Object odoorn2_open_1 +editor_folder connect/Doors name wood door type 91 activate_on_push 1 @@ -2079,10 +2080,10 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Doors end Object ggate_open +editor_folder connect/Garden_gate name garden gate type 91 activate_on_push 1 @@ -2096,9 +2097,9 @@ maxsp 1 ac 1 wc 0 -editor_folder connect/Garden_gate end Object ggate_closed +editor_folder connect/Garden_gate name garden gate type 91 activate_on_push 1 @@ -2113,9 +2114,9 @@ ac 1 wc 3 move_block all -editor_folder connect/Garden_gate end Object gate_open_1 +editor_folder connect/Gates name gate type 91 activate_on_push 1 @@ -2127,9 +2128,9 @@ wc 0 dam 1 maxsp 1 -editor_folder connect/Gates end Object gate_closed_1 +editor_folder connect/Gates name gate type 91 activate_on_push 1 @@ -2143,9 +2144,9 @@ wc 6 maxsp 0 dam 1 -editor_folder connect/Gates end Object gate_open_2 +editor_folder connect/Gates name gate type 91 activate_on_push 1 @@ -2157,9 +2158,9 @@ hp 0 dam 1 maxsp 1 -editor_folder connect/Gates end Object gate_closed_2 +editor_folder connect/Gates name gate type 91 activate_on_push 1 @@ -2173,9 +2174,9 @@ wc 7 dam 1 maxsp 0 -editor_folder connect/Gates end Object gateTrg1 +editor_folder connect/Gates name gate type 26 activate_on_push 1 @@ -2193,9 +2194,9 @@ hp 20 speed 0.35 value 1 -editor_folder connect/Gates end Object gateTrg2 +editor_folder connect/Gates name gate type 26 activate_on_push 1 @@ -2213,9 +2214,9 @@ hp 20 speed 0.35 value 1 -editor_folder connect/Gates end Object grate_open_1 +editor_folder connect/Gates name grate type 91 activate_on_push 1 @@ -2228,9 +2229,9 @@ dam 5 maxsp 1 ac 1 -editor_folder connect/Gates end Object grate_closed_1 +editor_folder connect/Gates name grate type 91 activate_on_push 1 @@ -2244,9 +2245,9 @@ maxsp 0 dam 5 ac 1 -editor_folder connect/Gates end Object grate_open_2 +editor_folder connect/Gates name iron gate type 91 activate_on_push 1 @@ -2259,9 +2260,9 @@ dam 5 maxsp 1 ac 1 -editor_folder connect/Gates end Object grate_closed_2 +editor_folder connect/Gates name grate type 91 activate_on_push 1 @@ -2275,23 +2276,23 @@ ac 1 dam 5 maxsp 0 -editor_folder connect/Gates end Object gratedoor_1 +editor_folder connect/Gates face gratedoor1.111 blocksview 1 no_pick 1 move_block all -editor_folder connect/Gates end Object gratedoor_2 +editor_folder connect/Gates face gratedoor2.111 blocksview 1 no_pick 1 move_block all -editor_folder connect/Gates end Object igateTrg1 +editor_folder connect/Gates name iron gate type 26 activate_on_push 1 @@ -2311,9 +2312,9 @@ hp 20 speed 0.35 value 1 -editor_folder connect/Gates end Object igateTrg2 +editor_folder connect/Gates name iron gate type 26 activate_on_push 1 @@ -2333,9 +2334,9 @@ hp 20 speed 0.35 value 1 -editor_folder connect/Gates end Object igate_closed_1 +editor_folder connect/Gates name iron gate type 91 activate_on_push 1 @@ -2351,9 +2352,9 @@ wc 7 maxsp 0 dam 6 -editor_folder connect/Gates end Object igate_closed_2 +editor_folder connect/Gates name iron gate type 91 activate_on_push 1 @@ -2369,9 +2370,9 @@ wc 5 dam 6 maxsp 0 -editor_folder connect/Gates end Object igate_open_1 +editor_folder connect/Gates name iron gate type 91 activate_on_push 1 @@ -2385,9 +2386,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect/Gates end Object igate_open_2 +editor_folder connect/Gates name iron gate type 91 activate_on_push 1 @@ -2401,9 +2402,9 @@ hp 0 dam 6 maxsp 1 -editor_folder connect/Gates end Object spike_moving +editor_folder connect/Gates name spike type 91 activate_on_push 1 @@ -2418,9 +2419,9 @@ maxsp 0 dam 256 ac 1 -editor_folder connect/Gates end Object spike_open +editor_folder connect/Gates name spike type 91 activate_on_push 1 @@ -2433,9 +2434,9 @@ dam 256 maxsp 1 ac 1 -editor_folder connect/Gates end Object spike_closed +editor_folder connect/Gates name spike type 91 activate_on_push 1 @@ -2449,9 +2450,9 @@ maxsp 0 dam 256 ac 1 -editor_folder connect/Gates end Object spike_hidden +editor_folder connect/Gates name spike type 91 activate_on_push 1 @@ -2464,9 +2465,9 @@ dam 256 maxsp 1 ac 1 -editor_folder connect/Gates end Object spikes_moving +editor_folder connect/Gates name spikes type 91 activate_on_push 1 @@ -2481,9 +2482,9 @@ maxsp 0 dam 8 ac 1 -editor_folder connect/Gates end Object spikes_open +editor_folder connect/Gates name spikes type 91 activate_on_push 1 @@ -2496,9 +2497,9 @@ dam 8 maxsp 1 ac 1 -editor_folder connect/Gates end Object spikes_closed +editor_folder connect/Gates name spikes type 91 activate_on_push 1 @@ -2512,9 +2513,9 @@ maxsp 0 dam 8 ac 1 -editor_folder connect/Gates end Object spikes_hidden +editor_folder connect/Gates name spikes type 91 activate_on_push 1 @@ -2527,9 +2528,9 @@ dam 8 maxsp 1 ac 1 -editor_folder connect/Gates end Object pit_closed +editor_folder connect/Hole name pit type 94 activate_on_push 1 @@ -2540,9 +2541,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_open +editor_folder connect/Hole name pit type 94 activate_on_push 1 @@ -2554,9 +2555,9 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-pink-c-marble_111_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2568,9 +2569,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-pink-c-marble_111_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2583,11 +2584,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-pink-c-marble_112_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2599,9 +2600,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-pink-c-marble_112_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2614,11 +2615,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-pink-c-marble_113_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2630,9 +2631,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-pink-c-marble_113_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2645,11 +2646,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-pink-c-marble_114_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2661,9 +2662,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-pink-c-marble_114_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2676,9 +2677,9 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-red-c-marble_111_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2690,9 +2691,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-red-c-marble_111_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2705,11 +2706,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-red-c-marble_112_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2721,9 +2722,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-red-c-marble_112_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2736,11 +2737,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-red-c-marble_113_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2752,9 +2753,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-red-c-marble_113_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2767,11 +2768,11 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object pit_white-red-c-marble_114_closed +editor_folder connect/Hole name marble is_floor 1 type 94 @@ -2783,9 +2784,9 @@ is_animated 0 wc 10 maxsp 0 -editor_folder connect/Hole end Object pit_white-red-c-marble_114_open +editor_folder connect/Hole name pit is_floor 1 type 94 @@ -2798,9 +2799,9 @@ move_on walk wc 0 maxsp 1 -editor_folder connect/Hole end Object trapdoor_1 +editor_folder connect/Hole name trapdoor type 95 face trapdoor_1.111 @@ -2808,9 +2809,9 @@ move_on walk no_pick 1 weight 100000 -editor_folder connect/Hole end Object trapdoor_2 +editor_folder connect/Hole name trapdoor type 95 face trapdoor_2.111 @@ -2818,9 +2819,9 @@ move_on walk no_pick 1 weight 999999 -editor_folder connect/Hole end Object trapdoor_3 +editor_folder connect/Hole name trapdoor type 95 face trapdoor_3.111 @@ -2828,9 +2829,9 @@ move_on walk no_pick 1 weight 1 -editor_folder connect/Hole end Object trapdoor_4 +editor_folder connect/Hole name trapdoor type 95 face trapdoor_4.111 @@ -2838,9 +2839,9 @@ move_on walk no_pick 1 weight 120000 -editor_folder connect/Hole end Object spinner_-135 +editor_folder connect/Spinner name spinner face spinner.11B anim_speed 1 @@ -2850,9 +2851,9 @@ sp 3 move_on walk fly_low animation spinner_-135 -editor_folder connect/Spinner end Object spinner_-90 +editor_folder connect/Spinner name spinner face spinner.11B anim_speed 1 @@ -2862,9 +2863,9 @@ sp 2 move_on walk fly_low animation spinner_-90 -editor_folder connect/Spinner end Object spinner_-45 +editor_folder connect/Spinner name spinner face spinner.11B anim_speed 2 @@ -2874,9 +2875,9 @@ sp 1 move_on walk fly_low animation spinner_-45 -editor_folder connect/Spinner end Object spinner_45 +editor_folder connect/Spinner name spinner face spinner.111 anim_speed 2 @@ -2886,9 +2887,9 @@ sp -1 move_on walk fly_low animation spinner_45 -editor_folder connect/Spinner end Object spinner_90 +editor_folder connect/Spinner name spinner face spinner.111 anim_speed 1 @@ -2898,9 +2899,9 @@ sp -2 move_on walk fly_low animation spinner_90 -editor_folder connect/Spinner end Object spinner_135 +editor_folder connect/Spinner name spinner face spinner.111 anim_speed 1 @@ -2910,9 +2911,9 @@ sp -3 move_on walk fly_low animation spinner_135 -editor_folder connect/Spinner end Object spinner_180 +editor_folder connect/Spinner name spinner face spinner.11B anim_speed 1 @@ -2922,9 +2923,9 @@ sp 4 move_on walk fly_low animation spinner_180 -editor_folder connect/Spinner end Object altar +editor_folder connect slaying food type 18 activate_on_push 1 @@ -2934,9 +2935,9 @@ animation altar no_pick 1 move_on walk -editor_folder connect end Object button_plate +editor_folder connect name large button type 92 face button_big.111 @@ -2948,9 +2949,9 @@ weight 1000000 move_on walk move_off walk -editor_folder connect end Object button_small +editor_folder connect name small button type 92 activate_on_push 1 @@ -2962,9 +2963,9 @@ weight 1 move_on walk move_off walk -editor_folder connect end Object check_inv +editor_folder connect name check_inv invisible 1 type 64 @@ -2974,9 +2975,9 @@ move_off walk slaying set_individual_value last_sp 1 -editor_folder connect end Object cwall_closed_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -2992,9 +2993,9 @@ wc 7 maxsp 0 dam 6 -editor_folder connect end Object cwall_open_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -3008,9 +3009,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect end Object cwallmural1_closed_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -3026,9 +3027,9 @@ wc 7 maxsp 0 dam 6 -editor_folder connect end Object cwallmural1_open_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -3042,9 +3043,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect end Object detector +editor_folder connect name detector slaying player type 51 @@ -3053,9 +3054,9 @@ speed 0.5 no_pick 1 sp 1 -editor_folder connect end Object button_handle +editor_folder connect name handle type 93 activate_on_push 1 @@ -3064,9 +3065,9 @@ no_pick 1 animation button_handle client_type 25042 -editor_folder connect end Object button_lever +editor_folder connect name lever type 93 activate_on_push 1 @@ -3075,9 +3076,9 @@ no_pick 1 animation button_lever client_type 25042 -editor_folder connect end Object magic_ear +editor_folder connect type 29 face magic_ear.111 msg @@ -3086,9 +3087,9 @@ endmsg no_pick 1 invisible 1 -editor_folder connect end Object magic_mouth +editor_folder connect face magicmouth.111 type 98 activate_on_push 1 @@ -3096,9 +3097,9 @@ move_on walk fly_low no_pick 1 invisible 1 -editor_folder connect end Object mover_turn +editor_folder connect name mover face director.181 animation mover_turn @@ -3109,9 +3110,9 @@ no_pick 1 maxsp 1 move_on walk fly_low -editor_folder connect end Object mover_1 +editor_folder connect name mover face director.111 animation mover_1 @@ -3122,9 +3123,9 @@ no_pick 1 sp 1 move_on walk fly_low -editor_folder connect end Object mover_2 +editor_folder connect name mover face director.121 animation mover_2 @@ -3135,9 +3136,9 @@ no_pick 1 sp 2 move_on walk fly_low -editor_folder connect end Object mover_3 +editor_folder connect name mover face director.131 animation mover_3 @@ -3148,9 +3149,9 @@ no_pick 1 sp 3 move_on walk fly_low -editor_folder connect end Object mover_4 +editor_folder connect name mover face director.141 invisible 1 @@ -3161,9 +3162,9 @@ no_pick 1 sp 4 move_on walk fly_low -editor_folder connect end Object mover_5 +editor_folder connect name mover invisible 1 face director.151 @@ -3174,9 +3175,9 @@ no_pick 1 sp 5 move_on walk fly_low -editor_folder connect end Object mover_6 +editor_folder connect name mover invisible 1 face director.161 @@ -3187,9 +3188,9 @@ no_pick 1 sp 6 move_on walk fly_low -editor_folder connect end Object mover_7 +editor_folder connect name mover invisible 1 face director.171 @@ -3200,9 +3201,9 @@ no_pick 1 sp 7 move_on walk fly_low -editor_folder connect end Object mover_8 +editor_folder connect name mover invisible 1 face director.181 @@ -3213,9 +3214,9 @@ no_pick 1 sp 8 move_on walk fly_low -editor_folder connect end Object pedestal +editor_folder connect name pedestal slaying player type 17 @@ -3226,9 +3227,9 @@ no_pick 1 move_on walk move_off walk -editor_folder connect end Object stwall_closed_1 +editor_folder connect name stone wall type 91 activate_on_push 1 @@ -3244,9 +3245,9 @@ wc 7 maxsp 0 dam 6 -editor_folder connect end Object stwall_open_1 +editor_folder connect name stone wall type 91 activate_on_push 1 @@ -3260,9 +3261,9 @@ wc 0 dam 6 maxsp 1 -editor_folder connect end Object altar_trigger +editor_folder connect name altar slaying food food 5 @@ -3273,9 +3274,9 @@ is_animated 0 no_pick 1 move_on walk -editor_folder connect end Object button_trigger +editor_folder connect name button type 30 face button_sma.111 @@ -3286,9 +3287,9 @@ move_on walk move_off walk weight 1 -editor_folder connect end Object trigger +editor_folder connect name trigger type 27 face handle.111 @@ -3297,9 +3298,9 @@ is_animated 0 exp 30 client_type 25042 -editor_folder connect end Object pedestal_trigger +editor_folder connect name pedestal slaying player type 32 @@ -3310,9 +3311,9 @@ no_pick 1 move_on walk move_off walk -editor_folder connect end Object westcwall_closed_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -3328,9 +3329,9 @@ wc 7 maxsp 0 dam 6 -editor_folder connect end Object westcwall_open_1 +editor_folder connect name wall type 91 activate_on_push 1 @@ -3344,246 +3345,246 @@ wc 0 dam 6 maxsp 1 -editor_folder connect end Object dark_palace +editor_folder construct/Palace type 66 face dark_palace.x11 no_pick 1 client_type 25012 -editor_folder construct/Palace end More Object dark_palace_2 +editor_folder construct/Palace type 66 face dark_palace.x11 x 1 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_3 +editor_folder construct/Palace type 66 face dark_palace.x11 x 2 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_4 +editor_folder construct/Palace type 66 face dark_palace.x11 x 3 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_5 +editor_folder construct/Palace type 66 face dark_palace.x11 y 1 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_6 +editor_folder construct/Palace type 66 face dark_palace.x11 x 1 y 1 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_7 +editor_folder construct/Palace type 66 face dark_palace.x11 x 2 y 1 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_8 +editor_folder construct/Palace type 66 face dark_palace.x11 x 3 y 1 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_9 +editor_folder construct/Palace type 66 face dark_palace.x11 y 2 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_10 +editor_folder construct/Palace type 66 face dark_palace.x11 x 1 y 2 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_11 +editor_folder construct/Palace type 66 face dark_palace.x11 x 2 y 2 no_pick 1 -editor_folder construct/Palace end More Object dark_palace_12 +editor_folder construct/Palace type 66 face dark_palace.x11 x 3 y 2 no_pick 1 -editor_folder construct/Palace end Object palace +editor_folder construct/Palace type 66 face palace.x11 no_pick 1 client_type 25012 -editor_folder construct/Palace end More Object palace_2 +editor_folder construct/Palace type 66 face palace.x11 x 1 no_pick 1 -editor_folder construct/Palace end More Object palace_3 +editor_folder construct/Palace type 66 face palace.x11 x 2 no_pick 1 -editor_folder construct/Palace end More Object palace_4 +editor_folder construct/Palace type 66 face palace.x11 x 3 no_pick 1 -editor_folder construct/Palace end More Object palace_5 +editor_folder construct/Palace type 66 face palace.x11 y 1 no_pick 1 -editor_folder construct/Palace end More Object palace_6 +editor_folder construct/Palace type 66 face palace.x11 x 1 y 1 no_pick 1 -editor_folder construct/Palace end More Object palace_7 +editor_folder construct/Palace type 66 face palace.x11 x 2 y 1 no_pick 1 -editor_folder construct/Palace end More Object palace_8 +editor_folder construct/Palace type 66 face palace.x11 x 3 y 1 no_pick 1 -editor_folder construct/Palace end More Object palace_9 +editor_folder construct/Palace type 66 face palace.x11 y 2 no_pick 1 -editor_folder construct/Palace end More Object palace_10 +editor_folder construct/Palace type 66 face palace.x11 x 1 y 2 no_pick 1 -editor_folder construct/Palace end More Object palace_11 +editor_folder construct/Palace type 66 face palace.x11 x 2 y 2 no_pick 1 -editor_folder construct/Palace end More Object palace_12 +editor_folder construct/Palace type 66 face palace.x11 x 3 y 2 no_pick 1 -editor_folder construct/Palace end Object s_barn +editor_folder construct/Snow type 66 face s_barn.x11 speed -0.1 no_pick 1 -editor_folder construct/Snow end More Object s_barn_2 +editor_folder construct/Snow type 66 face s_barn.x11 speed -0.1 no_pick 1 x 1 -editor_folder construct/Snow end More Object s_barn_3 +editor_folder construct/Snow type 66 face s_barn.x11 speed -0.1 no_pick 1 y 1 -editor_folder construct/Snow end More Object s_barn_4 +editor_folder construct/Snow type 66 face s_barn.x11 speed -0.1 no_pick 1 x 1 y 1 -editor_folder construct/Snow end Object s_barrack_up +editor_folder construct/Snow name s_barrack type 66 face s_barrack_u.x11 @@ -3591,10 +3592,10 @@ anim_speed 1 client_anim_random 10 no_pick 1 -editor_folder construct/Snow end More Object s_barrack_up_2 +editor_folder construct/Snow name s_barrack type 66 face s_barrack_u.x11 @@ -3603,204 +3604,204 @@ client_anim_random 10 y 1 no_pick 1 -editor_folder construct/Snow end Object s_bungalow +editor_folder construct/Snow type 66 face s_bungalow.111 no_pick 1 -editor_folder construct/Snow end Object s_castle +editor_folder construct/Snow name castle type 66 face s_castle.x11 no_pick 1 -editor_folder construct/Snow end More Object s_castle_b +editor_folder construct/Snow name castle type 66 face s_castle.x11 x 1 no_pick 1 -editor_folder construct/Snow end More Object s_castle_c +editor_folder construct/Snow name castle type 66 face s_castle.x11 y 1 no_pick 1 -editor_folder construct/Snow end More Object s_castle_d +editor_folder construct/Snow name castle type 66 face s_castle.x11 x 1 y 1 no_pick 1 -editor_folder construct/Snow end Object s_church +editor_folder construct/Snow type 66 face s_church.x11 no_pick 1 -editor_folder construct/Snow end More Object s_church_2 +editor_folder construct/Snow name church type 66 face s_church.x11 x 1 no_pick 1 -editor_folder construct/Snow end More Object s_church_3 +editor_folder construct/Snow name church type 66 face s_church.x11 y 1 no_pick 1 -editor_folder construct/Snow end More Object s_church_4 +editor_folder construct/Snow name church type 66 face s_church.x11 x 1 y 1 no_pick 1 -editor_folder construct/Snow end Object s_citytower +editor_folder construct/Snow name tower type 66 face s_citytower.x11 speed -0.1 no_pick 1 -editor_folder construct/Snow end More Object s_citytower_2 +editor_folder construct/Snow name s_citytower type 66 face s_citytower.x11 speed -0.1 y 1 no_pick 1 -editor_folder construct/Snow end Object s_guild +editor_folder construct/Snow face s_guild.x11 type 66 no_pick 1 move_block all -editor_folder construct/Snow end More Object s_guild_2 +editor_folder construct/Snow name guild face s_guild.x11 type 66 no_pick 1 move_block all x 1 -editor_folder construct/Snow end More Object s_guild_3 +editor_folder construct/Snow name guild face s_guild.x11 type 66 no_pick 1 y 1 -editor_folder construct/Snow end More Object s_guild_4 +editor_folder construct/Snow name guild face s_guild.x11 type 66 no_pick 1 x 1 y 1 -editor_folder construct/Snow end Object s_inn +editor_folder construct/Snow name snowed inn face s_inn.x11 type 66 no_pick 1 -editor_folder construct/Snow end More Object s_inn_2 +editor_folder construct/Snow name snowed inn face s_inn.x11 type 66 x 1 no_pick 1 -editor_folder construct/Snow end Object treefort +editor_folder construct/Treehouse name treefort type 66 face treefort.x11 no_pick 1 client_type 25012 -editor_folder construct/Treehouse end More Object treefort_1 +editor_folder construct/Treehouse name treefort type 66 face treefort.x11 no_pick 1 x 1 -editor_folder construct/Treehouse end Object treefort2 +editor_folder construct/Treehouse name treefort type 66 face treefort2.x11 no_pick 1 client_type 25012 -editor_folder construct/Treehouse end More Object treefort2_1 +editor_folder construct/Treehouse name treefort type 66 face treefort2.x11 no_pick 1 y 1 -editor_folder construct/Treehouse end Object treefort3 +editor_folder construct/Treehouse name treefort type 66 face treefort3.111 no_pick 1 client_type 25012 -editor_folder construct/Treehouse end Object treehouse +editor_folder construct/Treehouse name treehouse type 66 face treehouse.111 no_pick 1 client_type 25012 -editor_folder construct/Treehouse end Object barrack_long +editor_folder construct/barrack name barrack type 66 face barrack_l.x11 @@ -3809,10 +3810,10 @@ client_anim_random 1 no_pick 1 client_type 25012 -editor_folder construct/barrack end More Object barrack_long_2 +editor_folder construct/barrack name barrack type 66 face barrack_l.x11 @@ -3821,17 +3822,17 @@ client_anim_random 1 x 1 no_pick 1 -editor_folder construct/barrack end Object barrack_small +editor_folder construct/barrack name small barrack type 66 face barrack_s.111 no_pick 1 client_type 25012 -editor_folder construct/barrack end Object barrack_up +editor_folder construct/barrack name barrack type 66 face barrack_u.x11 @@ -3840,10 +3841,10 @@ client_anim_random 1 no_pick 1 client_type 25012 -editor_folder construct/barrack end More Object barrack_up_2 +editor_folder construct/barrack name barrack type 66 face barrack_u.x11 @@ -3852,215 +3853,215 @@ client_anim_random 1 y 1 no_pick 1 -editor_folder construct/barrack end Object footbridge_0 +editor_folder construct/bridge/footbridge name footbridge face footbridge_0.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_1_2 +editor_folder construct/bridge/footbridge name footbridge face footbridge_1.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_1_4 +editor_folder construct/bridge/footbridge name footbridge face footbridge_2.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_2_1 +editor_folder construct/bridge/footbridge name footbridge face footbridge_3.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_1_1 +editor_folder construct/bridge/footbridge name footbridge face footbridge_4.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_1_1 +editor_folder construct/bridge/footbridge name footbridge face footbridge_5.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_2_2 +editor_folder construct/bridge/footbridge name footbridge face footbridge_6.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_3_2 +editor_folder construct/bridge/footbridge name footbridge face footbridge_7.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_1_3 +editor_folder construct/bridge/footbridge name footbridge face footbridge_8.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_2_4 +editor_folder construct/bridge/footbridge name footbridge face footbridge_9.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_1_2 +editor_folder construct/bridge/footbridge name footbridge face footbridge_A.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_3_1 +editor_folder construct/bridge/footbridge name footbridge face footbridge_B.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_2_2_3 +editor_folder construct/bridge/footbridge name footbridge face footbridge_C.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_3_4 +editor_folder construct/bridge/footbridge name footbridge face footbridge_D.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_3_3 +editor_folder construct/bridge/footbridge name footbridge face footbridge_E.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object footbridge_4 +editor_folder construct/bridge/footbridge name footbridge face footbridge_F.111 no_pick 1 -editor_folder construct/bridge/footbridge end Object stonebridge_0 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_0.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_1_2 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_1.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_1_4 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_2.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_2_1 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_3.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_1_1 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_4.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_1_1 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_5.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_2_2 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_6.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_3_2 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_7.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_1_3 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_8.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_2_4 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_9.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_1_2 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_A.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_3_1 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_B.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_2_2_3 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_C.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_3_4 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_D.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_3_3 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_E.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object stonebridge_4 +editor_folder construct/bridge/stonebridge name stonebridge face stonebridge_F.111 no_pick 1 -editor_folder construct/bridge/stonebridge end Object bungalow +editor_folder construct type 66 face bungalow.111 no_pick 1 client_type 25012 -editor_folder construct end Object castle +editor_folder construct/castle type 66 face castle.111 no_pick 1 client_type 25012 -editor_folder construct/castle end Object castle_a +editor_folder construct/castle name castle type 66 face castle_a.x11 @@ -4069,30 +4070,30 @@ animation castle_a no_pick 1 client_type 25012 -editor_folder construct/castle end More Object castle_b +editor_folder construct/castle name castle type 66 face castle_a.x11 animation castle_b x 1 no_pick 1 -editor_folder construct/castle end More Object castle_c +editor_folder construct/castle name castle type 66 face castle_a.x11 animation castle_c y 1 no_pick 1 -editor_folder construct/castle end More Object castle_d +editor_folder construct/castle name castle type 66 face castle_a.x11 @@ -4100,45 +4101,45 @@ x 1 y 1 no_pick 1 -editor_folder construct/castle end Object castle_a_east +editor_folder construct/castle name kyassuru type 66 face castle_a_east.x11 no_pick 1 client_type 25012 -editor_folder construct/castle end More Object castle_b_east +editor_folder construct/castle name kyassuru type 66 face castle_a_east.x11 x 1 no_pick 1 -editor_folder construct/castle end More Object castle_c_east +editor_folder construct/castle name kyassuru type 66 face castle_a_east.x11 y 1 no_pick 1 -editor_folder construct/castle end More Object castle_d_east +editor_folder construct/castle name kyassuru type 66 face castle_a_east.x11 x 1 y 1 no_pick 1 -editor_folder construct/castle end Object castle_a_northwest +editor_folder construct/castle name castle type 66 face castle_a_northwest.x11 @@ -4147,30 +4148,30 @@ animation castle_a_northwest no_pick 1 client_type 25012 -editor_folder construct/castle end More Object castle_b_northwest +editor_folder construct/castle name castle type 66 face castle_a_northwest.x11 animation castle_b_northwest x 1 no_pick 1 -editor_folder construct/castle end More Object castle_c_northwest +editor_folder construct/castle name castle type 66 face castle_a_northwest.x11 animation castle_c_northwest y 1 no_pick 1 -editor_folder construct/castle end More Object castle_d_northwest +editor_folder construct/castle name castle type 66 face castle_a_northwest.x11 @@ -4178,9 +4179,9 @@ x 1 y 1 no_pick 1 -editor_folder construct/castle end Object castle_a_western +editor_folder construct/castle name castle type 66 face castle_a_western.x11 @@ -4189,30 +4190,30 @@ animation castle_a_western no_pick 1 client_type 25012 -editor_folder construct/castle end More Object castle_b_western +editor_folder construct/castle name castle type 66 face castle_a_western.x11 animation castle_b_western x 1 no_pick 1 -editor_folder construct/castle end More Object castle_c_western +editor_folder construct/castle name castle type 66 face castle_a_western.x11 animation castle_c_western y 1 no_pick 1 -editor_folder construct/castle end More Object castle_d_western +editor_folder construct/castle name castle type 66 face castle_a_western.x11 @@ -4220,61 +4221,61 @@ x 1 y 1 no_pick 1 -editor_folder construct/castle end Object castle_west +editor_folder construct/castle name castle type 66 face castle_west.111 no_pick 1 client_type 25012 -editor_folder construct/castle end Object fort +editor_folder construct/fort name fortress type 66 face fort.x11 no_pick 1 client_type 25012 -editor_folder construct/fort end More Object fort_2 +editor_folder construct/fort name fortress type 66 face fort.x11 x 1 no_pick 1 -editor_folder construct/fort end More Object fort_3 +editor_folder construct/fort name fortress type 66 face fort.x11 y 1 no_pick 1 -editor_folder construct/fort end More Object fort_4 +editor_folder construct/fort name fortress type 66 face fort.x11 x 1 y 1 no_pick 1 -editor_folder construct/fort end Object fort_sym +editor_folder construct/fort name fortress type 66 face fort_sym.111 no_pick 1 client_type 25012 -editor_folder construct/fort end Object fountain +editor_folder construct/fountain name fountain face fountain.111 type 67 @@ -4283,49 +4284,49 @@ no_pick 1 anim_speed 2 client_anim_random 1 -editor_folder construct/fountain end Object darkhold +editor_folder construct/hold name darkhold type 66 face darkhold.x11 no_pick 1 move_block all client_type 25012 -editor_folder construct/hold end More Object darkhold_2 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 x 1 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_3 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 x 2 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_4 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 y 1 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_5 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4333,10 +4334,10 @@ y 1 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_6 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4344,20 +4345,20 @@ y 1 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_7 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 y 2 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_8 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4365,10 +4366,10 @@ y 2 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_9 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4376,20 +4377,20 @@ y 2 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_10 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 y 3 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_11 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4397,10 +4398,10 @@ y 3 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_12 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 @@ -4408,30 +4409,30 @@ y 3 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_13 +editor_folder construct/hold name darkhold type 66 face darkhold.x11 y 4 no_pick 1 move_block all -editor_folder construct/hold end More Object darkhold_14 +editor_fol... [truncated message content] |
From: <aki...@us...> - 2007-11-03 19:57:53
|
Revision: 3334 http://gridarta.svn.sourceforge.net/gridarta/?rev=3334&view=rev Author: akirschbaum Date: 2007-11-03 12:57:57 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Remove support for Look And Feel selection. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainView.java trunk/crossfire/src/cfeditor/action.properties Removed Paths: ------------- trunk/crossfire/src/cfeditor/LookAndFeelManager.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-11-03 19:24:27 UTC (rev 3333) +++ trunk/crossfire/ChangeLog 2007-11-03 19:57:57 UTC (rev 3334) @@ -1,5 +1,7 @@ 2007-11-03 Andreas Kirschbaum + * Remove support for Look And Feel selection. + * Update archetypes. * Implement #1713798 (Support objects nested in archetypes). Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2007-11-03 19:24:27 UTC (rev 3333) +++ trunk/crossfire/src/cfeditor/CMainView.java 2007-11-03 19:57:57 UTC (rev 3334) @@ -100,9 +100,6 @@ /** <code>true</code> when the object chooser is merged into the bottom panel. */ private boolean mapTileListBottom = true; - /** The look and feel manager. */ - private final LookAndFeelManager lookAndFeelManager; - private final Action aViewTreasurelists; private final Action aCloseAll; @@ -127,7 +124,6 @@ aViewTreasurelists = ACTION_FACTORY.createAction(true, "viewTreasurelists", mainControl); aCloseAll = ACTION_FACTORY.createAction(true, "closeAll", mainControl.getMapManager()); - lookAndFeelManager = new LookAndFeelManager(this); viewActions = new ViewActions(mainControl); mapActions = new MapActions(mainControl); initActions(); @@ -154,7 +150,6 @@ toolbarPanel.add(createCenterPanel(defwidth, defheight), BorderLayout.CENTER); setJMenuBar(ACTION_FACTORY.createMenuBar(true, "main")); mainControl.getScriptController().setMenu((JMenu) ACTION_FACTORY.find(getJMenuBar(), "plugins")); - lookAndFeelManager.init((JMenu) ACTION_FACTORY.find(getJMenuBar(), "view")); mapActions.updateMenuState(); Deleted: trunk/crossfire/src/cfeditor/LookAndFeelManager.java =================================================================== --- trunk/crossfire/src/cfeditor/LookAndFeelManager.java 2007-11-03 19:24:27 UTC (rev 3333) +++ trunk/crossfire/src/cfeditor/LookAndFeelManager.java 2007-11-03 19:57:57 UTC (rev 3334) @@ -1,140 +0,0 @@ -/* - * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. - * Copyright (C) 2000-2007 The Gridarta Developers. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package cfeditor; - -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.util.prefs.Preferences; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JMenu; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; -import net.sf.gridarta.MainControl; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Manages the look and feel menu entries. - * @author Andreas Kirschbaum - */ -public class LookAndFeelManager { - - /** Preferences. */ - private static final Preferences prefs = Preferences.userNodeForPackage(MainControl.class); - - /** The key used to store the selected L'n'F to INI file. */ - public static final String SELECTED_LNF_KEY = "MainWindow.lnfClass"; - - /** The main view. */ - @NotNull private final CMainView mainView; - - /** - * The menu to add look and feel entries to. - */ - @Nullable JMenu menuView = null; - - /** - * Create a new instance. - * - * @param mainView the main view - */ - public LookAndFeelManager(@NotNull final CMainView mainView) { - this.mainView = mainView; - } - - /** - * Set the selected look and feel. - * - * @param menuView the menu to add look and feel entries to - */ - public void init(@Nullable final JMenu menuView) { - this.menuView = menuView; - rebuildLookAndFeelMenuEntries(); - - setLookNFeel(prefs.get(SELECTED_LNF_KEY, UIManager.getCrossPlatformLookAndFeelClassName())); - } - - /** - * Rebuild the look and feel menu entries in the view menu. - */ - private void rebuildLookAndFeelMenuEntries() { - if (menuView == null) { - return; - } - - for (;;) { - final Component menuItem = menuView.getMenuComponent(0); - if (menuItem == null || !(menuItem instanceof JCheckBoxMenuItem)) { - break; - } - menuView.remove(0); - } - - final UIManager.LookAndFeelInfo[] lookAndFeelInfos = UIManager.getInstalledLookAndFeels(); - final String selectedLNFName = prefs.get(SELECTED_LNF_KEY, UIManager.getCrossPlatformLookAndFeelClassName()); - int index = 0; - for (final UIManager.LookAndFeelInfo lookAndFeelInfo : lookAndFeelInfos) { - final Action action = new LookAndFeelAction(lookAndFeelInfo); - final JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(action); - menuItem.setSelected(selectedLNFName.equals(lookAndFeelInfo.getClassName())); - menuView.add(menuItem, index++); - } - } - - /** - * Sets the used look'n'feel to be the specified l'n'f. - * @param className The name of the l'n'f class name to use. - */ - private void setLookNFeel(final String className) { - try { - UIManager.setLookAndFeel(className); - SwingUtilities.updateComponentTreeUI(mainView); - } catch (final UnsupportedLookAndFeelException noSuchLNF) { - } catch (final IllegalAccessException noAccess) { - } catch (final InstantiationException noInstance) { - } catch (final ClassNotFoundException noClass) { - } - } - - private final class LookAndFeelAction extends AbstractAction { - - /** The serial version UID. */ - private static final long serialVersionUID = 1; - - private final String className; - - private LookAndFeelAction(final UIManager.LookAndFeelInfo lookAndFeelInfo) { - className = lookAndFeelInfo.getClassName(); - putValue(NAME, lookAndFeelInfo.getName()); - putValue(SHORT_DESCRIPTION, "Selects " + lookAndFeelInfo.getName()); - } - - public void actionPerformed(final ActionEvent e) { - setLookNFeel(className); - prefs.put(SELECTED_LNF_KEY, className); - rebuildLookAndFeelMenuEntries(); - } - - } // class LookAndFeelAction - -} // class LookAndFeelManager Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2007-11-03 19:24:27 UTC (rev 3333) +++ trunk/crossfire/src/cfeditor/action.properties 2007-11-03 19:57:57 UTC (rev 3334) @@ -36,7 +36,7 @@ resources.menu=collectArches - viewTreasurelists tools.menu=validateMap - gc analyze.menu= -view.menu=- showMonster showExit showBackground showDoor showWall showEquipment showTreasure showConnected resetView - prevWindow nextWindow +view.menu=showMonster showExit showBackground showDoor showWall showEquipment showTreasure showConnected resetView - prevWindow nextWindow plugins.menu=- editPlugins - savePlugins importPlugin window.menu=closeAll help.menu=onlineHelp tod about This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-11-15 21:02:47
|
Revision: 3383 http://gridarta.svn.sourceforge.net/gridarta/?rev=3383&view=rev Author: akirschbaum Date: 2007-11-15 13:02:49 -0800 (Thu, 15 Nov 2007) Log Message: ----------- In game object attributes dialog, add drop-down control for "event type" field of Event objects. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/types.xml trunk/crossfire/src/cfeditor/CMainControl.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-11-15 20:21:32 UTC (rev 3382) +++ trunk/crossfire/ChangeLog 2007-11-15 21:02:49 UTC (rev 3383) @@ -1,3 +1,8 @@ +2007-11-15 Andreas Kirschbaum + + * In game object attributes dialog, add drop-down control for + "event type" field of Event objects. + 2007-11-14 Andreas Kirschbaum * Retain selection in selected square view when deleting objects Modified: trunk/crossfire/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/conf/types.xml 2007-11-15 20:21:32 UTC (rev 3382) +++ trunk/crossfire/resource/conf/types.xml 2007-11-15 21:02:49 UTC (rev 3383) @@ -65,7 +65,8 @@ # optional. # # bool_special - Like bool, but with customized true/false values # # treasurelist - CF treasure list (see "treasures" file) # -# list_LISTNAME - list, must be defined as a <list> element # +# list_LISTNAME - list, must be defined as a <list> element; # +# The list "event" is pre-defined. # # bitmask_BITMASKNAME - bitmask, must be defined as a <bitmask> # # element # # # @@ -1657,7 +1658,7 @@ Scripts are to be put in object's inventory. They execute an external script file when the trigger condition is met.]]> </description> - <attribute arch="subtype" editor="event type" type="int"> + <attribute arch="subtype" editor="event type" type="list_event"> The event type determines the trigger condition. </attribute> <attribute arch="title" editor="plugin name" type="string"> Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2007-11-15 20:21:32 UTC (rev 3382) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2007-11-15 21:02:49 UTC (rev 3383) @@ -26,6 +26,7 @@ import cfeditor.gameobject.GameObject; import cfeditor.gameobject.anim.AnimationObjects; import cfeditor.gameobject.face.FaceObjects; +import cfeditor.gameobject.scripts.ScriptArchData; import cfeditor.gui.GameObjectAttributesDialog; import cfeditor.gui.prefs.GUIPrefs; import cfeditor.gui.prefs.ResPrefs; @@ -288,6 +289,7 @@ } catch (final FileNotFoundException ex) { log.error("Cannot read GameObjectMatchers.xml: " + ex.getMessage()); } + typeList.getListTable().put("event", getEventTypes()); try { final String filename = IOUtils.getResourceURLAsString(getConfigurationDirectory(), CommonConstants.TYPEDEF_FILE); typeList.loadTypesFromXML(filename); @@ -1055,4 +1057,13 @@ return new File(getMapDir(), IGUIConstants.PICKMAP_DIR); } + private List<?> getEventTypes() { + final List<Object> result = new ArrayList<Object>(); + for (int typeNumber = 1; ScriptArchData.typeArchName(typeNumber) != null; typeNumber++) { + result.add(typeNumber); + result.add(ScriptArchData.typeName(typeNumber)); + } + return result; + } + } // class CMainControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-11-18 23:26:17
|
Revision: 3407 http://gridarta.svn.sourceforge.net/gridarta/?rev=3407&view=rev Author: akirschbaum Date: 2007-11-18 15:26:10 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Fix #1555837 (Doesn't support new move_type system): add 'move_slow' and 'move_slow_penalty' game object attributes. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/resource/conf/types.xml Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2007-11-18 23:18:33 UTC (rev 3406) +++ trunk/crossfire/ChangeLog 2007-11-18 23:26:10 UTC (rev 3407) @@ -1,5 +1,8 @@ 2007-11-18 Andreas Kirschbaum + * Fix #1555837 (Doesn't support new move_type system): add + 'move_slow' and 'move_slow_penalty' game object attributes. + * Implement #1816948 (Text in 'object chooser'). 2007-11-17 Andreas Kirschbaum Modified: trunk/crossfire/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/conf/types.xml 2007-11-18 23:18:33 UTC (rev 3406) +++ trunk/crossfire/resource/conf/types.xml 2007-11-18 23:26:10 UTC (rev 3407) @@ -1922,7 +1922,10 @@ If set, the object cannot be passed by players nor monsters. </attribute> <section name="terrain"> - <attribute arch="slow_move" editor="slow movement" type="int"> + <attribute arch="move_slow" editor="slow movement" type="bitmask_movement"> + The movement types that are affected by <slow penalty>. + </attribute> + <attribute arch="move_slow_penalty" editor="slow penalty" type="float"> If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal. @@ -1977,7 +1980,10 @@ If set, the object cannot be passed by players nor monsters. </attribute> <section name="terrain"> - <attribute arch="slow_move" editor="slow movement" type="int"> + <attribute arch="move_slow" editor="slow movement" type="bitmask_movement"> + The movement types that are affected by <slow penalty>. + </attribute> + <attribute arch="move_slow_penalty" editor="slow penalty" type="float"> If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal. @@ -2207,7 +2213,10 @@ value to be on the safe side. </attribute> <section name="terrain"> - <attribute arch="slow_move" editor="slow movement" type="int"> + <attribute arch="move_slow" editor="slow movement" type="bitmask_movement"> + The movement types that are affected by <slow penalty>. + </attribute> + <attribute arch="move_slow_penalty" editor="slow penalty" type="float"> If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal. @@ -4525,7 +4534,10 @@ sink into the swamp. Swamp with very high <drowning speed> can be a nasty and unexpected death-trap. Players should get a warning before such areas. </attribute> - <attribute arch="slow_move" editor="slow movement" type="int"> + <attribute arch="move_slow" editor="slow movement" type="bitmask_movement"> + The movement types that are affected by <slow penalty>. + </attribute> + <attribute arch="move_slow_penalty" editor="slow penalty" type="float"> If <slow movement> is set to a value greater zero, all creatures moving over this spot will be slower than normal. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |