Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/rc_entry

Requisition contract entry: analyzes things passed to it, returns whether they were needed, and is checked for completion at end of analyses.

Vars

countWhat quantity this entry requires (examples: item quantity, stack quantity or reagent units); can be adjusted at any point during creation.
entryclassThe evaluation class of the entry; used for formatting when building the text form of a contract's list of requirements.
feemodHow much this entry will contribute to a contract's overall payout, PER COUNT. Some entry types can configure this from commodity data.
nameName as shown on the requisition contract itself. Can be different from your item's real name for flavor purposes.
rollcountWhen an item contributes to fulfillment, this value should be incremented; when it matches or exceeds the count, the entry is fully satisfied.

Procs

extra_evalHook point for slight modifications to a contract entry's fulfillment condition. This should ALWAYS be included in any entry variant, as late as possible in primary checks but before the rolling count is incremented. It should return TRUE if additional checks pass, and FALSE if they do not.
rc_evalEvaluation proc called by contracts to see whether an item fulfills the entry's requirements.

Var Details

count

What quantity this entry requires (examples: item quantity, stack quantity or reagent units); can be adjusted at any point during creation.

entryclass

The evaluation class of the entry; used for formatting when building the text form of a contract's list of requirements.

feemod

How much this entry will contribute to a contract's overall payout, PER COUNT. Some entry types can configure this from commodity data.

name

Name as shown on the requisition contract itself. Can be different from your item's real name for flavor purposes.

rollcount

When an item contributes to fulfillment, this value should be incremented; when it matches or exceeds the count, the entry is fully satisfied.

Proc Details

extra_eval

Hook point for slight modifications to a contract entry's fulfillment condition. This should ALWAYS be included in any entry variant, as late as possible in primary checks but before the rolling count is incremented. It should return TRUE if additional checks pass, and FALSE if they do not.

rc_eval

Evaluation proc called by contracts to see whether an item fulfills the entry's requirements.

When creating an entry type, there are two required outputs from the variant's rc_eval proc. First, it must return true if the atom the entry has been passed contributes to satisfying the condition, so the atom can be consumed. Second, you must increment rollcount if the condition was satisfied; often by 1, but can be multiple for things like reagents or stacks.