Skip to content

Commit 10ff64e

Browse files
authored
Tune ups for standalones (scp-fs2open#7315)
* Tune ups for standalones Fixes two warnings from building in standalone and also provide, also adds needed function to actually tell if game is in standalone mode. * better fix for armor flags
1 parent 240a912 commit 10ff64e

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

code/scripting/api/libs/base.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,14 @@ ADE_FUNC(inDebug, l_Base, nullptr, "Determines if FSO is running in Release or D
614614
#endif
615615
}
616616

617+
ADE_FUNC(inStandalone, l_Base, nullptr, "Determines if FSO is running in Standalone mode or not", "boolean", "true if standalone, false otherwise") {
618+
if (Is_standalone) {
619+
return ADE_RETURN_TRUE;
620+
} else {
621+
return ADE_RETURN_FALSE;
622+
}
623+
}
624+
617625
ADE_FUNC(isEngineVersionAtLeast,
618626
l_Base,
619627
"number major, number minor, number build, [number revision = 0]",

code/scripting/api/objs/ship.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "object/objectdock.h"
3636
#include "parse/parselo.h"
3737
#include "playerman/player.h"
38-
#include "scripting/api/objs/message.h"
3938
#include "ship/ship.h"
4039
#include "ship/shipfx.h"
4140
#include "ship/shiphit.h"

code/ship/ship.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21086,6 +21086,7 @@ void parse_armor_type()
2108621086
stuff_string(name_buf, F_NAME, NAME_LENGTH);
2108721087

2108821088
tat = ArmorType(name_buf);
21089+
tat.flags = 0;
2108921090

2109021091
//now parse the actual table (damage type/armor type pairs)
2109121092
tat.ParseData();

0 commit comments

Comments
 (0)