Open 1ForeverHD opened 3 years ago
record:hasExpired(pathwayToTable)
method and then check for this within BanService and LongtermServicerecord.changed
point to record.settings.changed
record:update(settingsPathway, value)
which handles the abstraction recordChanged doesenvironment
paramter. If nil
, this will default to the global environment objectjob.environment
which is passed down from CommandService verificationBanService.playerLoadedMethod
if this is called before the environment loaded?Data Caps
For those who stumble across this card and are wondering what an 'Environment' is: imagine a game where players have their own personal section of land. Within this local area, they can configure their own admin roles, settings, bans, etc which saves. Everything which takes place within this area though remains within this area. An area can be anything from a plot of land in a server, to a private server. This in essence is an 'environment'. The goal with Nanoblox is to allow the easy creation of these environments, while ensuring restrictions are in place to prevent abuse. By default, there is the 'Game/Global' environment, where changes impact every server (i.e. the default behaviour you'd expect of admin commands).
Ben's latest thoughts and proposals:
1. APIs should be simplified
RoleService.createRole(isGlobal, properties)
should just becomeRoleService.createRole(properties)
, where 'isGlobal' and 'environment' now become properties. Consider renaming 'isGlobal' to 'permanent'. These properties default tofalse
andGame/Global
.2. Redesign how environments are defined
"Game"
instead ofmain.enum.environment.Game
SettingService.createPrivateEnvironmentIfA
3. Every record needs to have a UID
bans["82347291"]
it would bebans["82347291-IF9jL5UoJZ"]
with a record property 'userId' that points to that usersettings["Player"]
andsettings["System"]
it should besettings["Player-AbUkL5UoJZ"]
with a record that contains the keys 'player' and 'system'4. Every System Service needs to change
:update()
, which is the equivalent of doing.record:set()
, and a a signalchanged
which mirrors .record.changedRoleService.recordAdded:Connect(function(roleUID, record)
should becomeRoleService.roleAdded:Connect(function(role)
and the same forroleRemoved
, whileroleChanged
should be completely eliminated as the role object itself now has its own signal. Repeat for all other servicesSystemService.getObject(UID)
should always be the same, while services can have alternative getters such asRoleService.getRoleByName(name, environment)
,BanService.getBanByUserId(userId, environment)
, etc5. Virtually everything should use 'pathways'
6. How system items are displayed
7. Belonging to multiple environments
8. Objects/services now have to consider environments
9. Reconsider some of the challenges posed by the current System and ConfigService
10. GDPR Compliance
Currently Nanoblox has a 'global' environment where data can be saved (such as bans, roles, settings, etc).
Now consider how a similar environment can be setup for private servers and servers created through the SavePlaceAPI: https://developer.roblox.com/en-us/api-reference/class/AssetService
Also consider how zone-based environments can be created. For example, a game where everyone has an assigned piece of land, and only admin commands can be used in that zone on players in that zone. The environment can be associated to a player, but can also persist after this player leaves.
This will enable private server owners for example to permanently ban people and create saveable roles within their own private place whilst no spilling out into the rest of the game universe.
Revamp System
user.temp.descendantChanged
"RoleSJDSFKLSDF.limitModifiers.global"
), and then callServiceName.objectChanged
with the pathwayTable instead of settingName. Utilise createDesendantChanged (maybe) for this.record[key] = nil
, dorecord:set(nil)
SettingService.loaded()
Other
game.PrivateServerId
value, while CreatePlaceAsync Servers have a uniquegame.PlaceId
value. Consider a way then to initialise a 'private' environment with just a normal PlaceId.SystemService
with single method.createEnvironment(key)
game.PrivateServerId
if...privateServer
istrue
andgame.PrivateServerId
andgame.PrivateServerOwnerId > 0
reservedServer
istrue
andgame.PrivateServerId
andgame.PrivateServerOwnerId == 0
normalServer
istrue
andgame.PrivateServerId == nil
ConfigService