1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 17:37:39 +00:00

Consistently name every hookset with prefix hooks_. NFC.

I'm sure this causes massive merge-conflicts in the non-public code,
but I think it'd be a good idea, if only to avoid confusion between
e.g. `clearMemory` and the-variable-formerly-known-as `clearmemory`.
This commit is contained in:
Arthur O'Dwyer
2020-04-11 14:40:12 -04:00
parent 84881f0e04
commit 934e3d9a42
20 changed files with 32 additions and 32 deletions

View File

@@ -1295,8 +1295,8 @@ discovery::~discovery() { schedule_destruction(); if(discoverer) discoverer->joi
int hk =
#if CAP_THREAD
+ addHook(on_geometry_change, 100, [] { for(auto& d:discoveries) if(!d.second.is_suspended) d.second.suspend(); })
+ addHook(final_cleanup, 100, [] {
+ addHook(hooks_on_geometry_change, 100, [] { for(auto& d:discoveries) if(!d.second.is_suspended) d.second.suspend(); })
+ addHook(hooks_final_cleanup, 100, [] {
for(auto& d:discoveries) { d.second.schedule_destruction(); if(d.second.is_suspended) d.second.activate(); }
discoveries.clear();
})
@@ -1314,7 +1314,7 @@ int hk =
#endif
+ 0;
EX purehookset on_geometry_change;
EX purehookset hooks_on_geometry_change;
EX int field_celldistance(cell *c1, cell *c2) {
if(geometry != gFieldQuotient) return DISTANCE_UNKNOWN;