bugFreeciv - Bugs: bug #19957, Move Lua tile:set_label() from...

 
 
Show feedback again

bug #19957: Move Lua tile:set_label() from tolua_game to tolua_server

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Thu 19 Jul 2012 12:41:49 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 22 Jul 2012 01:52:45 PM UTC, SVN revision 21600:

Move Lua set_label() method from the "game" to the "server" suite,
since it doesn't make much sense on the client.

See gna bug #19957.

(Browse SVN revision 21600)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 21 Jul 2012 12:28:48 AM UTC, comment #3:
  • Invent edit.tile_set_label().
  • Remove bool return value from Tile:set_label() (which indicates whether the tile was changed, not much use to a script)
    • This highlights that the script function doesn't push updates to the client. Not completely trivial to fix, so punted to bug #19962.

(file #16147)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 20 Jul 2012 11:50:33 PM UTC, comment #2:

> Just wanted to check there wasn't some plan for client-side
> private labels.


While per-player labels would make sense, they too, if ever implemented, must go to server side to be added in savegames.

Marko Lindqvist <cazfi>
Project Administrator
Fri 20 Jul 2012 11:45:40 PM UTC, comment #1:

It's easy enough to fix this, but can I first check that the intent wasn't to make this available on the client?

Entering something like find.tile(0,0):set_label("Hello") in the client Lua console does actually "work" at the moment, in that the label appears on the map, but it tends not to show up until you've scrolled the map around about, and of course it doesn't go to other players, and is likely to be obliterated at some point by a server update.

Just wanted to check there wasn't some plan for client-side private labels.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Thu 19 Jul 2012 12:41:49 AM UTC, original submission:

Patch #3136 added the tile:set_label() method to tolua_game.pkg. This is used for both server- and client-side scripting. Since this an "edit" rather than "read" function, it should probably only be available on the server (tolua_server.pkg) -- while it can be invoked on the client, it doesn't seem very useful to do so.

For consistency, it might want to appear in the 'edit' module too.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16147:  trunk-lua-tile-set-label-server.patch added by jtn (5kB - text/x-diff - trunk r21593)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Jul 2012 01:54:04 PM UTCjtnStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 21 Jul 2012 12:28:48 AM UTCjtnAttached File-=>Added trunk-lua-tile-set-label-server.patch, #16147
      StatusNone=>Ready For Test
      Assigned toNone=>jtn
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup