You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a gnome's sparetime ends while they are on their way to eat, they will still continue to pick up the food item, but not eat it. This is bad because it blocks one inventory slot during work.
The reason is that in z_spare_procs.tcl, proc sparetime_eat_start, at the very end sparetime_eat_item is set but not used right away. Instead the gnome will eat it at the next call to sparetime_eat_loop - which will not occur if the sparetime ended.
This can be fixed in several ways:
Don't pick up the item yet, just walk to it. Then eat and consume it in one go on the next call to sparetime_eat_loop.
Drop the item if the sparetime is over.
Eat the thing immediately, even if work time has started.
I might think of a solution later.
The text was updated successfully, but these errors were encountered:
The first variant seems to be the most complicated. Keep in mind that items that will be picked up are being locked, so that no other gnome will try to pick them up as well. Ending up not picking up the item but keeping it locked would make the fix worse than the bug.
The third options seems to be the easiest. I am currently testing
proc sparetime_eat_end {} {
global sparetime_disappointment sparetime_eat_item
if {[lsearch [inv_list this] $sparetime_eat_item]!=-1} {
log "mealtime ends, so I will drop my leftovers ([get_objname $sparetime_eat_item])"
beamto_world $sparetime_eat_item
}
set sparetime_eat_item 0
sparetime_check_in 0
set sparetime_disappointment 0.0
// log "sparetime_eat_end"
}
When a gnome's sparetime ends while they are on their way to eat, they will still continue to pick up the food item, but not eat it. This is bad because it blocks one inventory slot during work.
The reason is that in z_spare_procs.tcl, proc sparetime_eat_start, at the very end sparetime_eat_item is set but not used right away. Instead the gnome will eat it at the next call to sparetime_eat_loop - which will not occur if the sparetime ended.
This can be fixed in several ways:
I might think of a solution later.
The text was updated successfully, but these errors were encountered: