15 static bool making =
true;
26 const string &filename,
28 const string &fullname,
31 std::string customizedUnit,
39 assert( netcreate != 0 );
46 netbuf.
addString( flightgroup != NULL ? flightgroup->
name : std::string(
"Object" ) );
75 cerr<<
"NETCREATE UNIT : "<<
file<<
" ("<<serial<<
")"<<endl;
78 if ( facname.empty() ) {
80 cerr<<
" Unit has an invalid faction "<<faction<<endl;
84 if ( !fname.empty() ) {
88 "default", 1, 1,
"",
"",
mission );
108 const char *filename,
111 const vector< string > &dest,
115 const std::vector< GFXLightLocal > &ligh,
136 for (
unsigned int i = 0;
i < dest.size();
i++)
142 for (
unsigned int j = 0;
j < ligh.size();
j++)
164 vector< string >dest;
165 unsigned short nbdest = netbuf.
getShort();
167 for (i = 0; i < nbdest; i++) {
169 char *ctmp =
new char[tmp.length()+1];
170 ctmp[tmp.length()] = 0;
171 memcpy( ctmp, tmp.c_str(), tmp.length() );
172 dest.push_back( ctmp );
178 vector< GFXLightLocal >
lights;
179 unsigned short nblight = netbuf.
getShort();
180 for (i = 0; i < nblight; i++)
185 if ( facname.empty() ) {
187 cerr<<
" Planet "<<
file<<
" has an invalid faction "<<faction<<endl;
191 char insideout = netbuf.
getChar();
193 cerr<<
"NETCREATE PLANET : "<<
file<<endl;
196 file,
string(),
string(),
202 const char *unitfile,
233 cerr<<
"NETCREATE NEBULA : "<<
file<<endl;
236 if ( facname.empty() ) {
238 cerr<<
" Nebula has an invalid faction "<<faction<<endl;
246 const string &filename,
248 const string &fullname,
250 const string &modifications,
257 float detonation_radius,
273 netbuf.
addFloat( detonation_radius );
296 const float damage( netbuf.
getFloat() );
297 float phasedamage = netbuf.
getFloat();
299 float radialeffect = netbuf.
getFloat();
301 float detonation_radius = netbuf.
getFloat();
302 const string modifs( mods );
304 cerr<<
"NETCREATE MISSILE : "<<
file<<
" ("<<serial<<
")"<<endl;
307 if ( facname.empty() ) {
309 cerr<<
" Missile has an invalid faction "<<faction<<endl;
313 file.c_str(),
faction, modifs, damage, phasedamage, time, radialeffect, radmult, detonation_radius, serial );
324 const char *filename,
355 cerr<<
"NETCREATE ASTEROID : "<<
file<<endl;
358 if ( facname.empty() ) {
360 cerr<<
" Asteroid has an invalid faction "<<faction<<endl;
379 if (allowSystemTypes)
383 if (allowSystemTypes)