1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-06-09 14:22:13 +00:00

ru:: short platforms

This commit is contained in:
Zeno Rogue
2026-04-13 20:25:16 +02:00
parent 9413dadf78
commit 0ef0cc12db
2 changed files with 19 additions and 0 deletions
+8
View File
@@ -532,6 +532,14 @@ struct horoplatform : public moving_platform {
}
};
struct length_platform : public moving_platform {
unique_ptr<moving_platform> base; int len;
virtual int width() { return len; }
xy location_at(ld t) { return base->location_at(t); }
string get_name() override { return "short " + base->get_name(); }
string get_help() override { return base->get_help(); }
};
struct cycloid_platform : public moving_platform {
moving_platform *base;
ld period, shift;
+11
View File
@@ -370,6 +370,17 @@ void load_room(fhstream& f, cell *c) {
p = &*b;
r.entities.emplace_back(std::move(b));
}
else if(cap == "LENGTH") {
int len = get_int();
for(auto& p: last_platform) {
auto& f = find_entity(r, p);
auto b = std::make_unique<length_platform>();
b->len = len;
p = &*b;
b->base = std::move(as_platform(f));
f = std::move(b);
}
}
else if(cap == "SAW") for(auto p: last_platform) {
auto& f = find_entity(r, p);
auto b = std::make_unique<saw>(); nam(*b);