Data centres: multi-storey shell, racks and pods, cooling, fire safety, power
Deploy web Studio / deploy (push) Successful in 1m4s

datacentre.rhai (palette groups Data centre, Cooling, Fire safety, Power):

- dc_building: multi-storey shell (storeys of storey_h), walls in pieces,
  slabs, roof with parapet, louvres, front door and loading dock; levels
  cut it open storey by storey
- raised_floor; rack_row and dc_pod (cabinets by U, width, depth,
  equipment, fill, doors, LEDs; in-row coolers; cold / hot aisle
  containment with vent tiles, roof, end doors, ceiling duct, airflow);
  dc_cage for colocation
- crah, chiller (air-cooled, dry, adiabatic), cooling_tower, pipe_run
- smoke_detectors (grid + coverage), fire_pipe (VESDA, sprinkler, gas),
  gas_bank (Novec 1230, FM-200, Inergen sized for its halls), fire_device
  (panels, call points, abort switches, beacons, extinguishers)
- power_cab (UPS, battery, PDU, switchgear, RPP), busway, cable_tray,
  transformer
- tooltips sum IT load, kW/m2, cooling redundancy per storey, UPS load,
  battery runtime, plant cooling and agent quantity (warning when short)

Engine and stdlib:

- part_hidden(o) in house.rhai: parts on closed storeys inside a
  dc_building are not drawn (they only made sort cycles under the slab
  above); house parts, furniture and people use it. Existing examples
  render byte-identical.
- overhead services sort in their own "ceiling" layer with tight boxes
- sort records which sprites each broken cycle involved; isokit check
  names them (Rendered.cycle_at)

examples/datacentre (three storeys and a roof plant), Data centre demo in
the web Studio, tests, SCRIPTING/README/ROADMAP, MCP instructions.
This commit is contained in:
grabowski committed 2026-10-27 17:08:39 +07:00
1 parent c8becc2e59
commit 2810477f1b
22 files changed
+2281 -18

No files matched your search

+22 -7
View File
@@ -27,11 +27,26 @@ fn house_view(o) {
if s < k { 0 } else if s == k { 1 } else { 2 }
}
/// Leave part o out? On a storey above the one a level cuts open, or on a
/// closed storey inside a data centre shell (dc_building), whose walls and
/// slabs hide it anyway (and would sort badly against what stands above).
fn part_hidden(o) {
let hv = house_view(o);
if hv == 2 { return true; }
if hv == 1 { return false; }
let s = storey_of(o.z);
for b in objects_at(["dc_building"], o.x, o.y) {
let s0 = storey_of(b.z);
if s >= s0 && s < s0 + b.p.storeys { return true; }
}
false
}
fn wall_cut_h() { 1.0 }
fn wall_types() { ["house_wall"] }
fn opening_types() { ["window", "door"] }
fn room_types() { ["floor"] }
fn house_wall_materials() { ["render", "render2", "brick", "wood", "wall", "wall2", "wallp", "concb", "office", "furnw"] }
fn room_types() { ["floor", "raised_floor"] }
fn house_wall_materials() { ["render", "render2", "brick", "wood", "wall", "wall2", "wallp", "concb", "office", "furnw", "firewall"] }
fn flooring_materials() { ["f-oak", "f-wood", "f-tile", "f-stone", "f-carpet", "f-conc", "z-floor", "z-living", "z-kitchen", "z-bed", "z-wc"] }
fn house_roof_materials() { ["rooft", "roofr", "roof", "roof2", "roof3", "roofcap", "canopy"] }
@@ -116,7 +131,7 @@ fn meta_house_wall() {
fn prefab_house_wall(o) {
let p = o.p;
if house_view(o) == 2 { return; }
if part_hidden(o) { return; }
let top = wall_top(o);
let cap = if top < p.h { "cut" } else { p.mat };
let t = p.t / 2.0;
@@ -203,7 +218,7 @@ fn meta_window() {
fn prefab_window(o) {
let c = opening_at(o);
let w = c.wall;
if house_view(w) == 2 { return; }
if part_hidden(w) { return; }
let H = w.p.h;
let t = w.p.t / 2.0;
let top = wall_top(w);
@@ -247,7 +262,7 @@ fn meta_door() {
fn prefab_door(o) {
let c = opening_at(o);
let w = c.wall;
if house_view(w) == 2 { return; }
if part_hidden(w) { return; }
let p = o.p;
let H = w.p.h;
let t = w.p.t / 2.0;
@@ -314,7 +329,7 @@ fn meta_floor() {
}
fn prefab_floor(o) {
if house_view(o) == 2 { return; }
if part_hidden(o) { return; }
let p = o.p;
let w = p.w / 2.0;
let d = p.d / 2.0;
@@ -495,7 +510,7 @@ fn meta_stairs() {
}
fn prefab_stairs(o) {
if house_view(o) == 2 { return; }
if part_hidden(o) { return; }
let p = o.p;
let w = p.w / 2.0;
let n = fmax(2.0, (p.rise / 0.18).round()).to_int();