The m4nfo User manual and Technical Report

Functions for cargoes

Using functions for new cargoes

Introduction

In m4nfo, new cargoes are using only two types of functions:

Functions for sprite layout definition

Format

The only graphics associated with cargoes is their icon that is shown in the station window, therefore there's only a very simple sprite layout needed:

spriteset(<number>)

Example 1 (defining cargo icon graphics):
def(15) spriteset(0) // fish icon
def(16) spriteset(1) // beer icon

Functions for cargo performance

These functions are used to evaluate game-intrinsic variables, and make them accessible to the cargo's activation function. As cargoes have no functions acssociated with it, the only performance function is callback().

Function Description
callback(<block>)Check incidence (and type) of callback

Description

callback(<block>)

This function checks for a callback incidence, and if so, returns the type of the incurred callback.