Building: Justice
Now, in some Peaceful zones when you try to attack someone a copper will come and arrest you.
The "justice.police_station" property on the zone is set to an isolated storage room containing nothing but police officers. These officers all must have the "Police" flag. You may want to make these officers treatas to template_police_1 - look at the traps on this template and see if it fits what you want.
The police storage room then needs a "justice.interview" property pointing to the Interview Room, which is a room with an exit and a mobile (the custody sergeant), with the RefuseMove and Police flag and treatas set to "template_custodysergeant_1. The Custody sergeant will administer a fine when the player attempts to leave the first time, and then will permit further attempts to leave. The sergeant is also not attackable in this release, to prevent players committing suicide by entering an unwinnable fight and ending up a dead fugitive.
If there is more than one zone associated with the police station you can set the "fwd" property on the zone to forward it to the other zones. If there are one-off rooms that need to be in a different zone (for example, Agent has rooms on both Livingstone and New Lyon), you can set the "fwd" property on the actual rooms and this will override the zonewide one.
Thus, level1_zone::fwd is set to "level2_zone".
Magic is done with ships to get the right zone depending upon where it is done.
(Finally, it would be nice to have "planet" properties set on the zones (except zones with "fwd"). For example, level2_zone::planet is set to "Cryosphere", lstone_zone::planet is "Livingstone", etc. There should be only one zone with each particular planet value, use fwd to point extra zones at the main zone.)
Current offences include
- Attacking someone in a peaceful area
- Being a fugitive
- Carrying an offensive weapon (if you are a civilian)
- Drunk on Duty (defined as having a mission)
- Resisting arrest (attacking an arresting officer)
Making a new Offence
To invoke an arrest, use the mud.arrest function, e.g.
mud.arrest(pl, snitcher, acts(pl, "%1 is soliciting without a licence!"))
This won't actually add anything to their criminal record, or fine them anything, so
you must use cash.fine to do that, e.g.
cash.fine(pl, 100, "Unlicenced soliciting")