260 lines
9.5 KiB
Ruby
260 lines
9.5 KiB
Ruby
FrameworkModule = {
|
|||
|
|
name: "Appearance",
|
||
|
|
key: :appearance,
|
||
|
|
menu: :APPEARANCE,
|
||
|
|
depends_on: []
|
||
|
|
}
|
||
|
|
|
||
|
|
module MenuFramework
|
||
|
|
module SUBMENU
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Character Editing Menu
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
register_command(
|
||
|
|
group: :LONA,
|
||
|
|
type: :scene,
|
||
|
|
key: :edit_appearance,
|
||
|
|
label: "modules/character:commands/appearance",
|
||
|
|
menu1: "menu:window_help/character1",
|
||
|
|
name: "CheatMenuAppearance",
|
||
|
|
dict: :APPEARANCE,
|
||
|
|
order: 70
|
||
|
|
)
|
||
|
|
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Appearance
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_list,
|
||
|
|
key: "Hair Color",
|
||
|
|
label: "modules/character:commands/appearance/hair_color",
|
||
|
|
state: "$game_player.actor.record_HairColor",
|
||
|
|
list: [
|
||
|
|
{ key: 0, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/0")}]" },
|
||
|
|
{ key: 1, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/1")}]" },
|
||
|
|
{ key: 2, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/2")}]" },
|
||
|
|
{ key: 3, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/3")}]" },
|
||
|
|
{ key: 4, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/4")}]" },
|
||
|
|
{ key: 5, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/5")}]" }
|
||
|
|
],
|
||
|
|
action: ->(v) { $game_player.actor.record_HairColor = v; $game_player.refresh_chs },
|
||
|
|
hide: -> { defined?(LonaRecolor) },
|
||
|
|
order: 30
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :PRIMARY,
|
||
|
|
type: :edit_num,
|
||
|
|
key: "Dirt",
|
||
|
|
label: "modules/character:commands/appearance/dirt",
|
||
|
|
state: "$game_player.actor.dirt.to_i",
|
||
|
|
enable: -> { $game_player.actor.actStat.get_stat('dirt', 3) != 0 && !$cheat_autoclean },
|
||
|
|
min: 0,
|
||
|
|
max: 255,
|
||
|
|
action: ->(v) { $game_player.actor.dirt = v },
|
||
|
|
order: 45
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :TOGGLES,
|
||
|
|
type: :toggle,
|
||
|
|
key: "Disable Dirt",
|
||
|
|
label: "modules/character:toggle/dirt",
|
||
|
|
state: "$game_player.actor.actStat.get_stat('dirt', 3) == 0",
|
||
|
|
help1: "modules/character:command_help/dirt",
|
||
|
|
help2: "menu:command_help/local",
|
||
|
|
global: false,
|
||
|
|
order: 50,
|
||
|
|
action: -> {
|
||
|
|
if $game_player.actor.actStat.get_stat('dirt', 3) == 0
|
||
|
|
$game_player.actor.actStat.set_stat('dirt', 255, 3)
|
||
|
|
else
|
||
|
|
$game_player.actor.actStat.set_stat('dirt', 0, 3)
|
||
|
|
end
|
||
|
|
$game_player.actor.refresh
|
||
|
|
})
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_list,
|
||
|
|
key: "Freckles",
|
||
|
|
label: "modules/character:commands/appearance/freckles",
|
||
|
|
state: "$game_player.actor.stat['Freckle']",
|
||
|
|
list: [
|
||
|
|
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||
|
|
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" }
|
||
|
|
],
|
||
|
|
action: ->(v) { FrameworkUtils.custom_state_edit("Freckle", v) }
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_num,
|
||
|
|
key: "PubicHairVag",
|
||
|
|
label: "modules/character:commands/appearance/vpubes",
|
||
|
|
state: "$game_player.actor.stat['PubicHairVag']",
|
||
|
|
help1: "modules/character:command_help/pubes1",
|
||
|
|
min: 0,
|
||
|
|
max: 4,
|
||
|
|
action: ->(v) { FrameworkUtils.custom_state_edit("PubicHairVag", v) }
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_num,
|
||
|
|
key: "PubicHairAnal",
|
||
|
|
label: "modules/character:commands/appearance/apubes",
|
||
|
|
state: "$game_player.actor.stat['PubicHairAnal']",
|
||
|
|
help1: "modules/character:command_help/pubes1",
|
||
|
|
min: 0,
|
||
|
|
max: 4,
|
||
|
|
action: ->(v) { FrameworkUtils.custom_state_edit("PubicHairAnal", v) }
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_num,
|
||
|
|
key: "PubicHairVagGrowth",
|
||
|
|
label: "modules/character:commands/appearance/vpubegrowth",
|
||
|
|
state: "$game_player.actor.pubicHair_Vag_GrowRate",
|
||
|
|
hide: -> { $game_player.actor.stat['PubicHairVag'] == 0 },
|
||
|
|
help1: "modules/character:command_help/pubegrowth1",
|
||
|
|
help2: "modules/character:command_help/pubegrowth2",
|
||
|
|
min: 1,
|
||
|
|
max: 365,
|
||
|
|
action: ->(v) { $game_player.actor.pubicHair_Vag_GrowRate = v }
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :APPEARANCE,
|
||
|
|
type: :edit_num,
|
||
|
|
key: "PubicHairAnalGrowth",
|
||
|
|
label: "modules/character:commands/appearance/apubegrowth",
|
||
|
|
state: "$game_player.actor.pubicHair_Anal_GrowRate",
|
||
|
|
hide: -> { $game_player.actor.stat['PubicHairAnal'] == 0 },
|
||
|
|
help1: "modules/character:command_help/pubegrowth1",
|
||
|
|
help2: "modules/character:command_help/pubegrowth2",
|
||
|
|
min: 1,
|
||
|
|
max: 365,
|
||
|
|
action: ->(v) { $game_player.actor.pubicHair_Anal_GrowRate = v }
|
||
|
|
)
|
||
|
|
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Auto-Care Toggles
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
register_command(
|
||
|
|
group: :TOGGLES,
|
||
|
|
type: :toggle,
|
||
|
|
key: "Auto Bandage",
|
||
|
|
label: "modules/character:toggle/autobandage",
|
||
|
|
help1: "modules/character:command_help/autobandage",
|
||
|
|
state: "$cheat_autobandage",
|
||
|
|
gdef: false,
|
||
|
|
order: 60
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :TOGGLES,
|
||
|
|
type: :toggle,
|
||
|
|
key: "Auto Clean",
|
||
|
|
label: "modules/character:toggle/autoclean",
|
||
|
|
help1: "modules/character:command_help/autoclean",
|
||
|
|
state: "$cheat_autoclean",
|
||
|
|
gdef: false,
|
||
|
|
order: 70
|
||
|
|
)
|
||
|
|
register_command(
|
||
|
|
group: :TOGGLES,
|
||
|
|
type: :toggle,
|
||
|
|
key: "Auto Cure",
|
||
|
|
label: "modules/character:toggle/autocure",
|
||
|
|
help1: "modules/character:command_help/autocure",
|
||
|
|
state: "$cheat_autocure",
|
||
|
|
gdef: false,
|
||
|
|
order: 80
|
||
|
|
)
|
||
|
|
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Optional companion mod integration
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
if defined?(LonaRecolor) && LonaRecolor.respond_to?(:register_appearance_commands)
|
||
|
|
LonaRecolor.register_appearance_commands
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Auto-Care Application
|
||
|
|
#--------------------------------------------------------------------------
|
||
|
|
# Uses a slower trigger (~3 seconds) since wounds etc. aren't as time-sensitive.
|
||
|
|
class CheatFramework
|
||
|
|
alias_method :slow_trigger_MODULE_AUTOSTATE, :slow_trigger
|
||
|
|
def slow_trigger
|
||
|
|
slow_trigger_MODULE_AUTOSTATE
|
||
|
|
FrameworkUtils.apply_auto_states if FrameworkUtils.ingame?
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
module FrameworkUtils
|
||
|
|
def self.apply_auto_states
|
||
|
|
return unless self.ingame?
|
||
|
|
actor = $game_player.actor
|
||
|
|
return unless actor
|
||
|
|
|
||
|
|
if $cheat_autobandage; autobandage end
|
||
|
|
if $cheat_autoclean; autoclean end
|
||
|
|
if $cheat_autocure; autocure end
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.autobandage
|
||
|
|
list = ["WoundHead", "WoundChest", "WoundCuff", "WoundSArm", "WoundMArm", "WoundCollar", "WoundBelly", "WoundGroin", "WoundSThigh", "WoundMThigh", "VaginalDamaged", "UrethralDamaged", "SphincterDamaged", "EffectBleedVag", "EffectBleedAnal"]
|
||
|
|
mass_remove_state(list)
|
||
|
|
end
|
||
|
|
|
||
|
|
# Clears the cum tank and its derived states together, since the states are
|
||
|
|
# computed from the tank. Bypasses healCums, which only drains one entry per call.
|
||
|
|
def self.autoclean
|
||
|
|
actor = $game_player.actor
|
||
|
|
actor.vag_cums.clear
|
||
|
|
actor.cumsMeters.each_key { |key| actor.cumsMeters[key] = 0 }
|
||
|
|
actor.check_cum_maximum
|
||
|
|
actor.update_cum_state
|
||
|
|
mass_remove_state(["SemenBursting", "EffectScat", "EffectBleedVag", "EffectBleedAnal"])
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.autocure
|
||
|
|
list = ["ParasitedMoonWorm", "ParasitedPotWorm", "AnalSeedBed", "BladderSeedBed", "ParasitedPolypWorm", "ParasitedHookWorm", "StomachSeedBed", "STD_Leukorrhea", "STD_WartAnal", "STD_WartVag", "STD_HerpesAnal", "STD_HerpesVag"]
|
||
|
|
mass_remove_state(list)
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.mass_remove_state(list)
|
||
|
|
actor = $game_player.actor
|
||
|
|
active_states = list.select { |id| actor.state_stack(id) >= 1 }
|
||
|
|
active_states.each do |state|
|
||
|
|
actor.remove_state(state)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
# ---------------------------------
|
||
|
|
# Live portrait preview in the Appearance menu
|
||
|
|
# ---------------------------------
|
||
|
|
class Scene_CheatMenuAppearance
|
||
|
|
alias_method :start_Framework_portrait_preview, :start
|
||
|
|
def start
|
||
|
|
start_Framework_portrait_preview
|
||
|
|
$game_portraits.setRprt("Lona")
|
||
|
|
portrait = $game_portraits.getPortrait("Lona")
|
||
|
|
portrait.skip_animation
|
||
|
|
canvas = portrait.instance_variable_get(:@canvas)
|
||
|
|
left_shift = (0.4 * Graphics.width).round
|
||
|
|
portrait.set_position((Graphics.width - canvas[0]) / 2 - left_shift, (Graphics.height - canvas[1]) / 2)
|
||
|
|
end
|
||
|
|
|
||
|
|
alias_method :update_Framework_portrait_preview, :update
|
||
|
|
def update
|
||
|
|
update_Framework_portrait_preview
|
||
|
|
$game_portraits.getPortrait("Lona").update
|
||
|
|
end
|
||
|
|
|
||
|
|
alias_method :terminate_Framework_portrait_preview, :terminate
|
||
|
|
def terminate
|
||
|
|
portrait = $game_portraits.getPortrait("Lona")
|
||
|
|
portrait.hide
|
||
|
|
portrait.skip_animation # same animation-won't-progress-here issue as start
|
||
|
|
terminate_Framework_portrait_preview
|
||
|
|
end
|
||
|
|
end
|