View Issue Details

IDProjectCategoryView StatusLast Update
0002872FSSCPFREDpublic2014-06-29 23:02
ReporterFUBAR-BDHR Assigned ToFUBAR-BDHR  
PrioritylowSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.19 
Summary0002872: FRED should warn on invalid ship classes
DescriptionI believe this used to happen but was changed when checking was added to release builds of FS2_Open. Right now you get the message about ship or weapon classes not found but no info on what. Invalid ones in the team loadout do give a warning for each one it just seems to be individual ships in the mission that only print to the log. While this is good for release FRED need to give you the warning so you know what ship the problem is on without going through FRED2_Open.log which FRED has locked.
Steps To ReproduceDrop a ship in FRED. Save the mission. Edit the mission in notepad and change the class of the ship to something that doesn't exist. Do a file->new then reopen the altered mission in FRED.
TagsNo tags attached.

Activities

FUBAR-BDHR

2013-05-12 05:29

developer  

2872.patch (823 bytes)   
Index: missionparse.cpp
===================================================================
--- missionparse.cpp	(revision 9677)
+++ missionparse.cpp	(working copy)
@@ -2632,7 +2632,12 @@
 	find_and_stuff("$Class:", &p_objp->ship_class, F_NAME, Ship_class_names, Num_ship_classes, "ship class");
 	if (p_objp->ship_class < 0)
 	{
-		mprintf(("MISSIONS: Ship \"%s\" has an invalid ship type (ships.tbl probably changed).  Making it type 0\n", p_objp->name));
+		if (Fred_running) {
+			Warning(LOCATION, "Ship \"%s\" has an invalid ship type (ships.tbl probably changed).  Making it type 0\n", p_objp->name);
+		} 
+		else {
+			mprintf(("MISSIONS: Ship \"%s\" has an invalid ship type (ships.tbl probably changed).  Making it type 0\n", p_objp->name));
+		}
 
 		p_objp->ship_class = 0;
 		Num_unknown_ship_classes++;
2872.patch (823 bytes)   

FUBAR-BDHR

2013-05-12 05:30

developer   ~0015054

It's just a simple if/else but dropping it in code review in case there was some other reason for it not being a warning.

The_E

2014-06-26 15:36

administrator   ~0015920

Commited to trunk in r10841

Goober5000

2014-06-29 21:07

administrator   ~0015934

Yes, I changed it from a Warning to an mprintf in r4396 in order to make it less obtrusive. I figured that people could just look in the log file to find out the missing class name.

Related Changesets

fs2open: fs2_open_3_6_9 r4396

2008-01-17 02:44

Goober5000


Ported: N/A

Details Diff
warn users when they run a campaign under the wrong mod
Affected Issues
0002872
mod - /branches/fs2_open_3_6_9/fs2_open/code/fred2/freddoc.cpp Diff File
mod - /branches/fs2_open_3_6_9/fs2_open/code/globalincs/systemvars.cpp Diff File
mod - /branches/fs2_open_3_6_9/fs2_open/code/globalincs/systemvars.h Diff File
mod - /branches/fs2_open_3_6_9/fs2_open/code/mission/missionparse.cpp Diff File
mod - /branches/fs2_open_3_6_9/fs2_open/code/mission/missionparse.h Diff File
mod - /trunk/fs2_open/code/fred2/freddoc.cpp Diff File
mod - /trunk/fs2_open/code/globalincs/systemvars.cpp Diff File
mod - /trunk/fs2_open/code/globalincs/systemvars.h Diff File
mod - /trunk/fs2_open/code/mission/missionparse.cpp Diff File
mod - /trunk/fs2_open/code/mission/missionparse.h Diff File

fs2open: trunk r10841

2014-06-26 11:55

The_E


Ported: N/A

Details Diff
From FUBAR: Patch for Mantis 2872 (Make FRED emit a warning for invalid ship classes in a mission file) Affected Issues
0002872
mod - /trunk/fs2_open/code/mission/missionparse.cpp Diff File

Issue History

Date Modified Username Field Change
2013-05-12 05:29 FUBAR-BDHR New Issue
2013-05-12 05:29 FUBAR-BDHR Status new => assigned
2013-05-12 05:29 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-05-12 05:29 FUBAR-BDHR File Added: 2872.patch
2013-05-12 05:30 FUBAR-BDHR Note Added: 0015054
2013-05-12 05:30 FUBAR-BDHR Status assigned => code review
2014-06-26 15:36 The_E Note Added: 0015920
2014-06-26 15:36 The_E Status code review => resolved
2014-06-26 15:36 The_E Resolution open => fixed
2014-06-29 21:07 Goober5000 Note Added: 0015934
2014-06-29 23:00 Goober5000 Changeset attached => fs2open trunk r10841
2014-06-29 23:02 Goober5000 Changeset attached => fs2open fs2_open_3_6_9 r4396