Sarbian changed the topic of #kspmodding to: Welcome to #kspmodding - the channel for discussing, and learning about, modding Kerbal Space Program. Code of Conduct: https://git.io/vSQh6 | Always provide logs. | *** PSA: https://kerbalspaceprogram.com/api/index.htm | Someone is writting a Phd dissertation on KSP modding please fill out this survey https://goo.gl/forms/1vrkPYH4az8l32sb2 - I have met him and it s legit
egg is now known as egg|zzz|egg
blowfish has joined #kspmodding
Olympic1 has quit [Ping timeout: 186 seconds]
N70 is now known as N70|zzz
xEvilReeperx has quit [Quit: Web client closed]
pizzaoverhead_ has joined #kspmodding
pizzaoverhead has quit [Ping timeout: 186 seconds]
pizzaoverhead_ has quit [Read error: Connection reset by peer]
pizzaoverhead_ has joined #kspmodding
BasharMilesTeg_ is now known as BasharMilesTeg
Ezriilc has quit [Ping timeout: 186 seconds]
blowfish has quit [Quit: Leaving]
Olympic1 has joined #kspmodding
pizzaoverhead_ has quit [Ping timeout: 198 seconds]
pizzaoverhead has joined #kspmodding
Orum has joined #kspmodding
N70|zzz is now known as N70
pizzaoverhead has quit [Quit: Leaving]
<N70> anyone here know alot about MKS?
SigmaAway has quit [Ping timeout: 207 seconds]
SigmaAway has joined #kspmodding
Ezriilc has joined #kspmodding
<Orum> is terms of playing with it or modding for/with it?
Orum has quit [Read error: Connection reset by peer]
<N70> making a patch for it
<N70> to add support for kerbalism
<N70> wait, DO you know, Orum?
<N70> oh
egg has joined #kspmodding
lamont has quit [Remote host closed the connection]
egg has quit [Read error: Connection reset by peer]
egg|zzz|egg has quit [Read error: Connection reset by peer]
egg has joined #kspmodding
<N70> Question
<N70> how do I get all of a module's submodules of a certain type
blowfish has joined #kspmodding
<N70> how do I get all of a module's submodules of a certain type?
<BenjaminK> in what way?
<BenjaminK> code?
<N70> yes
<N70> I want, with a Greenhouse module, get all of the submodules of the type "GreenhouseMode"
<BenjaminK> so all inherited members?
<N70> yes
<BenjaminK> I'm sure there's somrtjing like 'object.inheritsFrom()'
<N70> I was doing "GetComponents<GreenhouseMode>()"
<N70> BenjaminK, no
<N70> i mean like submodules
<BenjaminK> …
<BenjaminK> hmm
<N70> like MODULE { name = A MODULE { name = B } }
<BenjaminK> yes
<N70> i want to get B from A's code
<BenjaminK> yes
<BenjaminK> actually, I'm not sure how one would do that
<BenjaminK> do submodules exist as subclasses too?
<BenjaminK> or inherited classes :p
<N70> hmmm
lamont has joined #kspmodding
lamont has quit [Client Quit]
BenjaminK has quit [Ping timeout: 383 seconds]
<blowfish> N70: is A a class you're writing?
<N70> A and B are both PartModules
<blowfish> you can't nest PartModules
<blowfish> at least not without a lot of custom handling
<N70> how do I make a custom "mode" for a module
<blowfish> what do you mean?
<blowfish> specifics might be useful here
<N70> like MODULE { name = Greenhouse GreenhouseMode { } }
<blowfish> You will have to turn those things into C# objects in OnLoad and then do what you want with them in the module's code
<N70> how would i do so
<blowfish> not trivial to explain
<blowfish> I'd recommend looking at other mods' code to understand what's going on
<N70> example?
<N70> blowfish, can you give me an example of another mod
<blowfish> trying to think of a simple one
<blowfish> are you aware of any modules that have a similar data structure?
<N70> Not really
<N70> no
<blowfish> hmm
<blowfish> well here's some recommended reading regardless: https://forum.kerbalspaceprogram.com/index.php?/topic/145340-the-lifecycle-of-a-part-module-a-primer/
egg is now known as egg|afk|egg
<N70> also, blowfish, do you know how to take advantage of variants in ksp 1.4
<blowfish> somewhat
<blowfish> you can stuff custom data in them, but you have to listen for variant change events in another module and then retrieve that data
<N70> ohk
blowfish has quit [Quit: Leaving]
egg|afk|egg is now known as egg
egg is now known as egg|zzz|egg