mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 10:05:23 +01:00
34a257f531
A smoke source of a vehicle's model now shows a part of its steam engine when its template says which, with the new optional key steam: in data/smokesource_<template>.txt: - exhaust: the blast up the chimney, in four puffs a turn of the driving wheels from two double-acting cylinders, merging into a steady blast at speed; - smoke: the smoke of the fire, denser the harder it burns; - safety_valves: the safety valves blowing off; - cocks: the open cylinder cocks, with each stroke. The engine gives each the share of the template's spawn rate and of the opacity and launch velocity of the particles (smoke::steam_emission, with unit tests). A template without steam:, or a vehicle without a steam engine, works as before: the smoke of the diesels and of the sceneries doesn't change. The AI opens the cylinder cocks of a steam locomotive while starting, under 10 km/h with the regulator open. Assets: four new templates in the SVN's data/: smokesource_steam_exhaust.txt, smokesource_steam_smoke.txt, smokesource_steam_valves.txt and smokesource_steam_cocks.txt, made in the SVN working copy and not committed yet. A model uses them with submodels of those names (the placeholder pkp/ty2_v1, ty23_v1 and pt31_v1 have them: the exhaust and the smoke at the chimney, the valves on the dome, the cocks at the cylinders). Without the templates such a source logs the missing file, as for any other template; no model in the SVN uses them yet.