Introduce FrozenUnderFogUpdatedByGps and IOnGpsRefreshed.

This trait uses the new interface to register with the GpsWatcher to get notified when the GPS state changes. It needs to register as if the actor is destroyed, the GpsWatcher can no longer query actors in the world to get the trait. This is no good as the trait needs to perform actions after the death of its parent actor.

When the GPS is enabled, the trait will track ownership changes and update the frozen actor (just like if there was only a GPS dot, it would change colour) and it will also remove frozen actors if the real actor dies or is sold.
This commit is contained in:
RoosterDragon
2015-12-31 01:47:23 +00:00
parent a232eff7fd
commit 3c930c3ef9
4 changed files with 138 additions and 10 deletions

View File

@@ -430,6 +430,7 @@
Guardable:
Range: 3c0
FrozenUnderFog:
FrozenUnderFogUpdatedByGps:
Tooltip:
GenericName: Structure
Demolishable:
@@ -499,6 +500,7 @@
SellSounds: cashturn.aud
Guardable:
FrozenUnderFog:
FrozenUnderFogUpdatedByGps:
Health:
HP: 100
Shape: Rectangle