~starkingdoms/starkingdoms

662e53149c4e0f23e257cdb9249509f63297049b — ghostlyzsh 1 year, 11 months ago e861fb0
idk anymore
2 files changed, 4 insertions(+), 0 deletions(-)

M starkingdoms-client/src/protocol.ts
M starkingdoms-client/src/textures.ts
M starkingdoms-client/src/protocol.ts => starkingdoms-client/src/protocol.ts +1 -0
@@ 5,6 5,7 @@ export interface ProtoTransform {
}
export enum PlanetType {
  Earth = "Earth",
  Moon = "Moon",
}
export enum PartType {
  Hearty = "Hearty",

M starkingdoms-client/src/textures.ts => starkingdoms-client/src/textures.ts +3 -0
@@ 1,5 1,6 @@
import { PartType, PlanetType } from "./protocol.ts";
import tex_earth from "./assets/earth.svg";
import tex_moon from "./assets/moon.svg";
import tex_hearty from "./assets/hearty.svg";
import tex_cargo_off from "./assets/cargo_off.svg";
import tex_missing from "./assets/missing.svg";


@@ 7,6 8,8 @@ import tex_missing from "./assets/missing.svg";
export function planet_texture_url(type: PlanetType): string {
  if (type == PlanetType.Earth) {
    return tex_earth;
  } else if (type == PlanetType.Moon) {
    return tex_moon;
  }
  return tex_missing;
}