MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AddItem

Method AddItem

src/script/api/script_list.cpp:425–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void ScriptList::AddItem(SQInteger item, SQInteger value)
426{
427 this->modifications++;
428
429 if (this->HasItem(item)) return;
430
431 this->items[item] = value;
432 this->values.emplace(value, item);
433}
434
435void ScriptList::RemoveItem(SQInteger item)
436{

Callers 15

LoadObjectMethod · 0.95
AddListMethod · 0.95
_setMethod · 0.95
GetAllRailTypesMethod · 0.80
ScriptDepotListMethod · 0.80
SetValueMethod · 0.80
AddRectangleMethod · 0.80
AddTileMethod · 0.80
ScriptRoadTypeListMethod · 0.80
ScriptObjectTypeListMethod · 0.80

Calls 1

HasItemMethod · 0.95

Tested by

no test coverage detected