View Single Post
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 12-08-2006 , 04:16   Re: CSDM 2.1d beta
Reply With Quote #26

Another reason for itemeditor to be included into csdm_itemmode plugin was this - when I did it the first time as a separate plugin (about 1 month ago), the half of the code (for creating entities, reading config files with entities definition, removing them from the map etc) it was... about half code of Your plugin.
Here are some situations itemmode plugin should know the editor is working so it should behave in some specyfic ways (You need to rewrite some code of Your plugin anyway):
1. Someone switched to on my item editor - this man should see since that moment ALL weapons defined in the items config file (including these weapons they are restricted in csdm.cfg). In this case Your csdm_itemmode should remove all entities from the map then - itemeditor should create them including also these restricted (to let the user delete/move some of them, add new ones etc.)
2. Your plugin should know the user is editing the map entities config (by item editor) - so pfnTouch function shouldn't let pickup weapons in this time (You want to remove some item, but You are too close to it - so You pickup it, if that function lets do this; You removed some entity, but itemmode plugin doesn't know yet this - so You pickup not existing already item etc).
3. The user finished the work with editor - by using "exit" from any of menus in itemeditor - I have to remove all weapons from the map (because they might be also displayed these restricted), then You should get the info (itemeditor finished the work) and You should reload the config file.

In my private opinion making forwards for such kind communication and use 2 times the half code the same in 2 separate plugins is ugly and no worth to do, but let me know what was the main reason You successed with changing BAILOPAN's decision (as far as I know it's very hard to make him changing any decision, so You had to have really good argument - I would like to know it).
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.
KWo is offline