@@ -26,7 +26,8 @@ class ProjectData extends ApiEntityBase
2626 const KEY_EQUALIZER = 'equalizer ' ;
2727 const KEY_EXTENDABLE_SCREENS = 'extendableScreens ' ;
2828 const KEY_IS_LEGO = 'isLego ' ;
29- const KEY_MUTE_MUSIC = 'muteMusic ' ;
29+ const KEY_MUTE_SFX = 'muteSfx ' ;
30+ const KEY_HAS_SFX = 'hasSfx ' ;
3031 const KEY_PROJECT_COLORS = 'projectColors ' ;
3132 const KEY_PROJECT_VERSION = 'projectVersion ' ;
3233 const KEY_SCREENS = 'screens ' ;
@@ -42,7 +43,7 @@ class ProjectData extends ApiEntityBase
4243 const WRITABLE_KEYS = [
4344 self ::KEY_CURRENT_SCREEN_ID ,
4445 self ::KEY_EDITING_MODE ,
45- self ::KEY_MUTE_MUSIC ,
46+ self ::KEY_MUTE_SFX ,
4647 self ::KEY_SOUNDS ,
4748 self ::KEY_PROJECT_COLORS ,
4849 self ::KEY_SCREENS ,
@@ -83,7 +84,10 @@ class ProjectData extends ApiEntityBase
8384 protected $ isLego ;
8485
8586 /** @var bool */
86- protected $ muteMusic ;
87+ protected $ muteSfx ;
88+
89+ /** @var bool */
90+ protected $ hasSfx ;
8791
8892 /** @var ColorCollection */
8993 protected $ projectColors ;
@@ -266,6 +270,25 @@ public function isLego(): bool
266270 return $ this ->isLego ;
267271 }
268272
273+ /**
274+ * @return bool
275+ */
276+ public function hasSfx (): bool
277+ {
278+ return $ this ->hasSfx ;
279+ }
280+
281+ /**
282+ * @param bool $hasSfx
283+ * @return ProjectData
284+ */
285+ public function setHasSfx (bool $ hasSfx ): ProjectData
286+ {
287+ $ this ->hasSfx = $ hasSfx ;
288+
289+ return $ this ;
290+ }
291+
269292 /**
270293 * @param bool $isLego
271294 * @return ProjectData
@@ -280,18 +303,22 @@ public function setIsLego(bool $isLego): ProjectData
280303 /**
281304 * @return bool
282305 */
283- public function isMuteMusic (): bool
306+ public function isMuteSfx (): bool
284307 {
285- return $ this ->muteMusic ;
308+ return $ this ->muteSfx ;
286309 }
287310
288311 /**
289- * @param bool $muteMusic
312+ * @param bool $muteSfx
290313 * @return ProjectData
291314 */
292- public function setMuteMusic (bool $ muteMusic ): ProjectData
315+ public function setMuteSfx (bool $ muteSfx ): ProjectData
293316 {
294- $ this ->muteMusic = $ muteMusic ;
317+ if (true === $ this ->hasSfx ) {
318+ $ this ->muteSfx = $ muteSfx ;
319+ } else {
320+ $ this ->muteSfx = false ;
321+ }
295322
296323 return $ this ;
297324 }
@@ -604,8 +631,11 @@ public function exchangeArray(array $projectDataArrayData)
604631 $ isLego = $ projectDataArrayData [self ::KEY_IS_LEGO ];
605632 $ this ->setIsLego ($ isLego );
606633
607- $ muteMusic = $ projectDataArrayData [self ::KEY_MUTE_MUSIC ];
608- $ this ->setMuteMusic ($ muteMusic );
634+ $ hasSfx = $ projectDataArrayData [self ::KEY_HAS_SFX ];
635+ $ this ->setHasSfx ($ hasSfx );
636+
637+ $ muteSfx = $ projectDataArrayData [self ::KEY_MUTE_SFX ];
638+ $ this ->setMuteSfx ($ muteSfx );
609639
610640 if (array_key_exists (self ::KEY_PROJECT_COLORS , $ projectDataArrayData )) {
611641 $ projectColorsArrayData = $ projectDataArrayData [self ::KEY_PROJECT_COLORS ];
@@ -723,7 +753,8 @@ public function getArrayCopyFull(): array
723753 self ::KEY_EQUALIZER => $ this ->isEqualizer (),
724754 self ::KEY_EXTENDABLE_SCREENS => $ this ->isExtendableScreens (),
725755 self ::KEY_IS_LEGO => $ this ->isLego (),
726- self ::KEY_MUTE_MUSIC => $ this ->isMuteMusic (),
756+ self ::KEY_HAS_SFX => $ this ->hasSfx (),
757+ self ::KEY_MUTE_SFX => $ this ->isMuteSfx (),
727758 self ::KEY_PROJECT_COLORS => $ this ->projectColors ->getArrayCopy (),
728759 self ::KEY_PROJECT_VERSION => $ this ->getProjectVersion (),
729760 self ::KEY_SCREENS => $ this ->screens ->getArrayCopy (),
0 commit comments