COB: deprecate unit/team/allyteam/global vars. Use lua functions instead

COB: deprecate unit/team/allyteam/global vars. Use lua functions instead

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

COB: deprecate unit/team/allyteam/global vars. Use lua functions instead

Post by Jools »

I realise 103 has been out for a couple of months but it's been vacation times, so here this comes now:

Basically the idea to deprecate unit variables in cob is problematic. Say you have a metal maker that has an unit variable called OPERATING. Now you need a gadget to keep track of unit state instead of doing it directly in the unit instance. It makes lua more spaghetti and even more unstable than it already is.

What's the recommended way wrt to the comment "Use lua functions instead"? And what was the benefit of deprecating something that's used a lot and that has been working for many years?

Ref: https://github.com/spring/spring/blob/m ... ngelog.txt
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: COB: deprecate unit/team/allyteam/global vars. Use lua functions instead

Post by hokomoko »

1) It was not used a lot, by any scale whatsoever.
2) The changes are trivial (Example, as I think your use in XTA is the same):
http://imolarpg.dyndns.org/trac/balatest/changeset/5198
Far from spaghetti
3) This allowed me to remove unnecessary code from the engine and make saved files smaller (some day they may even work)
Post Reply

Return to “Engine”