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