Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Base Material
- - By Maikel Date 2014-04-16 13:15
I rewrote the BaseMaterial library and the engine regarding base materials a bit, to clean up some stuff and fix some other issues, the functions are now more consistently named:
* GetBaseMaterial(int plr, id def, int index, int category)
* DoBaseMaterial(int plr, id def, int change)
* GetBaseProduction(int plr, id def, int index, int category)
* DoBaseProduction(int plr, id def, int change)

And in your Scenario.txt:
* BaseMaterial=Clonk=2
* BaseProduction=Clonk=2

The engine implementation is now really obsolete and can be removed in my opinion, after I haven't received any bug complaints in the next two weeks, so please let me know if you find something or not.

P.S. for people working on other branches, be sure to adapt your scenarios if you have any, on master everything should be fine.
Parent - - By Clonkonaut [de] Date 2014-04-16 13:23
Not a big thing but what about SetBaseMaterial/Production?
Reply
Parent - By Maikel Date 2014-04-16 13:28
I will implement that as well, maybe after someone found a bug, it is on my todo! I also forgot to add a safety check for negative numbers, which I presume is in the engine but has not been coded by Randrian originally for the BaseMaterial library.

In any case that needs to go in as well.
Parent - - By Maikel Date 2014-04-17 17:04
Parent - By Clonkonaut [de] Date 2014-04-17 17:16
<3
Reply
Up Topic Development / Developer's Corner / Base Material

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill