main commit
This commit is contained in:
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
// This file is automatically @generated by Asphalt.
|
||||
// It is not intended for manual editing.
|
||||
declare const assets: {
|
||||
audio: {
|
||||
music: {
|
||||
"a-bench-for-ducks.ogg": Content
|
||||
"eggplants-in-the-sky.ogg": Content
|
||||
"lobby.ogg": Content
|
||||
"meowmeowmeow.ogg": Content
|
||||
"railway-resonance.ogg": Content
|
||||
"root.ogg": Content
|
||||
"solstice.ogg": Content
|
||||
"stay-on-track.ogg": Content
|
||||
"weltschmerz.ogg": Content
|
||||
}
|
||||
}
|
||||
images: {
|
||||
kiwirina: {
|
||||
"LUNA....png": Content
|
||||
"eyes.png": Content
|
||||
"kiwi tag.png": Content
|
||||
"lateworkerconceptmob.png": Content
|
||||
"next station ost cover.png": Content
|
||||
"porte closed.png": Content
|
||||
"porte open.png": Content
|
||||
}
|
||||
svg: {
|
||||
"cube.svg": Content
|
||||
}
|
||||
}
|
||||
rooms: {
|
||||
normal: {
|
||||
"plus-corridor.rbxm": Content
|
||||
"straight-corridor.rbxm": Content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export = assets
|
||||
@@ -0,0 +1,39 @@
|
||||
-- This file is automatically @generated by Asphalt.
|
||||
-- It is not intended for manual editing.
|
||||
local assets = {
|
||||
audio = {
|
||||
music = {
|
||||
["a-bench-for-ducks.ogg"] = Content.fromUri("rbxassetid://93869395830786"),
|
||||
["eggplants-in-the-sky.ogg"] = Content.fromUri("rbxassetid://74192100149187"),
|
||||
["lobby.ogg"] = Content.fromUri("rbxassetid://119303577477446"),
|
||||
["meowmeowmeow.ogg"] = Content.fromUri("rbxassetid://106235234984065"),
|
||||
["railway-resonance.ogg"] = Content.fromUri("rbxassetid://97452653460582"),
|
||||
["root.ogg"] = Content.fromUri("rbxassetid://76389194668757"),
|
||||
["solstice.ogg"] = Content.fromUri("rbxassetid://76565610359366"),
|
||||
["stay-on-track.ogg"] = Content.fromUri("rbxassetid://123486861030898"),
|
||||
["weltschmerz.ogg"] = Content.fromUri("rbxassetid://108803792430337"),
|
||||
},
|
||||
},
|
||||
images = {
|
||||
kiwirina = {
|
||||
["LUNA....png"] = Content.fromUri("rbxassetid://105469337892524"),
|
||||
["eyes.png"] = Content.fromUri("rbxassetid://115382005766484"),
|
||||
["kiwi tag.png"] = Content.fromUri("rbxassetid://100562459880003"),
|
||||
["lateworkerconceptmob.png"] = Content.fromUri("rbxassetid://120860142409755"),
|
||||
["next station ost cover.png"] = Content.fromUri("rbxassetid://127096632190841"),
|
||||
["porte closed.png"] = Content.fromUri("rbxassetid://119045003698167"),
|
||||
["porte open.png"] = Content.fromUri("rbxassetid://83329348606912"),
|
||||
},
|
||||
svg = {
|
||||
["cube.svg"] = Content.fromUri("rbxassetid://92619665942094"),
|
||||
},
|
||||
},
|
||||
rooms = {
|
||||
normal = {
|
||||
["plus-corridor.rbxm"] = Content.fromUri("rbxassetid://129493473437352"),
|
||||
["straight-corridor.rbxm"] = Content.fromUri("rbxassetid://76052577701850"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return assets
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Modding } from "@flamework/core";
|
||||
|
||||
export class Generation {
|
||||
/**
|
||||
* Load all rooms in the given folder.
|
||||
* @metadata macro intrinsic-arg-shift
|
||||
*/
|
||||
addPaths<T extends string>(path: T, meta?: Modding.Intrinsic<"path", [T]>): void;
|
||||
addPaths<T extends string>(paths: T[][]): void {
|
||||
// WIP
|
||||
print(paths);
|
||||
}
|
||||
}
|
||||
|
||||
// Placeholder
|
||||
export class PrefixSumArray<T extends defined> {
|
||||
private bounds: number[] = [];
|
||||
private totalLength: number = 0;
|
||||
private values: T[] = [];
|
||||
|
||||
add(size: number, value: T) {
|
||||
if (size <= 0) return;
|
||||
this.totalLength += size;
|
||||
|
||||
this.bounds.push(this.totalLength);
|
||||
this.values.push(value);
|
||||
}
|
||||
|
||||
get(index: number) {
|
||||
if (typeIs(index, "number") && index < 1 && index > this.totalLength) return undefined;
|
||||
|
||||
let low = 1;
|
||||
let high = this.bounds.size();
|
||||
|
||||
while (low < high) {
|
||||
const mid = math.floor((low + high) / 2);
|
||||
if (this.bounds[mid] < index) {
|
||||
low = mid + 1;
|
||||
} else {
|
||||
high = mid;
|
||||
}
|
||||
}
|
||||
|
||||
return this.values[low];
|
||||
}
|
||||
|
||||
size() {
|
||||
return this.totalLength;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
type ToNumberTuple<T extends readonly defined[]> = {
|
||||
[K in keyof T]: number;
|
||||
};
|
||||
|
||||
export class NArray<N extends number[], T extends defined> {
|
||||
private array: Array<T>;
|
||||
private dims: N;
|
||||
|
||||
constructor(value?: T, ...dims: N) {
|
||||
this.dims = dims;
|
||||
const size = factorAnArray(dims);
|
||||
this.array = value !== undefined ? new Array(size, value) : new Array(size);
|
||||
}
|
||||
|
||||
get(...index: ToNumberTuple<N>): T | undefined {
|
||||
return this.array[this.getIndex(index)];
|
||||
}
|
||||
|
||||
set(value: T, ...index: ToNumberTuple<N>) {
|
||||
this.array[this.getIndex(index)] = value;
|
||||
}
|
||||
|
||||
private getIndex(index: ToNumberTuple<N>) {
|
||||
let factor = 1;
|
||||
let ret = 0;
|
||||
index.forEach((value, index) => {
|
||||
if (index === 0) ret += value;
|
||||
factor *= this.dims[index - 1];
|
||||
ret += value * factor;
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
function factorAnArray(arr: number[]) {
|
||||
let size = 1;
|
||||
for (const dim of arr) {
|
||||
size *= dim;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Hook into the Singleton to a event which trigger each player join.
|
||||
*/
|
||||
export interface OnPlayerJoined {
|
||||
/**
|
||||
* This function will be called when a player join the game.
|
||||
*/
|
||||
onPlayerJoined(player: Player): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook into the Singleton to a event which trigger each player quit.
|
||||
*/
|
||||
export interface OnPlayerQuit {
|
||||
/**
|
||||
* This function will be called when a player quit the game.
|
||||
*/
|
||||
onPlayerQuit(player: Player): void;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Networking } from "@flamework/networking";
|
||||
|
||||
import { SetSetting } from "./typings/settings";
|
||||
|
||||
/**
|
||||
* Global client to server events.
|
||||
*/
|
||||
export interface ClientToServerEvents {
|
||||
/**
|
||||
* Setting client to server events.
|
||||
*/
|
||||
settings: {
|
||||
/**
|
||||
* Send current player setting to the player.
|
||||
*/
|
||||
SetSettings(section: string, settings: Map<string, boolean | number | string>): void;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Global client to server functions.
|
||||
*/
|
||||
export interface ClientToServerFunctions {
|
||||
/**
|
||||
* Setting client to server functions.
|
||||
*/
|
||||
settings: {
|
||||
/**
|
||||
* Get saved settings.
|
||||
*/
|
||||
GetSettings(): SetSetting;
|
||||
/**
|
||||
* Get server settings version
|
||||
*/
|
||||
GetVersion(): number;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Global server to client events.
|
||||
*/
|
||||
export interface ServerToClientEvents {}
|
||||
|
||||
/**
|
||||
* Global server to client functions.
|
||||
*/
|
||||
export interface ServerToClientFunctions {}
|
||||
|
||||
export const GlobalEvents = Networking.createEvent<ClientToServerEvents, ServerToClientEvents>();
|
||||
export const GlobalFunctions = Networking.createFunction<ClientToServerFunctions, ServerToClientFunctions>();
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
import { SettingDefinition } from "@common/shared/typings/settings";
|
||||
|
||||
/**
|
||||
* Type definition of the setting definition file.
|
||||
*/
|
||||
export declare interface SettingsFile {
|
||||
[group: string]: SettingDefinition[];
|
||||
/**
|
||||
* The current version of the setting file.
|
||||
*/
|
||||
version: number;
|
||||
}
|
||||
|
||||
declare const settingsFile: SettingsFile;
|
||||
|
||||
export = settingsFile;
|
||||
@@ -0,0 +1,104 @@
|
||||
version = 2
|
||||
|
||||
[[Accessibility]]
|
||||
default = false
|
||||
description = "Reduce the visual effects of flashing lights and fast motion."
|
||||
name = "Epilepsy mode"
|
||||
type = "Boolean"
|
||||
|
||||
[[Accessibility]]
|
||||
default = true
|
||||
description = "Enable the shaking screen."
|
||||
name = "Shaking Screen"
|
||||
type = "Boolean"
|
||||
|
||||
[[Accessibility]]
|
||||
default = false
|
||||
description = "Disables all game sounds and adds information about them."
|
||||
name = "Deaf mode"
|
||||
type = "Boolean"
|
||||
|
||||
[[Accessibility]]
|
||||
default = 1
|
||||
description = "You know what is subtitle isn't it"
|
||||
name = "Subtitle"
|
||||
option = ["Nothing", "Dialogue only", "All Sound"]
|
||||
type = "Enum"
|
||||
|
||||
[[Accessibility]]
|
||||
default = true
|
||||
description = "Activities mod to be fair with the blind people"
|
||||
name = "Blind mode"
|
||||
type = "Boolean"
|
||||
|
||||
[[Graphic]]
|
||||
default = true
|
||||
description = "Allow you to see your body in first person."
|
||||
name = "Introspection"
|
||||
type = "Boolean"
|
||||
|
||||
[[Control]]
|
||||
default = true
|
||||
description = "Do like if you are on mobile"
|
||||
name = "Force mobile"
|
||||
type = "Boolean"
|
||||
|
||||
[[Control]]
|
||||
default = true
|
||||
description = "let you Edit mobile bouton"
|
||||
name = "Edit mobile bouton"
|
||||
type = "Boolean"
|
||||
|
||||
[[Sond]]
|
||||
default = 90
|
||||
description = " Change l'angle de vision"
|
||||
max = 120
|
||||
min = 30
|
||||
name = "FOV"
|
||||
type = "Int"
|
||||
|
||||
[[Sond]]
|
||||
default = 100
|
||||
description = "Change the volume of Main"
|
||||
max = 200
|
||||
min = 0
|
||||
name = "Main Volume"
|
||||
type = "Int"
|
||||
|
||||
[[Sond]]
|
||||
default = 100
|
||||
description = "Change the volume of SFX"
|
||||
max = 200
|
||||
min = 0
|
||||
name = "SFX Volume"
|
||||
type = "Int"
|
||||
|
||||
[[Sond]]
|
||||
default = 100
|
||||
description = "Change the volume of Musique"
|
||||
max = 200
|
||||
min = 0
|
||||
name = "Musique Volume"
|
||||
type = "Int"
|
||||
|
||||
[[Sond]]
|
||||
default = 100
|
||||
description = "Change the volume of Mob"
|
||||
max = 200
|
||||
min = 0
|
||||
name = "Mob Volume"
|
||||
type = "Int"
|
||||
|
||||
[[Sond]]
|
||||
default = 100
|
||||
description = "Change the volume of Radio"
|
||||
max = 200
|
||||
min = 0
|
||||
name = "Musique Radio"
|
||||
type = "Int"
|
||||
|
||||
[[Performance]]
|
||||
default = false
|
||||
description = "Do you have a potato PC ?if it the case enable is"
|
||||
name = "Toaster mod"
|
||||
type = "Boolean"
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Possible types of Setting.
|
||||
*/
|
||||
export enum SettingType {
|
||||
Boolean = "Boolean",
|
||||
Enum = "Enum",
|
||||
Float = "Float",
|
||||
Int = "Int",
|
||||
String = "String",
|
||||
}
|
||||
|
||||
/**
|
||||
* A setting definition.
|
||||
*/
|
||||
export interface SettingDefinition<T extends SettingType = SettingType> {
|
||||
/**
|
||||
* The default value of the setting.
|
||||
*/
|
||||
default: SettingRealType<T>;
|
||||
/**
|
||||
* The english description of the setting.
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* The unique id of the setting.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The name of the setting.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The type of the setting.
|
||||
*/
|
||||
type: T;
|
||||
}
|
||||
|
||||
export const SettingTypeChecker: Record<SettingType, keyof CheckableTypes> = {
|
||||
Boolean: "boolean",
|
||||
Enum: "number",
|
||||
Float: "number",
|
||||
Int: "number",
|
||||
String: "string",
|
||||
};
|
||||
|
||||
/**
|
||||
* The data storage form of saved setting.
|
||||
*/
|
||||
export type SetSetting = Map<string, Map<string, boolean | number | string>>;
|
||||
/**
|
||||
* Transform Setting type enum to real typescript/lua type.
|
||||
*/
|
||||
export type SettingRealType<T extends SettingType> = CheckableTypes[(typeof SettingTypeChecker)[T]];
|
||||
@@ -0,0 +1,12 @@
|
||||
import { mount } from "@rbxts/vide";
|
||||
|
||||
/**
|
||||
* Transform a vide component into a Hoarcekat story.
|
||||
* @param component A vide component.
|
||||
* @returns A Hoarcekat story.
|
||||
*/
|
||||
export function Hoarcekat<T>(component: () => T) {
|
||||
return (target: Instance) => {
|
||||
return mount(component, target);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Atom } from "@rbxts/charm";
|
||||
import { derive, source, Source } from "@rbxts/vide";
|
||||
import { useAtom } from "@rbxts/vide-charm";
|
||||
|
||||
/**
|
||||
* Create an derivate which a "not" (`!`) operator on an boolean source.
|
||||
* @param source A Boolean Source
|
||||
* @returns The derivate.
|
||||
*/
|
||||
export function NotDerivate(source: Source<boolean>): () => boolean {
|
||||
return derive(() => !source());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create two function linked to an charm atom or a vide source.
|
||||
* @param atom An optional charm atom.
|
||||
* @param defaultValue The default value if `atom` is `undefined`.
|
||||
* @returns Two function, one to get the value of the box, one to set the value of the box.
|
||||
*/
|
||||
export function useBox<T>(atom: Atom<T>, defaultValue?: T): [getter: () => T, setter: (value: T) => T];
|
||||
export function useBox<T>(atom: Atom<T> | undefined, defaultValue: T): [getter: () => T, setter: (value: T) => T];
|
||||
export function useBox<T>(atom: Atom<T> | undefined, defaultValue: T): [getter: () => T, setter: (value: T) => T] {
|
||||
if (atom) {
|
||||
return [useAtom(atom), atom];
|
||||
} else {
|
||||
const value = source(defaultValue);
|
||||
return [value, value];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user