
C4Object::BuyEnergy() - refills Clonks energy inside bases for a reasonable price
C4Object::ExecBase() - apparently removes the snow on the base
I'll post more over the time.

> C4Object::ExecBase() - apparently removes the snow on the base
I already removed everything else that function did, because that has been reimplemented in script. Snow-removal is probably best kept in the engine for performance reasons, so there's nothing to do here anymore, except possibly renaming the function.
> C4Object::BuyEnergy()
That function is already gone, in the same commit as the above.

2336 // Energy shortage
2337 if (NeedEnergy) if (::Game.iTick35>12) if (eDrawMode!=ODM_BaseOnly)
2338 {
2339 C4Facet &fctEnergy = ::GraphicsResource.fctEnergy;
2340 int32_t tx=cox+Shape.Wdt/2-fctEnergy.Wdt/2, ty=coy-fctEnergy.Hgt-5;
2341 fctEnergy.Draw(cgo.Surface,cgo.X+tx,cgo.Y+ty);
2342 }
along with NeedEnergy
This draws the red lightning symbol above the object when it's out of energy.

That depends on how the Command system will look in the future, at the moment the Energy command is completely broken. Things that can at least be removed are the OCFs and C4Ds related to power but not to lines. ObjectComDigDouble and ObjectComLineConstruction should probably be reimplemented in C4Script, and are obsolete as such. C4Player::PlaceReadyBase is broken, but do we need this in the future. And the command Build is partly broken since it depends on Energy. And probably something I missed.

>removed are the OCFs
Why are the OCFs not used instead of the functions "IsPowerConsumer return 1"?
>C4Ds
Are there any?
>ObjectComDigDouble and ObjectComLineConstruction
>C4Player::PlaceReadyBase
What are these used for?
----
and I am also talking about the act map entry "energyusage" and the related checks in the engine. Plus all this energy management for structures.
OCFs are based on LineConnect C4Ds, and these are specified in the Defcore. If one makes a new building only including the power consumer would not be enough, one would need additional defcore changes. I don't know what is prefered, keeping the OCFs or not.
The first is what happens on double dig with a clonk, i.e. Activate calls in the first held object, Checking for trees, Checking for linekits to be disconnected, Activate call inside the clonk itself. Line construction handles linekit connection, i.e. power lines, drain and source pipes, although this is never called in praxis.
PlaceReadyBase is used to generate the base when you select multiple buildings in scenario.txt, it also includes powerline connection.
Seems to be obsolete.
>>ObjectComDigDouble and ObjectComLineConstruction
>>C4Player::PlaceReadyBase
>What are these used for?
The first is what happens on double dig with a clonk, i.e. Activate calls in the first held object, Checking for trees, Checking for linekits to be disconnected, Activate call inside the clonk itself. Line construction handles linekit connection, i.e. power lines, drain and source pipes, although this is never called in praxis.
PlaceReadyBase is used to generate the base when you select multiple buildings in scenario.txt, it also includes powerline connection.
>and I am also talking about the act map entry "energyusage" and the related checks in the engine. Plus all this energy management for structures.
Seems to be obsolete.

No need for a new thread. I removed GetTaggedPlayerName from the engine, and reimplemented it in C4Script. Also extended it and the already available GetPlayerByName to Teams. I hope I exported it right. Would be useful if someone could test/commit it.
ISC licence is understood.
ISC licence is understood.
Attachment: TaggedPlayer.patch (8k)

> I hereby license the following file(s) under the CC-by license
Since this is the blanket statement the forum adds, I'd like to have this clarified: Is this patch CC-by or ISC (furthermore, what's our preferred license for scripts)?

I hereby license the following file(s) under the CC-by license for artwork or the ISC license for scripts




http://bitbucket.org/guenther/openclonk/changeset/ad89db429c5d
I'd appreciate reviews and/or tests.



If you're about it: Make
GetID()
obsolete and disallow reuse of player numbers.

Anything to do with settlement scores can be removed from the engine, since it is not displayed in the hud anymore. It is also easy to reimplement with C4Script. It still appears in the evaluation after the game.

Then objects/scenarios can still use the score, but do it on a more meaningful basis. For example, goal objects could give you score based on the difficulty of the goal.


Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill