diff --git a/assets b/assets index 066bc043e..89031afbc 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 066bc043e087a348453886ef1f7c25e948f79e90 +Subproject commit 89031afbcaaba31e860cc2a595206d57089c8224 diff --git a/project.hxp b/project.hxp index 0560ebbf7..c9b6b57ab 100644 --- a/project.hxp +++ b/project.hxp @@ -210,6 +210,16 @@ class Project extends HXProject */ static final UNLOCK_EVERYTHING:FeatureFlag = "UNLOCK_EVERYTHING"; + /** + * `-DCENSOR_EXPLETIVES` + * If enabled, specifically disable "sexual explitives" in the game. + * This will forcibly censor these words (even if naughtyness is enabled), while leaving other swears. + * + * NOTE: This is needed because the Android platform specifically hates "fuck" and "cunt", + * but is fine with other naughtyness such as "cock", "asshole", implied sex, cigarettes, etc. + */ + static final CENSOR_EXPLETIVES:FeatureFlag = "CENSOR_EXPLETIVES"; + /** * `-DFEATURE_DEBUG_FUNCTIONS` * If this flag is enabled, the game will have all playtester-only debugging functionality enabled. @@ -401,6 +411,13 @@ class Project extends HXProject */ static final FEATURE_MOBILE_IAR:FeatureFlag = "FEATURE_MOBILE_IAR"; + /** + * `-DFEATURE_NAUGHTYNESS` + * If this feature flag is enabled, naughtyness will be a toggleable option in the Options Menu. + * If disabled, the option will be hidden and the game will always be censored. + */ + static final FEATURE_NAUGHTYNESS:FeatureFlag = "FEATURE_NAUGHTYNESS"; + // // CONFIGURATION FUNCTIONS // @@ -758,6 +775,12 @@ class Project extends HXProject // Should be true only on mobile builds. FEATURE_TOUCH_CONTROLS.apply(this, isMobile()); + // Should be true on mobile builds. + CENSOR_EXPLETIVES.apply(this, isMobile()); + + // Should be true on everything. + FEATURE_NAUGHTYNESS.apply(this, true); + // Should be true only on mobile release builds. Remember you can add the flag manually for testing. FEATURE_MOBILE_ADVERTISEMENTS.apply(this, (isMobile() && isRelease() && envConfig != null)); FEATURE_MOBILE_IAP.apply(this, (isMobile() && isRelease() && envConfig != null)); diff --git a/source/funkin/Preferences.hx b/source/funkin/Preferences.hx index 030ce9810..196e5bd93 100644 --- a/source/funkin/Preferences.hx +++ b/source/funkin/Preferences.hx @@ -56,11 +56,19 @@ class Preferences static function get_naughtyness():Bool { + #if NO_FEATURE_NAUGHTYNESS + return false; + #else return Save?.instance?.options?.naughtyness; + #end } static function set_naughtyness(value:Bool):Bool { + #if NO_FEATURE_NAUGHTYNESS + value = false; + #end + var save:Save = Save.instance; save.options.naughtyness = value; save.flush(); diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index d1e498606..404526dbc 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -2189,7 +2189,7 @@ class FreeplayState extends MusicBeatSubState // Set the album graphic and play the animation if relevant. var newAlbumId:Null = daSong?.data.getAlbumId(currentDifficulty, currentVariation); - if (albumRoll.albumId != newAlbumId && !busy) + if (albumRoll.albumId != newAlbumId) { albumRoll.albumId = newAlbumId; albumRoll.skipIntro(); diff --git a/source/funkin/ui/options/PreferencesMenu.hx b/source/funkin/ui/options/PreferencesMenu.hx index 24d3fd791..5ff0803d2 100644 --- a/source/funkin/ui/options/PreferencesMenu.hx +++ b/source/funkin/ui/options/PreferencesMenu.hx @@ -108,9 +108,11 @@ class PreferencesMenu extends Page */ function createPrefItems():Void { + #if FEATURE_NAUGHTYNESS createPrefItemCheckbox('Naughtyness', 'If enabled, raunchy content (such as swearing, etc.) will be displayed.', function(value:Bool):Void { Preferences.naughtyness = value; }, Preferences.naughtyness); + #end createPrefItemCheckbox('Downscroll', 'If enabled, this will make the notes move downwards.', function(value:Bool):Void { Preferences.downscroll = value; }, Preferences.downscroll, diff --git a/source/funkin/util/Constants.hx b/source/funkin/util/Constants.hx index 9a998f073..8de4cc983 100644 --- a/source/funkin/util/Constants.hx +++ b/source/funkin/util/Constants.hx @@ -559,6 +559,11 @@ class Constants public static final GHOST_TAP_DELAY:Float = 3 / 8; #end + /** + * Otherwise known as "The FuckCunt Variable" + */ + public static final CENSOR_EXPLETIVES:Bool = #if CENSOR_EXPLETIVES true #else false #end; + /** * The maximum number of previous file paths for the Chart Editor to remember. */