On 2013 Mar 1, at 2:50 AM, Jacob Nevins wrote: <snip>
> David Lowe writes: >> That's an interesting idea, but i don't know who would have the time >> and talent to submit such a patch. In order to be truly useful, it >> would have to enable the given unit to do almost anything the player >> could tell it to do - and prevent the script from having the unit do >> things the player couldn't tell it to do. It seems like that would >> require lots of hooks to accomplish all that. > > Permissions won't be a problem -- we already don't trust the client, so > a client-side script won't be able to do anything the player can't. > > But, yes, there is a fair amount of work required to define the actions > for client-side scripting to affect the game world. They can't all be > straight copies of the server methods (e.g. 'edit' module), because the > client doesn't get instant feedback; e.g. on the server, > edit.unit_move() returns whether the unit died; on the client, it will > merely trigger the dispatch of a network packet requesting that the unit > move, and in the natural implementation, when that returns to the script > we won't know if the move was even allowed; if the script wants to know > what happened to the unit it will have to watch for a signal triggered > by news of the unit's fate from the server (and in any case can't know > for sure that e.g. the unit's death was triggered by the script's > action). So client-side scripts are going to have to be written in a > much more open-loop style. I'm not sure if permissions is the word i would have used, but a rogue script could conceivably issue an order that couldn't even be given through the GUI. We may want to review our sanity-checking as part of this effort. sent from Lion Jayne: "Ten percent of nothin' is ... let me do the math here ... nothin' into nothin' ... carry the nothin' ... " _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev