Just throwing this out here, feedback plz.

Started by jacob814, April 23, 2016, 09:38:25 AM

Previous topic - Next topic

jacob814

Would it be possible to have a battery emit light only when it has power using pure xml?
My Mods:
Glass&Lights

skullywag

Define "has power".

If you mean when it contains power (stored) no, that would require some c#.

If you mean when its Comp Power is receiving power then yes. Just add a compglower like a lamp has on it. You might be able to set the power trader comp (youll need that as well) to produce 0 power as its a battery.

Totally off the top of my head though...
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

jacob814

Quote from: skullywag on April 23, 2016, 09:44:25 AM
Define "has power".

If you mean when it contains power (stored) no, that would require some c#.

If you mean when its Comp Power is receiving power then yes. Just add a compglower like a lamp has on it. You might be able to set the power trader comp (youll need that as well) to produce 0 power as its a battery.

Totally off the top of my head though...

I am guessing because it uses a different thingClass because a battery uses Building_Battery and the CompProperties_Power uses the Building thing Class... Darn.

Would it be possible to combine the two thingClasses, I know a little of Java and as long as the right functions are in the class, there would be no problem right?
My Mods:
Glass&Lights

skullywag

no a comp can be added to anything that ticks. i think you misunderstood what i wrote.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

jacob814

Quote from: skullywag on April 23, 2016, 09:56:17 AM
no a comp can be added to anything that ticks. i think you misunderstood what i wrote.

So let me try to understand, a building can't use power from itself but from an outside network. I was just thinking of something like an emergency light that would stay on as long as it's internal power supply doesn't run out. C# is not my forte...
My Mods:
Glass&Lights

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Toggle

Quote from: jacob814 on April 23, 2016, 10:00:26 AM
Quote from: skullywag on April 23, 2016, 09:56:17 AM
no a comp can be added to anything that ticks. i think you misunderstood what i wrote.

So let me try to understand, a building can't use power from itself but from an outside network. I was just thinking of something like an emergency light that would stay on as long as it's internal power supply doesn't run out. C# is not my forte...

Could always just hook up a lamp beside it. Not as pretty, but would still function the same.
Selling broken colonist souls for two thousand gold. Accepting cash or credit.

jacob814

Quote from: Z0MBIE2 on April 23, 2016, 04:48:43 PM
Quote from: jacob814 on April 23, 2016, 10:00:26 AM
Quote from: skullywag on April 23, 2016, 09:56:17 AM
no a comp can be added to anything that ticks. i think you misunderstood what i wrote.

So let me try to understand, a building can't use power from itself but from an outside network. I was just thinking of something like an emergency light that would stay on as long as it's internal power supply doesn't run out. C# is not my forte...

Could always just hook up a lamp beside it. Not as pretty, but would still function the same.

Ya but I was thinking of something for my mod... If someone could help me with this I would be indebted...
My Mods:
Glass&Lights

Illusion Distort

Give me a minute or two, im on it *insert picture of solider standing at attention*

Stalker102

look up the fuel generator code should help you some as it only emits light when resource is in it.
Life has many Bridges. Don't burn the ones you crossed

Illusion Distort

So... The way buildings are coded is that there is a different class for most of the advanced once, that means that a building cannot behave as two classes at the same time. (i dont know whether or not this is right).
So if you want a building to behave a spesific way, you need to make a .dll that describes how this battery/lamp handles input and gloweffects. (really just anything that you want it to do)

If i am wrong in saying this, then please correct me, i'd love to know rather than be uncertian. :*