Author Topic: [patch] factoryeditor gui: producer/consumer dependencies  (Read 7576 times)

0 Members and 1 Guest are viewing this topic.

Offline smu42

[patch] factoryeditor gui: producer/consumer dependencies
« on: March 16, 2009, 10:13:55 PM »
Hey folks,

I wrote a small patch which is IMO especially helpful for beginners.
It shows for a given factory f:
- A list of factories that produce the goods which are needed by f.
- A list of factories that consume the goods which are produced by f.

I have tested this patch with ubuntu linux with pak64: no known problems.

I'd like to make these lists clickable: If you click on a factory, it should be selected in the list on the left of the window.
BUT: The interface could be better in general. Maybe s.o. can help me out here.

There are two new translations ("factories producing " & "factories needing "), but I don't know were to add them (pak dependent?).
Is there a way to translate sentences? "factories producing X" would be "Fabriken, die X produzieren" in German.

smu42

[Edit: fixed tabs/spaces in patch]
« Last Edit: March 16, 2009, 11:44:34 PM by smu42 »

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #1 on: March 16, 2009, 10:55:08 PM »
Hi! Welcome to the forum.

As to the patch... Sorry, i am not very active programmer at the moment. The improvements look nice. As you say, interface could be better ;) Apart from clickable links, I think it might be good to allow hiding these texts (show on/off).

A side note - you use spaces for indenting, while the original code uses tabs. That is source of some changes listed in diff, while nothing changed on these lines.

Translations have to be added separately. Let's leave that for when it is decided to add this?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline z9999

Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #2 on: March 17, 2009, 04:45:04 AM »
My first version of map ediotr have had this.
But prissi removed this when merged in simutrans.  :(
http://archive.forum.simutrans.com/topic/03405.0/index.html#msg60581

Offline smu42

Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #3 on: March 17, 2009, 11:19:46 AM »
Well, thats odd. But I think the main reason is the "bad interface" but not the idea. (Although z9999s gui was better than mine)

Prissi, if you don't like it this way, could you give me some hints? I'm not very good at designing interfaces, but I can certainly do the programming.

Ideas:
1) Hide/Show button. (simple implementation)
2) No texts. Add a filter filtering all factories which are supplier or consumer of f and show them in the window on the left. (a bit more complicated)
3) [insert your idea here]
« Last Edit: March 22, 2009, 05:55:22 PM by smu42 »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #4 on: March 23, 2009, 02:15:54 PM »
Not sure, need to look more at the code. I certainly want to have the interface as less cluttered as possible. The information what factories can deliver is imho not most urgent, as generally the editor is only to be used for building scenarios and not during real games, as it will mess up the industry balance. This was the reason I left it out of the code. But zou are under considerated thus there is hope.

Chanching UI is time coonsuming, as those strings need to be put into svn and so on ...

Offline smu42

Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #5 on: March 23, 2009, 08:19:56 PM »
Not sure, need to look more at the code.

I read that as "I will contact you, when I have detailed information"


I certainly want to have the interface as less cluttered as possible.

I agree. IMO the On/Off button is the best solution in that case.


The information what factories can deliver is imho not most urgent, as generally the editor is only to be used for building scenarios and not during real games, as it will mess up the industry balance.

I disagree. Yes, the info is not "most urgent" but very helpful.
There are also users that place each factory with this editor (I do this at least from time to time). It's just another way of playing simutrans.


But zou are under considerated thus there is hope.

 :D


Chanching UI is time coonsuming, as those strings need to be put into svn and so on ...

If I would have infos about this, I would definitely help, but I haven't.

Yes, I do want this "feature" in simutrans :)

We could discuss the details in German, if you prefer.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #6 on: June 02, 2009, 09:14:15 PM »
Did someone save the patch?

Offline smu42


Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 3957
  • Total likes: 148
  • Helpful: 71
  • Lost In Stupid Parenthesis
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #8 on: June 04, 2009, 08:59:56 PM »
Here it is again.

Thanks. I hope Prissi finds it.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #9 on: September 06, 2009, 06:38:41 AM »
Patch seems gone again ...

Offline Frank

Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #10 on: September 06, 2009, 09:13:44 AM »
Patch seems gone again ...

save time by patches.simutrans-germany.com 30 days

EDIT changed to 90 days
« Last Edit: September 06, 2009, 09:21:03 AM by Frank »

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: [patch] factoryeditor gui: producer/consumer dependencies
« Reply #11 on: September 06, 2009, 09:15:54 AM »
I don't have this one saved :( But smu42 is active reader, so there is hope :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!