Search in sources :

Example 6 with FluidModifier

use of com.lilithsthrone.game.character.body.valueEnums.FluidModifier in project liliths-throne-public by Innoxia.

the class Body method saveAsXML.

@Override
public Element saveAsXML(Element parentElement, Document doc) {
    // Core:
    Element bodyCore = doc.createElement("bodyCore");
    parentElement.appendChild(bodyCore);
    CharacterUtils.addAttribute(doc, bodyCore, "piercedStomach", String.valueOf(this.isPiercedStomach()));
    CharacterUtils.addAttribute(doc, bodyCore, "height", String.valueOf(this.getHeightValue()));
    CharacterUtils.addAttribute(doc, bodyCore, "femininity", String.valueOf(this.getFemininity()));
    CharacterUtils.addAttribute(doc, bodyCore, "bodySize", String.valueOf(this.getBodySize()));
    CharacterUtils.addAttribute(doc, bodyCore, "muscle", String.valueOf(this.getMuscle()));
    CharacterUtils.addAttribute(doc, bodyCore, "pubicHair", String.valueOf(this.getPubicHair()));
    CharacterUtils.addAttribute(doc, bodyCore, "bodyMaterial", String.valueOf(this.getBodyMaterial()));
    CharacterUtils.addAttribute(doc, bodyCore, "genitalArrangement", String.valueOf(this.getGenitalArrangement()));
    for (BodyCoveringType bct : BodyCoveringType.values()) {
        Element element = doc.createElement("bodyCovering");
        bodyCore.appendChild(element);
        CharacterUtils.addAttribute(doc, element, "type", bct.toString());
        CharacterUtils.addAttribute(doc, element, "pattern", this.coverings.get(bct).getPattern().toString());
        CharacterUtils.addAttribute(doc, element, "modifier", this.coverings.get(bct).getModifier().toString());
        CharacterUtils.addAttribute(doc, element, "colourPrimary", this.coverings.get(bct).getPrimaryColour().toString());
        if (this.coverings.get(bct).isPrimaryGlowing()) {
            CharacterUtils.addAttribute(doc, element, "glowPrimary", String.valueOf(this.coverings.get(bct).isPrimaryGlowing()));
        }
        CharacterUtils.addAttribute(doc, element, "colourSecondary", this.coverings.get(bct).getSecondaryColour().toString());
        if (this.coverings.get(bct).isSecondaryGlowing()) {
            CharacterUtils.addAttribute(doc, element, "glowSecondary", String.valueOf(this.coverings.get(bct).isSecondaryGlowing()));
        }
        if (this.getBodyCoveringTypesDiscovered().contains(bct)) {
            CharacterUtils.addAttribute(doc, element, "discovered", String.valueOf(this.getBodyCoveringTypesDiscovered().contains(bct)));
        }
    }
    // Antennae:
    Element bodyAntennae = doc.createElement("antennae");
    parentElement.appendChild(bodyAntennae);
    CharacterUtils.addAttribute(doc, bodyAntennae, "type", this.antenna.getType().toString());
    CharacterUtils.addAttribute(doc, bodyAntennae, "rows", String.valueOf(this.antenna.getAntennaRows()));
    // Arm:
    Element bodyArm = doc.createElement("arm");
    parentElement.appendChild(bodyArm);
    CharacterUtils.addAttribute(doc, bodyArm, "type", this.arm.getType().toString());
    CharacterUtils.addAttribute(doc, bodyArm, "rows", String.valueOf(this.arm.getArmRows()));
    CharacterUtils.addAttribute(doc, bodyArm, "underarmHair", this.arm.getUnderarmHair().toString());
    // Ass:
    Element bodyAss = doc.createElement("ass");
    parentElement.appendChild(bodyAss);
    CharacterUtils.addAttribute(doc, bodyAss, "type", this.ass.getType().toString());
    CharacterUtils.addAttribute(doc, bodyAss, "assSize", String.valueOf(this.ass.getAssSize().getValue()));
    CharacterUtils.addAttribute(doc, bodyAss, "hipSize", String.valueOf(this.ass.getHipSize().getValue()));
    Element bodyAnus = doc.createElement("anus");
    parentElement.appendChild(bodyAnus);
    CharacterUtils.addAttribute(doc, bodyAnus, "wetness", String.valueOf(this.ass.anus.orificeAnus.wetness));
    CharacterUtils.addAttribute(doc, bodyAnus, "elasticity", String.valueOf(this.ass.anus.orificeAnus.elasticity));
    CharacterUtils.addAttribute(doc, bodyAnus, "plasticity", String.valueOf(this.ass.anus.orificeAnus.plasticity));
    CharacterUtils.addAttribute(doc, bodyAnus, "capacity", String.valueOf(this.ass.anus.orificeAnus.capacity));
    CharacterUtils.addAttribute(doc, bodyAnus, "stretchedCapacity", String.valueOf(this.ass.anus.orificeAnus.stretchedCapacity));
    CharacterUtils.addAttribute(doc, bodyAnus, "virgin", String.valueOf(this.ass.anus.orificeAnus.virgin));
    CharacterUtils.addAttribute(doc, bodyAnus, "bleached", String.valueOf(this.ass.anus.bleached));
    CharacterUtils.addAttribute(doc, bodyAnus, "assHair", this.ass.anus.assHair.toString());
    Element anusModifiers = doc.createElement("anusModifiers");
    bodyAnus.appendChild(anusModifiers);
    for (OrificeModifier om : OrificeModifier.values()) {
        CharacterUtils.addAttribute(doc, anusModifiers, om.toString(), String.valueOf(this.ass.anus.orificeAnus.hasOrificeModifier(om)));
    }
    // Breasts:
    Element bodyBreast = doc.createElement("breasts");
    parentElement.appendChild(bodyBreast);
    CharacterUtils.addAttribute(doc, bodyBreast, "type", this.breast.type.toString());
    CharacterUtils.addAttribute(doc, bodyBreast, "shape", this.breast.shape.toString());
    CharacterUtils.addAttribute(doc, bodyBreast, "size", String.valueOf(this.breast.size));
    CharacterUtils.addAttribute(doc, bodyBreast, "rows", String.valueOf(this.breast.rows));
    CharacterUtils.addAttribute(doc, bodyBreast, "milkStorage", String.valueOf(this.breast.milkStorage));
    CharacterUtils.addAttribute(doc, bodyBreast, "storedMilk", String.valueOf(this.breast.milkStored));
    CharacterUtils.addAttribute(doc, bodyBreast, "milkRegeneration", String.valueOf(this.breast.milkRegeneration));
    CharacterUtils.addAttribute(doc, bodyBreast, "nippleCountPerBreast", String.valueOf(this.breast.nippleCountPerBreast));
    Element bodyNipple = doc.createElement("nipples");
    parentElement.appendChild(bodyNipple);
    CharacterUtils.addAttribute(doc, bodyNipple, "elasticity", String.valueOf(this.breast.nipples.orificeNipples.elasticity));
    CharacterUtils.addAttribute(doc, bodyNipple, "plasticity", String.valueOf(this.breast.nipples.orificeNipples.plasticity));
    CharacterUtils.addAttribute(doc, bodyNipple, "capacity", String.valueOf(this.breast.nipples.orificeNipples.capacity));
    CharacterUtils.addAttribute(doc, bodyNipple, "stretchedCapacity", String.valueOf(this.breast.nipples.orificeNipples.stretchedCapacity));
    CharacterUtils.addAttribute(doc, bodyNipple, "virgin", String.valueOf(this.breast.nipples.orificeNipples.virgin));
    CharacterUtils.addAttribute(doc, bodyNipple, "pierced", String.valueOf(this.breast.nipples.pierced));
    CharacterUtils.addAttribute(doc, bodyNipple, "nippleSize", String.valueOf(this.breast.nipples.nippleSize));
    CharacterUtils.addAttribute(doc, bodyNipple, "nippleShape", this.breast.nipples.nippleShape.toString());
    CharacterUtils.addAttribute(doc, bodyNipple, "areolaeSize", String.valueOf(this.breast.nipples.areolaeSize));
    CharacterUtils.addAttribute(doc, bodyNipple, "areolaeShape", this.breast.nipples.areolaeShape.toString());
    Element nippleModifiers = doc.createElement("nippleModifiers");
    bodyNipple.appendChild(nippleModifiers);
    for (OrificeModifier om : OrificeModifier.values()) {
        CharacterUtils.addAttribute(doc, nippleModifiers, om.toString(), String.valueOf(this.breast.nipples.orificeNipples.hasOrificeModifier(om)));
    }
    Element bodyMilk = doc.createElement("milk");
    parentElement.appendChild(bodyMilk);
    CharacterUtils.addAttribute(doc, bodyMilk, "flavour", this.breast.milk.getFlavour().toString());
    Element milkModifiers = doc.createElement("milkModifiers");
    bodyMilk.appendChild(milkModifiers);
    for (FluidModifier fm : FluidModifier.values()) {
        CharacterUtils.addAttribute(doc, milkModifiers, fm.toString(), String.valueOf(this.breast.milk.hasFluidModifier(fm)));
    }
    // TODO transformativeEffects;
    // Ear:
    Element bodyEar = doc.createElement("ear");
    parentElement.appendChild(bodyEar);
    CharacterUtils.addAttribute(doc, bodyEar, "type", this.ear.type.toString());
    CharacterUtils.addAttribute(doc, bodyEar, "pierced", String.valueOf(this.ear.pierced));
    // Eye:
    Element bodyEye = doc.createElement("eye");
    parentElement.appendChild(bodyEye);
    CharacterUtils.addAttribute(doc, bodyEye, "type", this.eye.type.toString());
    CharacterUtils.addAttribute(doc, bodyEye, "eyePairs", String.valueOf(this.eye.eyePairs));
    CharacterUtils.addAttribute(doc, bodyEye, "irisShape", this.eye.irisShape.toString());
    CharacterUtils.addAttribute(doc, bodyEye, "pupilShape", this.eye.pupilShape.toString());
    // Face:
    Element bodyFace = doc.createElement("face");
    parentElement.appendChild(bodyFace);
    CharacterUtils.addAttribute(doc, bodyFace, "type", this.face.type.toString());
    CharacterUtils.addAttribute(doc, bodyFace, "piercedNose", String.valueOf(this.face.piercedNose));
    CharacterUtils.addAttribute(doc, bodyFace, "facialHair", this.face.facialHair.toString());
    Element bodyMouth = doc.createElement("mouth");
    parentElement.appendChild(bodyMouth);
    CharacterUtils.addAttribute(doc, bodyMouth, "elasticity", String.valueOf(this.face.mouth.orificeMouth.elasticity));
    CharacterUtils.addAttribute(doc, bodyMouth, "plasticity", String.valueOf(this.face.mouth.orificeMouth.plasticity));
    CharacterUtils.addAttribute(doc, bodyMouth, "capacity", String.valueOf(this.face.mouth.orificeMouth.capacity));
    CharacterUtils.addAttribute(doc, bodyMouth, "stretchedCapacity", String.valueOf(this.face.mouth.orificeMouth.stretchedCapacity));
    CharacterUtils.addAttribute(doc, bodyMouth, "virgin", String.valueOf(this.face.mouth.orificeMouth.virgin));
    CharacterUtils.addAttribute(doc, bodyMouth, "piercedLip", String.valueOf(this.face.mouth.piercedLip));
    CharacterUtils.addAttribute(doc, bodyMouth, "lipSize", String.valueOf(this.face.mouth.lipSize));
    Element mouthModifiers = doc.createElement("mouthModifiers");
    bodyMouth.appendChild(mouthModifiers);
    for (OrificeModifier om : OrificeModifier.values()) {
        CharacterUtils.addAttribute(doc, mouthModifiers, om.toString(), String.valueOf(this.face.mouth.orificeMouth.hasOrificeModifier(om)));
    }
    Element bodyTongue = doc.createElement("tongue");
    parentElement.appendChild(bodyTongue);
    CharacterUtils.addAttribute(doc, bodyTongue, "piercedTongue", String.valueOf(this.face.tongue.pierced));
    CharacterUtils.addAttribute(doc, bodyTongue, "tongueLength", String.valueOf(this.face.tongue.tongueLength));
    Element tongueModifiers = doc.createElement("tongueModifiers");
    bodyTongue.appendChild(tongueModifiers);
    for (TongueModifier tm : TongueModifier.values()) {
        CharacterUtils.addAttribute(doc, tongueModifiers, tm.toString(), String.valueOf(this.face.tongue.hasTongueModifier(tm)));
    }
    // Hair:
    Element bodyHair = doc.createElement("hair");
    parentElement.appendChild(bodyHair);
    CharacterUtils.addAttribute(doc, bodyHair, "type", this.hair.type.toString());
    CharacterUtils.addAttribute(doc, bodyHair, "length", String.valueOf(this.hair.length));
    CharacterUtils.addAttribute(doc, bodyHair, "hairStyle", this.hair.style.toString());
    // Horn:
    Element bodyHorn = doc.createElement("horn");
    parentElement.appendChild(bodyHorn);
    CharacterUtils.addAttribute(doc, bodyHorn, "type", this.horn.type.toString());
    CharacterUtils.addAttribute(doc, bodyHorn, "length", String.valueOf(this.horn.length));
    CharacterUtils.addAttribute(doc, bodyHorn, "rows", String.valueOf(this.horn.rows));
    // Leg:
    Element bodyLeg = doc.createElement("leg");
    parentElement.appendChild(bodyLeg);
    CharacterUtils.addAttribute(doc, bodyLeg, "type", this.leg.type.toString());
    // Penis:
    Element bodyPenis = doc.createElement("penis");
    parentElement.appendChild(bodyPenis);
    CharacterUtils.addAttribute(doc, bodyPenis, "type", this.penis.type.toString());
    CharacterUtils.addAttribute(doc, bodyPenis, "size", String.valueOf(this.penis.size));
    CharacterUtils.addAttribute(doc, bodyPenis, "girth", String.valueOf(this.penis.girth));
    CharacterUtils.addAttribute(doc, bodyPenis, "pierced", String.valueOf(this.penis.pierced));
    CharacterUtils.addAttribute(doc, bodyPenis, "virgin", String.valueOf(this.penis.virgin));
    Element penisModifiers = doc.createElement("penisModifiers");
    bodyPenis.appendChild(penisModifiers);
    for (PenisModifier pm : PenisModifier.values()) {
        CharacterUtils.addAttribute(doc, penisModifiers, pm.toString(), String.valueOf(this.penis.hasPenisModifier(pm)));
    }
    CharacterUtils.addAttribute(doc, bodyPenis, "elasticity", String.valueOf(this.penis.orificeUrethra.elasticity));
    CharacterUtils.addAttribute(doc, bodyPenis, "plasticity", String.valueOf(this.penis.orificeUrethra.plasticity));
    CharacterUtils.addAttribute(doc, bodyPenis, "capacity", String.valueOf(this.penis.orificeUrethra.capacity));
    CharacterUtils.addAttribute(doc, bodyPenis, "stretchedCapacity", String.valueOf(this.penis.orificeUrethra.stretchedCapacity));
    CharacterUtils.addAttribute(doc, bodyPenis, "urethraVirgin", String.valueOf(this.penis.orificeUrethra.virgin));
    Element urethraModifiers = doc.createElement("urethraModifiers");
    bodyPenis.appendChild(urethraModifiers);
    for (OrificeModifier om : OrificeModifier.values()) {
        CharacterUtils.addAttribute(doc, urethraModifiers, om.toString(), String.valueOf(this.penis.orificeUrethra.hasOrificeModifier(om)));
    }
    Element bodyTesticle = doc.createElement("testicles");
    parentElement.appendChild(bodyTesticle);
    CharacterUtils.addAttribute(doc, bodyTesticle, "testicleSize", String.valueOf(this.penis.testicle.testicleSize));
    CharacterUtils.addAttribute(doc, bodyTesticle, "cumProduction", String.valueOf(this.penis.testicle.cumStorage));
    CharacterUtils.addAttribute(doc, bodyTesticle, "numberOfTesticles", String.valueOf(this.penis.testicle.testicleCount));
    CharacterUtils.addAttribute(doc, bodyTesticle, "internal", String.valueOf(this.penis.testicle.internal));
    Element bodyCum = doc.createElement("cum");
    parentElement.appendChild(bodyCum);
    CharacterUtils.addAttribute(doc, bodyCum, "flavour", this.penis.testicle.cum.flavour.toString());
    Element cumModifiers = doc.createElement("cumModifiers");
    bodyCum.appendChild(cumModifiers);
    for (FluidModifier fm : FluidModifier.values()) {
        CharacterUtils.addAttribute(doc, cumModifiers, fm.toString(), String.valueOf(this.penis.testicle.cum.hasFluidModifier(fm)));
    }
    // TODO transformativeEffects;
    // Skin:
    Element bodySkin = doc.createElement("skin");
    parentElement.appendChild(bodySkin);
    CharacterUtils.addAttribute(doc, bodySkin, "type", this.skin.type.toString());
    // Tail:
    Element bodyTail = doc.createElement("tail");
    parentElement.appendChild(bodyTail);
    CharacterUtils.addAttribute(doc, bodyTail, "type", this.tail.type.toString());
    CharacterUtils.addAttribute(doc, bodyTail, "count", String.valueOf(this.tail.tailCount));
    // Vagina
    Element bodyVagina = doc.createElement("vagina");
    parentElement.appendChild(bodyVagina);
    CharacterUtils.addAttribute(doc, bodyVagina, "type", this.vagina.type.toString());
    CharacterUtils.addAttribute(doc, bodyVagina, "labiaSize", String.valueOf(this.vagina.labiaSize));
    CharacterUtils.addAttribute(doc, bodyVagina, "clitSize", String.valueOf(this.vagina.clitSize));
    CharacterUtils.addAttribute(doc, bodyVagina, "pierced", String.valueOf(this.vagina.pierced));
    CharacterUtils.addAttribute(doc, bodyVagina, "wetness", String.valueOf(this.vagina.orificeVagina.wetness));
    CharacterUtils.addAttribute(doc, bodyVagina, "elasticity", String.valueOf(this.vagina.orificeVagina.elasticity));
    CharacterUtils.addAttribute(doc, bodyVagina, "plasticity", String.valueOf(this.vagina.orificeVagina.plasticity));
    CharacterUtils.addAttribute(doc, bodyVagina, "capacity", String.valueOf(this.vagina.orificeVagina.capacity));
    CharacterUtils.addAttribute(doc, bodyVagina, "stretchedCapacity", String.valueOf(this.vagina.orificeVagina.stretchedCapacity));
    CharacterUtils.addAttribute(doc, bodyVagina, "virgin", String.valueOf(this.vagina.orificeVagina.virgin));
    CharacterUtils.addAttribute(doc, bodyVagina, "squirter", String.valueOf(this.vagina.orificeVagina.squirter));
    Element vaginaModifiers = doc.createElement("vaginaModifiers");
    bodyVagina.appendChild(vaginaModifiers);
    for (OrificeModifier om : OrificeModifier.values()) {
        CharacterUtils.addAttribute(doc, vaginaModifiers, om.toString(), String.valueOf(this.vagina.orificeVagina.hasOrificeModifier(om)));
    }
    Element bodyGirlcum = doc.createElement("girlcum");
    parentElement.appendChild(bodyGirlcum);
    CharacterUtils.addAttribute(doc, bodyGirlcum, "flavour", this.vagina.girlcum.flavour.toString());
    Element girlcumModifiers = doc.createElement("girlcumModifiers");
    bodyGirlcum.appendChild(girlcumModifiers);
    for (FluidModifier fm : FluidModifier.values()) {
        CharacterUtils.addAttribute(doc, girlcumModifiers, fm.toString(), String.valueOf(this.vagina.girlcum.hasFluidModifier(fm)));
    }
    // TODO transformativeEffects;
    // Wing:
    Element bodyWing = doc.createElement("wing");
    parentElement.appendChild(bodyWing);
    CharacterUtils.addAttribute(doc, bodyWing, "type", this.wing.type.toString());
    CharacterUtils.addAttribute(doc, bodyWing, "size", String.valueOf(this.wing.size));
    return parentElement;
}
Also used : FluidModifier(com.lilithsthrone.game.character.body.valueEnums.FluidModifier) TongueModifier(com.lilithsthrone.game.character.body.valueEnums.TongueModifier) Element(org.w3c.dom.Element) BodyCoveringType(com.lilithsthrone.game.character.body.types.BodyCoveringType) PenisModifier(com.lilithsthrone.game.character.body.valueEnums.PenisModifier) OrificeModifier(com.lilithsthrone.game.character.body.valueEnums.OrificeModifier)

Example 7 with FluidModifier

use of com.lilithsthrone.game.character.body.valueEnums.FluidModifier in project liliths-throne-public by Innoxia.

the class FluidMilk method saveAsXML.

public Element saveAsXML(Element parentElement, Document doc) {
    Element element = doc.createElement("milk");
    parentElement.appendChild(element);
    CharacterUtils.addAttribute(doc, element, "type", this.type.toString());
    CharacterUtils.addAttribute(doc, element, "flavour", this.flavour.toString());
    Element cumModifiers = doc.createElement("milkModifiers");
    element.appendChild(cumModifiers);
    for (FluidModifier fm : FluidModifier.values()) {
        CharacterUtils.addAttribute(doc, cumModifiers, fm.toString(), String.valueOf(this.hasFluidModifier(fm)));
    }
    return element;
}
Also used : FluidModifier(com.lilithsthrone.game.character.body.valueEnums.FluidModifier) Element(org.w3c.dom.Element)

Example 8 with FluidModifier

use of com.lilithsthrone.game.character.body.valueEnums.FluidModifier in project liliths-throne-public by Innoxia.

the class FluidMilk method loadFromXML.

public static FluidMilk loadFromXML(Element parentElement, Document doc) {
    Element milk = (Element) parentElement.getElementsByTagName("milk").item(0);
    FluidMilk fluidMilk = new FluidMilk(FluidType.valueOf(milk.getAttribute("type")));
    fluidMilk.flavour = (FluidFlavour.valueOf(milk.getAttribute("flavour")));
    Element milkModifiers = (Element) milk.getElementsByTagName("milkModifiers").item(0);
    for (FluidModifier fm : FluidModifier.values()) {
        if (Boolean.valueOf(milkModifiers.getAttribute(fm.toString()))) {
            fluidMilk.fluidModifiers.add(fm);
        }
    }
    return fluidMilk;
}
Also used : FluidModifier(com.lilithsthrone.game.character.body.valueEnums.FluidModifier) Element(org.w3c.dom.Element)

Aggregations

FluidModifier (com.lilithsthrone.game.character.body.valueEnums.FluidModifier)8 Element (org.w3c.dom.Element)6 OrificeModifier (com.lilithsthrone.game.character.body.valueEnums.OrificeModifier)4 PenisModifier (com.lilithsthrone.game.character.body.valueEnums.PenisModifier)3 BodyCoveringType (com.lilithsthrone.game.character.body.types.BodyCoveringType)2 TongueModifier (com.lilithsthrone.game.character.body.valueEnums.TongueModifier)2 PenetrationType (com.lilithsthrone.game.sex.PenetrationType)2 SexType (com.lilithsthrone.game.sex.SexType)2 BodyHair (com.lilithsthrone.game.character.body.valueEnums.BodyHair)1 BodyMaterial (com.lilithsthrone.game.character.body.valueEnums.BodyMaterial)1 BreastShape (com.lilithsthrone.game.character.body.valueEnums.BreastShape)1 CoveringModifier (com.lilithsthrone.game.character.body.valueEnums.CoveringModifier)1 GenitalArrangement (com.lilithsthrone.game.character.body.valueEnums.GenitalArrangement)1 OrificeType (com.lilithsthrone.game.sex.OrificeType)1 HashMap (java.util.HashMap)1