Niceify-ing it (Yes, that's a word)

actorid
Alexander "Ace" Olofsson 13 years ago
parent ba602929ef
commit 7c1e417f9a

@ -12,9 +12,6 @@ void Activator::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
esm.writeHNString("FNAM", name);
if (!script.empty())
{
esm.writeHNString("SCRI", script);
}
esm.writeHNOString("SCRI", script);
}
}

@ -14,12 +14,9 @@ void Potion::load(ESMReader &esm)
void Potion::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!icon.empty())
esm.writeHNString("TEXT", icon);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!name.empty())
esm.writeHNString("FNAM", name);
esm.writeHNOString("TEXT", icon);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("FNAM", name);
esm.writeHNT("ALDT", data, 12);
effects.save(esm);
}

@ -15,8 +15,7 @@ void Apparatus::save(ESMWriter &esm)
esm.writeHNString("MODL", model);
esm.writeHNString("FNAM", name);
esm.writeHNT("AADT", data, 16);
if (!script.empty())
esm.writeHNString("SCRI", script);
esm.writeHNOString("SCRI", script);
esm.writeHNString("ITEX", icon);
}
}

@ -20,10 +20,8 @@ void PartReferenceList::save(ESMWriter &esm)
for (std::vector<PartReference>::iterator it = parts.begin(); it != parts.end(); ++it)
{
esm.writeHT(it->part);
if (!it->male.empty())
esm.writeHNString("BNAM", it->male);
if (!it->female.empty())
esm.writeHNString("CNAM", it->female);
esm.writeHNOString("BNAM", it->male);
esm.writeHNOString("CNAM", it->female);
}
}
@ -42,14 +40,11 @@ void Armor::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
esm.writeHNString("FNAM", name);
if (!script.empty())
esm.writeHNString("SCRI", script);
esm.writeHNOString("SCRI", script);
esm.writeHNT("AODT", data, 24);
if (!icon.empty())
esm.writeHNString("ITEX", icon);
esm.writeHNOString("ITEX", icon);
parts.save(esm);
if (!enchant.empty())
esm.writeHNString("ENAM", enchant);
esm.writeHNOString("ENAM", enchant);
}
}

@ -16,17 +16,12 @@ void Book::load(ESMReader &esm)
void Book::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!name.empty())
esm.writeHNString("FNAM", name);
esm.writeHNOString("FNAM", name);
esm.writeHNT("BKDT", data, 20);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!icon.empty())
esm.writeHNString("ITEX", icon);
if (!text.empty())
esm.writeHNString("TEXT", text);
if (!enchant.empty())
esm.writeHNString("ENAM", enchant);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("ITEX", icon);
esm.writeHNOString("TEXT", text);
esm.writeHNOString("ENAM", enchant);
}
}

@ -14,10 +14,8 @@ void BirthSign::load(ESMReader &esm)
void BirthSign::save(ESMWriter &esm)
{
esm.writeHNString("FNAM", name);
if (!texture.empty())
esm.writeHNString("TNAM", texture);
if (!description.empty())
esm.writeHNString("DESC", description);
esm.writeHNOString("TNAM", texture);
esm.writeHNOString("DESC", description);
powers.save(esm);
}

@ -100,18 +100,15 @@ void Cell::save(ESMWriter &esm)
{
if (water != 0)
esm.writeHNT("WHGT", water);
if (data.flags & QuasiEx)
{
if (!region.empty())
esm.writeHNString("RGNN", region);
}
esm.writeHNOString("RGNN", region);
else
esm.writeHNT("AMBI", ambi, 16);
}
else
{
if (!region.empty())
esm.writeHNString("RGNN", region);
esm.writeHNOString("RGNN", region);
if (mapColor != 0)
esm.writeHNT("NAM5", mapColor);
}

@ -29,8 +29,7 @@ void Class::save(ESMWriter &esm)
{
esm.writeHNString("FNAM", name);
esm.writeHNT("CLDT", data, 60);
if (!description.empty())
esm.writeHNString("DESC", description);
esm.writeHNOString("DESC", description);
}
}

@ -19,19 +19,15 @@ void Clothing::load(ESMReader &esm)
void Clothing::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!name.empty())
esm.writeHNString("FNAM", name);
esm.writeHNOString("FNAM", name);
esm.writeHNT("CTDT", data, 12);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!icon.empty())
esm.writeHNString("ITEX", icon);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("ITEX", icon);
parts.save(esm);
if (!enchant.empty())
esm.writeHNString("ENAM", enchant);
esm.writeHNOString("ENAM", enchant);
}
}

@ -41,13 +41,11 @@ void Container::load(ESMReader &esm)
void Container::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!name.empty())
esm.writeHNString("FNAM", name);
esm.writeHNOString("FNAM", name);
esm.writeHNT("CNDT", weight, 4);
esm.writeHNT("FLAG", flags, 4);
if (!script.empty())
esm.writeHNString("SCRI", script);
esm.writeHNOString("SCRI", script);
inventory.save(esm);
}

@ -40,12 +40,9 @@ void Creature::load(ESMReader &esm, const std::string& id)
void Creature::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!original.empty())
esm.writeHNString("CNAM", original);
if (!name.empty())
esm.writeHNString("FNAM", name);
if (!script.empty())
esm.writeHNString("SCRI", script);
esm.writeHNOString("CNAM", original);
esm.writeHNOString("FNAM", name);
esm.writeHNOString("SCRI", script);
esm.writeHNT("NPDT", data, 96);
esm.writeHNT("FLAG", flags);
if (scale != 1.0)

@ -14,14 +14,10 @@ void Door::load(ESMReader &esm)
void Door::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!name.empty())
esm.writeHNString("FNAM", name);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!openSound.empty())
esm.writeHNString("SNAM", openSound);
if (!closeSound.empty())
esm.writeHNString("ANAM", closeSound);
esm.writeHNOString("FNAM", name);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("SNAM", openSound);
esm.writeHNOString("ANAM", closeSound);
}
}

@ -156,8 +156,7 @@ void DialInfo::save(ESMWriter &esm)
}
}
if (!resultScript.empty())
esm.writeHNString("BNAM", resultScript);
esm.writeHNOString("BNAM", resultScript);
switch(questStatus)
{

@ -16,10 +16,8 @@ void Ingredient::save(ESMWriter &esm)
esm.writeHNString("MODL", model);
esm.writeHNString("FNAM", name);
esm.writeHNT("IRDT", data, 56);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!icon.empty())
esm.writeHNString("ITEX", script);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("ITEX", script);
}
}

@ -16,15 +16,11 @@ void Light::load(ESMReader &esm)
void Light::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
if (!name.empty())
esm.writeHNString("FNAM", name);
if (!icon.empty())
esm.writeHNString("ITEX", icon);
esm.writeHNOString("FNAM", name);
esm.writeHNOString("ITEX", icon);
esm.writeHNT("LHDT", data, 24);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!sound.empty())
esm.writeHNString("SNAM", sound);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("SNAM", sound);
}
}

@ -44,10 +44,8 @@ void Tool::save(ESMWriter &esm)
}
esm.writeT(data, 16);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!icon.empty())
esm.writeHNString("ITEX", icon);
esm.writeHNOString("SCRI", script);
esm.writeHNOString("ITEX", icon);
}

Loading…
Cancel
Save