attempt hotloading if element doesn't exist
This commit is contained in:
parent
8878053ee0
commit
c02e8aa59a
2 changed files with 10 additions and 1 deletions
|
@ -38,3 +38,4 @@ ocean;land;sea
|
|||
planet;earth;ocean
|
||||
planet;land;ocean
|
||||
star;fire;sky
|
||||
pollution;air;dust
|
||||
|
|
|
@ -56,6 +56,14 @@ int main(int argc, char *argv[]) {
|
|||
uintptr_t result;
|
||||
hashmap_get(elements, command_re, strlen(command_re), &result);
|
||||
|
||||
// todo: better
|
||||
if (result == 0) {
|
||||
load_elements(elements, combo_file, 0) ||
|
||||
load_elements(elements, "bin/" combo_file, 0);
|
||||
|
||||
hashmap_get(elements, command_re, strlen(command_re), &result);
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
printf("You didn't make anything.\n");
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue