CobFileName

CobFileName

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
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

CobFileName

Post by Argh »

Just wanted to give a shout-out for this:

New UnitDef tag: cobfilename

Thanks for putting that in, jK, that will save me soooooo much repetitious crap with World Builder, and make things a lot easier to maintain.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: scriptName

Post by lurker »

Heh, read the svn log again before you post. jK had basically overwritten the scriptname tag I added a couple weeks ago, and has removed it. You're welcome though :P
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: CobFileName

Post by Argh »

Oh :oops:

Whew! The one above means it just changed names, basically.

So:

std::string scriptName; // the name of the unit's script, e.g. "armjeth.cob"
std::string scriptPath; // the path of the unit's script, e.g. "scripts/armjeth.cob"

Yay, this is very cool, can't wait to be able to drop about 50 duplicate scripts from World Builder...
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: CobFileName

Post by lurker »

To be clear, it doesn't actually read scriptPath; that one is there so you don't have several places appending "scripts/", and for future flexibility or something, I don't remember.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: CobFileName

Post by Nemo »

Great success!


Thanks a ton for this, means I can maintain 1/4th as many infantry scripts.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Re: CobFileName

Post by quantum »

Yay for units created in unitdefs_post!
Post Reply

Return to “Engine”