New combined semaphore working style

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Quantom
Engineer
Engineer
Posts: 20
Joined: 13 Dec 2020 10:37
Location: Kyiv Ukraine

New combined semaphore working style

Post by Quantom »

Hello! Im think, that OpenTTD need have a new combined semaphore! Now (already on starting this teme) combined semaphore working this way - if ALL out semaphores are red, combined are red. I think we need new way - if ONE OF out semaphores are red, combined are red.
Now, you know what I want, I need say, I not have any experience whis developing OpenTTD, whis openGL. I'm know baze of C++ (but i think i need more C, becouse original code of combined semaphore was writed on C)
Can someone help me whis it?
Thanks
If you want make something, maki it yourself. If you want to maki it by programming, just get this task to another programmist :D
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: New combined semaphore working style

Post by Eddi »

i'm unsure why you would need that, but you could start from this ancient patch that also adds a new signal type: [will not apply, but might show the general gist of what to do]

viewtopic.php?f=33&t=26364

note that currently the signal types 0 through 5 are used, types 6 and 7 are unused and you can add without much trouble.
Quantom
Engineer
Engineer
Posts: 20
Joined: 13 Dec 2020 10:37
Location: Kyiv Ukraine

Re: New combined semaphore working style

Post by Quantom »

Thank you!
Realy, interesting Idea!
Becouse (if we imagine train signals as C code like: (if x [Some condition] y:) )
Now in this code we have only "AND" Like condition, NAND patch adds "NOT" condition, and I like add "OR" condition.
If you want make something, maki it yourself. If you want to maki it by programming, just get this task to another programmist :D
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: New combined semaphore working style

Post by Wahazar »

BTW, signal 6 is already used in JGRPP for programmed signals, I suggest to use 7 :)
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: New combined semaphore working style

Post by JGR »

McZapkie wrote: 13 Dec 2020 21:03 BTW, signal 6 is already used in JGRPP for programmed signals, I suggest to use 7 :)
You could easily create this behaviour using the existing programmable pre-signal functionality, such that you wouldn't need to add another signal type as well.

That said, it is not really a problem for two different patches to be using signal type 6 for different purposes.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: New combined semaphore working style

Post by odisseus »

Quantom wrote: 13 Dec 2020 11:00 I think we need new way - if ONE OF out semaphores are red, combined are red.
This can be achieved using just the existing types of signals.
Attachments
Wronnville Transport, Aug 13th, 2009-fs8.png
Wronnville Transport, Aug 13th, 2009-fs8.png (80.52 KiB) Viewed 1719 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 22 guests