25
edits
No edit summary |
|||
Line 49: | Line 49: | ||
} | } | ||
} | } | ||
} | |||
public override bool FireEvent(Event E) | |||
{ | |||
if (E.ID == "EnteredCell") | |||
{ | |||
CheckCamouflage(); | |||
return true; | |||
} | |||
if (E.ID == "Equipped") | |||
{ | |||
GameObject GO = E.GetParameter<GameObject>("EquippingObject"); | |||
GO.RegisterPartEvent(this, "EnteredCell"); | |||
CheckCamouflage(); | |||
return true; | |||
} | |||
if (E.ID == "Unequipped") | |||
{ | |||
GameObject GO = E.GetParameter<GameObject>("UnequippingObject"); | |||
StatShifter.RemoveStatShifts(GO); | |||
GO.UnregisterPartEvent(this, "EnteredCell"); | |||
return true; | |||
} | |||
return base.FireEvent(E); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |