pioneerspacesim/pioneer — pull request #2857 by impaktor (2014-04-10 17:10:47+00:00)
Title: dumping/jettison unwanted goods close to station is a crime

Fixes #873

This introduces a `CrimeStats`-module for checking dumping. I imagine the module will check other crimes as well, in the future, something I'm thinking about having a go at.

So far it checks and fines if player dumps anything with negative price within 100 km from any station. I've tested everything I could think of, except that the crime is added to the Police record since I get blown away before I can dock and pay my fines (another thing I'd like to fix).

Ideally, I'd like both the fine and police-name to be faction specific.

Also, I've noticed that all crimes are translated double, both in core (due to Polit.cpp) and in ui-core (because Police.lua). I guess there's no point in removing them from ui-core, since that is where they will belong in the end, when crime migrates from C++ to Lua. (Perhaps then there should be a `CrimeDef`, like a `EquipDef`, with a `CrimeDef["MURDER"].name`, `CrimeDef["MURDER"].fine`, or similar? Something that will let you get the translated name of the crime?)