Cooperation

Cooperation

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Cooperation

Post by AF »

Or rather the lack of it

Code: Select all

Modified:
  trunk/tools/unitsync/unitsync.cpp
  trunk/tools/unitsync/unitsync.h
  trunk/tools/unitsync/unitsync_api.h
Log:
* Mod/Map Options : 'section' option type added (key, name, description)
* each mod/map option can have a 'section' = sectionKey
The unitsync API is shared by numerous peopel runnign with different languages with different needs. Its fine if your saying maintaining language bindings and your the only project that uses that language, but otherwise this needs discussing, rather than cavalier ignorant changes.

This doesn't just go to satirik this goes to everybody. Show a little consideration for everyone else involved.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Cooperation

Post by Tobi »

Actually if you'd look at the diff you'd notice no APIs changed, from the looks of it it seems completely backwards compatible.

So I don't think there is an issue...

For reference, the diff:

Code: Select all

Index: unitsync_api.h
===================================================================
--- unitsync_api.h	(revision 6292)
+++ unitsync_api.h	(revision 6293)
@@ -66,6 +66,7 @@
 DLL_EXPORT int          __stdcall GetModOptionCount();
 DLL_EXPORT const char*  __stdcall GetOptionKey(int optIndex);
 DLL_EXPORT const char*  __stdcall GetOptionName(int optIndex);
+DLL_EXPORT const char* __stdcall GetOptionSection(int optIndex);
 DLL_EXPORT const char*  __stdcall GetOptionDesc(int optIndex);
 DLL_EXPORT int          __stdcall GetOptionType(int optIndex);
 DLL_EXPORT int          __stdcall GetOptionBoolDef(int optIndex);
Index: unitsync.cpp
===================================================================
--- unitsync.cpp	(revision 6292)
+++ unitsync.cpp	(revision 6293)
@@ -1070,8 +1070,9 @@
 	string key;
 	string name;
 	string desc;
+	string section;

-	string type; // "bool", "number", "string", "list"
+	string type; // "bool", "number", "string", "list", "section"

 	OptionType typeCode;

@@ -1116,6 +1117,8 @@
 		return false;
 	}
 	opt.desc = optTbl.GetString("desc", opt.name);
+
+	opt.section = optTbl.GetString("section", "");

 	opt.type = optTbl.GetString("type", "");
 	opt.type = StringToLower(opt.type);
@@ -1183,6 +1186,9 @@

 		opt.listDef = optTbl.GetString("def", opt.list[0].name);
 	}
+	else if (opt.type == "section") {
+		opt.typeCode = opt_section;
+	}
 	else {
 		return false; // unknown type
 	}
@@ -1299,6 +1305,13 @@
 	return GetStr(options[optIndex].name);
 }

+DLL_EXPORT const char* __stdcall GetOptionSection(int optIndex)
+{
+	if (InvalidOptionIndex(optIndex)) {
+		return NULL;
+	}
+	return GetStr(options[optIndex].section);
+}

 DLL_EXPORT const char* __stdcall GetOptionDesc(int optIndex)
 {
Index: unitsync.h
===================================================================
--- unitsync.h	(revision 6292)
+++ unitsync.h	(revision 6293)
@@ -35,11 +35,12 @@


 enum OptionType {
-	opt_error  = 0,
-	opt_bool   = 1,
-	opt_list   = 2,
-	opt_number = 3,
-	opt_string = 4
+	opt_error   = 0,
+	opt_bool    = 1,
+	opt_list    = 2,
+	opt_number  = 3,
+	opt_string  = 4,
+	opt_section = 5
 };
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Cooperation

Post by imbaczek »

I think AF means "what is this going to do/mean for the lobby". I personally have no idea.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Cooperation

Post by koshi »

modders will have the option to group their settings in sections and lobbies will have the option of respecting that
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Cooperation

Post by Satirik »

actually there is a new api : GetOptionSection (but you don't have to support sections to use the modoptions)

just added a new option type : 'section' in modoptions (key, name and description), and options can belong to a section (just add a section = 'section_key')

tested and it works
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

I would have preferred a tree based system along with descriptions for each node and arbitrary attributes that lobbies could use to help highlight them such as preferred ordering or file paths to icons in the VFS etc

However my point was not directed at the content satirik submitted but the principle of what he did. We are both part of a lobby ecosystem and should not waltz around like betalord did when he was the sole member of the ecosystem. He had an excuse, it was his prerogative, you don't. None of us do, except maybe Aegis.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Cooperation

Post by koshi »

If you consider sections of sections a tree than it's doable already, optional description for each node too. The total order of options in the lua file is preserved thru the unitsync interface, there you have the prefered ordering if modmakers adhere to that.
Btw, didn't you just the other day voice your opinion against mod defined Gui choices?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

Structure and styling are not the same thing.

It is the lobbies responsibility to style text and draw headers and GUI controls.

Think of it as the difference between CSS and html. html is for defining content, CSS is for beautifying that content. While I object to mods having to resort to inline html to do things the lobby should ahve done to begin with, sometimes there are things that content devs want to do that are structural, such as flagging options as important, adding icons, or defining heirarchies. The lobby cannot do this on its own, and they are not indicative of GUI fluff, as they can be represented in many different ways.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Cooperation

Post by Satirik »

AF : blabla i want blabla i'll do blabla in battlehub it will rox more blabla but i don't have freetime now, but be sure it will be released before the 12/09/2008

what AF actually thinks (think is a big word for AF but we also say game's AI think no ?) : WTH ??? a new features in TASClient, damn i must whine to slow it down so battlehub will have a chance to reach tasclient in 4 or 5years
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Re: Cooperation

Post by Agon »

Satirik, could you stop this?
The Battlehub team and Springlobby team only want a chance to be replace TASClient.
Why?
Because I (maybe they, too) think TASClient uses a old programming language which does not support Unicode. Only supports windows. And I want something new and faster.
And currently I do not miss much features on SpringLobby. Basically better torrent support and a notifying system.

Oh and AF simply be smarter than Satirik :wink:

And I think the end user should have the choose between the lobby clients.
If a description for each of the clients and a main description why the user can choose, is displayed. The user would not have a problem.

And what about cmake? Is it able to replace scons?

Edit:
AF's picture looks better than Satiriks :twisted:
Is the picture from Satirik allowed on this forum?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

My pictures a play on the word satirical
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Cooperation

Post by Satirik »

Agon wrote:Satirik, could you stop this?
The Battlehub team and Springlobby team only want a chance to be replace TASClient.
Why?
Because I (maybe they, too) think TASClient uses a old programming language which does not support Unicode. Only supports windows. And I want something new and faster.
And currently I do not miss much features on SpringLobby. Basically better torrent support and a notifying system.

Oh and AF simply be smarter than Satirik :wink:

And I think the end user should have the choose between the lobby clients.
If a description for each of the clients and a main description why the user can choose, is displayed. The user would not have a problem.

And what about cmake? Is it able to replace scons?

Edit:
AF's picture looks better than Satiriks :twisted:
Is the picture from Satirik allowed on this forum?
Image
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

Image
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Cooperation

Post by Hoi »

/clears buffer
/checks it out
/lols :P
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Cooperation

Post by Satirik »

Hoi wrote:/clears buffer
/checks it out
/lols :P
you couldn't understand, it's better that way
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Cooperation

Post by Hoi »

I already saw the picture :roll:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

One could say satiric that your avatar is racist
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Cooperation

Post by Tobi »

Can we please maintain a normal discussion and not refrain to image spamming and other crap not belonging on a forum for developers.

The original change was fine, ABI-wise, it didn't break any APIs, it is flexible, it is fully backwards compatible, it allows full hierarchies for structuring the options etc. So, props for that. One thing that could have been done better is the documentation though. (0% comments in the patch :-P)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Cooperation

Post by AF »

Its not the contents and the details of the change itself that I was objecting to, it was the principle of how he did it, or rather 'what he didnt do' that I object to. Namely discussion.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Cooperation

Post by Satirik »

AF wrote:One could say satiric that your avatar is racist
racist ? you have no idea where it comes from ? but if you see a picture of a black guy it's racist ... damn ooopsss i said black the forbidden word, i must be racist !! RETARDED ...that's what you are, if you have problems with black and racism it's not my problem

http://www.gougoule.com/bisous/ <= first video of AF in action
Post Reply

Return to “Engine”