public IPromise <Void> ChangeShipNameAndId(string name, string id) { try { var oldId = Aos.Node.ShipId; Aos.Node.ShipAlias = name; Aos.Node.ShipId = id; _gameContext.Me.UpdateName(Aos.Node.ShipId); if (Aos.Node.IsMainNode) { var nameAndId = new Pair <Primitive <string>, Primitive <string> > { First = name.AsPrimitive(), Second = id.AsPrimitive() }; ShipBroadcast($"T|System.ChangeShipNameAndId|{{{nameAndId.Stringify()}}}", oldId); } _log.Info($"Renamed {oldId} to {Aos.Node.ShipAlias}-{Aos.Node.ShipId}"); return(Void.Promise()); } catch (Exception e) { _log.Error($"Rename failed: {e}"); return(Promise <Void> .FromError(e)); } }
IPromise <Void> _ChangeShipName(Primitive <string> name) { var oldName = Aos.Node.ShipAlias; Aos.Node.ShipAlias = name.Value; return(Void.Promise()); }
public IPromise <Void> ChangeNodeNameAndId(string name, string id) { Aos.Node.NodeAlias = name; Aos.Node.NodeId = id; return(Void.Promise()); }
IPromise <Void> _UpdatePbTag(Void a) { return(Void.Promise()); }
IPromise <Void> _AssignRandomShipId(Void a) { return(Void.Promise()); }
IPromise <Void> _ChangeNodeNameAndId(Pair <Primitive <string>, Primitive <string> > nameAndId) { Aos.Node.NodeAlias = nameAndId.First.Value; Aos.Node.NodeId = nameAndId.Second.Value; return(Void.Promise()); }