aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_industrial/init.lua
Commit message (Expand)AuthorAge
* [BREAKING] Use client-side translations instead of intllib; add zh_CN transla...ywang2020-07-19
* Use a standard wagon inventory formspecBlockhead2020-03-18
* Merge branch 'mt5-fixes'orwell962020-01-04
|\
| * Move attachment positions down 1 nodeorwell962019-12-05
* | Remove fullbright (H#140)orwell962019-12-18
|/
* Change get_inventory_formspec API - add invname parameterorwell962018-12-10
* onboard computer fixh-v-smacker2018-08-12
* Fix box wagonsorwell962018-06-14
* Fix bugs found while testingorwell962018-06-14
* Improve textures and models of industrial train and add new more powerful ind...mbb2017-12-12
* Implement sound api and some soundsorwell962017-12-06
* Remove zip release files, move mod to root, exclude assets from Makefile (#92)rubenwardy2017-09-20
* Restructure mod directoryorwell962017-01-04
* remove train type concept and calculate train's capabilities based on used wa...orwell962016-12-22
* Turning mod into a modpack and separating the trains from the core modorwell962016-12-20
pos_, const std::string &data_): type(type_), pos(pos_), data(data_) { } void serialize(std::ostream &os); void deSerialize(std::istream &is, u8 version); }; class StaticObjectList { public: /* Inserts an object to the container. Id must be unique (active) or 0 (stored). */ void insert(u16 id, StaticObject obj) { if(id == 0) { m_stored.push_back(obj); } else { if(m_active.find(id) != m_active.end()) { dstream<<"ERROR: StaticObjectList::insert(): " <<"id already exists"<<std::endl; assert(0); return; } m_active[id] = obj; } } void remove(u16 id) { assert(id != 0); if(m_active.find(id) == m_active.end()) { dstream<<"WARNING: StaticObjectList::remove(): id="<<id <<" not found"<<std::endl; return; } m_active.erase(id); } void serialize(std::ostream &os); void deSerialize(std::istream &is); /* NOTE: When an object is transformed to active, it is removed from m_stored and inserted to m_active. The caller directly manipulates these containers. */ std::list<StaticObject> m_stored; std::map<u16, StaticObject> m_active; private: }; #endif