MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / runRandomize

Method runRandomize

source/game/StarBehaviorState.cpp:377–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377NodeStatus BehaviorState::runRandomize(RandomizeNode const& node, NodeState& state) {
378 if (state.isNothing())
379 state.set(CompositeState(node.children.size(), Random::randUInt(node.children.size() - 1)));
380
381 CompositeState& composite = state->get<CompositeState>();
382 auto child = node.children.get(composite.index);
383 NodeStatus status = runNode(*child, *composite.children[composite.index]);
384 return status;
385}
386
387}

Callers

nothing calls this directly

Calls 6

CompositeStateClass · 0.85
randUIntFunction · 0.85
isNothingMethod · 0.80
setMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected