Extend Wait Condition

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Pat4yczek
Inserter
Inserter
Posts: 46
Joined: Thu Aug 03, 2017 1:40 pm
Contact:

Extend Wait Condition

Post by Pat4yczek »

Hi there

I have problem

I want to make mod, which add a new wait condition "Next stop is enable"
What's gonna do?
Normally, when all stops are disable, train gonna skip this station and go to the next.
This wait condition gonna disable this feature.

Pat4yczek
Inserter
Inserter
Posts: 46
Joined: Thu Aug 03, 2017 1:40 pm
Contact:

Re: Extend Wait Condition

Post by Pat4yczek »

Continuation for topic:

For now if I think right need to extend gui-train and gui-train-wait-condition-description

Code: Select all

data.extend({
    {
        type = "gui-train"
        name = "add-next-stop-enable-condition"
    }
    {
        type = "gui-train-wait-condition-description"
        name = "next-stop-enable"
    }
})
and I make code for local/en

Code: Select all

[gui-train]
add-next-stop-enable-condition=Next stop is enable

[gui-train-wait-codtition-description]
next-stop-enable=__1__ is __2__

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Extend Wait Condition

Post by Rseding91 »

I don't see this happening.
If you want to get ahold of me I'm almost always on Discord.

Pat4yczek
Inserter
Inserter
Posts: 46
Joined: Thu Aug 03, 2017 1:40 pm
Contact:

Re: Extend Wait Condition

Post by Pat4yczek »

A very helpful motivation I see...
I see this code can't work, so for now I gonna make new class that's be inherrit from LuaTrain.
I'm not familliar with lua, but if I can make classes, so properties can make too.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Extend Wait Condition

Post by Rseding91 »

I don't think you understand how modding in Factorio works. Have you done any tutorials yet?

There is no creation of new classes or extending base game classes. There is only using the mod API as it's provided and the classes the game provides.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding interface requests”