Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/steve/src/cfg/ItemDescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace steve {
struct ItemDescription {
virtual ~ItemDescription(){};
std::string name;
bool blacklisted = false, whitelisted = false;
float weight = 1.f;
Expand Down
218 changes: 0 additions & 218 deletions modules/ctl_doom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -324,224 +324,6 @@ OB_MODULES["doom_mon_control"] =
},
}

CTL_DOOM.ID24_MONSTERS =
{
id24_ghoul =
{
id = 3007,
r = 16,
h = 40,
level = 1,
prob = 140,
health = 50,
damage = 3,
attack = "missile",
density = 1.0,
room_size = "any"
},
id24_banshee =
{
id = 3008,
r = 20,
h = 56,
level = 1,
prob = 140,
health = 100,
damage = 128,
attack = "melee",
density = 1.0,
room_size = "any"
},
id24_mindweaver =
{
id = 3009,
r = 64,
h = 64,
level = 1,
prob = 140,
health = 500,
damage = 5.5,
attack = "hitscan",
density = 1.0,
room_size = "any"
},
id24_shocktrooper =
{
id = 3010,
r = 20,
h = 56,
level = 1,
prob = 140,
health = 100,
damage = 10.7,
attack = "missile",
density = 1.0,
room_size = "any"
},
id24_vassago =
{
id = 3011,
r = 24,
h = 64,
level = 1,
prob = 140,
boss_type = "minor",
boss_prob = 50,
health = 1000,
damage = 25,
attack = "missile",
density = 1.0,
room_size = "any"
},
id24_tyrant =
{
id = 3012,
r = 40,
h = 110,
level = 1,
prob = 140,
boss_type = "minor",
boss_prob = 50,
health = 1000,
damage = 125,
attack = "missile",
density = 1.0,
room_size = "any"
},
}

function CTL_DOOM.id24_monster_setup(self)

module_param_up(self)

table.merge_missing(GAME.MONSTERS, CTL_DOOM.ID24_MONSTERS)

for _,opt in pairs(self.options) do

local M = GAME.MONSTERS[string.sub(opt.name, 7)]

if M and PARAM[opt.name] ~= gui.gettext("Default") then
M.prob = PARAM[opt.name] * 100
M.density = M.prob * .006 + .1

-- allow Spectres to be controlled individually
M.replaces = nil

-- loosen some of the normal restrictions
M.skip_prob = nil
M.crazy_prob = nil

if M.prob > 40 then
M.level = 1
M.weap_min_damage = nil
end

if M.prob > 200 then
M.boss_type = nil
end
end
end

end

OB_MODULES["doom_mon_control_id24"] =
{

name = "doom_mon_control_id24",

label = _("ID24 Monster Control"),

game = "doomish",
where = "experimental",

hooks =
{
setup = CTL_DOOM.id24_monster_setup
},

options =
{
{
name = "float_id24_ghoul",
label = _("Ghoul"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Ghouls."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
{
name = "float_id24_banshee",
label = _("Banshee"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Banshees."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
{
name = "float_id24_mindweaver",
label = _("Mindweaver"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Mindweavers."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
{
name = "float_id24_shocktrooper",
label = _("Shocktrooper"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Shocktroopers."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
{
name = "float_id24_vassago",
label = _("Vassago"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Vassago."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
{
name = "float_id24_tyrant",
label = _("Tyrant"),
valuator = "slider",
min = 0,
max = 20,
increment = .02,
default = _("Default"),
nan = _("Default"),
tooltip = _("Control the amount of Tyrants."),
presets = _("0:0 (None at all),.02:0.02 (Scarce),.14:0.14 (Less),.5:0.5 (Plenty),1.2:1.2 (More),3:3 (Heaps),20:20 (INSANE)"),
randomize_group="monsters",
},
},
}

----------------------------------------------------------------

CTL_DOOM.WEAPON_PREF_CHOICES =
Expand Down
4 changes: 2 additions & 2 deletions source/csg_bsp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ static void MarkGapsWithEntities()
}

// ignore map models
if (!(E->props.getStr("model")).empty())
if (!E->props.getStr("model").empty())
{
continue;
}
Expand Down Expand Up @@ -1919,7 +1919,7 @@ static void SpreadReachability(void)
{
gap_c *G = R->gaps[k];

if (!(G->bottom->t.face.getStr("reachable")).empty() || !(G->top->b.face.getStr("reachable")).empty())
if (!G->bottom->t.face.getStr("reachable").empty() || !G->top->b.face.getStr("reachable").empty())
{
G->reachable = true;
}
Expand Down
48 changes: 34 additions & 14 deletions source/csg_doom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,12 @@ static void MakeSector(region_c *R)
S->c_h = S->f_h;
}

S->f_tex = f_face->getStr("tex", dummy_plane_tex);
S->c_tex = c_face->getStr("tex", dummy_plane_tex);
S->f_tex = f_face->getStr("tex");
if (S->f_tex.empty())
S->f_tex = dummy_plane_tex;
S->c_tex = c_face->getStr("tex");
if (S->c_tex.empty())
S->c_tex = dummy_plane_tex;

int f_mark = f_face->getInt("mark");
int c_mark = c_face->getInt("mark");
Expand Down Expand Up @@ -1243,7 +1247,9 @@ static sidedef_c *MakeSidedef(linedef_c *L, sector_c *sec, sector_c *back, snag_
}
else
{
SD->mid = lower->face.getStr("tex", dummy_tex);
SD->mid = lower->face.getStr("tex");
if (SD->mid.empty())
SD->mid = dummy_tex;

int ox = lower->face.getInt("u1", IVAL_NONE);
int oy = lower->face.getInt("v1", IVAL_NONE);
Expand Down Expand Up @@ -1281,7 +1287,7 @@ static sidedef_c *MakeSidedef(linedef_c *L, sector_c *sec, sector_c *back, snag_

if (rail)
{
std::string rail_tex = rail->face.getStr("tex", "");
std::string rail_tex = rail->face.getStr("tex");

if (!rail_tex.empty())
{
Expand Down Expand Up @@ -1352,8 +1358,12 @@ static sidedef_c *MakeSidedef(linedef_c *L, sector_c *sec, sector_c *back, snag_
upper = u_brush->verts[0];
}

SD->lower = lower->face.getStr("tex", dummy_tex);
SD->upper = upper->face.getStr("tex", dummy_tex);
SD->lower = lower->face.getStr("tex");
if (SD->lower.empty())
SD->lower = dummy_tex;
SD->upper = upper->face.getStr("tex");
if (SD->upper.empty())
SD->upper = dummy_tex;
}

SD->y_offset = NormalizeYOffset(SD->y_offset);
Expand Down Expand Up @@ -1399,7 +1409,7 @@ static csg_property_set_c *FindTrigger(snag_c *S, sector_c *front, sector_c *bac
continue;
}

if ((V->face.getStr("special")).empty())
if (V->face.getStr("special").empty())
{
continue;
}
Expand Down Expand Up @@ -1497,7 +1507,7 @@ static brush_vert_c *FindRail(const snag_c *S, const region_c *R, const region_c
continue;
}

if (!(V->face.getStr("tex", "")).empty())
if (!V->face.getStr("tex").empty())
{
return V; // found it!
}
Expand Down Expand Up @@ -2537,12 +2547,18 @@ static void SolidExtraFloor(sector_c *sec, gap_c *gap1, gap_c *gap2)
EF->top_h = OBSIDIAN_I_ROUND(gap2->bottom->t.z);
EF->bottom_h = OBSIDIAN_I_ROUND(gap1->top->b.z);

EF->top = gap2->bottom->t.face.getStr("tex", dummy_plane_tex);
EF->bottom = gap1->top->b.face.getStr("tex", dummy_plane_tex);
EF->top = gap2->bottom->t.face.getStr("tex");
if (EF->top.empty())
EF->top = dummy_plane_tex;
EF->bottom = gap1->top->b.face.getStr("tex");
if (EF->bottom.empty())
EF->bottom = dummy_plane_tex;

brush_vert_c *V = gap2->bottom->verts[0];

EF->wall = V->face.getStr("tex", dummy_wall_tex);
EF->wall = V->face.getStr("tex");
if (EF->wall.empty())
EF->wall = dummy_wall_tex;
}

static void LiquidExtraFloor(sector_c *sec, csg_brush_c *liquid)
Expand Down Expand Up @@ -2573,12 +2589,16 @@ static void LiquidExtraFloor(sector_c *sec, csg_brush_c *liquid)
EF->top_h = EF->bottom_h + 128; // not significant
}

EF->top = liquid->t.face.getStr("tex", dummy_plane_tex);
EF->top = liquid->t.face.getStr("tex");
if (EF->top.empty())
EF->top = dummy_plane_tex;
EF->bottom = EF->top;

brush_vert_c *V = liquid->verts[0];

EF->wall = V->face.getStr("tex", dummy_wall_tex);
EF->wall = V->face.getStr("tex");
if (EF->wall.empty())
EF->wall = dummy_wall_tex;
}

static void ExtraFloors(sector_c *S, region_c *R)
Expand Down Expand Up @@ -2982,7 +3002,7 @@ static void WriteLinedefs()
static void AddThing_FraggleScript(int x, int y, int z, csg_entity_c *E, int type, int angle, int options)
{
// this is set in the Lua code (raw_add_entity)
std::string fs_name = E->props.getStr("fs_name", "");
std::string fs_name = E->props.getStr("fs_name");

if (fs_name.empty())
{
Expand Down
Loading