fix chameleon menu (#18028)

This commit is contained in:
Slava0135
2023-07-16 10:04:51 +03:00
committed by GitHub
parent 7e2eb1c212
commit e9d3d86d30

View File

@@ -21,13 +21,13 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<ChameleonClothingComponent, ComponentInit>(OnInit); SubscribeLocalEvent<ChameleonClothingComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<ChameleonClothingComponent, ComponentGetState>(GetState); SubscribeLocalEvent<ChameleonClothingComponent, ComponentGetState>(GetState);
SubscribeLocalEvent<ChameleonClothingComponent, GetVerbsEvent<InteractionVerb>>(OnVerb); SubscribeLocalEvent<ChameleonClothingComponent, GetVerbsEvent<InteractionVerb>>(OnVerb);
SubscribeLocalEvent<ChameleonClothingComponent, ChameleonPrototypeSelectedMessage>(OnSelected); SubscribeLocalEvent<ChameleonClothingComponent, ChameleonPrototypeSelectedMessage>(OnSelected);
} }
private void OnInit(EntityUid uid, ChameleonClothingComponent component, ComponentInit args) private void OnMapInit(EntityUid uid, ChameleonClothingComponent component, MapInitEvent args)
{ {
SetSelectedPrototype(uid, component.SelectedId, true, component); SetSelectedPrototype(uid, component.SelectedId, true, component);
} }