Open Chaoschaot232 opened 2 years ago
This is provided by Mafi.DurationExtensions.Seconds()
which is an extension of int
. You can see the definitions if you look at the binaries Mafi.Base
and Mafi.Core
in a .NET inspector. Can be written as
Mafi.DurationExtensions.Seconds(60);
60.Seconds();
The SetDuration
takes Duration
as parameter, not two different parameters (20
and Seconds()
- which by the way makes no sense that Seconds would be a lone function parameter, maybe if it was Seconds(20)
but not 20, Seconds()
)
Hey MaFi Games Team,
I am interested in modding or maybe helping out with your game so I looked into your example code and found a red marked line: https://github.com/MaFi-Games/Captain-of-industry-modding/blob/main/src/ExampleMod/ExampleMachineData.cs#L39
Now my questen here is, if this code is valid syntax or if Github is right in marking it red and as an error 🤔 Looking at the lines above I wouold assoume that Github wants it like that:
But what is correct and what not? Sometime it is correct and working incl. compiling the code but it could also be wrong and this confuses me a little bit. Would be nice to get feedback on this :)
Cheer and keep up the good work 👋 🥂