Made many attributes optional.
This commit is contained in:
parent
1fbf31e56c
commit
13344ddc06
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name" : "Civilian",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2,
|
||||
"reloadTime" : 0,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/craft/civilian01.png",
|
||||
"flags" : "EF_MISSION_TARGET+EF_RETREATING+EF_TAKES_DAMAGE",
|
||||
"aiFlags" : "AIF_GOAL_JUMPGATE+AIF_AVOIDS_COMBAT+AIF_FOLLOWS_PLAYER"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "INF Tug",
|
||||
"health" : 50,
|
||||
"shield" : 0,
|
||||
"speed" : 1.85,
|
||||
"reloadTime" : 10,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/craft/infTug.png",
|
||||
"flags" : "EF_HAS_ROPE+EF_TAKES_DAMAGE",
|
||||
"aiFlags" : "AIF_AVOIDS_COMBAT+AIF_TOWS"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
"shield" : 50,
|
||||
"speed" : 1.5,
|
||||
"reloadTime" : 10,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/craft/munitionsTransport.png",
|
||||
"flags" : "EF_TAKES_DAMAGE",
|
||||
"aiFlags" : "AIF_AVOIDS_COMBAT"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"health" : 15,
|
||||
"shield" : 15,
|
||||
"speed" : 2,
|
||||
"reloadTime" : 0,
|
||||
"shieldRechargeRate" : 60,
|
||||
"texture" : "gfx/craft/shuttle.png",
|
||||
"flags" : "EF_COLLECTS_ITEMS+EF_TAKES_DAMAGE+EF_NO_EPIC",
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "Tug",
|
||||
"health" : 50,
|
||||
"shield" : 0,
|
||||
"speed" : 1.85,
|
||||
"reloadTime" : 10,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/craft/tug.png",
|
||||
"guns" : [
|
||||
{
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "CannonDart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2.1,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"guns" : [
|
||||
{
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "Dart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2.1,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"guns" : [
|
||||
{
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "MissileDart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2.1,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"missiles" : 999,
|
||||
"flags" : "EF_TAKES_DAMAGE"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "SimpleDart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2.1,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"guns" : [
|
||||
{
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "StaticDart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 0,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"flags" : "EF_TAKES_DAMAGE"
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name" : "UnarmedDart",
|
||||
"health" : 15,
|
||||
"shield" : 0,
|
||||
"speed" : 2.1,
|
||||
"reloadTime" : 24,
|
||||
"shieldRechargeRate" : 0,
|
||||
"texture" : "gfx/fighters/dart01.png",
|
||||
"flags" : "EF_TAKES_DAMAGE"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name" : "Clarke Defence #5",
|
||||
"description" : "",
|
||||
"requires" : 28,
|
||||
"background" : "gfx/backgrounds/background06.jpg",
|
||||
"planet" : "gfx/planets/bluePlanet.png",
|
||||
"music" : "music/battle/heroism.ogg",
|
||||
"unwinnable" : 1,
|
||||
"objectives" : [
|
||||
{
|
||||
"description" : "Eliminate all enemy forces",
|
||||
"targetName" : "Enemy",
|
||||
"targetValue" : 1,
|
||||
"targetType" : "TT_DESTROY",
|
||||
"isEliminateAll" : 1
|
||||
}
|
||||
],
|
||||
"player" : {
|
||||
"type" : "Lynx",
|
||||
"side" : "SIDE_ALLIES",
|
||||
"pilot" : "-",
|
||||
"squadron" : "-",
|
||||
"x" : 25,
|
||||
"y" : 45
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name" : "Rebel Assault #1",
|
||||
"description" : "",
|
||||
"requires" : 28,
|
||||
"requires" : 99,
|
||||
"background" : "gfx/backgrounds/background03.jpg",
|
||||
"planet" : "gfx/planets/spirit.png",
|
||||
"music" : "music/battle/InnerCore_Low.ogg",
|
||||
|
|
|
@ -676,10 +676,10 @@ static void loadFighterDef(char *filename)
|
|||
STRNCPY(e->name, cJSON_GetObjectItem(root, "name")->valuestring, MAX_NAME_LENGTH);
|
||||
STRNCPY(e->defName, e->name, MAX_NAME_LENGTH);
|
||||
e->health = e->maxHealth = cJSON_GetObjectItem(root, "health")->valueint;
|
||||
e->shield = e->maxShield = cJSON_GetObjectItem(root, "shield")->valueint;
|
||||
e->shield = e->maxShield = getJSONValue(root, "shield", 0);
|
||||
e->speed = cJSON_GetObjectItem(root, "speed")->valuedouble;
|
||||
e->reloadTime = cJSON_GetObjectItem(root, "reloadTime")->valueint;
|
||||
e->shieldRechargeRate = cJSON_GetObjectItem(root, "shieldRechargeRate")->valueint;
|
||||
e->reloadTime = getJSONValue(root, "reloadTime", 0);
|
||||
e->shieldRechargeRate = getJSONValue(root, "shieldRechargeRate", 0);
|
||||
e->texture = getTexture(cJSON_GetObjectItem(root, "texture")->valuestring);
|
||||
|
||||
SDL_QueryTexture(e->texture, NULL, NULL, &e->w, &e->h);
|
||||
|
|
Loading…
Reference in New Issue