Rewrote calculation for walk delays
Fixes to class extensions to make the code work as a mod Fixed Issix breeding schedule Fixed crash when player without Pet skill Improved donation scene so only new tasks get applied Fixed donation counting Started working on Pasture Walk scene Added Trash can functionality to remove empty condoms Added dialogue for Issix to remove PC's keyholder Slut locks locked by Issix Fixes to Azazel's fertility training
This commit is contained in:
parent
b41e06de8e
commit
2e86208e04
|
@ -29,6 +29,7 @@ func checkRequirements(requirements: Dictionary):
|
|||
|
||||
func shouldBeShownForcedEvent():
|
||||
var scenes_seen = getModuleFlag("IssixModule", "Misc_Slavery_Info", {"scenes_seen": []})
|
||||
GM.pc.getSkillsHolder().ensureSkillExists("Pet")
|
||||
var current_progression_points = GM.pc.getSkillsHolder().getSkill("Pet").getLevel()
|
||||
if GM.main.getDays() >= GM.main.getModuleFlag("IssixModule", "Progression_Day_Next", 0) and GM.main.getModuleFlag("IssixModule", "Unwelcome_At_Corner", false) != true:
|
||||
registered_special_scenes.sort_custom(CustomSorter, "sort_by_progressionpoints")
|
||||
|
|
|
@ -80,6 +80,19 @@ static func checkIfAchieved(flagName: String, stateKey: String) -> bool:
|
|||
static func returnValueFromStateFlag(flagName: String, stateKey: String, default=null):
|
||||
return GM.main.getModuleFlag("IssixModule", flagName, {}).get(stateKey, default)
|
||||
|
||||
# Return average time for which there should be a walk
|
||||
static func averageWalkTime() -> int:
|
||||
return 9
|
||||
|
||||
static func untilNextWalk(fake = false) -> int:
|
||||
var last_walk = GM.main.getModuleFlag("IssixModule", "Last_Walk", GM.main.getDays())
|
||||
var rng = RandomNumberGenerator.new()
|
||||
rng.seed = last_walk
|
||||
var variation = rng.randi_range(-2, 2)
|
||||
if fake:
|
||||
variation += rng.randi_range(1, 1)
|
||||
return last_walk + averageWalkTime() + variation - GM.main.getDays()
|
||||
|
||||
# Modify state of a state dict flag
|
||||
static func modifyDictStates(flagName: String, stateKey: String, stateValue):
|
||||
var states = GM.main.getModuleFlag("IssixModule", flagName, {})
|
||||
|
|
|
@ -7,7 +7,7 @@ func _init():
|
|||
|
||||
func getTopicValue(_topicID, _pc):
|
||||
if(_topicID == "IssixBrand"):
|
||||
if(GM.main.getModuleFlag("IssixModule", "Issix_Branded_PC") == true):
|
||||
if(_pc.isPlayer() and GM.main.getModuleFlag("IssixModule", "Issix_Branded_PC") == true):
|
||||
return 1.0
|
||||
|
||||
return 0.0
|
||||
|
@ -21,7 +21,7 @@ func getVisibleName(_topicID):
|
|||
|
||||
func getAddsToFocus(_topicID, _focus) -> float:
|
||||
if(_topicID == "IssixBrand"):
|
||||
if(_focus == LustFocus.Butt):
|
||||
if(_focus == LustFocus.Body):
|
||||
return 1.0
|
||||
|
||||
return 0.0
|
||||
|
|
|
@ -4,11 +4,11 @@ class_name IssixModule
|
|||
# If a var matches with your config ID, the config option will be sycronized with the config value
|
||||
var characterCoverage = "fur"
|
||||
|
||||
const Globals = preload("res://Modules/IssixModule/Globals.gd")
|
||||
|
||||
func onFoxLibModInit(foxModuleAPI):
|
||||
foxModuleAPI.addListOption("characterCoverage", "Character's coverage", [["fur", "Fur"], ["skin", "Skin"], ["scales", "Scales"]], "Pick how to refer to what kind of coverage your character has", "fur")
|
||||
|
||||
const APPROX_WALK_DELAY = 9
|
||||
|
||||
func getFlags():
|
||||
return {
|
||||
"Issix_Introduced": flag(FlagType.Bool),
|
||||
|
@ -285,14 +285,11 @@ static func addSceneToWatched(scene: String):
|
|||
static func addIssixMood(mood: int):
|
||||
GM.main.setModuleFlag("IssixModule", "Issix_Mood", clamp(GM.main.getModuleFlag("IssixModule", "Issix_Mood", 50)+mood, 0, 100))
|
||||
|
||||
static func getWalkDelay():
|
||||
return APPROX_WALK_DELAY
|
||||
|
||||
static func getPlayerRole():
|
||||
return "pet" if GM.main.getModuleFlag("IssixModule", "PC_Enslavement_Role", 1) == 1 else "prostitute"
|
||||
|
||||
static func playerToFuck():
|
||||
return (int(GM.main.getDays()-1) % 2 == 1) and GM.main.getModuleFlag("IssixModule", "Todays_Bred_Slave", "") == "pc" # every uneven day
|
||||
return GM.main.getModuleFlag("IssixModule", "Todays_Bred_Slave", "") == "pc" # every uneven day
|
||||
|
||||
static func getPlayerPetName():
|
||||
if Species.Canine in GM.pc.getSpecies():
|
||||
|
@ -377,7 +374,7 @@ func tickDay():
|
|||
GM.main.increaseModuleFlag("IssixModule", "Comic_Books", RNG.randi_range(5, 8))
|
||||
if int(GM.main.getDays()) % 30 == 0 and GM.main.getModuleFlag("IssixModule", "Strikes_For_Disobedience", 0) > 0: # every 30 days remove one strike
|
||||
GM.main.increaseModuleFlag("IssixModule", "Strikes_For_Disobedience", -1)
|
||||
if GM.main.getDays()-1-GM.main.getModuleFlag("IssixModule", "Last_Walk", GM.main.getDays()) == APPROX_WALK_DELAY:
|
||||
if Globals.untilNextWalk() < 0:
|
||||
GM.main.setModuleFlag("IssixModule", "Last_Walk", GM.main.getDays()-1)
|
||||
|
||||
|
||||
|
|
|
@ -158,19 +158,29 @@ func _react(_action: String, _args):
|
|||
return
|
||||
|
||||
if _action == "enchant":
|
||||
var item = _args[0]
|
||||
var lock = _args[1]
|
||||
var item: ItemBase = _args[0]
|
||||
var lock: String = _args[1]
|
||||
var newLock: SmartLockBase = null
|
||||
|
||||
var newLock = SmartLock.create(lock) # This is a very basic implementation of "enchanting", I kinda want to make it add more challenges to an item on each enchant but that depends on how this feature is perceived
|
||||
if item.getRestraintData().getSmartLock():
|
||||
newLock = item.getRestraintData().getSmartLock()
|
||||
else:
|
||||
newLock = SmartLock.create(lock) # This is a very basic implementation of "enchanting", I kinda want to make it add more challenges to an item on each enchant but that depends on how this feature is perceived
|
||||
newLock.onLocked({forcer = "pc"})
|
||||
item.getRestraintData.setLevel(item.getRestraintData.getLevel()+1) # Just an extra
|
||||
item.getRestraintData().setSmartLock(newLock)
|
||||
|
||||
item.getRestraintData.setLevel(item.getRestraintData.getLevel()+1) # Just an extra
|
||||
# Hey kids, don't do this at home, it's bound to be dangerous (seriously, I'm fucking surprised that works, though it feels like shoestring held kind of feature and fairly restricted)
|
||||
|
||||
if lock == SmartLock.SlutLock:
|
||||
var availableTasks = ["Orgasms", "Choke", "Bodywritings"] # Tasks should be available to anyone regardless any body configuration
|
||||
var availableTasks = ["Orgasms", "Choke", "Bodywritings"] # Tasks should be available to anyone regardless any body configuration TODO Add more?
|
||||
for task in newLock.tasks:
|
||||
availableTasks.erase(task.id)
|
||||
|
||||
var theTask:NpcBreakTaskBase = GlobalRegistry.createSlaveBreakTask(RNG.pick(availableTasks))
|
||||
if availableTasks.size() == 0:
|
||||
addMessage("Cannot apply any more slut lock tasks to this item!")
|
||||
return
|
||||
var theTask: NpcBreakTaskBase = GlobalRegistry.createSlaveBreakTask(RNG.pick(availableTasks))
|
||||
|
||||
theTask.generateFor("pc", false, RNG.randf_rangeX2(1.0, 2.0))
|
||||
newLock.tasks.append(theTask)
|
||||
|
@ -179,6 +189,8 @@ func _react(_action: String, _args):
|
|||
var _ok = task.connect("onTaskCompleted", newLock, "onSlutTaskCompleted")
|
||||
|
||||
addMessage(newLock.getName()+" has been applied to "+item.getVisibleName())
|
||||
GM.main.increaseModuleFlag("IssixModule", "Issix_Used_Donations", 10)
|
||||
|
||||
setState("")
|
||||
if(lockedInto):
|
||||
endScene()
|
||||
|
|
13
Modules/IssixModule/Scenes/SlaveryFirst/PastureWalkies.gd
Normal file
13
Modules/IssixModule/Scenes/SlaveryFirst/PastureWalkies.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends SceneBase
|
||||
|
||||
const Globals = preload("res://Modules/IssixModule/Globals.gd")
|
||||
|
||||
func _init():
|
||||
sceneID = "IssixPastureWalk"
|
||||
|
||||
func _run():
|
||||
if(state == ""):
|
||||
pass
|
||||
|
||||
func _react(_action: String, _args):
|
||||
pass
|
|
@ -1,4 +1,4 @@
|
|||
extends RequirementsBasedScene
|
||||
extends "res://Modules/IssixModule/Scenes/RequirementsBasedScene.gd"
|
||||
|
||||
var preference = 0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends RequirementsBasedScene
|
||||
extends "res://Modules/IssixModule/Scenes/RequirementsBasedScene.gd"
|
||||
|
||||
var preference = 0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends RequirementsBasedScene
|
||||
extends "res://Modules/IssixModule/Scenes/RequirementsBasedScene.gd"
|
||||
|
||||
var preference = 0
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ func _run():
|
|||
pass
|
||||
if playerToFuck() and getModuleFlag("IssixModule", "Had_Sex_With_Issix", false) != true:
|
||||
saynn("[color=#983030][b]Master expects you to be available for fucking today.[/b][/color]")
|
||||
if Globals.untilNextWalk() == 0 and GM.main.getTime() > 15*60*60 and GM.main.getTime() < 17*60*60:
|
||||
saynn("[color=#ffaa00][b]Everyone at the corner is preparing to leave for the walk[/b][/color]")
|
||||
setModuleFlag("IssixModule", "Last_Day_Visited_Master", GM.main.getDays())
|
||||
addButton("Master", "Talk with your master about something", "issixpetmenu")
|
||||
addButton("Azazel", "Actions in relation to Azazel", "azazelpetmenu")
|
||||
|
@ -61,6 +63,7 @@ func _run():
|
|||
addDisabledButton("Walk", "Walks are unimplemented at the moment, possibly in future releases!")
|
||||
else:
|
||||
addDisabledButton("Walk", "Too late for a walk")
|
||||
addButton("Trash can", "Open the trash can", "trash_can")
|
||||
addButton("Pass", "Pass the time (placeholder button for now, supposed to be actions with pets/master later)", "passtime")
|
||||
if getModuleFlag("IssixModule", "Comic_Book_Unlocked", false) == true and getModuleFlag("IssixModule", "Comic_Books", 0) > 0:
|
||||
addButtonWithChecks("Comic", "Read one of "+ str(getModuleFlag("IssixModule", "Comic_Books", 0)) +" comic books", "readabook", [], [ButtonChecks.NotBlindfolded])
|
||||
|
@ -93,6 +96,8 @@ func _run():
|
|||
null:
|
||||
pass
|
||||
addDisabledButton("Options", "Ask your Master to change how he treats you (WIP)") #, "issixoptions" Pet etiquette, make player communicate via animalistic sounds, unlocks optional training
|
||||
if GM.pc.hasKeyholderLocksFrom("issix"):
|
||||
addButton("Smartlocks", "Ask Issix for keys to gear on you", "issix_smartlock_ask_keys")
|
||||
# If all training options have been finished, the option hasn't been rejected and Pet level 10+
|
||||
# if GM.pc.getSkillLevel("Pet") >= 10 and getModuleFlag("IssixModule", "Issix_Mood", 50) > 85:
|
||||
# addButton("Talk", "Talk with Master about being a pet", "mindbroken_intro")
|
||||
|
@ -357,7 +362,7 @@ func _run():
|
|||
saynn("[say=pc]Thank you Hiisi![/say]")
|
||||
addButton("Finish", "End this conversation", "hiisipetmenu")
|
||||
|
||||
if state == "azazelfertilityfirst":
|
||||
if state == "azazel_fertility_first_ask":
|
||||
playAnimation(StageScene.Duo, "kneel", {pc="azazel"})
|
||||
saynn("[say=pc]Heyy Azazel... Umm.[/say]")
|
||||
saynn("Azazel smiles at you.")
|
||||
|
@ -408,13 +413,16 @@ func _run():
|
|||
addDisabledButton("No Strapons", "You don't have loaded strapons")
|
||||
addButton("Later", "You have to go!", "azazelpetmenu")
|
||||
|
||||
if state == "azazelfertilityrepeatlube":
|
||||
if state in ["azazelfertilityfirstlube", "azazelfertilityrepeatlube"]:
|
||||
if state == "azazelfertilityfirstlube":
|
||||
saynn("[say=azazel]Alrighty then! Pass me the lube {pc.boy}![/say]")
|
||||
else:
|
||||
saynn("[say=pc]Heey, can we do fertility training right now?[/say]")
|
||||
saynn("[say=azazel]Sure! I'm up for it. Have you brought the slick juice?[/say]")
|
||||
if GM.pc.getInventory().hasItemID("lube"):
|
||||
saynn("[say=pc]Yup, have it here, catch.[/say]")
|
||||
saynn("You throw the bottle of lube at Azazel, he catches it.")
|
||||
saynn("[say=azazel]Thaaaanks, that will come in handy later hehe. Now, where were we last time...[/say]")
|
||||
saynn("[say=azazel]Thaaaanks, that will come in handy later hehe. "+("Let the learning begin!" if state == "azazelfertilityfirstlube" else "Now, where were we last time...")+"[/say]")
|
||||
addMessage("You've gave Azazel one bottle of lube")
|
||||
addButton("Continue", "Continue", "azazelfertilityfirst")
|
||||
else:
|
||||
|
@ -422,7 +430,10 @@ func _run():
|
|||
saynn("[say=azazel]Well, I'll wait. As much as I want to breed you, I need lube for stuff![/say]")
|
||||
addButton("Leave", "", "azazelpetmenu")
|
||||
|
||||
if state == "azazelfertilityrepeatsex":
|
||||
if state in ["azazelfertilitysecondsex", "azazelfertilityrepeatsex"]:
|
||||
if state == "azazelfertilitysecondsex":
|
||||
saynn("[say=azazel]Yay![/say]")
|
||||
else:
|
||||
saynn("[say=pc]Heey, can we do fertility training right now?[/say]")
|
||||
saynn("[say=azazel]Well, that depends in your strapon is loaded and your womb ready to receive a happy load hihi.[/say]")
|
||||
saynn("He eyes you with lust.")
|
||||
|
@ -699,11 +710,16 @@ func _run():
|
|||
addButton("Finish", "Finish this interaction", "lamiapetmenu")
|
||||
|
||||
if state == "issixwalkquestion":
|
||||
var last_walk = getModuleFlag("IssixModule", "Last_Walk", 0)
|
||||
if last_walk + 5 > GM.main.getDays():
|
||||
saynn("[say=pc]Master, when do we go on next walk to the pasture?[/say]")
|
||||
var to_walk = Globals.untilNextWalk()
|
||||
if to_walk > 5:
|
||||
saynn("[say=issix]We've just been on a walk pretty recently, so you'll have to be a little bit more patient my pet.[/say]")
|
||||
elif to_walk == 1:
|
||||
saynn("[say=issix]I plan to go out tomorrow, you excited? Just remember to come before 17:00 to hang out, otherwise there is little time.[/say]")
|
||||
elif to_walk == 0:
|
||||
saynn("[say=issix]Sorry, we've already been to the pasture today. We didn't want to wait at that point. Maybe next time? Just watch out for the day.[/say]")
|
||||
else:
|
||||
saynn("[say=issix]Hmm, soonish, probably in around "+ str(AVERAGE_WALK_DELAY-(GM.main.getDays()-last_walk)) + " days. Are you excited for the next walk?[/say]")
|
||||
saynn("[say=issix]Hmm, soonish, probably in around "+ str(Globals.untilNextWalk(true)) + " days. Are you excited for the next walk?[/say]")
|
||||
addButton("Back", "Go back", "issixpetmenu")
|
||||
|
||||
if state == "issixsexrequest":
|
||||
|
@ -743,6 +759,36 @@ func _run():
|
|||
saynn("You read one of the comic books, 20 minutes pass.") # TODO Expand on this
|
||||
addButton("Back", "Go back", "")
|
||||
|
||||
if state == "trash_can":
|
||||
saynn("You can throw garbage into harems trash can")
|
||||
addButton("Empty condoms", "Discard all of empty condoms in your inventory", "discard_condoms")
|
||||
addButton("Back", "Close the trash can", "")
|
||||
|
||||
if state == "issix_smartlock_ask_keys_success":
|
||||
saynn("[say=pc]M-master, may I have a key to your restraints?[/say]")
|
||||
saynn("It's clear your predicament brings a smile to Master's face.")
|
||||
saynn("[say=issix]Mmmm, you don't want to be rendered helpless by my gear pet? Owww, you hurt my feelings! You look great like this.[/say]")
|
||||
saynn("[say=pc]*whine*[/say]")
|
||||
saynn("[say=issix]I'll consider your plea but I want to see you beg. Beg for me to release you.[/say]")
|
||||
addButton("Beg", "Beg your Master to free you from his restraints", "issix_beg_smartlocks")
|
||||
addButton("Don't beg", "Decide not to beg and leave", "issixpetmenu")
|
||||
|
||||
if state == "issix_beg_smartlocks":
|
||||
saynn("You beg your Master to free you of the restraints, he relents.")
|
||||
saynn("[say=issix]Fine, it served its purpose.[/say]")
|
||||
saynn("He then comes to you and opens each restraint with his key one by one until all of the keylocked by himself are no longer on your body.")
|
||||
saynn("[say=issix]I'll keep them for another session, go.[/say]")
|
||||
saynn("He winks and waves at you to go.")
|
||||
addButton("Leave", "Leave", "issixpetmenu")
|
||||
|
||||
if state == "issix_smartlock_ask_keys_fail":
|
||||
saynn("[say=pc]M-master, may I have a key to your restraints?[/say]")
|
||||
saynn("Your Master's grimace doesn't seem very friendly.")
|
||||
saynn("[say=issix]No. You look better this way, don't you dare reject my gifts.[/say]")
|
||||
saynn("He grabs you by the arm and shakes you in show of power over your helplessness being bound by his gear.")
|
||||
saynn("[say=issix]Now, leave.[/say]")
|
||||
addButton("Leave", "Leave", "issixpetmenu")
|
||||
|
||||
func getTimeSpent():
|
||||
return getModuleFlag("IssixModule", "Pet_Time_Interaction_Today", 0)+(GM.main.getTime()-pet_time_start)
|
||||
|
||||
|
@ -836,7 +882,7 @@ func getMood():
|
|||
return "[color=green]excellent[/color]"
|
||||
|
||||
static func playerToFuck():
|
||||
return (int(GM.main.getDays()) % 2 == 1) and GM.main.getModuleFlag("IssixModule", "Todays_Bred_Slave", "") == "pc"
|
||||
return GM.main.getModuleFlag("IssixModule", "Todays_Bred_Slave", "") == "pc"
|
||||
|
||||
func getDays():
|
||||
var days_enslaved = getModuleFlag("IssixModule", "Misc_Slavery_Info", {})["day_enslaved"]
|
||||
|
@ -892,6 +938,16 @@ func _react(_action: String, _args):
|
|||
GM.pc.addLust(-90)
|
||||
GM.pc.addStamina(-10)
|
||||
|
||||
if _action == "discard_condoms":
|
||||
var counter = 0
|
||||
for condom in GM.pc.getInventory().getAllOf("UsedCondom"):
|
||||
condom.getFluids().removeEmptyInternalEntries()
|
||||
if condom.getFluids().isEmpty():
|
||||
counter += 1
|
||||
condom.destroyMe()
|
||||
addMessage("You've trashed "+str(counter)+" empty condoms.")
|
||||
_action = "trash_can"
|
||||
|
||||
if _action == "azazelfertilitysecond":
|
||||
GM.pc.getInventory().addItem(getCharacter("azazel").getInventory().getEquippedItem(InventorySlot.Strapon))
|
||||
|
||||
|
@ -901,7 +957,7 @@ func _react(_action: String, _args):
|
|||
|
||||
if _action == "azazellearnfertility":
|
||||
if getModuleFlag("IssixModule", "Azazel_Fertility_Training_Today") == null:
|
||||
_action = "azazelfertilityfirst"
|
||||
_action = "azazel_fertility_first_ask"
|
||||
elif GM.pc.getSkillLevel(Skill.Fertility) < 6:
|
||||
_action = "azazelfertilityrepeatlube"
|
||||
else:
|
||||
|
@ -1051,6 +1107,19 @@ func _react(_action: String, _args):
|
|||
processTime(15*60)
|
||||
_action = ""
|
||||
|
||||
if _action == "issixwalkquestion":
|
||||
if Globals.untilNextWalk() == 0 and 17 * 60 * 60 > GM.main.getTime():
|
||||
runScene("IssixPastureWalk", [], "walkies")
|
||||
|
||||
if _action == "issix_smartlock_ask_keys":
|
||||
if getModuleFlag("IssixModule", "Issix_Mood", 50) < 50:
|
||||
_action = "issix_smartlock_ask_keys_fail"
|
||||
else:
|
||||
_action = "issix_smartlock_ask_keys_success"
|
||||
|
||||
if _action == "issix_beg_smartlocks":
|
||||
addMessage("Your Master has freed you from "+str(GM.pc.unlockAllKeyholderLocksFrom("issix"))+" restraints.")
|
||||
|
||||
if(_action == "endthescene"):
|
||||
# increaseModuleFlag("IssixModule", "PC_Training_Level")
|
||||
increaseModuleFlag("IssixModule", "Pet_Time_Interaction_Today", GM.main.getTime()-pet_time_start)
|
||||
|
@ -1085,6 +1154,9 @@ func _react_scene_end(_tag, _result):
|
|||
allow_pawns = false
|
||||
setState("issixpetmenu")
|
||||
|
||||
if _tag == "walkies":
|
||||
setState("issixpetmenu")
|
||||
|
||||
if _result is Array:
|
||||
if _result.has("force_close"):
|
||||
GM.main.pickOption("endthescene", [])
|
||||
|
|
Loading…
Reference in a new issue