Search in sources :

Example 1 with ObedienceLevel

use of com.lilithsthrone.game.character.attributes.ObedienceLevel in project liliths-throne-public by Innoxia.

the class SlaveryManagementDialogue method getSlaveInformationHeader.

private static String getSlaveInformationHeader(NPC character) {
    headerSB.setLength(0);
    AffectionLevel affection = AffectionLevel.getAffectionLevelFromValue(character.getAffection(Main.game.getPlayer()));
    ObedienceLevel obedience = ObedienceLevel.getObedienceLevelFromValue(character.getObedienceValue());
    float affectionChange = character.getDailyAffectionChange();
    float obedienceChange = character.getDailyObedienceChange();
    headerSB.append("<div class='container-full-width' style='text-align:center;'>" + // Core naming information:
    "<div class='container-full-width' style='margin-bottom:0;'>" + "<div style='width:50%; float:left; font-weight:bold; margin:0; padding:0;'>" + "Slave's Name" + "</div>" + "<div style='width:50%; float:left; font-weight:bold; margin:0; padding:0;'>" + UtilText.parse(character, "What [npc.she] calls you") + "</div>" + "</div>" + "<div class='container-full-width inner' style='padding:8px;'>" + "<div style='width:49%; float:left; font-weight:bold; margin:0 1% 0 0; padding:0;'>" + "<form style='float:left; width:90%; margin:0; padding:0;'><input type='text' id='slaveNameInput' value='" + Util.formatForHTML(character.getName()) + "' style='width:100%; margin:0; padding:0;'></form>" + "<div class='SM-button' id='" + character.getId() + "_RENAME' style='float:left; width:9%; height:28px; line-height:28px; margin:0 0 0 1%; padding:0;'>" + "&#10003;" + "</div>" + "</div>" + "<div style='width:49%; float:left; font-weight:bold; margin:0 0 0 1%; padding:0;'>" + "<form style='float:left; width:50%; margin:0; padding:0;'><input type='text' id='slaveToPlayerNameInput' value='" + Util.formatForHTML(character.getPlayerPetName()) + "' style='width:100%; margin:0; padding:0;'></form>" + "<div class='SM-button' id='" + character.getId() + "_CALLS_PLAYER' style='float:left; width:9%; height:28px; line-height:28px; margin:0 0 0 1%; padding:0;'>" + "&#10003;" + "</div>" + " <div class='SM-button' id='GLOBAL_CALLS_PLAYER' style='float:left; width:39%; height:28px; line-height:28px; margin:0 0 0 1%; padding:0;'>" + "All Slaves" + "</div>" + "</div>" + // Extra core information:
    "<div class='container-full-width' style='margin-bottom:0;'>" + "<div style='width:25%; float:left; font-weight:bold; margin:0; padding:0;'>" + "Location" + "</div>" + "<div style='float:left; width:15%; font-weight:bold; margin:0; padding:0;'>" + "<b style='color:" + Colour.AFFECTION.toWebHexString() + ";'>Affection</b>" + "</div>" + "<div style='float:left; width:15%; font-weight:bold; margin:0; padding:0;'>" + "<b style='color:" + Colour.OBEDIENCE.toWebHexString() + ";'>Obedience</b>" + "</div>" + "<div style='float:left; width:15%; font-weight:bold; margin:0; padding:0;'>" + "<b>Job</b>" + "</div>" + "<div style='float:left; width:15%; font-weight:bold; margin:0; padding:0;'>" + "<b style='color:" + Colour.CURRENCY_GOLD.toWebHexString() + ";'>Income</b>" + "</div>" + "<div style='width:15%; float:left; font-weight:bold; margin:0; padding:0;'>" + "Value" + "</div>" + "</div>" + "<div class='container-full-width inner'>" + "<div style='width:25%; float:left; margin:0; padding:0;'>" + "<b style='color:" + character.getLocationPlace().getColour().toWebHexString() + ";'>" + character.getLocationPlace().getName() + "</b>" + ",</br>" + "<span style='color:" + character.getWorldLocation().getColour().toWebHexString() + ";'>" + character.getWorldLocation().getName() + "</span>" + "</div>" + "<div style='float:left; width:15%; margin:0; padding:0;'>" + "<b style='color:" + affection.getColour().toWebHexString() + ";'>" + character.getAffection(Main.game.getPlayer()) + // TODO
    "</b>" + "</br><span style='color:" + (affectionChange == 0 ? Colour.BASE_GREY : (affectionChange > 0 ? Colour.GENERIC_GOOD : Colour.GENERIC_BAD)).toWebHexString() + ";'>" + (affectionChange > 0 ? "+" : "") + decimalFormat.format(affectionChange) + "</span>/day" + "</br>" + "<span style='color:" + affection.getColour().toWebHexString() + ";'>" + Util.capitaliseSentence(affection.getName()) + "</span>" + "</div>" + "<div style='float:left; width:15%; margin:0; padding:0;'>" + "<b style='color:" + obedience.getColour().toWebHexString() + ";'>" + character.getObedienceValue() + "</b>" + "</br><span style='color:" + (obedienceChange == 0 ? Colour.BASE_GREY : (obedienceChange > 0 ? Colour.GENERIC_GOOD : Colour.GENERIC_BAD)).toWebHexString() + ";'>" + (obedienceChange > 0 ? "+" : "") + decimalFormat.format(obedienceChange) + "</span>/day" + "</br>" + "<span style='color:" + obedience.getColour().toWebHexString() + ";'>" + Util.capitaliseSentence(obedience.getName()) + "</span>" + "</div>" + "<div style='float:left; width:15%; margin:0; padding:0;'>" + Util.capitaliseSentence(character.getSlaveJob().getName(character)));
    for (SlaveJobSetting setting : character.getSlaveJobSettings()) {
        headerSB.append("</br><span style='color:" + setting.getColour().toWebHexString() + ";'>" + setting.getTag() + "</span>");
    }
    headerSB.append("</div>" + "<div style='float:left; width:15%; margin:0; padding:0;'>" + UtilText.formatAsMoney(character.getSlaveJob().getFinalDailyIncomeAfterModifiers(character)) + "/day" + "</div>" + "<div style='float:left; width:15%; margin:0; padding:0;'>" + UtilText.formatAsMoney(character.getValueAsSlave()) + "</div>" + "</div>" + "<div class='container-full-width inner'>" + "<b style='color:" + Colour.GENERIC_ARCANE.toWebHexString() + ";'>Permissions:</b></br>");
    int permissionCount = 0;
    for (SlavePermission permission : SlavePermission.values()) {
        for (SlavePermissionSetting setting : permission.getSettings()) {
            if (character.getSlavePermissionSettings().get(permission).contains(setting)) {
                headerSB.append((permissionCount == 0 ? "" : ", ") + "<span style='color:" + permission.getColour().toWebHexString() + ";'>" + setting.getName() + "</span>");
                permissionCount++;
            }
        }
    }
    headerSB.append(".</div>" + "</div>" + "</div>");
    return headerSB.toString();
}
Also used : AffectionLevel(com.lilithsthrone.game.character.attributes.AffectionLevel) SlaveJobSetting(com.lilithsthrone.game.slavery.SlaveJobSetting) SlavePermissionSetting(com.lilithsthrone.game.slavery.SlavePermissionSetting) ObedienceLevel(com.lilithsthrone.game.character.attributes.ObedienceLevel) SlavePermission(com.lilithsthrone.game.slavery.SlavePermission)

Aggregations

AffectionLevel (com.lilithsthrone.game.character.attributes.AffectionLevel)1 ObedienceLevel (com.lilithsthrone.game.character.attributes.ObedienceLevel)1 SlaveJobSetting (com.lilithsthrone.game.slavery.SlaveJobSetting)1 SlavePermission (com.lilithsthrone.game.slavery.SlavePermission)1 SlavePermissionSetting (com.lilithsthrone.game.slavery.SlavePermissionSetting)1