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 Jul 19 00:41:49 2012  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Sun Jul 22 13:52:45 2012, 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 Jul 21 00:28:48 2012, 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 Jul 20 23:50:33 2012, 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 Jul 20 23:45:40 2012, 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 Jul 19 00:41:49 2012, 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):

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.


    Error: not logged in



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Jul 22 13:54:04 2012jtnStatusReady For Test=>Fixed
    Sat Jul 21 00:28:48 2012jtnAttached 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