diff --git a/code/__DEFINES/text.dm b/code/__DEFINES/text.dm index 9529d6c4fe2..18f1e9a5e1c 100644 --- a/code/__DEFINES/text.dm +++ b/code/__DEFINES/text.dm @@ -58,6 +58,12 @@ /// Removes everything enclose in < and > inclusive of the bracket, and limits the length of the message. #define STRIP_HTML_FULL(text, limit) (GLOB.html_tags.Replace(copytext(text, 1, limit), "")) +/** + * stuff like `copytext(input, length(input))` will trim the last character of the input, + * because DM does it so it copies until the char BEFORE the `end` arg, so we need to bump `end` by 1 in these cases. + */ +#define PREVENT_CHARACTER_TRIM_LOSS(integer) (integer + 1) + /// Folder directory for strings #define STRING_DIRECTORY "strings" diff --git a/code/game/objects/items/food/sweets.dm b/code/game/objects/items/food/sweets.dm index 4ac87ba9b8b..a9c51f97c8e 100644 --- a/code/game/objects/items/food/sweets.dm +++ b/code/game/objects/items/food/sweets.dm @@ -306,6 +306,10 @@ venue_value = FOOD_PRICE_WORTHLESS var/mutable_appearance/head var/head_color = rgb(0, 0, 0) + /// NOVA EDIT ADDITION BEGIN + //Copies reagent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops + var/metabolization_amount = REAGENTS_METABOLISM / 2 + // NOVA EDIT ADDITION END /// NOVA ADDITION BEGIN //Copies regent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops @@ -357,6 +361,10 @@ food_flags = FOOD_FINGER_FOOD slot_flags = ITEM_SLOT_MASK crafting_complexity = FOOD_COMPLEXITY_1 + // NOVA EDIT ADDITION BEGIN + //Copies reagent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops + var/metabolization_amount = REAGENTS_METABOLISM / 2 + // NOVA EDIT ADDITION END /// NOVA ADDITION BEGIN //Copies regent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops @@ -385,6 +393,10 @@ food_flags = FOOD_FINGER_FOOD slot_flags = ITEM_SLOT_MASK crafting_complexity = FOOD_COMPLEXITY_1 + /// NOVA EDIT ADDITION BEGIN + //Copies reagent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops + var/metabolization_amount = REAGENTS_METABOLISM / 2 + // NOVA EDIT ADDITION END /// NOVA ADDITION BEGIN //Copies regent metabolization from bubblegum so that you cant get infinite reagents from wearing lolipops diff --git a/code/modules/tgui_input/text.dm b/code/modules/tgui_input/text.dm index f97e0326d58..4b3e59a6028 100644 --- a/code/modules/tgui_input/text.dm +++ b/code/modules/tgui_input/text.dm @@ -32,9 +32,9 @@ if(!user.client.prefs.read_preference(/datum/preference/toggle/tgui_input)) if(encode) if(multiline) - return stripped_multiline_input(user, message, title, default, max_length) + return stripped_multiline_input(user, message, title, default, PREVENT_CHARACTER_TRIM_LOSS(max_length)) else - return stripped_input(user, message, title, default, max_length) + return stripped_input(user, message, title, default, PREVENT_CHARACTER_TRIM_LOSS(max_length)) else if(multiline) return input(user, message, title, default) as message|null @@ -162,4 +162,4 @@ /datum/tgui_input_text/proc/set_entry(entry) if(!isnull(entry)) var/converted_entry = encode ? html_encode(entry) : entry - src.entry = trim(converted_entry, max_length) + src.entry = trim(converted_entry, PREVENT_CHARACTER_TRIM_LOSS(max_length))