As asked by blowfish i want to provide suggestions for lua in map entity handling.
In trem logic for map entities is handled by target(name) chain, meaning you specify a target and targename params with a string value.
The ones with target param will activate everything that has a targetname with the same values.
Copying this behaviour trough lua functions should be a piece of cake.
For starters we should obsolete trigger_always, which just fires at start.
We just need a generalized function, for example named trigger(target) that could do the job.
And have a callback in lua that could be overriden or a table to insert functions to call when the map starts.
Next would be target_delay, which when triggered just will trigger something else later, by adding a second argument to the triggering function being the delay, this one could be ditched too.
Of course for this to work we will to add a callback function when a player enters some area.
In netradiant there are quite a few, a basic, one for buildables, one for human equipment checks and alien classes.
We could squeeze all 4 of these entities into one callback function and make the designer chose what logic he likes.
Likewise will need to adapt the func_button, trigger_teleport and target_teleport in the same vain.
I havent fully checked if those are all triggering entities but it should outline the rough work.
The following output only entities could be replaced with simple function calls from the trigger functions.
We need just a handful functions to make a mappers life so easier, such as instakilling, adding damage to a player or healing him.
Then there are functions needed for printing text, teleporting players and team win triggers.
Plus a few i didnt mention.
Also lua functions for movement of entities would be quite nice.
This would provide a great start for serverside lua usage.
In addition it would partially get rid of forcing the mapper to go trough lengthy recompiling when adjusting entities in maps.