OpenTTD Source 20250312-master-gcdcc6b491d
object.h File Reference

Functions related to objects. More...

#include "tile_type.h"
#include "company_type.h"
#include "object_type.h"

Go to the source code of this file.

Functions

void UpdateCompanyHQ (TileIndex tile, uint score)
 Update the CompanyHQ to the state associated with the given score.
 
void BuildObject (ObjectType type, TileIndex tile, CompanyID owner=OWNER_NONE, struct Town *town=nullptr, uint8_t view=0)
 Actually build the object.
 
WindowShowBuildObjectPicker ()
 Show our object picker.
 

Detailed Description

Functions related to objects.

Definition in file object.h.

Function Documentation

◆ BuildObject()

void BuildObject ( ObjectType  type,
TileIndex  tile,
CompanyID  owner,
Town town,
uint8_t  view 
)

◆ ShowBuildObjectPicker()

Window * ShowBuildObjectPicker ( )

◆ UpdateCompanyHQ()

void UpdateCompanyHQ ( TileIndex  tile,
uint  score 
)

Update the CompanyHQ to the state associated with the given score.

Parameters
tileThe (northern) tile of the company HQ, or INVALID_TILE.
scoreThe current (performance) score of the company.

Definition at line 159 of file object_cmd.cpp.

References GetCompanyHQSize, IncreaseCompanyHQSize, and INVALID_TILE.

Referenced by CmdBuildObject(), and UpdateCompanyRatingAndValue().