Add 'slut' job functionality to SettingsMixin in Unbelievaboat
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
This commit expands the job system by adding the 'slut' job, including cooldown management and payout structures. The cooldowns are integrated into the existing framework, allowing for a new high-reward operation. Additionally, the command description has been updated for clarity, and the embed messages have been adjusted to reflect the new job's payouts and fail rates, enhancing user interaction and gameplay experience.
This commit is contained in:
parent
3fdd10fb8d
commit
2971d0d4ae
2 changed files with 19 additions and 7 deletions
|
@ -37,7 +37,7 @@ class SettingsMixin(MixinMeta):
|
|||
The time can be formatted as so `1h30m` etc. Valid times are hours, minutes and seconds.
|
||||
"""
|
||||
job = job.lower()
|
||||
if job not in ["work", "crime", "rob", "deposit", "withdraw"]:
|
||||
if job not in ["work", "crime", "rob", "deposit", "withdraw", "slut"]:
|
||||
return await ctx.send("Invalid job.")
|
||||
seconds = time.total_seconds()
|
||||
if seconds < 30:
|
||||
|
@ -50,6 +50,7 @@ class SettingsMixin(MixinMeta):
|
|||
"rob": "robcd",
|
||||
"deposit": "depositcd",
|
||||
"withdraw": "withdrawcd",
|
||||
"slut": "slutcd",
|
||||
}
|
||||
cooldowns[jobcd[job]] = int(seconds)
|
||||
await ctx.tick()
|
||||
|
@ -256,8 +257,16 @@ class SettingsMixin(MixinMeta):
|
|||
robcd = humanize_timedelta(seconds=jobcd["robcd"] - time)
|
||||
else:
|
||||
robcd = "Ready to use."
|
||||
msg = "Work Cooldown: `{}`\nCrime Cooldown: `{}`\nRob Cooldown: `{}`".format(
|
||||
workcd, crimecd, robcd
|
||||
if cd["slutcd"] is None:
|
||||
slutcd = "Ready to use."
|
||||
else:
|
||||
time = int(datetime.datetime.utcnow().timestamp()) - cd["slutcd"]
|
||||
if time < jobcd["slutcd"]:
|
||||
slutcd = humanize_timedelta(seconds=jobcd["slutcd"] - time)
|
||||
else:
|
||||
slutcd = "Ready to use."
|
||||
msg = "Work Cooldown: `{}`\nCrime Cooldown: `{}`\nRob Cooldown: `{}`\nSlut Cooldown: `{}`".format(
|
||||
workcd, crimecd, robcd, slutcd
|
||||
)
|
||||
await ctx.maybe_send_embed(msg)
|
||||
|
||||
|
@ -273,8 +282,9 @@ class SettingsMixin(MixinMeta):
|
|||
workcd = humanize_timedelta(seconds=cooldowns["workcd"])
|
||||
robcd = humanize_timedelta(seconds=cooldowns["robcd"])
|
||||
crimecd = humanize_timedelta(seconds=cooldowns["crimecd"])
|
||||
cooldownmsg = "Work Cooldown: `{}`\nCrime Cooldown: `{}`\nRob Cooldown: `{}`".format(
|
||||
workcd, crimecd, robcd
|
||||
slutcd = humanize_timedelta(seconds=cooldowns["slutcd"])
|
||||
cooldownmsg = "Work Cooldown: `{}`\nCrime Cooldown: `{}`\nRob Cooldown: `{}`\nSlut Cooldown: `{}`".format(
|
||||
workcd, crimecd, robcd, slutcd
|
||||
)
|
||||
embed = discord.Embed(colour=ctx.author.colour, title="Unbelievaboat Settings")
|
||||
embed.add_field(
|
||||
|
@ -285,12 +295,14 @@ class SettingsMixin(MixinMeta):
|
|||
payouts = data["payouts"]
|
||||
crimepayout = f"**Max**: {humanize_number(payouts['crime']['max'])}\n**Min**: {humanize_number(payouts['crime']['min'])}"
|
||||
workpayout = f"**Max**: {humanize_number(payouts['work']['max'])}\n**Min**: {humanize_number(payouts['work']['min'])}"
|
||||
slutpayout = f"**Max**: {humanize_number(payouts['slut']['max'])}\n**Min**: {humanize_number(payouts['slut']['min'])}"
|
||||
embed.add_field(name="Work Payouts", value=workpayout, inline=True)
|
||||
embed.add_field(name="Crime Payouts", value=crimepayout, inline=True)
|
||||
embed.add_field(name="Slut Payouts", value=slutpayout, inline=True)
|
||||
failrates = data["failrates"]
|
||||
embed.add_field(
|
||||
name="Fail Rates",
|
||||
value=f"**Crime**: {failrates['crime']}%\n**Rob**: {failrates['rob']}%\n**Interest Fee**: {data['interest']}%",
|
||||
value=f"**Crime**: {failrates['crime']}%\n**Rob**: {failrates['rob']}%\n**Slut**: {failrates['slut']}%\n**Interest Fee**: {data['interest']}%",
|
||||
inline=True,
|
||||
)
|
||||
fines = data["fines"]
|
||||
|
|
|
@ -381,7 +381,7 @@ class Unbelievaboat(Wallet, Roulette, SettingsMixin, commands.Cog, metaclass=Com
|
|||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
async def slut(self, ctx):
|
||||
"""Involvement in a slutty operation - With high rewards but legallity is questionable."""
|
||||
"""Involvement in a slutty operation - With high rewards but legallity may be questionable."""
|
||||
if ctx.assume_yes:
|
||||
return await ctx.send("This command can't be scheduled.")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue