common is now a node package
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import settingsFile from "@common/shared/settings";
|
||||
import { SettingDefinition, SettingRealType, SettingType } from "@common/shared/typings/settings";
|
||||
import { Controller, OnStart } from "@flamework/core";
|
||||
import { Atom, atom } from "@rbxts/charm";
|
||||
import Object, { keys } from "@rbxts/object-utils";
|
||||
import { keys } from "@rbxts/object-utils";
|
||||
|
||||
import settingsFile from "../../shared/settings";
|
||||
import { SettingDefinition, SettingRealType, SettingType } from "../../shared/typings/settings";
|
||||
import { Events, Functions } from "../network";
|
||||
|
||||
/**
|
||||
@@ -78,7 +78,7 @@ export class SettingsController implements OnStart {
|
||||
* Setup atoms and definition at service start.
|
||||
*/
|
||||
private setupAtoms() {
|
||||
const sections = Object.keys<Record<string, SettingDefinition[]>>(settingsFile).filter((key) =>
|
||||
const sections = keys<Record<string, SettingDefinition[]>>(settingsFile).filter((key) =>
|
||||
typeIs(settingsFile[key], "table"),
|
||||
);
|
||||
sections.forEach((key) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GlobalEvents, GlobalFunctions } from "@common/shared/network";
|
||||
import { GlobalEvents, GlobalFunctions } from "../shared/network";
|
||||
|
||||
export const Events = GlobalEvents.createClient({});
|
||||
export const Functions = GlobalFunctions.createClient({});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { NotDerivate, useBox } from "@common/shared/utils/ui/vide";
|
||||
import { Atom } from "@rbxts/charm";
|
||||
import Vide, { Derivable, source } from "@rbxts/vide";
|
||||
|
||||
import { NotDerivate, useBox } from "../../../../shared/utils/ui/vide";
|
||||
|
||||
/**
|
||||
* Props of a toggle.
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SettingsController } from "@common/client/controllers/settings";
|
||||
import { SettingDefinition, SettingRealType, SettingType } from "@common/shared/typings/settings";
|
||||
import { Atom } from "@rbxts/charm";
|
||||
import Vide, { Case, For, Source, source, Switch } from "@rbxts/vide";
|
||||
|
||||
import { SettingDefinition, SettingRealType, SettingType } from "../../../../shared/typings/settings";
|
||||
import { SettingsController } from "../../../controllers/settings";
|
||||
import { Toggle } from "../global/toggle";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Toggle } from "@common/client/ui/components/global/toggle";
|
||||
import { Hoarcekat } from "@common/shared/utils/ui/hoarcekat";
|
||||
import { Node } from "@rbxts/vide";
|
||||
|
||||
import { Hoarcekat } from "../../../../shared/utils/ui/hoarcekat";
|
||||
import { Toggle } from "../../components/global/toggle";
|
||||
|
||||
export = Hoarcekat(Toggle as () => Node);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GlobalEvents, GlobalFunctions } from "@common/shared/network";
|
||||
import { GlobalEvents, GlobalFunctions } from "../shared/network";
|
||||
|
||||
export const Events = GlobalEvents.createServer({});
|
||||
export const Functions = GlobalFunctions.createServer({});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { OnPlayerJoined, OnPlayerQuit } from "@common/shared/modding/players";
|
||||
import { Modding, OnStart } from "@flamework/core";
|
||||
import { Players } from "@rbxts/services";
|
||||
|
||||
import { OnPlayerJoined, OnPlayerQuit } from "../../../shared/modding/players";
|
||||
|
||||
/**
|
||||
* This Service Manage some player event with modding.
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { OnPlayerJoined } from "@common/shared/modding/players";
|
||||
import SettingsFile from "@common/shared/settings";
|
||||
import { SetSetting, SettingTypeChecker } from "@common/shared/typings/settings";
|
||||
import { OnStart, Service } from "@flamework/core";
|
||||
|
||||
import { OnPlayerJoined } from "../../shared/modding/players";
|
||||
import SettingsFile from "../../shared/settings";
|
||||
import { SetSetting, SettingTypeChecker } from "../../shared/typings/settings";
|
||||
import { Events, Functions } from "../network";
|
||||
import { DataService, Store } from "./data";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Networking } from "@flamework/networking";
|
||||
|
||||
import { SetSetting } from "./typings/settings";
|
||||
import { SetSetting } from "../shared/typings/settings";
|
||||
|
||||
/**
|
||||
* Global client to server events.
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { SettingDefinition } from "@common/shared/typings/settings";
|
||||
import { SettingDefinition } from "./typings/settings";
|
||||
|
||||
/**
|
||||
* Type definition of the setting definition file.
|
||||
|
||||
Reference in New Issue
Block a user