add disable vfx to server methods
This commit is contained in:
@@ -119,6 +119,7 @@ public partial class MareHub
|
||||
groupPair.DisableSounds = dto.GroupPairPermissions.IsDisableSounds();
|
||||
groupPair.DisableAnimations = dto.GroupPairPermissions.IsDisableAnimations();
|
||||
groupPair.IsPaused = dto.GroupPairPermissions.IsPaused();
|
||||
groupPair.DisableVFX = dto.GroupPairPermissions.IsDisableVFX();
|
||||
|
||||
await _dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
|
||||
@@ -214,7 +215,8 @@ public partial class MareHub
|
||||
GroupGID = group.GID,
|
||||
GroupUserUID = UserUID,
|
||||
DisableAnimations = false,
|
||||
DisableSounds = false
|
||||
DisableSounds = false,
|
||||
DisableVFX = false
|
||||
};
|
||||
|
||||
await _dbContext.GroupPairs.AddAsync(newPair).ConfigureAwait(false);
|
||||
|
||||
@@ -137,8 +137,10 @@ public partial class MareHub
|
||||
IsSynced = otherEntry != null,
|
||||
DisableOwnAnimations = userToOther.DisableAnimations,
|
||||
DisableOwnSounds = userToOther.DisableSounds,
|
||||
DisableOwnVFX = userToOther.DisableVFX,
|
||||
DisableOtherAnimations = otherEntry == null ? false : otherEntry.DisableAnimations,
|
||||
DisableOtherSounds = otherEntry == null ? false : otherEntry.DisableSounds
|
||||
DisableOtherSounds = otherEntry == null ? false : otherEntry.DisableSounds,
|
||||
DisableOtherVFX = otherEntry == null ? false : otherEntry.DisableVFX
|
||||
};
|
||||
|
||||
var results = await query.AsNoTracking().ToListAsync().ConfigureAwait(false);
|
||||
@@ -149,11 +151,13 @@ public partial class MareHub
|
||||
ownPerm.SetPaused(c.IsPaused);
|
||||
ownPerm.SetDisableAnimations(c.DisableOwnAnimations);
|
||||
ownPerm.SetDisableSounds(c.DisableOwnSounds);
|
||||
ownPerm.SetDisableVFX(c.DisableOwnVFX);
|
||||
var otherPerm = UserPermissions.NoneSet;
|
||||
otherPerm.SetPaired(c.IsSynced);
|
||||
otherPerm.SetPaused(c.OtherIsPaused);
|
||||
otherPerm.SetDisableAnimations(c.DisableOtherAnimations);
|
||||
otherPerm.SetDisableSounds(c.DisableOtherSounds);
|
||||
otherPerm.SetDisableVFX(c.DisableOtherVFX);
|
||||
return new UserPairDto(new(c.OtherUserUID, c.Alias), ownPerm, otherPerm);
|
||||
}).ToList();
|
||||
}
|
||||
@@ -345,6 +349,7 @@ public partial class MareHub
|
||||
pair.IsPaused = dto.Permissions.IsPaused();
|
||||
pair.DisableAnimations = dto.Permissions.IsDisableAnimations();
|
||||
pair.DisableSounds = dto.Permissions.IsDisableSounds();
|
||||
pair.DisableVFX = dto.Permissions.IsDisableVFX();
|
||||
_dbContext.Update(pair);
|
||||
await _dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace MareSynchronosServer.Utils
|
||||
permissions.SetDisableAnimations(group.DisableAnimations);
|
||||
permissions.SetDisableSounds(group.DisableSounds);
|
||||
permissions.SetDisableInvites(!group.InvitesEnabled);
|
||||
permissions.SetDisableVFX(group.DisableVFX);
|
||||
return permissions;
|
||||
}
|
||||
|
||||
@@ -37,6 +38,7 @@ namespace MareSynchronosServer.Utils
|
||||
permissions.SetDisableAnimations(groupPair.DisableAnimations);
|
||||
permissions.SetDisableSounds(groupPair.DisableSounds);
|
||||
permissions.SetPaused(groupPair.IsPaused);
|
||||
permissions.SetDisableVFX(groupPair.DisableVFX);
|
||||
return permissions;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user