From 73d04afb9bf880d3ee25c28c5d7b5b87b224e655 Mon Sep 17 00:00:00 2001
From: SandPoot <enric_gabirel@hotmail.com>
Date: Sun, 21 Jul 2024 16:37:34 -0300
Subject: [PATCH 1/7] push

---
 .../code/_onclick/hud/screen_objects.dm       | 35 +++++++++++++++++--
 1 file changed, 32 insertions(+), 3 deletions(-)

diff --git a/modular_sand/code/_onclick/hud/screen_objects.dm b/modular_sand/code/_onclick/hud/screen_objects.dm
index 1a463f058066..62040916c5e5 100644
--- a/modular_sand/code/_onclick/hud/screen_objects.dm
+++ b/modular_sand/code/_onclick/hud/screen_objects.dm
@@ -13,9 +13,38 @@
 	screen_loc = ui_hunger_thirst
 
 /atom/movable/screen/healthdoll/Click(location, control, params)
-	var/mob/living/L = usr
-	usr.Click(L, control, params)
-	return FALSE	//The health doll doesn't really do anything on it's own, change this if you need to
+	if(hud?.mymob)
+		return hud.mymob.Click(arglist(args))
+
+/atom/movable/screen/healthdoll/examine(mob/user)
+	if(hud?.mymob)
+		return hud.mymob.examine(arglist(args))
+
+/atom/movable/screen/healthdoll/examine_more(mob/user)
+	if(hud?.mymob)
+		return hud.mymob.examine_more(arglist(args))
+
+/atom/movable/screen/healthdoll/MouseEntered(location, control, params)
+	if(hud?.mymob)
+		return hud.mymob.MouseEntered(arglist(args))
+
+/atom/movable/screen/healthdoll/MouseExited(location, control, params)
+	if(hud?.mymob)
+		return hud.mymob.MouseExited(arglist(args))
+
+/atom/movable/screen/healthdoll/MouseDown(location, control, params)
+	if(hud?.mymob)
+		return hud.mymob.MouseDown(arglist(args))
+
+/atom/movable/screen/healthdoll/MouseUp(location, control, params)
+	if(hud?.mymob)
+		return hud.mymob.MouseUp(arglist(args))
+
+/atom/movable/screen/healthdoll/MouseDrag(over_object, src_location, over_location, src_control, over_control, params)
+	if(hud?.mymob)
+		return hud.mymob.MouseDrag(arglist(args))
+
+// Mousedrop won't work, behavior is usually defined on the thing that MouseDrag started on
 
 /atom/movable/screen/sanity
 	name = "sanity"

From 490a61c128b1345cdddd872cc27a4dd9cfad009a Mon Sep 17 00:00:00 2001
From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com>
Date: Sun, 21 Jul 2024 19:57:56 +0000
Subject: [PATCH 2/7] Automatic changelog generation for PR #377 [ci skip]

---
 html/changelogs/AutoChangeLog-pr-377.yml | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 html/changelogs/AutoChangeLog-pr-377.yml

diff --git a/html/changelogs/AutoChangeLog-pr-377.yml b/html/changelogs/AutoChangeLog-pr-377.yml
new file mode 100644
index 000000000000..b37872bc5622
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-377.yml
@@ -0,0 +1,5 @@
+author: SandPoot
+delete-after: true
+changes:
+  - tweak: The healthdoll was made more responsive, for example, it will show screentips
+      correctly.

From a94970c4c05693de585e6ca7ba41d3ef2d7ea01e Mon Sep 17 00:00:00 2001
From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com>
Date: Sun, 21 Jul 2024 19:58:52 +0000
Subject: [PATCH 3/7] Automatic changelog compile [ci skip]

---
 html/changelogs/AutoChangeLog-pr-377.yml | 5 -----
 html/changelogs/archive/2024-07.yml      | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)
 delete mode 100644 html/changelogs/AutoChangeLog-pr-377.yml

diff --git a/html/changelogs/AutoChangeLog-pr-377.yml b/html/changelogs/AutoChangeLog-pr-377.yml
deleted file mode 100644
index b37872bc5622..000000000000
--- a/html/changelogs/AutoChangeLog-pr-377.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-author: SandPoot
-delete-after: true
-changes:
-  - tweak: The healthdoll was made more responsive, for example, it will show screentips
-      correctly.
diff --git a/html/changelogs/archive/2024-07.yml b/html/changelogs/archive/2024-07.yml
index d87fd89da523..2ab81616d09b 100644
--- a/html/changelogs/archive/2024-07.yml
+++ b/html/changelogs/archive/2024-07.yml
@@ -5,3 +5,7 @@
   SandPoot:
   - rscadd: Added favorite interactions to the interaction menu, those persist between
       rounds and between characters.
+2024-07-21:
+  SandPoot:
+  - tweak: The healthdoll was made more responsive, for example, it will show screentips
+      correctly.

From 8c85d0d630ab4ba3ca0f0d8252e7b49497d3ab08 Mon Sep 17 00:00:00 2001
From: SandPoot <enric_gabirel@hotmail.com>
Date: Wed, 24 Jul 2024 15:27:51 -0300
Subject: [PATCH 4/7] push

---
 code/modules/client/preferences.dm                  |  6 +++---
 code/modules/client/preferences_savefile.dm         |  2 +-
 .../datums/components/interaction_menu_granter.dm   |  2 +-
 .../code/datums/interactions/lewd_definitions.dm    |  2 +-
 .../code/modules/client/preferences_savefile.dm     |  7 +++++++
 .../code/modules/client/preferences_toggles.dm      | 13 +++++++++++++
 tgstation.dme                                       |  1 +
 7 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100644 modular_sand/code/modules/client/preferences_toggles.dm

diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index fc7b0fce3057..8760ea172fcb 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
 	///Should we be in the widescreen mode set by the config?
 	var/widescreenpref = TRUE
 	///Strip menu style
-	var/long_strip_menu = FALSE
+	var/long_strip_menu = TRUE
 	///What size should pixels be displayed as? 0 is strech to fit
 	var/pixel_size = 0
 	///What scaling method should we use?
@@ -1338,7 +1338,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
 					dat += "<table><tr><td width='340px' height='300px' valign='top'>"
 					dat += "<h2>Fetish content prefs</h2>"
 					dat += "<b>Allow Lewd Verbs:</b> <a href='?_src_=prefs;preference=verb_consent'>[(toggles & VERB_CONSENT) ? "Yes":"No"]</a><br>" // Skyrat - ERP Mechanic Addition
-					dat += "<b>Mute Lewd Verb Sounds:</b> <a href='?_src_=prefs;preference=mute_lewd_verb_sounds'>[(toggles & LEWD_VERB_SOUNDS) ? "Yes":"No"]</a><br>" // Sandstorm - ERP Mechanic Addition
+					dat += "<b>Lewd Verb Sounds:</b> <a href='?_src_=prefs;preference=lewd_verb_sounds'>[(toggles & LEWD_VERB_SOUNDS) ? "Yes":"No"]</a><br>" // Sandstorm - ERP Mechanic Addition
 					dat += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
 					dat += "<b>Genital examine text</b>:<a href='?_src_=prefs;preference=genital_examine'>[(cit_toggles & GENITAL_EXAMINE) ? "Enabled" : "Disabled"]</a><BR>"
 					dat += "<b>Vore examine text</b>:<a href='?_src_=prefs;preference=vore_examine'>[(cit_toggles & VORE_EXAMINE) ? "Enabled" : "Disabled"]</a><BR>"
@@ -3281,7 +3281,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
 				if("verb_consent") // Skyrat - ERP Mechanic Addition
 					toggles ^= VERB_CONSENT // Skyrat - ERP Mechanic Addition
 
-				if("mute_lewd_verb_sounds") // Skyrat - ERP Mechanic Addition
+				if("lewd_verb_sounds") // Skyrat - ERP Mechanic Addition
 					toggles ^= LEWD_VERB_SOUNDS // Skyrat - ERP Mechanic Addition
 
 				if("persistent_scars")
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 7b89a0e6eb13..1e6b3613e461 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -5,7 +5,7 @@
 //	You do not need to raise this if you are adding new values that have sane defaults.
 //	Only raise this value when changing the meaning/format/name/layout of an existing value
 //	where you would want the updater procs below to run
-#define SAVEFILE_VERSION_MAX	59
+#define SAVEFILE_VERSION_MAX	59.1
 
 /*
 SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
diff --git a/modular_sand/code/datums/components/interaction_menu_granter.dm b/modular_sand/code/datums/components/interaction_menu_granter.dm
index 8a1d4d964b23..82457c851b84 100644
--- a/modular_sand/code/datums/components/interaction_menu_granter.dm
+++ b/modular_sand/code/datums/components/interaction_menu_granter.dm
@@ -401,7 +401,7 @@
 
 	//Getting preferences
 		.["verb_consent"] = 		!!CHECK_BITFIELD(prefs.toggles, VERB_CONSENT)
-		.["lewd_verb_sounds"] = 	!CHECK_BITFIELD(prefs.toggles, LEWD_VERB_SOUNDS)
+		.["lewd_verb_sounds"] = 	!!CHECK_BITFIELD(prefs.toggles, LEWD_VERB_SOUNDS)
 		.["arousable"] = 			prefs.arousable
 		.["genital_examine"] = 		!!CHECK_BITFIELD(prefs.cit_toggles, GENITAL_EXAMINE)
 		.["vore_examine"] = 		!!CHECK_BITFIELD(prefs.cit_toggles, VORE_EXAMINE)
diff --git a/modular_sand/code/datums/interactions/lewd_definitions.dm b/modular_sand/code/datums/interactions/lewd_definitions.dm
index 101d8b1f3a8a..eb3ed3feaeab 100644
--- a/modular_sand/code/datums/interactions/lewd_definitions.dm
+++ b/modular_sand/code/datums/interactions/lewd_definitions.dm
@@ -8,7 +8,7 @@
 /proc/playlewdinteractionsound(turf/turf_source, soundin, vol as num, vary, extrarange as num, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S, envwet = -10000, envdry = 0, manual_x, manual_y, list/ignored_mobs)
 	var/list/hearing_mobs
 	for(var/mob/H in get_hearers_in_view(4, turf_source))
-		if(!H.client || (H.client.prefs.toggles & LEWD_VERB_SOUNDS))
+		if(!H.client || !(H.client.prefs.toggles & LEWD_VERB_SOUNDS))
 			continue
 		LAZYADD(hearing_mobs, H)
 	if(ignored_mobs?.len)
diff --git a/modular_sand/code/modules/client/preferences_savefile.dm b/modular_sand/code/modules/client/preferences_savefile.dm
index 2f123464f743..d89f7df70aee 100644
--- a/modular_sand/code/modules/client/preferences_savefile.dm
+++ b/modular_sand/code/modules/client/preferences_savefile.dm
@@ -16,6 +16,13 @@
 		if(CHECK_BITFIELD(toggles, SOUND_BARK))
 			DISABLE_BITFIELD(toggles, SOUND_BARK)
 			ENABLE_BITFIELD(toggles, VERB_CONSENT)
+
+	if(current_version < 59.1)
+		// Just invert it, now it's a switch to see if you want it on, rather than off.
+		TOGGLE_BITFIELD(toggles, LEWD_VERB_SOUNDS)
+
+		// It may not be a default on cit, but this is meant to be default here at least.
+		long_strip_menu = TRUE
 	. = ..()
 
 /datum/preferences/save_preferences(bypass_cooldown, silent)
diff --git a/modular_sand/code/modules/client/preferences_toggles.dm b/modular_sand/code/modules/client/preferences_toggles.dm
new file mode 100644
index 000000000000..dfcceab6f989
--- /dev/null
+++ b/modular_sand/code/modules/client/preferences_toggles.dm
@@ -0,0 +1,13 @@
+TOGGLE_CHECKBOX(/datum/verbs/menu/Settings/Sound, toggle_lewd_sounds)()
+	set name = "Hear/Silence Lewd Verb Sounds"
+	set category = "Preferences"
+	set desc = "Hear Lewd Verb Sounds From Interactions"
+	usr.client.prefs.toggles ^= LEWD_VERB_SOUNDS
+	usr.client.prefs.save_preferences()
+	if(usr.client.prefs.toggles & LEWD_VERB_SOUNDS)
+		to_chat(usr, "You will now hear lewd verb sounds.")
+	else
+		to_chat(usr, "You will no longer hear lewd verb sounds")
+	SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Hearing Lewd Verb Sounds", "[usr.client.prefs.toggles & LEWD_VERB_SOUNDS ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+/datum/verbs/menu/Settings/Sound/toggle_lewd_sounds/Get_checked(client/C)
+	return C.prefs.toggles & LEWD_VERB_SOUNDS
diff --git a/tgstation.dme b/tgstation.dme
index e52664207de8..c3afe0b8481f 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -4187,6 +4187,7 @@
 #include "modular_sand\code\modules\client\client_procs.dm"
 #include "modular_sand\code\modules\client\preferences.dm"
 #include "modular_sand\code\modules\client\preferences_savefile.dm"
+#include "modular_sand\code\modules\client\preferences_toggles.dm"
 #include "modular_sand\code\modules\client\loadout\_security.dm"
 #include "modular_sand\code\modules\client\loadout\accessories.dm"
 #include "modular_sand\code\modules\client\loadout\backpack.dm"

From fe249b6e1237b3c7f90d8b5da5c7b918b0f25252 Mon Sep 17 00:00:00 2001
From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com>
Date: Wed, 24 Jul 2024 19:27:08 +0000
Subject: [PATCH 5/7] Automatic changelog generation for PR #378 [ci skip]

---
 html/changelogs/AutoChangeLog-pr-378.yml | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 html/changelogs/AutoChangeLog-pr-378.yml

diff --git a/html/changelogs/AutoChangeLog-pr-378.yml b/html/changelogs/AutoChangeLog-pr-378.yml
new file mode 100644
index 000000000000..4ed8555aff80
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-378.yml
@@ -0,0 +1,8 @@
+author: SandPoot
+delete-after: true
+changes:
+  - rscadd: Top-left menu now has lewd sounds toggle.
+  - tweak: The preference for lewd sounds is now about activating them, not muting.
+      (your preferences have been automatically flipped to account for this)
+  - tweak: Long strip menu is meant to be default on for sandstorm, and so it has
+      been set so.

From c5692503618920194886d6357bf8e70c23ba8900 Mon Sep 17 00:00:00 2001
From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com>
Date: Wed, 24 Jul 2024 19:28:09 +0000
Subject: [PATCH 6/7] Automatic changelog compile [ci skip]

---
 html/changelogs/AutoChangeLog-pr-378.yml | 8 --------
 html/changelogs/archive/2024-07.yml      | 7 +++++++
 2 files changed, 7 insertions(+), 8 deletions(-)
 delete mode 100644 html/changelogs/AutoChangeLog-pr-378.yml

diff --git a/html/changelogs/AutoChangeLog-pr-378.yml b/html/changelogs/AutoChangeLog-pr-378.yml
deleted file mode 100644
index 4ed8555aff80..000000000000
--- a/html/changelogs/AutoChangeLog-pr-378.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-author: SandPoot
-delete-after: true
-changes:
-  - rscadd: Top-left menu now has lewd sounds toggle.
-  - tweak: The preference for lewd sounds is now about activating them, not muting.
-      (your preferences have been automatically flipped to account for this)
-  - tweak: Long strip menu is meant to be default on for sandstorm, and so it has
-      been set so.
diff --git a/html/changelogs/archive/2024-07.yml b/html/changelogs/archive/2024-07.yml
index 2ab81616d09b..c016c6b0ef60 100644
--- a/html/changelogs/archive/2024-07.yml
+++ b/html/changelogs/archive/2024-07.yml
@@ -9,3 +9,10 @@
   SandPoot:
   - tweak: The healthdoll was made more responsive, for example, it will show screentips
       correctly.
+2024-07-24:
+  SandPoot:
+  - rscadd: Top-left menu now has lewd sounds toggle.
+  - tweak: The preference for lewd sounds is now about activating them, not muting.
+      (your preferences have been automatically flipped to account for this)
+  - tweak: Long strip menu is meant to be default on for sandstorm, and so it has
+      been set so.

From cdf631e9ccaaaa907b32207fb1a9af39d90db65a Mon Sep 17 00:00:00 2001
From: tgstation-server <tgstation-server@users.noreply.github.com>
Date: Thu, 25 Jul 2024 01:16:16 +0000
Subject: [PATCH 7/7] Update TGS DMAPI

---
 code/__DEFINES/tgs.dm      | 2 +-
 code/modules/tgs/README.md | 2 +-
 code/modules/tgs/v5/api.dm | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm
index e2c89df90e9b..17464b44dae8 100644
--- a/code/__DEFINES/tgs.dm
+++ b/code/__DEFINES/tgs.dm
@@ -1,6 +1,6 @@
 // tgstation-server DMAPI
 
-#define TGS_DMAPI_VERSION "7.1.2"
+#define TGS_DMAPI_VERSION "7.1.3"
 
 // All functions and datums outside this document are subject to change with any version and should not be relied on.
 
diff --git a/code/modules/tgs/README.md b/code/modules/tgs/README.md
index 6319028d8106..35ca73d7e9a8 100644
--- a/code/modules/tgs/README.md
+++ b/code/modules/tgs/README.md
@@ -1,6 +1,6 @@
 # DMAPI Internals
 
-This folder should be placed on it's own inside a codebase that wishes to use the TGS DMAPI. Warranty void if modified.
+This folder should be placed on its own inside a codebase that wishes to use the TGS DMAPI. Warranty void if modified.
 
 - [includes.dm](./includes.dm) is the file that should be included by DM code, it handles including the rest.
 - The [core](./core) folder includes all code not directly part of any API version.
diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm
index 95b8edd3ee5c..05d0dee25b3c 100644
--- a/code/modules/tgs/v5/api.dm
+++ b/code/modules/tgs/v5/api.dm
@@ -50,7 +50,9 @@
 	version = null // we want this to be the TGS version, not the interop version
 
 	// sleep once to prevent an issue where world.Export on the first tick can hang indefinitely
+	TGS_DEBUG_LOG("Starting Export bug prevention sleep tick. time:[world.time] sleep_offline:[world.sleep_offline]")
 	sleep(world.tick_lag)
+	TGS_DEBUG_LOG("Export bug prevention sleep complete")
 
 	var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands(), DMAPI5_PARAMETER_TOPIC_PORT = GetTopicPort()))
 	if(!istype(bridge_response))