[NoGo] GSGoal after bankrupt
Moderator: OpenTTD Developers
[NoGo] GSGoal after bankrupt
I have a big problem:
I made a script with GSGoal, and all company have specific goals (goal1).
If a company go to bankrupt, then the goal1 automatically destroyed by the OpenTTD.
Then when someone does a new company, this new company was become the goal1.
And I can't remove easy this.
Exist a list what have the all goals?
I made a script with GSGoal, and all company have specific goals (goal1).
If a company go to bankrupt, then the goal1 automatically destroyed by the OpenTTD.
Then when someone does a new company, this new company was become the goal1.
And I can't remove easy this.
Exist a list what have the all goals?
Sorry my bad english, I don't speak english!
Re: [NoGo] GSGoal after bankrupt
Currently it is up to GSes to Clean up when a company goes bankrupt. My personal opinion is that it would be better if OpenTTD removed company specific goals when a company goes bankrupt due to the asynchronous behaviour of GSes. Having a new player see old goals etc for a previous company is worse in my opinion than that he/she have to wait some time for them to be created.
I have a patch in preparation to change this in my goal GUI/story book patch queue.
I have a patch in preparation to change this in my goal GUI/story book patch queue.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] GSGoal after bankrupt
Ok, I solved my problem. I wrote wrong code, with GSEventCompanyBankrupt.
But this is interesting, if I don't remove goal from bankrupted company, the nem company receive this goal. I think the new company receive the old company's ID.
sorry I not found the GSes documentation.
But this is interesting, if I don't remove goal from bankrupted company, the nem company receive this goal. I think the new company receive the old company's ID.
sorry I not found the GSes documentation.
Sorry my bad english, I don't speak english!
Re: [NoGo] GSGoal after bankrupt
As of r24986, company specific goals will now be removed when a company goes bankrupt. (this also applies to company monitors)
This behaviour have been included in the documentation of GSGoal and GSCargoMonitor, just hold on until the next time the public API docs are updated.
(note that as of writing this, there is no nightly yet that contains this change)
This behaviour have been included in the documentation of GSGoal and GSCargoMonitor, just hold on until the next time the public API docs are updated.
(note that as of writing this, there is no nightly yet that contains this change)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] GSGoal after bankrupt
Will r24986 be included in Ver. 1.3?
(It would be nice for me to know, this little change would be a lot of work (saved) for me)
(It would be nice for me to know, this little change would be a lot of work (saved) for me)
Re: [NoGo] GSGoal after bankrupt
yep, there is no 1.3 branch yet
Re: [NoGo] GSGoal after bankrupt
Also, see this thread where I've written a bit on this change. Especially, if you plan to support OpenTTD 1.2, its a good idea to read through that post.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 5 guests