code:
# Auto detect text files and perform LF normalization
* text=auto

repo_name: Fulco/BlueLinuxBastion

path: .gitattributes

license: mit


code:
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature.  For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
  push:
    branches: [ "main" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main" ]
  schedule:
    - cron: '37 9 * * 0'

permissions:
  contents: read

jobs:
  codacy-security-scan:
    permissions:
      contents: read # for actions/checkout to fetch code
      security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
      actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
    name: Codacy Security Scan
    runs-on: ubuntu-latest
    steps:
      # Checkout the repository to the GitHub Actions runner
      - name: Checkout code
        uses: actions/checkout@v4

      # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
      - name: Run Codacy Analysis CLI
        uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
        with:
          # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
          # You can also omit the token and run the tools that support default configurations
          # project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
          verbose: true
          output: results.sarif
          format: sarif
          # Adjust severity of non-security issues
          gh-code-scanning-compat: true
          # Force 0 exit code to allow SARIF file generation
          # This will handover control about PR rejection to the GitHub side
          max-allowed-issues: 2147483647

      # Upload the SARIF file generated in the previous step
      - name: Upload SARIF results file
        uses: github/codeql-action/upload-sarif@v2
        with:
          sarif_file: results.sarif


code:
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in this community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

Here are some examples of hypothetical unacceptable behavior within a GitHub-type development community:

- Harassment and discrimination: Engaging in any form of harassment, discrimination, or personal attacks based on race, gender, sexual orientation, religion, or any other protected characteristic.

- Offensive language and conduct: Using offensive, derogatory, or inappropriate language, or engaging in conduct that creates a hostile or intimidating environment for other community members.

- Trolling and spamming: Posting irrelevant, inflammatory, or repetitive content with the intent to provoke or disrupt the community.

- Violation of privacy: Sharing private or personal information about other community members without their explicit consent.

- Intellectual property infringement: Submitting or sharing content that violates intellectual property rights, such as copyrighted material or patented code, without proper attribution or permission.

- Malicious code and security vulnerabilities: Intentionally introducing malicious code, exploits, or security vulnerabilities into the project's codebase or dependencies.

- Abuse of the contribution process: Submitting pull requests or issues that are not constructive, are duplicates, or are designed to waste maintainers' time and effort.

- Unethical or illegal activities: Engaging in any unethical or illegal activities, such as promoting or encouraging harmful or dangerous behavior.

- Disrespect for project maintainers: Disregarding or disrespecting the decisions, guidelines, or authority of project maintainers and moderators.

- Violation of the code of conduct: Failing to adhere to the project's code of conduct or other established community guidelines.


code:
# Contributing to RapidEnum

Thank you for your interest in contributing to RapidEnum! We welcome contributions from the community to help improve and enhance the functionality of this tool.

## How to Contribute

1. Fork the repository on GitHub.
2. Create a new branch from the `main` branch for your feature or bug fix.
3. Make your changes in the new branch.
4. Ensure that your code follows the project's coding style and conventions.
5. Write clear, concise, and descriptive commit messages.
6. Test your changes thoroughly to ensure they work as expected.
7. Push your changes to your forked repository.
8. Submit a pull request to the `main` branch of the original repository.

## Guidelines

To ensure a smooth contribution process, please adhere to the following guidelines:

- Before starting work on a new feature or bug fix, check the existing issues and pull requests to avoid duplication of effort.
- If you're proposing a new feature, please open an issue first to discuss it with the maintainers.
- Write clean, readable, and well-documented code.
- Follow the existing coding style and conventions used in the project.
- Include relevant tests for your changes to ensure code quality and prevent regressions.
- Keep your pull requests focused and limited to a single feature or bug fix.
- Be responsive to feedback and be willing to make changes to your pull request if requested.

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms.

## Reporting Issues

If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. When reporting issues, please provide as much detail as possible, including steps to reproduce the problem, expected behavior, and actual behavior.

## Contact

If you have any questions or need further assistance, you can contact the project maintainers at [security@fulco.net].

Thank you for your contributions!


code:
# Blue Linux Bastion: Linux System Hardening Scripts

This repository contains a set of scripts designed to enhance the security of Linux systems. These scripts are designed for blue teams during security competitions or for anyone looking to implement stringent security measures on their Linux systems. They are designed for my personal needs and may not meet your own.

![Image of the Bastion](https://github.com/fulco/BlueLinuxBastion/assets/802660/52bd88c5-a985-4ed2-af29-9698733b0198)

## Scripts Overview

### userkiller.sh

This script is the main hardening script that performs the following tasks:
- Logs out all users (except the specified user and root) and kills their processes
- Clears cron jobs for all users (except the specified user and root)
- Changes passwords for all users (except the specified user and root)
- Updates the SSH daemon (sshd) to listen on a custom port (defined by `$NEW_SSH_PORT`)
- Configures firewall rules using UFW (Uncomplicated Firewall) or iptables based on a specified input file
- Creates a backup admin user with sudo access for emergency purposes
- Logs script actions to a file for future reference and troubleshooting (default log file: `/var/log/userkiller.log`, can be changed with an optional argument)
- Generates the `croncheck.sh` script and `cronline.txt` file for periodic system checks
- Manages system services by displaying enabled and running services and allowing the user to selectively disable non-needed services

### croncheck.sh

This script is generated by the `userkiller.sh` script and is designed to be run periodically via cron to ensure that the system remains hardened. It performs the following checks:
- Verifies that the backup admin user exists and has sudo access
- Checks if the SSH configuration file is unchanged and has the immutable flag set
- Checks if the firewall rules are unchanged based on the defined rules (port specified by `$NEW_SSH_PORT`)

### cronline.txt

This file is generated by the `userkiller.sh` script and contains a sample cron entry to run the `croncheck.sh` script periodically and log any failures to the `/var/log/croncheck_failure.log` file.

### conchecker.sh

The `conchecker.sh` script is designed to monitor network connections on the Linux system and identify unauthorized connections. It performs the following tasks:
- Retrieves the current user's SSH connection IP and excludes it from the checks
- Parses the output of `netstat -antp` to extract connection details
- Checks if each connection is allowed based on the `allowed_ips.txt` file
- If a connection is unauthorized:
  - Prompts the user to kill the associated process
  - Prompts the user to add a firewall rule to block the connection
- Logs detailed information about the script's actions with timestamps

### rapidenum.sh

The `rapidenum.sh` script is designed to perform more network scans (as may be of use during competitions) using Nmap to check for open ports associated with specific TCP and UDP services on a given network range. It includes various optimizations to speed up the scanning process:
- Parallelizes the scans by splitting the network range into smaller subsets
- Adjusts Nmap timing and performance options for faster scanning
- Limits the scanned ports based on prior knowledge of likely open ports
- Uses Nmap's ping sweep to identify live hosts before scanning for open ports
- Optimizes the script by removing unnecessary output and using efficient command-line tools

## Usage, Prerequisites, Configuration, and More

For detailed information on how to use these scripts, including prerequisites, configuration, troubleshooting, and more, please refer to the [Blue Linux Bastion Wiki](https://github.com/fulco/BlueLinuxBastion/wiki).

## Contributing

Contributions are welcome to enhance the scripts' functionality or documentation. Please fork the repository, make your changes, and submit a pull request for review.

## License

This project is released under the [MIT License](https://opensource.org/licenses/MIT).

## Disclaimer

These scripts are provided as-is and should be used with caution. It is recommended to test the scripts in a non-production environment before applying them to critical systems. The scripts make significant changes to user accounts, processes, and system configurations, so ensure that you have appropriate backups and understand the implications of running the scripts.


code:
# Security Policy

## Supported Versions

The BlueLinuxBastion project is an open-source initiative, and we encourage users to use the latest version of the scripts available in the repository. We actively maintain and update the scripts to address any security vulnerabilities or improvements.

| Version | Supported          |
| ------- | ------------------ |
| latest  | :white_check_mark: |

## Reporting a Vulnerability

We take security vulnerabilities seriously and appreciate the efforts of the community in identifying and reporting them responsibly. If you discover a security vulnerability in the BlueLinuxBastion scripts or have suggestions for improving the project's security, please follow these steps:

1. **Do not disclose the vulnerability publicly** until it has been addressed by the project maintainers.

2. Create a new issue on the [GitHub repository](https://github.com/fulco/BlueLinuxBastion/issues) with the following details:
   - A clear description of the vulnerability or security concern.
   - Steps to reproduce the vulnerability, if applicable.
   - Any additional information or context that may be helpful in understanding and resolving the issue.

3. Apply the "security" label to the issue to ensure prompt attention from the project maintainers.

4. The project maintainers will acknowledge receipt of your report within 48 hours and provide an estimated timeline for addressing the vulnerability.

5. We kindly request that you do not disclose the vulnerability publicly until it has been resolved and a patch or update has been released.

## Security Best Practices

When using the BlueLinuxBastion scripts in your environment, consider the following security best practices:

1. **Review and Customize**: Before deploying the scripts, thoroughly review the code and customize it according to your specific security requirements and environment.

2. **Test in Non-Production**: Always test the scripts in a non-production environment before applying them to critical systems. Ensure that the scripts behave as expected and do not introduce any unintended consequences.

3. **Secure Script Execution**: Ensure that the scripts are executed with appropriate privileges and access controls. Protect the scripts and their associated files from unauthorized access or modification.

4. **Monitor and Audit**: Regularly monitor the system logs and audit trails generated by the scripts. Investigate any suspicious activities or anomalies promptly.

5. **Keep Scripts Updated**: Stay informed about updates and releases of the BlueLinuxBastion project. Regularly update the scripts to benefit from bug fixes, security enhancements, and new features.

6. **Educate Team Members**: Ensure that all team members who use or interact with the BlueLinuxBastion scripts are aware of the security guidelines and best practices outlined in this policy.

## Acknowledgments

We would like to express our gratitude to the security researchers, contributors, and users who have helped identify and report vulnerabilities in the BlueLinuxBastion project. Your efforts contribute to making the project more secure and reliable for the community.

## Contact

If you have any questions, concerns, or feedback regarding the security of the BlueLinuxBastion project, please contact the project maintainers at [security@fulco.net](security@fulco.net).


code:
#!/bin/bash

# Redirects all output to a log file while also displaying it on the console.
exec > >(tee -a /var/log/conchecker.log) 2>&1

# Function to log messages with timestamps
log() {
    local message=$1
    echo "$(date '+%Y-%m-%d %H:%M:%S'): $message"
}

# Checks if the script is run as root, exits if not.
check_run_as_root() {
    if [ "$(id -u)" -ne 0 ]; then
        log "This script must be run as root"
        exit 1
    fi
}

# Validates that a username is provided as a parameter.
validate_parameters() {
    if [ -z "$1" ]; then
        log "Usage: $0 <username_to_exclude>"
        exit 1
    fi
}

# Verify the allowed_ips.txt file
verify_allowed_ips_file() {
    if [ ! -f "$ALLOWED_CONNECTIONS_FILE" ]; then
        log "The allowed_ips.txt file does not exist."
        log "Please create the file and add allowed IP addresses, one per line."
        exit 1
    fi

    if [ ! -s "$ALLOWED_CONNECTIONS_FILE" ]; then
        log "The allowed_ips.txt file is empty."
        log "Please add allowed IP addresses to the file, one per line."
        exit 1
    fi
}

# Validates that exactly one argument is provided.
if [ $# -ne 1 ]; then
    log "Incorrect usage. Please provide exactly one username as an argument."
    log "Usage: $0 <username_to_exclude>"
    exit 1
fi

# Constants
NEW_SSH_PORT=2298  # Define your SSH port here
ALLOWED_CONNECTIONS_FILE="allowed_ips.txt"
CURRENT_USER=$1

# Check if the script is run as root
check_run_as_root

# Validate the provided username parameter
validate_parameters "$CURRENT_USER"

# Verify the allowed_ips.txt file
verify_allowed_ips_file

# Function to check for the availability of firewall tools
check_firewall_tool() {
    if command -v ufw > /dev/null; then
        echo "ufw"
    elif command -v iptables > /dev/null; then
        echo "iptables"
    else
        echo "none"
    fi
}

# Function to add firewall rules
add_firewall_rule() {
    local local_ip=$1
    local remote_ip=$2
    local tool=$3

    case "$tool" in
        "ufw")
            ufw deny from "$remote_ip" to "$local_ip"
            log "Firewall rule added using ufw to block $remote_ip to $local_ip"
            ;;
        "iptables")
            iptables -A INPUT -s "$remote_ip" -d "$local_ip" -j DROP
            log "Firewall rule added using iptables to block $remote_ip to $local_ip"
            ;;
        *)
            log "No firewall tool available to add rule."
            ;;
    esac
}

# Function to kill a process by PID
kill_process() {
    local pid=$1
    local signal=$2
    kill "-$signal" "$pid"
    log "Process with PID $pid killed with signal $signal"
}

# Main function to check connections
check_connections() {
    local current_ssh_connection
    current_ssh_connection=$(who | awk -v user="$CURRENT_USER" '$1 == user {print $NF}' | sed 's/[()]//g')

    local firewall_tool
    firewall_tool=$(check_firewall_tool)

    log "Starting connection checks..."

    netstat -antp | grep 'tcp' | while read -r line; do
        local local_ip
        local_ip=$(echo "$line" | awk '{print $4}')

        local remote_ip
        remote_ip=$(echo "$line" | awk '{print $5}')

        local pid_program
        pid_program=$(echo "$line" | awk '{print $7}' | awk -F'/' '{print $1}')

        local program_name
        program_name=$(echo "$line" | awk '{print $7}' | awk -F'/' '{print $2}')

        # Skip the connection if it belongs to the current user's SSH connection
        if [[ "$program_name" == "sshd" ]] && [[ "$remote_ip" == *"$current_ssh_connection"* ]]; then
            continue
        fi

        # Extract the local port from the local_ip
        local local_port
        local_port=$(echo "$local_ip" | awk -F':' '{print $NF}')

        # Check if the connection is allowed based on the allowed_ips.txt file or if the local port matches NEW_SSH_PORT
        if ! grep -q "$local_ip $remote_ip" "$ALLOWED_CONNECTIONS_FILE" && [ "$local_port" -ne "$NEW_SSH_PORT" ]; then
            log "Unauthorized connection: $local_ip <-> $remote_ip (Process: $program_name, PID: $pid_program)"

            # Prompt the user to kill the unauthorized process
            local answer_kill
            read -r -p "Would you like to kill this process? (yes/no) " answer_kill
            if [[ "$answer_kill" == "yes" ]]; then
                log "User chose to kill the process with PID $pid_program"
                kill_process "$pid_program" "15"
                sleep 5
                if ps -p "$pid_program" > /dev/null; then
                    log "Process with PID $pid_program is still running after SIGTERM, sending SIGKILL"
                    kill_process "$pid_program" "9"
                fi
            else
                log "User chose not to kill the process with PID $pid_program"
            fi

            # Prompt the user to add a firewall rule to block the unauthorized connection
            local answer_firewall
            read -r -p "Would you like to block this connection using firewall? (yes/no) " answer_firewall
            if [[ "$answer_firewall" == "yes" ]]; then
                log "User chose to block the connection from $remote_ip to $local_ip using $firewall_tool"
                add_firewall_rule "$local_ip" "$remote_ip" "$firewall_tool"
            else
                log "User chose not to block the connection from $remote_ip to $local_ip"
            fi
        fi
    done

    log "Connection checks completed."
}

# Running the main function
check_connections


code:
#!/bin/bash

# Check if the script is run as root
if [ "$(id -u)" -ne 0 ]; then
  echo "This script must be run as root"
  exit 1
fi

# Define the backup user
BACKUP_USER="backup_admin"

# Check if the backup user exists
if id "$BACKUP_USER" >/dev/null 2>&1; then
  echo "Backup user $BACKUP_USER exists"
else
  echo "Backup user $BACKUP_USER does not exist"
  exit 1
fi

# Check if the backup user has sudo access
if sudo -l -U "$BACKUP_USER" >/dev/null 2>&1; then
  echo "Backup user $BACKUP_USER has sudo access"
else
  echo "Backup user $BACKUP_USER does not have sudo access"
  exit 1
fi

# Check if the SSH configuration file is unchanged
SSH_CONFIG="/etc/ssh/sshd_config"
if [ "$(sudo lsattr $SSH_CONFIG)" == "----i---------e-- $SSH_CONFIG" ]; then
  echo "SSH configuration file is unchanged"
else
  echo "SSH configuration file has been modified"
  exit 1
fi

# Check if the firewall rules are unchanged
if command -v ufw >/dev/null 2>&1 && ufw status | grep -qw "active"; then
  # Check UFW rules
  if ufw status numbered | grep -qw "98"; then
    echo "UFW rules are unchanged"
  else
    echo "UFW rules have been modified"
    exit 1
  fi
elif command -v iptables >/dev/null 2>&1; then
  # Check iptables rules
  if iptables -L INPUT --line-numbers | grep -q "tcp dpt:98"; then
    echo "iptables rules are unchanged"
  else
    echo "iptables rules have been modified"
    exit 1
  fi
else
  echo "No known firewall (ufw or iptables) is active on this system"
  exit 1
fi

echo "All checks passed successfully"
exit 0


code: 0 * * * * /path/to/script.sh || echo "$(date): Script execution failed" >> /var/log/script_failure.log


code:
#!/bin/bash

# Function to display usage information
usage() {
  echo "Usage: $0 [-d output_directory] [-s service1,service2,...] [-r rate] [-t timeout] network_range"
  echo "  -d output_directory  Specify the output directory for scan results (default: ./HostServices)"
  echo "  -s service1,service2,...  Specify the services to scan (default: all services)"
  echo "  -r rate  Specify the maximum packet rate (default: 1000)"
  echo "  -t timeout  Specify the timeout in seconds for each host (default: 600)"
  echo "  network_range  The network range to scan (e.g., 10.1.1.0/24)"
}

# Parse command-line arguments
output_dir="./HostServices"
services=()
max_rate=1000
timeout=600

while getopts ":d:s:r:t:" opt; do
  case $opt in
    d) output_dir=$OPTARG ;;
    s) IFS=',' read -ra services <<< "$OPTARG" ;;
    r) max_rate=$OPTARG ;;
    t) timeout=$OPTARG ;;
    \?) echo "Invalid option: -$OPTARG" >&2; usage; exit 1 ;;
    :) echo "Option -$OPTARG requires an argument." >&2; usage; exit 1 ;;
  esac
done
shift $((OPTIND-1))

if [ $# -ne 1 ]; then
  usage
  exit 1
fi

network_range="$1"

# Check if Nmap is installed
if ! command -v nmap &> /dev/null; then
  echo "Nmap is not installed. Please install Nmap and try again."
  exit 1
fi

# Create the output directory if it doesn't exist
mkdir -p "$output_dir"

# Define the services and their corresponding ports
declare -A services_tcp=(
  ["ftp"]=21
  ["ssh"]=22
  ["telnet"]=23
  ["smtp"]=25
  ["dns"]=53
  ["http"]=80
  ["pop3"]=110
  ["imap"]=143
  ["https"]=443
  ["smb"]=445
  ["mssql"]=1433
  ["oracle"]=1521
  ["mysql"]=3306
  ["rdp"]=3389
  ["postgresql"]=5432
  ["vnc"]=5900
  ["http-alt"]=8080
  ["https-alt"]=8443
  ["smtps"]=465
  ["imaps"]=993
  ["pop3s"]=995
  ["mongodb"]=27017
  ["socks"]=1080
  ["squid"]=3128
  ["rpcbind"]=111
  ["pptp"]=1723
)

declare -A services_udp=(
  ["dns"]=53
  ["dhcp-server"]=67
  ["dhcp-client"]=68
  ["tftp"]=69
  ["snmp"]=161
  ["ntp"]=123
  ["ldap"]=389
  ["ws-discovery"]=3389
  ["nfs"]=2049
)

# Perform a ping sweep to identify live hosts
echo "Performing ping sweep on $network_range"
live_hosts=$(nmap -sn --min-rate "$max_rate" --max-retries 1 --max-rtt-timeout 100ms "$network_range" | awk '/is up/{print $2}')

# Perform scans for selected services on live hosts
for service in "${services[@]:-${!services_tcp[@]} ${!services_udp[@]}}"; do
  if [[ ${services_tcp[$service]+_} ]]; then
    port=${services_tcp[$service]}
    protocol="TCP"
  elif [[ ${services_udp[$service]+_} ]]; then
    port=${services_udp[$service]}
    protocol="UDP"
  else
    echo "Unknown service: $service"
    continue
  fi

  echo "Scanning for $service ($protocol port $port) on live hosts"
  output_file="$output_dir/${service}_hosts.txt"

  if [ "$protocol" = "TCP" ]; then
    nmap -sV --min-rate "$max_rate" --max-retries 2 --host-timeout "${timeout}s" -p "$port" --open -oG - "$live_hosts" | awk '/Status: Open/{print $2}' > "$output_file"
  else
    nmap -sU -sV --min-rate "$max_rate" --max-retries 2 --host-timeout "${timeout}s" -p "$port" --open -oG - "$live_hosts" | awk '/Status: Open/{print $2}' > "$output_file"
  fi

  echo "Scan results saved to $output_file"
  echo "Number of live hosts with $service open: $(wc -l < "$output_file")"
  echo "---"
done


code:
#!/bin/bash

DEFAULT_LOG_FILE="/var/log/userkiller.log"

# Function to log messages with timestamps
log() {
    local message=$1
    echo "$(date '+%Y-%m-%d %H:%M:%S'): $message"
}

# Checks if the script is run as root, exits if not.
check_run_as_root() {
    if [ "$(id -u)" -ne 0 ]; then
        log "This script must be run as root"
        exit 1
    fi
}

# Validates that a username is provided as a parameter, and optionally a log file path.
validate_parameters() {
    if [ -z "$1" ]; then
        log "Usage: $0 <username_to_exclude> [log_file_path]"
        exit 1
    fi
}

# Validates that one or two arguments are provided.
if [ $# -lt 1 ] || [ $# -gt 2 ]; then
    log "Incorrect usage. Please provide a username and optionally a log file path as arguments."
    log "Usage: $0 <username_to_exclude> [log_file_path]"
    exit 1
fi

# Validates that the SSH port is a number between 1024 and 65535.
validate_ssh_port() {
    if ! [[ "$NEW_SSH_PORT" =~ ^[0-9]+$ ]] || [ "$NEW_SSH_PORT" -lt 1024 ] || [ "$NEW_SSH_PORT" -gt 65535 ]; then
        log "Invalid SSH port number: $NEW_SSH_PORT. It must be between 1024 and 65535."
        exit 1
    fi
}

# Prompts the user for a new password and verifies it.
setup_passwords() {
    while true; do
        read -rsp "Enter new password for users: " NEW_PASSWORD
        echo
        read -rsp "Repeat new password: " REPEAT_PASSWORD
        echo
        if [ "$NEW_PASSWORD" != "$REPEAT_PASSWORD" ]; then
            echo "Passwords do not match. Please try again."
        elif [ ${#NEW_PASSWORD} -lt 8 ]; then
            echo "Password must be at least 8 characters long."
        else
            break
        fi
    done
}

# Processes each user, kills their processes, removes their crontabs, and updates their passwords.
process_users() {
    USERS=$(awk -v exclude="$EXCLUDE_USER" -F: '$7 ~ /(bash|sh)$/ && $1 != exclude && $1 != "root" {print $1}' /etc/passwd)
    for USER in $USERS; do
        log "Processing user $USER"

        # Kill all processes for the user
        if pkill -u $USER; then
            log "Successfully killed processes for $USER."
        else
            log "Failed to kill processes for $USER. User may not have been running any processes." >&2
        fi

        # Remove user's crontab
        if crontab -r -u $USER 2>/dev/null; then
            log "Successfully removed crontab for $USER."
        else
            log "Failed to remove crontab for $USER or no crontab exists." >&2
            # Continue to the next user
            continue
        fi

        # Update user's password
        if echo "$USER:$NEW_PASSWORD" | chpasswd; then
            log "Password updated successfully for $USER."
        else
            log "Failed to update password for $USER." >&2
            # Continue to the next user
            continue
        fi
    done
}

# Creates a backup user with sudo privileges if it doesn't exist.
create_backup_user() {
    BACKUP_USER="backup_admin"
    if id "$BACKUP_USER" >/dev/null 2>&1; then
        log "Backup user $BACKUP_USER already exists. Skipping creation."
    else
        if useradd -m -s /bin/bash "$BACKUP_USER"; then
            if echo "$BACKUP_USER:$NEW_PASSWORD" | chpasswd; then
                if usermod -aG sudo "$BACKUP_USER"; then
                    log "Backup user $BACKUP_USER created with sudo access"
                else
                    log "Failed to add backup user $BACKUP_USER to sudo group"
                    exit 1
                fi
            else
                log "Failed to set password for backup user $BACKUP_USER"
                exit 1
            fi
        else
            log "Failed to create backup user $BACKUP_USER"
            exit 1
        fi
    fi
}

# Function to manage services
manage_services() {
    log "Listing enabled and running services..."
    systemctl list-units --type=service --state=running --no-pager

    read -rp "Enter the names of services to disable (space-separated), or press Enter to skip: " services_to_disable

    if [ -n "$services_to_disable" ]; then
        for service in $services_to_disable; do
            log "Stopping and disabling service: $service"
            if systemctl stop "$service" && systemctl disable "$service"; then
                log "Service $service has been stopped and disabled successfully."
            else
                log "Failed to stop or disable service: $service"
            fi
        done
    else
        log "No services selected for disabling."
    fi
}

# Updates the SSH daemon configuration to listen on a new port and disables root user login.
# Set the immutable flag on the SSH configuration file, moves the default chattr file to /var/log/chatol, and creates a script to replace it.
update_sshd_config() {

    if [ ! -f "$SSHD_CONFIG" ]; then
        log "SSH configuration file not found at $SSHD_CONFIG."
        exit 1
    fi

    if ! sed -i '/^#[ \t]*Port /s/^#//' "$SSHD_CONFIG" || ! sed -i "/^Port /c\\Port $NEW_SSH_PORT" "$SSHD_CONFIG"; then
        log "Failed to modify Port line in $SSHD_CONFIG."
        exit 1
    fi

    if grep -q "^PermitRootLogin" "$SSHD_CONFIG"; then
        sed -i 's/^PermitRootLogin.*/PermitRootLogin no/' "$SSHD_CONFIG"
        log "PermitRootLogin has been set to 'no' in $SSHD_CONFIG."
    else
        echo "PermitRootLogin no" >> "$SSHD_CONFIG"
        log "PermitRootLogin 'no' has been added to $SSHD_CONFIG."
    fi

    if ! systemctl restart sshd.service; then
        log "Failed to restart SSH service."
        exit 1
    fi
    log "sshd has been configured to listen on port $NEW_SSH_PORT and disabled root user login."

    # Set the immutable flag on the SSH configuration file
    if chattr +i "$SSHD_CONFIG"; then
        log "Immutable flag set on $SSHD_CONFIG."
    else
        log "Failed to set immutable flag on $SSHD_CONFIG."
        exit 1
    fi

    # Move the default chattr file to /var/log/chatol
    if mv /usr/bin/chattr /var/log/chatol; then
        log "Default chattr file moved to /var/log/chatol."
    else
        log "Failed to move default chattr file to /var/log/chatol."
        exit 1
    fi

    # Create a script to replace the default chattr file
    cat > /usr/bin/chattr <<EOL
#!/bin/bash
echo "Oops..."
EOL
    chmod +x /usr/bin/chattr
    log "Replaced chattr file with a script."
}

# Converts an IP range into individual IPs and outputs them.
ip_range_to_ips() {
    IFS='-' read -r start end <<< "$1"
    IFS='.' read -r s1 s2 s3 s4 <<< "$start"
    IFS='.' read -r e1 e2 e3 e4 <<< "$end"

    start_dec=$(($s1 * 16777216 + $s2 * 65536 + $s3 * 256 + $s4))
    end_dec=$(($e1 * 16777216 + $e2 * 65536 + $e3 * 256 + $e4))

    for ip_dec in $(seq $start_dec $end_dec); do
        # Convert integers back to IP addresses
        echo "$((ip_dec >> 24 & 255)).$((ip_dec >> 16 & 255)).$((ip_dec >> 8 & 255)).$((ip_dec & 255))"
    done
}

# Configures the firewall using either ufw or iptables, depending on what is available.
configure_firewall() {
    if command -v ufw >/dev/null 2>&1; then
        # Configuring firewall with ufw
        log "Configuring firewall with ufw..."
        ufw --force reset
        ufw default deny incoming
        ufw default allow outgoing

        # Allow new SSH port globally
        ufw allow $NEW_SSH_PORT comment 'Global SSH access'
        log "Allowed global access on the new SSH port $NEW_SSH_PORT"

        # Process firewall rules from a file
        while IFS=' ' read -r ip_or_range port; do
            if [[ "$ip_or_range" == *-* ]]; then
                # Expand IP ranges into individual IPs for ufw
                for ip in $(ip_range_to_ips "$ip_or_range"); do
                    ufw allow from "$ip" to any port $port comment 'Range Specified port'
                    log "Allowed $ip on port $port"
                done
            else
                # Handle single IP/CIDR
                ufw allow from "$ip_or_range" to any port $port comment 'Specified port'
                log "Allowed $ip_or_range on port $port"
            fi
        done < "$INPUT_FILE"
        ufw --force enable
        log "UFW rules have been updated based on $INPUT_FILE."
    elif command -v iptables >/dev/null 2>&1; then
        log "Configuring firewall with iptables..."
        # Flush existing rules
        iptables -F
        # Set default policies
        iptables -P INPUT DROP
        iptables -P FORWARD DROP
        iptables -P OUTPUT ACCEPT

        # Allow SSH on the new port globally
        iptables -A INPUT -p tcp --dport $NEW_SSH_PORT -j ACCEPT
        log "Allowed global access on the new SSH port $NEW_SSH_PORT"

        # Process firewall rules from a file
        while IFS=' ' read -r ip_or_range port; do
            if [[ "$ip_or_range" == *-* ]]; then
                # Handle IP ranges using CIDR notation for iptables
                iptables -A INPUT -p tcp -m iprange --src-range $ip_or_range --dport $port -j ACCEPT
                log "Allowed $ip_or_range on port $port"
            else
                # Handle single IP/CIDR
                iptables -A INPUT -p tcp -s "$ip_or_range" --dport $port -j ACCEPT
                log "Allowed $ip_or_range on port $port"
            fi
        done < "$INPUT_FILE"
        log "iptables rules have been updated based on $INPUT_FILE."
    else
        log "No known firewall (ufw or iptables) is active on this system."
    fi
}

# Generates the croncheck.sh file
generate_croncheck_script() {
    cat > croncheck.sh <<EOL
#!/bin/bash

# Check if the script is run as root
if [ "\$(id -u)" -ne 0 ]; then
  echo "This script must be run as root"
  exit 1
fi

# Define the backup user
BACKUP_USER="$BACKUP_USER"

# Check if the backup user exists
if ! id "\$BACKUP_USER" >/dev/null 2>&1; then
  echo "Backup user \$BACKUP_USER does not exist"
  exit 1
fi

# Check if the backup user has sudo access
if ! sudo -l -U "\$BACKUP_USER" >/dev/null 2>&1; then
  echo "Backup user \$BACKUP_USER does not have sudo access"
  exit 1
fi

# Check if the SSH configuration file is unchanged
SSH_CONFIG="$SSHD_CONFIG"
if [ "\$(sudo lsattr \$SSH_CONFIG 2>/dev/null)" != "----i---------e--, \$SSH_CONFIG" ]; then
  echo "SSH configuration file has been modified"
  exit 1
fi

# Check if the firewall rules are unchanged
if command -v ufw >/dev/null 2>&1 && ufw status | grep -qw "active"; then
  # Check UFW rules
  if ! ufw status numbered | grep -qw "$NEW_SSH_PORT"; then
    echo "UFW rules have been modified"
    exit 1
  fi
elif command -v iptables >/dev/null 2>&1; then
  # Check iptables rules
  if ! iptables -L INPUT --line-numbers | grep -q "tcp dpt:$NEW_SSH_PORT"; then
    echo "iptables rules have been modified"
    exit 1
  fi
else
  echo "No known firewall (ufw or iptables) is active on this system"
  exit 1
fi

echo "All checks passed successfully"
exit 0
EOL

    chmod +x croncheck.sh
    log "croncheck.sh script generated successfully."
}

# Generates the cronline.txt file
generate_cronline_file() {
    cat > cronline.txt <<EOL
0 * * * * $(pwd)/croncheck.sh || echo "\$(date): Script execution failed" >> /var/log/croncheck_failure.log
EOL

    log "cronline.txt file generated successfully."
}

# Log processes and their associated executables
log_processes() {
    log "Logging processes and their associated executables"
    sudo ls -l /proc/[0-9]*/exe 2>/dev/null | awk '/ -> / && !/\/usr\/(lib(exec)?|s?bin)\// {print $9, $10, $11}' | sed 's,/proc/\([0-9]*\)/exe,\1,' | tee -a /var/log/process_executables.log
}

# Main function to execute the script
main() {
    check_run_as_root
    validate_parameters "$@"
    EXCLUDE_USER=$1
    if [ $# -eq 2 ]; then
        LOG_FILE=$2
    else
        LOG_FILE=$DEFAULT_LOG_FILE
    fi
    exec > >(tee -a "$LOG_FILE") 2>&1  # Redirect output to the specified or default log file
    NEW_SSH_PORT=2298  # Define your SSH port here
    INPUT_FILE="allowed_ips.txt"  # Define your input file name here
    validate_ssh_port "$NEW_SSH_PORT"
    SSHD_CONFIG="/etc/ssh/ssh_config"
    setup_passwords
    log_processes  # Log processes before making changes
    process_users
    create_backup_user
    update_sshd_config
    manage_services
    configure_firewall
    generate_croncheck_script
    generate_cronline_file
    log "Operations complete for all users except $EXCLUDE_USER, $BACKUP_USER, and root."

    log_processes  # Log processes after making changes
}

main "$@"


code:
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs     diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln       merge=binary
#*.csproj    merge=binary
#*.vbproj    merge=binary
#*.vcxproj   merge=binary
#*.vcproj    merge=binary
#*.dbproj    merge=binary
#*.fsproj    merge=binary
#*.lsproj    merge=binary
#*.wixproj   merge=binary
#*.modelproj merge=binary
#*.sqlproj   merge=binary
#*.wwaproj   merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg   binary
#*.png   binary
#*.gif   binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc   diff=astextplain
#*.DOC   diff=astextplain
#*.docx  diff=astextplain
#*.DOCX  diff=astextplain
#*.dot   diff=astextplain
#*.DOT   diff=astextplain
#*.pdf   diff=astextplain
#*.PDF   diff=astextplain
#*.rtf   diff=astextplain
#*.RTF   diff=astextplain


code:
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
*.csproj.user

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
project.fragment.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
/Archived
/MyTo-Do.txt
/LL_post.txt
/creditsnew.txt
/Assemblies/UnityEngine.UI.dll
/Assemblies/UnityEngine.dll
/Assemblies/TextMeshPro-1.0.55.56.0b11.dll
/Assemblies/NVorbis.dll
/Assemblies/NAudio.dll
/Assemblies/HugsLib.dll
/Assemblies/Assembly-CSharp.dll
/Assemblies/Assembly-CSharp-firstpass.dll
/Assemblies/0Harmony.dll
/RimJobWorld.Main.sln
/.gitignore

path: .gitignore


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<rjw.BackstoryDef>
		<defName>rjw_childC</defName>
		<baseDescription>[PAWN_nameDef] was born in civil settlement.</baseDescription>
		<title>Child</title>
		<titleShort>Child</titleShort>
		<slot>Childhood</slot>
		<categoryName>Civil</categoryName>
	</rjw.BackstoryDef>

	<rjw.BackstoryDef>
		<defName>rjw_childT</defName>
		<baseDescription>[PAWN_nameDef] was born in a tribe.</baseDescription>
		<title>Child</title>
		<titleShort>Child</titleShort>
		<slot>Childhood</slot>
		<categoryName>Tribal</categoryName>
	</rjw.BackstoryDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<BodyPartDef>
		<defName>Genitals</defName>
		genitals
		<hitPoints>12</hitPoints>
		<frostbiteVulnerability>0.01</frostbiteVulnerability>
		<skinCovered>true</skinCovered>
		<solid>false</solid>
		<canSuggestAmputation>false</canSuggestAmputation>
		<bleedRate>1.0</bleedRate>
		<tags>

RJW_Fertility

		</tags>
	</BodyPartDef>

	<BodyPartDef>
		<defName>Chest</defName>
		chest
		<hitPoints>24</hitPoints>
		<frostbiteVulnerability>0.01</frostbiteVulnerability>
		<skinCovered>true</skinCovered>
		<solid>false</solid>
		<canSuggestAmputation>false</canSuggestAmputation>
		<bleedRate>1.0</bleedRate>
	</BodyPartDef>

	<BodyPartDef>
		<defName>Anus</defName>
		anus
		<hitPoints>8</hitPoints>
		<frostbiteVulnerability>0.01</frostbiteVulnerability>
		<skinCovered>true</skinCovered>
		<solid>false</solid>
		<canSuggestAmputation>false</canSuggestAmputation>
		<bleedRate>1.0</bleedRate>
	</BodyPartDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<BodyPartDef>
		<defName>MechGenitals</defName>
		mechanoid implanter
		<hitPoints>20</hitPoints>
		<skinCovered>true</skinCovered>
		<solid>true</solid>
		<canSuggestAmputation>false</canSuggestAmputation>
		<bleedRate>0</bleedRate>
		<frostbiteVulnerability>0.0</frostbiteVulnerability>
		<tags>

RJW_Fertility

		</tags>
	</BodyPartDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<BodyPartTagDef>
		<defName>RJW_Fertility</defName>
		<label>fertility_source</label>
		<description>Neccessary for reproduction</description>
		<vital>false</vital>
	</BodyPartTagDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<DamageDef>
		<defName>ViralDamage</defName>
		<workerClass>DamageWorker_AddInjury</workerClass>
		<label>viral damage</label>
		<externalViolence>false</externalViolence>
		<deathMessage>{0} has died of a disease.</deathMessage>
		<hediff>VirusPerma</hediff>
		<hediffSkin>VirusPerma</hediffSkin>
		<hediffSolid>VirusPerma</hediffSolid>
		<makesBlood>false</makesBlood>
		<harmAllLayersUntilOutside>false</harmAllLayersUntilOutside>
	</DamageDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<ThingDef ParentName="MakeableDrugBase">
		<defName>Aphrodisiac</defName>
		Aphrodisiac drug
		<description>A smokable drug made from humpshroom.</description>
		<graphicData>
			<texPath>Things/Item/Drug/Penoxycyline</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<rotatable>false</rotatable>
		<statBases>
			<WorkToMake>450</WorkToMake>
			<MarketValue>50</MarketValue>
			<Mass>0.05</Mass>
			<DeteriorationRate>6</DeteriorationRate>
			<Flammability>1.3</Flammability>
		</statBases>
		<techLevel>Medieval</techLevel>
		<ingestible>
			<foodType>Plant, Processed</foodType>
			<joyKind>Chemical</joyKind>
			<joy>0.80</joy>
			<baseIngestTicks>720</baseIngestTicks>
			<nurseable>true</nurseable>
			<drugCategory>Social</drugCategory>
			<ingestSound>Ingest_Smoke</ingestSound>
			<ingestEffect>Smoke_Joint</ingestEffect>
			<ingestEffectEat>EatVegetarian</ingestEffectEat>
			<ingestHoldOffsetStanding>
				<northDefault>
					<offset>(0.27,0,0.08)</offset>
					<behind>true</behind>
				</northDefault>
				<east>
					<offset>(0.45,0,0.08)</offset>
				</east>
				<south>
					<offset>(0.27,0,0.08)</offset>
				</south>
				<west>
					<offset>(-0.50,0,0.08)</offset>
					<flip>true</flip>
				</west>
			</ingestHoldOffsetStanding>
			<ingestHoldUsesTable>false</ingestHoldUsesTable>
			<ingestCommandString>Smoke {0}</ingestCommandString>
			<ingestReportString>Smoking {0}.</ingestReportString>
			<ingestReportStringEat>Consuming {0}.</ingestReportStringEat>
			<useEatingSpeedStat>false</useEatingSpeedStat>
			<outcomeDoers>

					<hediffDef>HumpShroomEffect</hediffDef>
					<severity>0.6</severity>
					<toleranceChemical>HumpShroom</toleranceChemical>

					<hediffDef>HumpShroomTolerance</hediffDef>
					<severity>0.042</severity>
					<divideByBodySize>true</divideByBodySize>

					<need>Sex</need>
					<offset>-0.5</offset>

			</outcomeDoers>
		</ingestible>
		<recipeMaker>
			<recipeUsers>

CraftingSpot

DrugLab

			</recipeUsers>
			<workSpeedStat>DrugCookingSpeed</workSpeedStat>
			<workSkill>Cooking</workSkill>
		</recipeMaker>
		<costList>
			<HumpShroom>4</HumpShroom>
		</costList>
		<comps>

				<chemical>HumpShroom</chemical>
				<addictiveness>0.030</addictiveness>
				<minToleranceToAddict>0.15</minToleranceToAddict>
				<existingAddictionSeverityOffset>0.1</existingAddictionSeverityOffset>
				<needLevelOffset>1</needLevelOffset>
				<listOrder>30</listOrder>

		</comps>
	</ThingDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>

	<ThingDef ParentName="MakeableDrugPillBase">
		<defName>RJW_Contraceptive</defName>
		Contraception pills
		<description>Deliver severe hit to fertility for one quadrum.</description>
		<graphicData>
			<texPath>Things/Item/Contraceptive</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<rotatable>false</rotatable>
		<statBases>
			<WorkToMake>120</WorkToMake>
			<MarketValue>15</MarketValue>
			<Mass>0.05</Mass>
		</statBases>
		<techLevel>Industrial</techLevel>
		<ingestible>
			<drugCategory>Medical</drugCategory>
			<outcomeDoers>

					<hediffDef>RJW_Contraceptive</hediffDef>
					<severity>1.0</severity>

			</outcomeDoers>
		</ingestible>
		<recipeMaker>
			<researchPrerequisite>DrugProduction</researchPrerequisite>
			<recipeUsers>

DrugLab

			</recipeUsers>
		</recipeMaker>
		<costList>
			<MedicineHerbal>1</MedicineHerbal>
		</costList>
		<comps>

			<addictiveness>0</addictiveness>
			<listOrder>1000</listOrder>
				<overdoseSeverityOffset>
					<min>0.08</min>
					<max>0.14</max>
				</overdoseSeverityOffset>

		</comps>
	</ThingDef>

	<HediffDef>
		<defName>RJW_Contraceptive</defName>
		<hediffClass>HediffWithComps</hediffClass>
		contraceptive
		<description>Contraception pills deliver severe hit to fertility for one quadrum.</description>
		<defaultLabelColor>(0.75, 0.75, 1.0)</defaultLabelColor>
		<isBad>false</isBad>
		<comps>

				<disappearsAfterTicks>
					<min>900000</min>
					<max>900000</max>
				</disappearsAfterTicks>

		</comps>
		<stages>

				Contracepted
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<setMax>0.1</setMax>

				</capMods>

		</stages>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>

	<ThingDef ParentName="MakeableDrugPillBase">
		<defName>RJW_FertPill</defName>
		Hyperfertility pills
		<description>Enhances fertility for 48 hours. Also works as a mild aphrodisiac.</description>
		<graphicData>
			<texPath>Things/Item/FertPill</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<rotatable>false</rotatable>
		<statBases>
			<WorkToMake>120</WorkToMake>
			<MarketValue>15</MarketValue>
			<Mass>0.05</Mass>
		</statBases>
		<techLevel>Industrial</techLevel>
		<ingestible>
			<drugCategory>Medical</drugCategory>
			<outcomeDoers>

					<hediffDef>RJW_FertPill</hediffDef>
					<severity>1.0</severity>

					<need>Sex</need>
					<offset>-0.25</offset>

			</outcomeDoers>
		</ingestible>
		<recipeMaker>
			<researchPrerequisite>DrugProduction</researchPrerequisite>
			<recipeUsers>

DrugLab

			</recipeUsers>
		</recipeMaker>
		<costList>
			<MedicineHerbal>1</MedicineHerbal>
			<HumpShroom>1</HumpShroom>
		</costList>
		<comps>

			<addictiveness>0</addictiveness>
			<listOrder>1000</listOrder>
				<overdoseSeverityOffset>
					<min>0.08</min>
					<max>0.14</max>
				</overdoseSeverityOffset>

		</comps>
	</ThingDef>

	<HediffDef>
		<defName>RJW_FertPill</defName>
		<hediffClass>HediffWithComps</hediffClass>
		fertpill
		<description>Enhanced fertility. A mild aphrodisiac.</description>
		<defaultLabelColor>(0.75, 0.75, 1.0)</defaultLabelColor>
		<isBad>false</isBad>
		<comps>

				<disappearsAfterTicks>
					<min>120000</min>
					<max>120000</max>
				</disappearsAfterTicks>

		</comps>
		<stages>

				Hyperfertility
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<offset>4</offset>

				</capMods>

		</stages>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>

	<ThingDef ParentName="CavePlantBase">
		<defName>PlantHumpShroom</defName>
		humpshroom shroom
		<description>Thick shroom with tough flesh, thick juice and smooth soft skin. Exhibits aphrodisiac effects when consumed, refills psyfocus.</description>
		<statBases>
			<MaxHitPoints>85</MaxHitPoints>
			<Beauty>2</Beauty>
			<Nutrition>0.15</Nutrition>
			<MeditationFocusStrength>1.0</MeditationFocusStrength>
		</statBases>
		<graphicData>
			<texPath>Things/Item/Humpshroom/Humpshroom</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<selectable>true</selectable>
		<pathCost>10</pathCost>
		<plant>
			<fertilityMin>0.01</fertilityMin>
			<fertilitySensitivity>0.25</fertilitySensitivity>
			<growDays>15.00</growDays>
			<harvestTag>Standard</harvestTag>
			<harvestedThingDef>HumpShroom</harvestedThingDef>
			<harvestYield>2</harvestYield>
			<sowMinSkill>4</sowMinSkill>
			<sowTags>

Hydroponic

			</sowTags>
			<topWindExposure>0.1</topWindExposure>
			<visualSizeRange>0.4~0.7</visualSizeRange>
		</plant>
		<comps>

				<glowRadius>1</glowRadius>
				<glowColor>(255,105,180,0)</glowColor>

				<statDef>MeditationFocusStrength</statDef>
				<focusTypes>

Sex

				</focusTypes>

		</comps>
	</ThingDef>

	<ThingDef ParentName="DrugBase">
		<defName>HumpShroom</defName>
		Hump shroom
		<description>A shroom with tough flesh, thick juice and smooth soft skin. Exhibits aphrodisiac effects when consumed, refills psyfocus.</description>
		<tradeability>Sellable</tradeability>
		<socialPropernessMatters>true</socialPropernessMatters>
		<tickerType>Rare</tickerType>
		<graphicData>
			<texPath>Things/Item/Humpshroom/HumpshroomCollected</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<thingCategories>

PlantFoodRaw

		</thingCategories>
		<statBases>
			<MarketValue>10</MarketValue>
			<Mass>0.1</Mass>
			<DeteriorationRate>4</DeteriorationRate>
			<Nutrition>0.40</Nutrition>
		</statBases>
		<techLevel>Neolithic</techLevel>
		<ingestible>
			<baseIngestTicks>100</baseIngestTicks>
			<chairSearchRadius>4</chairSearchRadius>
			<preferability>RawTasty</preferability>
			<tasteThought></tasteThought>
			<foodType>VegetableOrFruit</foodType>
			<maxNumToIngestAtOnce>1</maxNumToIngestAtOnce>
			<optimalityOffsetHumanlikes>-6</optimalityOffsetHumanlikes>
			<optimalityOffsetFeedingAnimals>-11</optimalityOffsetFeedingAnimals>
			<ingestEffect>EatVegetarian</ingestEffect>
			<ingestSound>RawVegetable_Eat</ingestSound>
			<joy>0.5</joy>
			<joyKind>Social</joyKind>
			<nurseable>true</nurseable>
			<drugCategory>Social</drugCategory>
			<outcomeDoers>

					<hediffDef>HumpShroomEffect</hediffDef>
					<severity>0.50</severity>
					<toleranceChemical>HumpShroom</toleranceChemical>

					<hediffDef>HumpShroomTolerance</hediffDef>
					<severity>0.032</severity>
					<divideByBodySize>true</divideByBodySize>

					<need>Sex</need>
					<offset>-0.5</offset>

					<offset>1.0</offset>

		</outcomeDoers>
		</ingestible>
		<comps>

				<daysToRotStart>30</daysToRotStart>
				<rotDestroys>true</rotDestroys>

				<chemical>HumpShroom</chemical>
				<addictiveness>0.050</addictiveness>
				<minToleranceToAddict>0.15</minToleranceToAddict>
				<existingAddictionSeverityOffset>0.1</existingAddictionSeverityOffset>
				<needLevelOffset>1</needLevelOffset>
				<listOrder>30</listOrder>

		</comps>
	</ThingDef>

	<HediffDef>
		<defName>HumpShroomEffect</defName>
		<hediffClass>HediffWithComps</hediffClass>
		Induced libido
		<description>Hump shroom aphrodisiac effects.</description>
		<defaultLabelColor>(1,0,0.5)</defaultLabelColor>
		<scenarioCanAdd>true</scenarioCanAdd>
		<maxSeverity>1.0</maxSeverity>
		<comps>

				<severityPerDay>-0.9</severityPerDay>

		</comps>
		<stages>

				<restFallFactor>1.33</restFallFactor>
				<statOffsets>
					<SexFrequency>2</SexFrequency>
					<SexSatisfaction>0.5</SexSatisfaction>
				</statOffsets>

		</stages>
	</HediffDef>

	<ThoughtDef>
		<defName>HumpShroomEffect</defName>
		<workerClass>ThoughtWorker_Hediff</workerClass>
		<hediff>HumpShroomEffect</hediff>
		<validWhileDespawned>true</validWhileDespawned>
		<stages>

				Humpshroom aftertaste
				<description>Tastes funny.</description>
				<baseMoodEffect>1</baseMoodEffect>

		</stages>
	</ThoughtDef>

	<ChemicalDef>
		<defName>HumpShroom</defName>
		humpshroom
		<addictionHediff>HumpShroomAddiction</addictionHediff>
		<toleranceHediff>HumpShroomTolerance</toleranceHediff>
		<onGeneratedAddictedToleranceChance>0.8</onGeneratedAddictedToleranceChance>
	</ChemicalDef>

	<NeedDef ParentName="DrugAddictionNeedBase">
		<defName>Chemical_HumpShroom</defName>
		<needClass>Need_Chemical</needClass>
		humpshroom
		<description>Person is now hooked on shrooms. Without them, their bedroom performance may fall.</description>
		<listPriority>10</listPriority>
	</NeedDef>

	<HediffDef ParentName="DrugToleranceBase">
		<defName>HumpShroomTolerance</defName>
		humpshroom tolerance
		<description>Hump shroom effects tolerance.</description>
		<isBad>false</isBad>
		<comps>

				<severityPerDay>-0.020</severityPerDay>

				<chemical>HumpShroom</chemical>

		</comps>
	</HediffDef>

	<HediffDef ParentName="AddictionBase">
		<defName>HumpShroomAddiction</defName>
		<hediffClass>Hediff_Addiction</hediffClass>
		humpshroom addiction
		<description>Hump shroom effects addiction.</description>
		<causesNeed>Chemical_HumpShroom</causesNeed>
		<comps>

				<severityPerDay>-0.1</severityPerDay>
				<showDaysToRecover>true</showDaysToRecover>

		</comps>
		<stages>

				withdrawal
				<statOffsets>
					<SexSatisfaction>-1</SexSatisfaction>
				</statOffsets>

		</stages>
	</HediffDef>

	<ThoughtDef>
		<defName>HumpShroomWithdrawal</defName>
		<workerClass>ThoughtWorker_Hediff</workerClass>
		<hediff>HumpShroomAddiction</hediff>
		<validWhileDespawned>true</validWhileDespawned>
		<stages>

				<visible>false</visible>

				humpshroom withdrawal
				<description>I just feel nothing down there.</description>
				<baseMoodEffect>-5</baseMoodEffect>

		</stages>
	</ThoughtDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<HediffDef Name="BondageBase" Abstract="True">
		<hediffClass>Hediff</hediffClass>
		<defaultLabelColor>(0.5, 0.5, 0.9)</defaultLabelColor>
		<makesSickThought>false</makesSickThought>
		<isBad>false</isBad>
		<tendable>false</tendable>
		<scenarioCanAdd>false</scenarioCanAdd>
	</HediffDef>

	<HediffDef ParentName="BondageBase">
		<defName>Chains</defName>
		chains
		<labelNoun>chains</labelNoun>
		<description>A series of chains that restrict its wearer.</description>
		<stages>

				<capMods>

						<capacity>Manipulation</capacity>
						<setMax>0.35</setMax>

						<capacity>Moving</capacity>
						<setMax>0.35</setMax>

				 </capMods>

		</stages>
	</HediffDef>

	<HediffDef ParentName="BondageBase">
		<defName>BoundHands</defName>
		bound hands
		<labelNoun>bound hands</labelNoun>
		<description>Bound hands.</description>
		<stages>

				<capMods>

						<capacity>Manipulation</capacity>
						<setMax>0.00</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef ParentName="BondageBase">
		<defName>BoundLegs</defName>
		bound legs
		<labelNoun>bound legs</labelNoun>
		<description>Bound legs.</description>
		<stages>

				<capMods>

						<capacity>Moving</capacity>
						<setMax>0.00</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef ParentName="BondageBase">
		<defName>RJW_Restraints</defName>
		Restraints
		<labelNoun>restraints</labelNoun>
		<description>A set of restraints.</description>
		<stages>

				<capMods>

						<capacity>Manipulation</capacity>
						<setMax>0.00</setMax>

						<capacity>Moving</capacity>
						<setMax>0.00</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef ParentName="BondageBase">
		<defName>RJW_Cocoon</defName>
		<hediffClass>rjw.Cocoon</hediffClass>
		Cocoon
		<labelNoun>A cocoon</labelNoun>
		<description>A cocoon that tends to its host until ready to procreate.</description>
		<stages>

				<capMods>

						<capacity>Manipulation</capacity>
						<setMax>0.00</setMax>

						<capacity>Moving</capacity>
						<setMax>0.00</setMax>

				</capMods>
				<statOffsets>
					<ComfyTemperatureMin>-50</ComfyTemperatureMin>
					<ComfyTemperatureMax>50</ComfyTemperatureMax>
				</statOffsets>

		</stages>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

	<HediffDef>
		<defName>Hediff_Bukkake</defName>
		<hediffClass>rjw.Hediff_Bukkake</hediffClass>
		Bukkake
		<description>Ejaculated onto.</description>
		<makesSickThought>false</makesSickThought>
		<initialSeverity>0.01</initialSeverity>
		<maxSeverity>1</maxSeverity>

		<isBad>false</isBad>
		<tendable>false</tendable>
		<stages>

				minor
				<becomeVisible>false</becomeVisible>

				<minSeverity>0.3</minSeverity>
				little
				<statOffsets>
					<Vulnerability>0.2</Vulnerability>
					<SocialImpact>-0.1</SocialImpact>
				</statOffsets>

				<minSeverity>0.6</minSeverity>
				extensive
				<statOffsets>
					<Vulnerability>0.3</Vulnerability>
					<SocialImpact>-0.3</SocialImpact>
				</statOffsets>

				<minSeverity>0.8</minSeverity>
				full
				<statOffsets>
					<Vulnerability>-0.1</Vulnerability>
					<SocialImpact>-0.5</SocialImpact>
				</statOffsets>

		</stages>
	</HediffDef>

	<HediffDef Name="Hediff_Semen">
		<hediffClass>rjw.Hediff_Semen</hediffClass>
		<defName>Hediff_Semen</defName>
		semen
		<labelNoun>semen</labelNoun>
		<description>Semen.</description>
		<labelNounPretty>semen on {1}</labelNounPretty>
		<defaultLabelColor>(0.95,0.95,0.95)</defaultLabelColor>
		<isBad>false</isBad>
		<tendable>false</tendable>
		<makesSickThought>false</makesSickThought>
		<makesAlert>false</makesAlert>
		<maxSeverity>1</maxSeverity>
		<initialSeverity>0.001</initialSeverity>
		<injuryProps>
			<canMerge>true</canMerge>
		</injuryProps>
		<stages>

				little

				<minSeverity>0.25</minSeverity>
				some

				<minSeverity>0.5</minSeverity>
				dripping

				<minSeverity>0.8</minSeverity>
				drenched

		</stages>
		<comps>

				<healIntervalTicksStanding>1800</healIntervalTicksStanding>
				<healAmount>0.01</healAmount>

		</comps>
	</HediffDef>

	<HediffDef ParentName="Hediff_Semen">
		<defName>Hediff_InsectSpunk</defName>
		<description>Insect spunk.</description>
		insect spunk
		<labelNoun>insect spunk</labelNoun>
		<labelNounPretty>insect spunk on {1}</labelNounPretty>
		<defaultLabelColor>(0.6,0.83,0.35)</defaultLabelColor>
	</HediffDef>

	<HediffDef ParentName="Hediff_Semen">
		<defName>Hediff_MechaFluids</defName>
		<description>Mechanoid fluids.</description>
		mechanoid fluids
		<labelNoun>mechanoid fluids</labelNoun>
		<labelNounPretty>mecha fluids on {1}</labelNounPretty>
		<defaultLabelColor>(0.37,0.71,0.82)</defaultLabelColor>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>

	<rjw.HediffDef_InsectEgg Name="RJW_ImplantEgg" Abstract="True">
		<defName>RJW_InsectEgg</defName>
		Egg
		<hediffClass>rjw.Hediff_InsectEgg</hediffClass>
		<description>Parasitic egg(s) that enter the host's body and feeds off their nutrients until ready to hatch.
Just be glad they don't hatch by bursting out of your chest.</description>
		<defaultLabelColor>(0.8, 0.8, 0.35)</defaultLabelColor>
		<initialSeverity>0.01</initialSeverity>
		<isBad>false</isBad>
		<tendable>false</tendable>
		<eggsize>1</eggsize>
		<selffertilized>false</selffertilized>
		<stages>

				<minSeverity>0.01</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.01</offset>

				</capMods>

				<minSeverity>0.02</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.02</offset>

				</capMods>

				<minSeverity>0.05</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.05</offset>

				</capMods>

				<minSeverity>0.10</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.10</offset>

				</capMods>

				<minSeverity>0.15</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.15</offset>

				</capMods>

				<minSeverity>0.20</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.20</offset>

				</capMods>

				<minSeverity>0.25</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.25</offset>

				</capMods>

				<minSeverity>0.30</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.30</offset>

				</capMods>

				<minSeverity>0.40</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.40</offset>

				</capMods>

				<minSeverity>0.50</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.50</offset>

				</capMods>

				<minSeverity>0.75</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.75</offset>

				</capMods>

				<minSeverity>0.9</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-1.0</offset>

				</capMods>

		</stages>
	</rjw.HediffDef_InsectEgg>

	<rjw.HediffDef_InsectEgg ParentName="RJW_ImplantEgg">
		<defName>RJW_UnknownEgg</defName>
		<parentDef>Unknown</parentDef>
		<UnFertEggDef>RJW_EggUnfertilized</UnFertEggDef>
		<FertEggDef>RJW_EggFertilized</FertEggDef>
	</rjw.HediffDef_InsectEgg>

	<rjw.HediffDef_InsectEgg ParentName="RJW_ImplantEgg">
		<defName>RJW_InsectHiveEgg</defName>
		<parentDefs>

Megascarab

Spelopede

Megaspider

Queen

		</parentDefs>
		<childrenDefs>

Megascarab

Megascarab

Megascarab

Megascarab

Megascarab

Spelopede

Spelopede

Spelopede

Megaspider

		</childrenDefs>
		<UnFertEggDef>RJW_EggInsectUnfertilized</UnFertEggDef>
		<FertEggDef>RJW_EggInsectFertilized</FertEggDef>
	</rjw.HediffDef_InsectEgg>

	<rjw.HediffDef_MechImplants Name="RJW_ImplantMech" Abstract="True">
		<hediffClass>rjw.Hediff_MechImplants</hediffClass>
		<defaultLabelColor>(0.8, 0.8, 0.35)</defaultLabelColor>
		<description>A small computer that enters a host through one of their orifices.
Can analyze vital signs and location data, and relay that information back to its implanter.</description>
		<initialSeverity>0.01</initialSeverity>
		<isBad>false</isBad>
		<tendable>false</tendable>
	</rjw.HediffDef_MechImplants>

	<rjw.HediffDef_MechImplants ParentName="RJW_ImplantMech">
		<defName>RJW_MechanoidImplant</defName>
		<parentDefs>

Mech_Lancer

Mech_Scyther

Mech_Centipede

Mech_Pikeman

		</parentDefs>
		<childrenDefs>

Mech_Scyther

		</childrenDefs>
	</rjw.HediffDef_MechImplants>

	<rjw.HediffDef_MechImplants ParentName="RJW_ImplantMech">
		<hediffClass>rjw.Hediff_MicroComputer</hediffClass>
		<defName>RJW_MicroComputer</defName>
		<tendable>false</tendable>
		<isBad>true</isBad>
		MicroComputer
		<description>A small computer that enters a host through one of their orifices.
Can analyze vital signs and location data, and relay that information back to its implanter.</description>
		<minEventInterval>30000</minEventInterval>
		<maxEventInterval>90000</maxEventInterval>
		<randomHediffDefs>

RJW_Orgasm

TransportCums

TransportEggs

		</randomHediffDefs>
	</rjw.HediffDef_MechImplants>

	<rjw.HediffDef_EnemyImplants>
		<defName>Parasite</defName>
		<hediffClass>rjw.Hediff_Parasite</hediffClass>
		<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
		<initialSeverity>0.1</initialSeverity>
		<isBad>true</isBad>
		pregnant
		<description>A organism that lives inside a host and feeds off its nutrients, giving the host
severe discomfort.</description>
		<comps>

				<sendLetterWhenDiscovered>true</sendLetterWhenDiscovered>
				<discoverLetterLabel>{0} Parasited</discoverLetterLabel>
				<discoverLetterText>{0} is parasited!</discoverLetterText>

		</comps>
		<stages>

				early-stage-hidden
				<becomeVisible>false</becomeVisible>
				<vomitMtbDays>2.5</vomitMtbDays>

				middle-stage
				<minSeverity>0.333</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.15</offset>

				</capMods>

				late-stage
				<minSeverity>0.666</minSeverity>
				<vomitMtbDays>2</vomitMtbDays>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.30</offset>

				</capMods>

		</stages>
	</rjw.HediffDef_EnemyImplants>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<HediffDef>
		<defName>FeelingBroken</defName>
		<hediffClass>rjw.AdvancedHediffWithComps</hediffClass>
		Feeling broken
		<defaultLabelColor>(0.5, 0.7, 0.45)</defaultLabelColor>
		<makesSickThought>false</makesSickThought>
		<initialSeverity>0.025</initialSeverity>
		<maxSeverity>1</maxSeverity>
		<scenarioCanAdd>true</scenarioCanAdd>
		<tendable>false</tendable>
		<description>Mind broken. No longer capable of emotion.</description>
		<isBad>false</isBad>
		<comps>

				<severityPerDayReduce>
					<points>

(1,0)

(10,-0.025)

					</points>
				</severityPerDayReduce>

				<severityPerDayIncrease>
					<points>

(0,0.1)

(1,1)

					</points>
				</severityPerDayIncrease>

		</comps>
		<stages>

				early-stage
				<becomeVisible>false</becomeVisible>

				in a trance
				<minSeverity>0.1</minSeverity>
				<painOffset>0.1</painOffset>
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.8</postFactor>

				</capMods>

				broken
				<minSeverity>0.3</minSeverity>
				<painOffset>0.05</painOffset>
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.7</postFactor>

				</capMods>
				<statOffsets>
					<Vulnerability>0.25</Vulnerability>
				</statOffsets>

				Extremely broken
				<minSeverity>0.5</minSeverity>
				<painOffset>-0.1</painOffset>
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.6</postFactor>

				</capMods>
				<statOffsets>
					<Vulnerability>0.5</Vulnerability>
				</statOffsets>

		</stages>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<HediffDef>
		<defName>RJW_IUD</defName>
		IUD
		<hediffClass>HediffWithComps</hediffClass>
		<description>A small copper device inserted into the womb that prevents pregnancy.</description>
		<defaultLabelColor>(0.8, 0.8, 0.35)</defaultLabelColor>
		<isBad>false</isBad>
		<scenarioCanAdd>true</scenarioCanAdd>
		<stages>

				<capMods>

						<capacity>RJW_Fertility</capacity>
						<setMax>0</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>IncreasedFertility</defName>
		Increased fertility
		<description>Increased fertility, for baby making.</description>
		<hediffClass>HediffWithComps</hediffClass>
		<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
		<isBad>false</isBad>
		<scenarioCanAdd>false</scenarioCanAdd>
		<stages>

				<becomeVisible>false</becomeVisible>
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<offset>0.25</offset>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>DecreasedFertility</defName>
		Low fertility
		<description>Low fertility.</description>
		<hediffClass>HediffWithComps</hediffClass>
		<defaultLabelColor>(1, 0.2, 0.2)</defaultLabelColor>
		<isBad>false</isBad>
		<scenarioCanAdd>false</scenarioCanAdd>
		<stages>

				<becomeVisible>false</becomeVisible>
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<offset>-0.5</offset>
						<setMax>0.25</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>ImpregnationBlocker</defName>
		Archotech pregnancy blocker
		<description>A complex device that prevents the ovaries from producing eggs.</description>
		<hediffClass>HediffWithComps</hediffClass>
		<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
		<isBad>false</isBad>
		<scenarioCanAdd>false</scenarioCanAdd>
		<stages>

				<becomeVisible>true</becomeVisible>
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<setMax>0</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>FertilityEnhancer</defName>
		Archotech fertility enhancer
		<description>A complex device that increases the likelihood of pregnancy.</description>
		<hediffClass>HediffWithComps</hediffClass>
		<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
		<isBad>false</isBad>
		<scenarioCanAdd>false</scenarioCanAdd>
		<stages>

				<becomeVisible>true</becomeVisible>
				<capMods>

						<capacity>RJW_Fertility</capacity>
						<offset>1</offset>

				</capMods>

		</stages>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<HediffDef>
		<defName>RJW_Orgasm</defName>
		<hediffClass>rjw.Hediff_Orgasm</hediffClass>
		Orgasm
		<defaultLabelColor>(0.5, 0.7, 0.45)</defaultLabelColor>
		<makesSickThought>false</makesSickThought>
		<initialSeverity>0.1</initialSeverity>
		<maxSeverity>1</maxSeverity>
		<scenarioCanAdd>false</scenarioCanAdd>
		<tendable>false</tendable>
		<description>"Ohh, yeahh, hah, hnnh, OH!"</description>
		<comps>

				<severityPerDay>-1</severityPerDay>

		</comps>
		<stages>

				Slightly
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.9</postFactor>

						<capacity>Manipulation</capacity>
						<postFactor>0.9</postFactor>

						<capacity>Moving</capacity>
						<postFactor>0.9</postFactor>

						<capacity>Talking</capacity>
						<postFactor>0.9</postFactor>

				</capMods>
				<statOffsets>
					<Vulnerability>0.2</Vulnerability>
				</statOffsets>

				Heavy
				<minSeverity>0.2</minSeverity>
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.65</postFactor>

						<capacity>Manipulation</capacity>
						<postFactor>0.65</postFactor>

						<capacity>Moving</capacity>
						<postFactor>0.65</postFactor>

						<capacity>Talking</capacity>
						<postFactor>0.65</postFactor>

				</capMods>
				<statOffsets>
					<Vulnerability>0.3</Vulnerability>
				</statOffsets>

				Extremely
				<minSeverity>0.501</minSeverity>
				<capMods>

						<capacity>Consciousness</capacity>
						<postFactor>0.3</postFactor>

						<capacity>Manipulation</capacity>
						<postFactor>0.65</postFactor>

						<capacity>Moving</capacity>
						<postFactor>0.2</postFactor>

						<capacity>Talking</capacity>
						<postFactor>0.5</postFactor>

				</capMods>
				<statOffsets>
					<Vulnerability>0.6</Vulnerability>
				</statOffsets>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>TransportCums</defName>
		<hediffClass>rjw.Hediff_TransportCums</hediffClass>
		<description>Cumming inside.</description>
		<isBad>false</isBad>
	</HediffDef>

	<HediffDef>
		<defName>TransportEggs</defName>
		<hediffClass>rjw.Hediff_TransportEggs</hediffClass>
		<description>Laying egg inside.</description>
		<isBad>false</isBad>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

	<HediffDef>
		<defName>Immunodeficiency</defName>
		<hediffClass>rjw.Hediff_ID</hediffClass>
		<defaultLabelColor>(1.0, 0.0, 0.0)</defaultLabelColor>
		Immunodeficiency
		<makesSickThought>false</makesSickThought>
		<minSeverity>0.600</minSeverity>
		<description>Very susceptible to disease.</description>
		<initialSeverity>0.601</initialSeverity>
		<tendable>false</tendable>
		<stages>

				<minSeverity>0.60</minSeverity>
				minor
				<restFallFactor>1.10</restFallFactor>
				<capMods>

						<capacity>Consciousness</capacity>
						<offset>-0.05</offset>

				</capMods>

				<minSeverity>0.75</minSeverity>
				major
				<restFallFactor>1.30</restFallFactor>
				<capMods>

						<capacity>Consciousness</capacity>
						<offset>-0.10</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.15</offset>

						<capacity>Moving</capacity>
						<offset>-0.15</offset>

				</capMods>

				<minSeverity>0.90</minSeverity>
				extreme
				<restFallFactor>1.50</restFallFactor>
				<capMods>

						<capacity>Consciousness</capacity>
						<offset>-0.15</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.30</offset>

						<capacity>Moving</capacity>
						<offset>-0.30</offset>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef>
		<defName>VirusPerma</defName>
		<hediffClass>Hediff_Injury</hediffClass>
		<tendable>false</tendable>
		<displayWound>true</displayWound>
		<chanceToCauseNoPain>1.0</chanceToCauseNoPain>
		<description>Viral damage.</description>
		viral damage
		<comps>

				<permanentLabel>permanent viral damage</permanentLabel>
				<instantlyPermanentLabel>permanent viral damage</instantlyPermanentLabel>

		</comps>
		<injuryProps>
			<painPerSeverity>0.0</painPerSeverity>
			<averagePainPerSeverityPermanent>0.0</averagePainPerSeverityPermanent>
			<destroyedLabel>Destroyed by disease</destroyedLabel>
			<destroyedOutLabel>Destroyed by disease</destroyedOutLabel>
		</injuryProps>
	</HediffDef>

	<HediffDef ParentName="AddedBodyPartBase">
		<defName>PegArm</defName>
		peg arm
		<labelNoun>a peg arm</labelNoun>
		<description>A peg arm.</description>
		<addedPartProps>
			<solid>true</solid>
			<partEfficiency>0.00</partEfficiency>
			<betterThanNatural>false</betterThanNatural>
		</addedPartProps>
		<spawnThingOnRemoved>WoodLog</spawnThingOnRemoved>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>

<Defs>
	<HediffDef Name="RJW_pregnancy_template" Abstract="True">
		Pregnant
		<description>Baby in the oven.</description>
		<defaultLabelColor>(1, 0.41, 0.81)</defaultLabelColor>
		<initialSeverity>0.001</initialSeverity>
		<isBad>false</isBad>
		<stages>

				early-stage
				<vomitMtbDays>2</vomitMtbDays>
				<hungerRateFactorOffset>0.25</hungerRateFactorOffset>

				middle-stage
				<minSeverity>0.333</minSeverity>
				<vomitMtbDays>4</vomitMtbDays>
				<hungerRateFactorOffset>0.3</hungerRateFactorOffset>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.15</offset>

				</capMods>

				late-stage
				<minSeverity>0.666</minSeverity>
				<vomitMtbDays>6</vomitMtbDays>
				<hungerRateFactorOffset>0.3</hungerRateFactorOffset>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.30</offset>

				</capMods>

				having contractions
				<minSeverity>0.99</minSeverity>
				<painOffset>0.5</painOffset>
				<capMods>

						<capacity>Moving</capacity>
						<setMax>0.0</setMax>

				</capMods>

		</stages>
	</HediffDef>

	<HediffDef ParentName="RJW_pregnancy_template">
		<defName>RJW_pregnancy</defName>
		<hediffClass>rjw.Hediff_BasePregnancy</hediffClass>
	</HediffDef>

	<HediffDef ParentName="RJW_pregnancy_template">
		<defName>RJW_pregnancy_beast</defName>
		<hediffClass>rjw.Hediff_BestialPregnancy</hediffClass>
	</HediffDef>

	<HediffDef ParentName="RJW_pregnancy_template">
		<defName>RJW_pregnancy_mech</defName>
		<hediffClass>rjw.Hediff_MechanoidPregnancy</hediffClass>
	</HediffDef>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<rjw.HediffDef_PartBase Name="RJW_PrivatePartBase" Abstract="True">

		<FluidType></FluidType>

		<isBad>false</isBad>
		<comps>

		</comps>
		<priceImpact>false</priceImpact>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="RJW_PrivatePartBase" Name="NaturalPrivatePartBase" Abstract="True">
		<hediffClass>rjw.Hediff_PartBaseNatural</hediffClass>
		<defaultLabelColor>(0.5, 0.8, 0.5)</defaultLabelColor>
		<addedPartProps>
			<solid>false</solid>
			<partEfficiency>1.0</partEfficiency>
		</addedPartProps>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBase" Name="NaturalPrivatePartPenis" Abstract="True">
		<FluidType>Cum</FluidType>
		<DefaultBodyPart>Genitals</DefaultBodyPart>
		<stages>

				Micro
				<minSeverity>0.01</minSeverity>

				Small
				<minSeverity>0.20</minSeverity>

				Average
				<minSeverity>0.40</minSeverity>

				Large
				<minSeverity>0.60</minSeverity>
					<capMods>

						<capacity>Moving</capacity>
						<offset>-0.02</offset>

				</capMods>

				Huge
				<minSeverity>0.80</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.05</offset>

				</capMods>

				Towering
				<minSeverity>1.01</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.10</offset>

				</capMods>

		</stages>
		<modExtensions>

				<bodysizescale>true</bodysizescale>
				<density>1.0</density>
				<lengths>

0

5.0

10.0

18.0

25.0

35.0

				</lengths>
				<girths>

0

5.0

10.0

13.0

17.0

21.0

				</girths>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBase" Name="NaturalPrivatePartVagina" Abstract="True">
		<FluidType>Cum</FluidType>
		<DefaultBodyPart>Genitals</DefaultBodyPart>
		<stages>

				Micro
				<minSeverity>0.01</minSeverity>

				Tight
				<minSeverity>0.20</minSeverity>

				Average
				<minSeverity>0.40</minSeverity>

				Accomodating
				<minSeverity>0.60</minSeverity>

				Cavernous
				<minSeverity>0.80</minSeverity>

				Abyssal
				<minSeverity>1.01</minSeverity>

		</stages>
		<modExtensions>

				<bodysizescale>true</bodysizescale>

				<lengths>

0

5.0

10.0

18.0

25.0

35.0

				</lengths>
				<girths>

0

5.0

10.0

13.0

17.0

21.0

				</girths>

				<props>
				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBase" Name="NaturalPrivatePartAnus" Abstract="True">
		<FluidType></FluidType>
		<DefaultBodyPart>Anus</DefaultBodyPart>
		<stages>

				Micro
				<minSeverity>0.01</minSeverity>

				Tight
				<minSeverity>0.20</minSeverity>

				Average
				<minSeverity>0.40</minSeverity>

				Accomodating
				<minSeverity>0.60</minSeverity>

				Cavernous
				<minSeverity>0.80</minSeverity>

				Abyssal
				<minSeverity>1.01</minSeverity>

		</stages>
		<modExtensions>

				<bodysizescale>true</bodysizescale>

				<girths>

0

5.0

10.0

13.0

17.0

21.0

				</girths>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBase" Name="NaturalPrivatePartBreast" Abstract="True">
		<FluidType>Milk</FluidType>
		<DefaultBodyPart>Chest</DefaultBodyPart>
		<stages>

				Nipples
				<minSeverity>0.01</minSeverity>

				Tiny
				<minSeverity>0.02</minSeverity>

				Small
				<minSeverity>0.20</minSeverity>

				Average
				<minSeverity>0.40</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.01</offset>

				</capMods>

				Large
				<minSeverity>0.60</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.025</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.01</offset>

				</capMods>

				Huge
				<minSeverity>0.80</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.05</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.02</offset>

				</capMods>

				Enormous
				<minSeverity>1.00</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.10</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.04</offset>

			</capMods>

				Massive
				<minSeverity>1.2</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.15</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.08</offset>

				</capMods>

				Gargantuan
				<minSeverity>1.4</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.25</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.12</offset>

				</capMods>

				Colossal
				<minSeverity>1.6</minSeverity>

				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.40</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.20</offset>

				</capMods>

				Titanic
				<minSeverity>1.8</minSeverity>
				<capMods>

						<capacity>Moving</capacity>
						<offset>-0.65</offset>

						<capacity>Manipulation</capacity>
						<offset>-0.32</offset>

				</capMods>

		</stages>
		<modExtensions>

				<bodysizescale>true</bodysizescale>

				<density>1.0</density>
				<cupSizes>

0

1

2

4

7

11

15

19

25

31

				</cupSizes>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="RJW_PrivatePartBase" Name="ArtificialPrivatePartBase" Abstract="True">
		<hediffClass>rjw.Hediff_PartBaseArtifical</hediffClass>
		<defaultLabelColor>(0.5, 0.5, 0.9)</defaultLabelColor>
		<addedPartProps>
			<solid>true</solid>
			<partEfficiency>1.0</partEfficiency>
		</addedPartProps>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="ArtificialPrivatePartBase" Name="ArtificialPrivatePartLotech" Abstract="True">
		<addedPartProps>
			<betterThanNatural>false</betterThanNatural>
		</addedPartProps>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="ArtificialPrivatePartBase" Name="ArtificialPrivatePartHitech" Abstract="True">
		<addedPartProps>
			<betterThanNatural>true</betterThanNatural>
		</addedPartProps>
		<priceImpact>true</priceImpact>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>GenericPenis</defName>
		generic penis
		<labelNoun>a penis</labelNoun>
		<description>A penis. Generic placeholder part for unsuported race.</description>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>GenericVagina</defName>
		generic vagina
		<labelNoun>a vagina</labelNoun>
		<description>A vagina. Generic placeholder part for unsuported race.</description>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartAnus">
		<defName>GenericAnus</defName>
		generic anus
		<labelNoun>an anus</labelNoun>
		<description>An anus. Generic placeholder part for unsuported race.</description>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBreast">
		<defName>GenericBreasts</defName>
		generic breasts
		<labelNoun>breasts</labelNoun>
		<description>A pair of breasts. Generic placeholder part for unsuported race.</description>
	</rjw.HediffDef_PartBase>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>HorsePenis</defName>
		equine penis
		<labelNoun>an equine penis</labelNoun>
		<description>A large horse penis. Flares out during sex.</description>
		<descriptionHyperlinks><ThingDef>HorsePenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>HorsePenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Flared

Sheathed

Long

Girthy

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>HorseVagina</defName>
		equine vagina
		<labelNoun>an equine vagina</labelNoun>
		<description>A mare vagina.</description>
		<descriptionHyperlinks><ThingDef>HorseVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>HorseVagina</spawnThingOnRemoved>
		<modExtensions>

				<props>

Loose

Deep

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>CatPenis</defName>
		feline penis
		<labelNoun>a feline penis</labelNoun>
		<description>A spine-covered feline penis.</description>
		<descriptionHyperlinks><ThingDef>CatPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CatPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Barbed

Sheathed

Tapered

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>CatVagina</defName>
		feline vagina
		<labelNoun>a feline vagina</labelNoun>
		<description>A feline vagina.</description>
		<descriptionHyperlinks><ThingDef>CatVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CatVagina</spawnThingOnRemoved>
		<modExtensions>

				<props>

Tight

Deep

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>DogPenis</defName>
		canine penis
		<labelNoun>a dog penis</labelNoun>
		<description>A bright red dog penis. The knot will expand during sex, locking its lover to their partner for a long time.</description>
		<descriptionHyperlinks><ThingDef>DogPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>DogPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Knoted

Sheathed

Tapered

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>DogVagina</defName>
		canine vagina
		<labelNoun>a dog vagina</labelNoun>
		<description>A dog vagina.</description>
		<descriptionHyperlinks><ThingDef>DogVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>DogVagina</spawnThingOnRemoved>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>DragonPenis</defName>
		dragon penis
		<labelNoun>a dragon penis</labelNoun>
		<description>A dragon penis. Has a knot that expands similarly to a dog's penis,
but the ribbings on both sides takes its lover to greater heights of pleasure.</description>
		<descriptionHyperlinks><ThingDef>DragonPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>DragonPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Ridged

Girthy

Knoted

Internal

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>DragonVagina</defName>
		dragon vagina
		<labelNoun>a dragon vagina</labelNoun>
		<description>A dragon vagina. Has a similar texture to their outer hide.</description>
		<descriptionHyperlinks><ThingDef>DragonVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>DragonVagina</spawnThingOnRemoved>
		<modExtensions>

				<props>

Loose

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>RaccoonPenis</defName>
		procyonine penis
		<labelNoun>a procyonine penis</labelNoun>
		<description>A raccoon penis.</description>
		<descriptionHyperlinks><ThingDef>RaccoonPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>RaccoonPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Long

Thin

Rigid

Sheathed

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>HemiPenis</defName>
		hemipenis
		<labelNoun>a hemipenis</labelNoun>
		<description>Twice the members for double the fun.</description>
		<descriptionHyperlinks><ThingDef>HemiPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>HemiPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Barbed

Tapered

Multiple

Small

Internal

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>CrocodilianPenis</defName>
		crocodilian penis
		<labelNoun>a crocodilian penis</labelNoun>
		<description>A crocodilian penis. Large and permenantly erect.</description>
		<descriptionHyperlinks><ThingDef>CrocodilianPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CrocodilianPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Rigid

Internal

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartBreast">
		<defName>UdderBreasts</defName>
		udder
		<labelNoun>an udders</labelNoun>
		<description>A animal like "breasts" with 4 nipples.</description>
		<descriptionHyperlinks><ThingDef>UdderBreasts</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>UdderBreasts</spawnThingOnRemoved>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>NarrowVagina</defName>
		narrow vagina
		<labelNoun>a narrow vagina</labelNoun>
		<description>A tight, narrow vagina.</description>
		<descriptionHyperlinks><ThingDef>NarrowVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>NarrowVagina</spawnThingOnRemoved>
		<modExtensions>

				<props>

Tight

Deep

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>NeedlePenis</defName>
		needle penis
		<labelNoun>a needle penis</labelNoun>
		<description>A small and thin penis.</description>
		<descriptionHyperlinks><ThingDef>NeedlePenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>NeedlePenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Sheathed

Long

Thin

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>RodentVagina</defName>
		rodent vagina
		<labelNoun>a rodent vagina</labelNoun>
		<description>A rodent vagina.</description>
		<descriptionHyperlinks><ThingDef>RodentVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>RodentVagina</spawnThingOnRemoved>
		<modExtensions>

				<props>

Tight

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>RodentPenis</defName>
		rodent penis
		<labelNoun>a rodent penis</labelNoun>
		<description>A rodent penis.</description>
		<descriptionHyperlinks><ThingDef>RodentPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>RodentPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Sheathed

Small

Tapered

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>CloacalPenis</defName>
		cloacal penis
		<labelNoun>a cloacal penis</labelNoun>
		<description>A cloacal penis.</description>
		<descriptionHyperlinks><ThingDef>CloacalPenis</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CloacalPenis</spawnThingOnRemoved>
		<modExtensions>

				<props>

Internal

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>CloacalVagina</defName>
		cloacal vagina
		<labelNoun>a cloacal vagina</labelNoun>
		<description>A cloacal vagina.</description>
		<descriptionHyperlinks><ThingDef>CloacalVagina</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CloacalVagina</spawnThingOnRemoved>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartAnus">
		<defName>CloacalAnus</defName>
		cloacal anus
		<labelNoun>cloacal anus</labelNoun>
		<description>A cloacal anus.</description>
		<descriptionHyperlinks><ThingDef>CloacalAnus</ThingDef></descriptionHyperlinks>
		<spawnThingOnRemoved>CloacalAnus</spawnThingOnRemoved>
	</rjw.HediffDef_PartBase>
</Defs>


code:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>DemonTentaclePenis</defName>
		demon tentacles
		<labelNoun>demon tentacles</labelNoun>
		<description>Tentacles capable of reaching corners of the body you never thought possible.</description>
		<descriptionHyperlinks><ThingDef>DemonTentaclePenis</ThingDef></descriptionHyperlinks>
		<modExtensions>

				<props>

Barbed

Prehensile

Thin

Internal

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartPenis">
		<defName>DemonPenis</defName>
		demon penis
		<labelNoun>a demon penis</labelNoun>
		<description>A large, daunting mass that can cause its lovers to succumb to debauchery.</description>
		<descriptionHyperlinks><ThingDef>DemonPenis</ThingDef></descriptionHyperlinks>
		<modExtensions>

				<props>

Ridged

Barbed

Humanlike

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartVagina">
		<defName>DemonVagina</defName>
		demon vagina
		<labelNoun>a demon vagina</labelNoun>
		<description>A tight vagina that can send its lovers to heaven.</description>
		<descriptionHyperlinks><ThingDef>DemonVagina</ThingDef></descriptionHyperlinks>
		<modExtensions>

				<props>

Ridged

Tight

				</props>

		</modExtensions>
	</rjw.HediffDef_PartBase>

	<rjw.HediffDef_PartBase ParentName="NaturalPrivatePartAnus">
		<defName>DemonAnus</defName>
		demon anus
		<labelNoun>a demon anus</labelNoun>
		<description>A demon anus.</description>
		<descriptionHyperlinks><ThingDef>DemonAnus</ThingDef></descriptionHyperlinks>
	</rjw.HediffDef_PartBase>
</Defs>