~starkingdoms/starkingdoms

ref: 606f60a8791056e6b04ce8c5ab2ea1aaae41c20c starkingdoms/starkingdoms-client/src/textures.ts -rw-r--r-- 598 bytes
606f60a8 — core update ansible in prep for api deployments 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { PartType, PlanetType } from "./protocol.ts";
import tex_earth from "./assets/earth.svg";
import tex_hearty from "./assets/hearty.svg";
import tex_cargo_on from "./assets/cargo_on.svg";
import tex_missing from "./assets/missing.svg";

export function planet_texture_url(type: PlanetType): string {
  if (type == PlanetType.Earth) {
    return tex_earth;
  }
  return tex_missing;
}

export function part_texture_url(type: PartType): string {
  if (type == PartType.Hearty) {
    return tex_hearty;
  } else if (type == PartType.Cargo) {
    return tex_cargo_on;
  }
  return tex_missing;
}