Jump to content

CookTime

Closed 1.2.8

Hi @imthenewguy, first of all thanks for the cool update. ❤️
I saw that you changed a lot on the plugin.
I have already adapted our cooking system for us again, but with version 1.2.7 I implemented an additional function that the cooking time was displayed under the description.
However, this is currently no longer possible with version 1.2.8.

Can you help me to implement it again?

I already have everything ready, the only thing I'm really missing is the variable for the cooking time.
I created a new default message "CookingTime" under #region Localization and also defined it in "ingredients_menu_description_1".
That goes so far, but as I said, unfortunately I'm missing the variable from the Cooking Time

new CuiTextComponent { Text = cookingData.description + "\n" + (cookingData.buffType == BuffType.Permission ? GetPermissionBuffDescription(cookingData.perms) : GetBuffDescription(cookingData.buffType, cookingData.BuffModifier) + "\n" + string.Format(lang.GetMessage("Duration", this, player.UserIDString), cookingData.buff_duration) + "\n" + string.Format(lang.GetMessage("CookingTime", this, player.UserIDString), cookingData.buff_duration)), Font = "robotocondensed-regular.ttf", FontSize = 16, Align = TextAnchor.UpperLeft, Color = "1 1 1 1"},

With version 1.2.7 I used kvp.Value.cookTime
Possibly you can help me with this problem.
I took a picture of what I mean exactly.

Screenshot_191.thumb.png.2b9ce1ab7b30a98da4ec181c7acfe1d0.png

This has nothing to do with this topic, but can still be important.
I think the DefaultRecipe and DefaultFood are enforced and written into the config over and over again.

Edited by MeinRust

Share this comment


Link to comment
11 hours ago, MeinRust said:

Hi @imthenewguy, first of all thanks for the cool update. ❤️
I saw that you changed a lot on the plugin.
I have already adapted our cooking system for us again, but with version 1.2.7 I implemented an additional function that the cooking time was displayed under the description.
However, this is currently no longer possible with version 1.2.8.

Can you help me to implement it again?

I already have everything ready, the only thing I'm really missing is the variable for the cooking time.
I created a new default message "CookingTime" under #region Localization and also defined it in "ingredients_menu_description_1".
That goes so far, but as I said, unfortunately I'm missing the variable from the Cooking Time

new CuiTextComponent { Text = cookingData.description + "\n" + (cookingData.buffType == BuffType.Permission ? GetPermissionBuffDescription(cookingData.perms) : GetBuffDescription(cookingData.buffType, cookingData.BuffModifier) + "\n" + string.Format(lang.GetMessage("Duration", this, player.UserIDString), cookingData.buff_duration) + "\n" + string.Format(lang.GetMessage("CookingTime", this, player.UserIDString), cookingData.buff_duration)), Font = "robotocondensed-regular.ttf", FontSize = 16, Align = TextAnchor.UpperLeft, Color = "1 1 1 1"},

With version 1.2.7 I used kvp.Value.cookTime
Possibly you can help me with this problem.
I took a picture of what I mean exactly.

Screenshot_191.thumb.png.2b9ce1ab7b30a98da4ec181c7acfe1d0.png

This has nothing to do with this topic, but can still be important.
I think the DefaultRecipe and DefaultFood are enforced and written into the config over and over again.

I will add a config option that will allow you to disable auto update for the meals.

Regardnig adding cooking time, could try something like this:

new CuiTextComponent { Text = cookingData.description + "\n" + (cookingData.buffType == BuffType.Permission ? GetPermissionBuffDescription(cookingData.perms) : GetBuffDescription(cookingData.buffType, cookingData.BuffModifier) + "\n" + string.Format(lang.GetMessage("Duration", this, player.UserIDString), cookingData.buff_duration)) + $"\nCooking Time: {cookingData.cookTime} seconds", Font = "robotocondensed-regular.ttf", FontSize = 16, Align = TextAnchor.UpperLeft, Color = "1 1 1 1" },

Can change it to lang of course, but if its only for your server you might as well hard code it.

  • Love 1

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

83.5k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.