aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_subway
Commit message (Expand)AuthorAge
* Add "X" line symbol for subway trains terminating/service tripsorwell962019-02-05
* Fix "subway train" itemorwell962019-01-22
* Remove superfluous "tarvelocity" assignmentsorwell962018-11-20
* Make "Line" property accessible from OBC and gettable via LATC, change subway...orwell962018-11-20
* Fix bugs found while testingorwell962018-06-14
* Revert assign_to_seat_group order on subway trainorwell962018-01-15
* Add bord computer to trainsorwell962018-01-09
* Move driving_ctrl_access property to seat grouporwell962018-01-09
* Don't use looped sounds on subwayorwell962018-01-07
* Change controls for trains (again)orwell962018-01-07
* Rewrite rail connection system...orwell962017-12-18
* Try to fix occasional crash when placing wagonsorwell962017-12-17
* Implement sound api and some soundsorwell962017-12-06
* Fix subway train placerorwell962017-10-25
* Some workaround fixes for Linuxworks serverorwell962017-10-25
* Moved default train track to separate mod, for integration with advcarts.Gabriel Pérez-Cerezo2017-10-25
* Set wagon line numberGabriel Pérez-Cerezo2017-10-23
* 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
class="hl opt">*time) const { std::unordered_map<int, float>::const_iterator i = times.find(rating); if (i == times.end()) { *time = 0; return false; } *time = i->second; return true; } void toJson(Json::Value &object) const; void fromJson(const Json::Value &json); }; typedef std::unordered_map<std::string, struct ToolGroupCap> ToolGCMap; typedef std::unordered_map<std::string, s16> DamageGroup; struct ToolCapabilities { float full_punch_interval; int max_drop_level; ToolGCMap groupcaps; DamageGroup damageGroups; ToolCapabilities( float full_punch_interval_=1.4, int max_drop_level_=1, const ToolGCMap &groupcaps_ = ToolGCMap(), const DamageGroup &damageGroups_ = DamageGroup() ): full_punch_interval(full_punch_interval_), max_drop_level(max_drop_level_), groupcaps(groupcaps_), damageGroups(damageGroups_) {} void serialize(std::ostream &os, u16 version) const; void deSerialize(std::istream &is); void serializeJson(std::ostream &os) const; void deserializeJson(std::istream &is); }; struct DigParams { bool diggable; // Digging time in seconds float time; // Caused wear u16 wear; std::string main_group; DigParams(bool a_diggable = false, float a_time = 0.0f, u16 a_wear = 0, const std::string &a_main_group = ""): diggable(a_diggable), time(a_time), wear(a_wear), main_group(a_main_group) {} }; DigParams getDigParams(const ItemGroupList &groups, const ToolCapabilities *tp); struct HitParams { s16 hp; s16 wear; HitParams(s16 hp_=0, s16 wear_=0): hp(hp_), wear(wear_) {} }; HitParams getHitParams(const ItemGroupList &armor_groups, const ToolCapabilities *tp, float time_from_last_punch); HitParams getHitParams(const ItemGroupList &armor_groups, const ToolCapabilities *tp); struct PunchDamageResult { bool did_punch = false; int damage = 0; int wear = 0; PunchDamageResult() = default; }; struct ItemStack; PunchDamageResult getPunchDamage( const ItemGroupList &armor_groups, const ToolCapabilities *toolcap, const ItemStack *punchitem, float time_from_last_punch ); f32 getToolRange(const ItemDefinition &def_selected, const ItemDefinition &def_hand);