Every recipe type registered from shared scripts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -48,7 +48,7 @@ export class FluidRules {
|
||||
api(): FluidApi {
|
||||
return {
|
||||
ids: () => EverythingRegistry.entries("fluids").map(([id]) => id),
|
||||
exists: (id) => EverythingRegistry.get("fluids", id) !== undefined,
|
||||
exists: fluid_exists,
|
||||
name: (fluid) => this.name(fluid),
|
||||
color: (fluid) => this.color(fluid),
|
||||
same: same_fluid,
|
||||
@@ -68,6 +68,10 @@ export class FluidRules {
|
||||
}
|
||||
}
|
||||
|
||||
export function fluid_exists(id: string): boolean {
|
||||
return EverythingRegistry.get("fluids", id) !== undefined;
|
||||
}
|
||||
|
||||
// whether they're one fluid, see FluidApi.same
|
||||
export function same_fluid(a: FluidVariant, b: FluidVariant): boolean {
|
||||
return a.id === b.id && same_data(a.data, b.data);
|
||||
|
||||
Reference in New Issue
Block a user