tester-fixes #19

Open
kanym wants to merge 0 commits from tester-fixes into main
Collaborator
No description provided.
Three tester reports against the Bone Servant, all with the same shape:
the servant was doing what the code said and the code said the wrong
thing. Two vanilla methods were re-read off the IL rather than trusted.

RPC_RemoveDoneItem empties ONE slot per call - it finds the first Done
slot, spawns its item, clears it and returns - not every slot, as the
comment on PullOutput claimed. DoCollect also swept the ground BEFORE
pulling, so each visit collected the previous visit's item and dropped a
fresh one; since Plan() diverts to PlanDelivery the moment the payload is
non-empty, the servant then left for the chest and abandoned what it had
just pulled. A working hearth therefore always had exactly one cooked
meat lying beside it. Now it pulls first, in a loop bounded by a new
ButlerStation.OutputPulls - the slot count for a cooking station, 1
everywhere else, because the fermenter's Ready survives its own tap for
the length of the animation and a bare while(HasOutput) would spam
RPC_Tap.

PlanFuel sat last, behind PlanLoad, and FreeSlots goes back above zero
the instant a furnace eats one ore - so loading always had an answer and
refuelling never got a turn. The blast furnace burned down to nothing.
PlanFuel now runs ahead of PlanLoad, which cannot starve loading in
return because FuelWanted is 0 for a station with no work, and it scores
candidates by the walk the way PlanLoad does now that the choice matters.

PlanDelivery offers the load to the nearest station that will CONSUME it,
as material or as fuel, after the chest search fails and before dropping
it on the floor. UpdateSmelter only calls SpawnProcessed once the ore
queue empties, so the charcoal kiln releases its whole batch at once -
exactly the delivery a nearly full chest cannot absorb. The coal now
walks into the furnace beside it instead of onto the ground.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Skadi's cold spell is bound to middle mouse and kept casting with the
piece selection panel open. The gate was already there - HandleColdSpell
sits behind RaceInput.Allowed - but the gate itself was incomplete:
Player.TakeInput tests Chat, Console, TextInput, StoreGui, InventoryGui,
Menu, TextViewer, the map, free-fly and the barber, and nothing else
(read off the IL). Vanilla does not need the build menu in that list
because build input is handled separately in UpdatePlacement; a mod
ability reading UnityEngine.Input directly does.

Hud.IsPieceSelectionVisible is static, public and null-safe on its own
instance, so it costs one call and no reflection. Checked before
TakeInput so it holds on the fail-open path too.

Fixed in RaceInput rather than in Skadi: that class is the mod's single
input gate, so this covers every race and every bound ability - the
transformations, the flight toggle and the three dragon-form attacks
included.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"Beehives per Aura" was bound into the config and then read by nobody.
SvermConfigManagement.Beehives had no callers and neither did the
constant behind it, so the entry described a limit that did not exist and
a player could raise thirty hives in one aura and get thirty workers.

SweepAura is two passes now, with the cap between them. The first applies
to hives already taken and counts them - that maintenance is not
skippable, it is what survives a zone reload - and only then are new
candidates considered. One pass would have let the order the physics
query happens to return decide whether a hive counted against the cap or
was measured by it. The minute keeps running on a hive that does not fit
today, so when a taken hive is destroyed the one that has waited longest
is claimed on the next sweep instead of starting over; lowering the cap
never hands a hive back.

Three limits are now the player's: Aura Radius, Nests per Radius and Nest
Spacing Radius. PieceDensityLimit.Register takes a snapshot of its
numbers, so the Hive Market and the Brood Mound both watch their entries
and re-register when one moves - Register replaces an entry rather than
stacking a second limit on the same piece.

All three are clamped, and the reason is not tidiness: Register REFUSES a
radius of zero or a maximum below one, and a refused limit is no limit at
all. A player typing 0 into "Nests per Radius" to mean "no nests" would
have been handed unlimited nests.

Every player-facing string that stated the old numbers now reads the live
ones - the two build refusals, the orphaned market's message and hover,
and the two Compendium lines. The nest's hover shows the cap next to the
count, so moving the knob has visible effect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin tester-fixes:tester-fixes
git switch tester-fixes

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff tester-fixes
git switch tester-fixes
git rebase main
git switch main
git merge --ff-only tester-fixes
git switch tester-fixes
git rebase main
git switch main
git merge --no-ff tester-fixes
git switch main
git merge --squash tester-fixes
git switch main
git merge --ff-only tester-fixes
git switch main
git merge tester-fixes
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nandor/RacesOfValheim!19
No description provided.