Skip to content

Commit

Permalink
Melons, map, knapsack #712
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Jul 4, 2024
1 parent 60afe48 commit cbb8cc7
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 29 deletions.
20 changes: 20 additions & 0 deletions data/.wolf3d/N3Ddata.cdogscpn/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@
"Sound": "pickup",
"Amount": 5,
"Max": 299
},
{
"Name": "Cantaloupe",
"Pic": {
"Type": "Normal",
"Pic": "cantaloupes"
},
"Sound": "pickup",
"Amount": 14,
"Max": 100
},
{
"Name": "Watermelon",
"Pic": {
"Type": "Normal",
"Pic": "watermelon"
},
"Sound": "pickup",
"Amount": 5,
"Max": 100
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added data/.wolf3d/N3Ddata.cdogscpn/graphics/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
4 changes: 0 additions & 4 deletions data/.wolf3d/N3Ddata.cdogscpn/graphics/suit_of_armor.txt

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions data/.wolf3d/N3Ddata.cdogscpn/guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
"Sound": "super_feeder",
"SwitchSound": "chaingun_pickup",
"Recoil": 0.23,
"Ammo": "Feed"
"Ammo": "Cantaloupe"
},
{
"Pic": "rocket_green",
"Name": "Watermelon Feeder",
"Icon": "chemo_gun",
"Bullet": "bullet",
"Cost": 1,
"Lock": 45,
"Pic": "",
"IsGrenade": true,
"Name": "Watermelons",
"Bullet": "grenade",
"Cost": 20,
"Lock": 30,
"Sound": "super_feeder",
"SwitchSound": "chaingun_pickup",
"Recoil": 0.23,
"Ammo": "Feed"
"SwitchSound": "grenade_pickup",
"Elevation": 24,
"Ammo": "Watermelon"
},
{
"Pic": "pistol",
Expand Down
32 changes: 32 additions & 0 deletions data/.wolf3d/N3Ddata.cdogscpn/pickups.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,38 @@
"Amount": 25
}],
"Sound": "pickup"
},
{
"Name": "knapsack",
"Pic": {
"Type": "Normal",
"Pic": "bag"
},
"Effects": [{
"Type": "Ammo",
"Ammo": "Feed",
"Amount": 100
}, {
"Type": "Ammo",
"Ammo": "Cantaloupe",
"Amount": 28
}, {
"Type": "Ammo",
"Ammo": "Watermelon",
"Amount": 25
}],
"Sound": "pickup"
},
{
"Name": "map",
"Pic": {
"Type": "Normal",
"Pic": "map"
},
"Effects": [{
"Type": "ShowMap"
}],
"Sound": "pickup"
}
]
}
74 changes: 64 additions & 10 deletions src/cdogs/map_wolf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,9 +2433,16 @@ static void LoadEntity(
}
break;
case CWENT_ARMOR:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("suit_of_armor"), v);
break;
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticAddKey(&m->u.Static, 0, v);
break;
default:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("suit_of_armor"), v);
break;
}
case CWENT_CAGE:
switch (map->type)
{
Expand All @@ -2449,9 +2456,18 @@ static void LoadEntity(
}
break;
case CWENT_CAGE_SKELETON:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("gibbet_skeleton"), v);
MissionStaticTryAddItem(&m->u.Static, StrMapObject("shadow"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("knapsack"), v);
break;
default:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("gibbet_skeleton"), v);
MissionStaticTryAddItem(&m->u.Static, StrMapObject("shadow"), v);
break;
}
break;
case CWENT_BONES1:
switch (map->type)
Expand Down Expand Up @@ -2634,16 +2650,54 @@ static void LoadEntity(
}
break;
case CWENT_LIFE:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("heart"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("ammo_Cantaloupe"), v);
break;
default:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("heart"), v);
break;
}
break;
case CWENT_BONES_BLOOD:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("gibs"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("ammo_Watermelon"), v);
break;
default:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("gibs"), v);
break;
}
break;
case CWENT_BARREL:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("barrel_wood2"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("ammo_Watermelon"), v);
break;
default:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("barrel_wood2"), v);
break;
}
break;
case CWENT_WELL_WATER:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("well_water"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("map"), v);
break;
default:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("well_water"), v);
break;
}
break;
case CWENT_WELL:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("well"), v);
Expand Down
5 changes: 0 additions & 5 deletions src/cdogsed/cdogsed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,11 +1346,6 @@ int main(int argc, char *argv[])
if (!loaded)
{
RealPath(argv[i], lastFile);
if (strchr(lastFile, '.') == NULL &&
sizeof lastFile - strlen(lastFile) > 3)
{
strcat(lastFile, ".cdogscpn");
}
if (MapNewLoad(lastFile, &gCampaign.Setting) == 0)
{
loaded = 1;
Expand Down

0 comments on commit cbb8cc7

Please sign in to comment.