diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-12-14 21:01:36 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-12-14 21:01:36 +0100 |
| commit | 7351f210dbe87805f0db6a5466640f1115da275f (patch) | |
| tree | 74904b506bf0f2f2ebc727d9acddac3ad0edff2e | |
| parent | 72fb49bd96cf5a4c878a5b8a53dcad7500d3b54e (diff) | |
| download | hurrycurry-7351f210dbe87805f0db6a5466640f1115da275f.tar hurrycurry-7351f210dbe87805f0db6a5466640f1115da275f.tar.bz2 hurrycurry-7351f210dbe87805f0db6a5466640f1115da275f.tar.zst | |
demand sink as tile flag
| -rw-r--r-- | data/maps/debug.yaml | 3 | ||||
| -rw-r--r-- | server/data/src/lib.rs | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/data/maps/debug.yaml b/data/maps/debug.yaml index fcb0883f..a78b3995 100644 --- a/data/maps/debug.yaml +++ b/data/maps/debug.yaml @@ -70,7 +70,7 @@ tiles: "°": crate:tomato -x "½": trash -x - "€": conveyor + "€": conveyor --demand-sink "Ø": black-hole -w "ø": white-hole -c "~": floor -w --chef-spawn --customer-spawn @@ -81,7 +81,6 @@ tiles: "C": wall:green -c entities: - - !demand_sink { pos: [19, 4] } - !player_portal { from: [14.5, 11.5], to: [21.5, 15.5] } - !environment_effect { name: rain, on: 60, off: 40 } - !environment_effect { name: wind, on: 60, off: 40 } diff --git a/server/data/src/lib.rs b/server/data/src/lib.rs index 09a1bd43..a677bffd 100644 --- a/server/data/src/lib.rs +++ b/server/data/src/lib.rs @@ -100,6 +100,8 @@ struct TileArgs { item: Option<String>, #[clap(long)] conveyor: Option<String>, + #[clap(long)] + demand_sink: bool, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -184,6 +186,9 @@ fn build_data( entities.push(EntityDecl::Book { pos }); tile_interactable_empty.insert(tile); // if it doesnt have a dedicated tile all of its kind will be interactable } + if tile_spec.demand_sink { + entities.push(EntityDecl::DemandSink { pos }); + } if let Some(off) = &tile_spec.conveyor { let (x, y) = off .split_once(",") |