Skip to content

Commit c7443ec

Browse files
committed
203 update.
1 parent db89b39 commit c7443ec

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎Essentials/Commands/EcoModule.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ public void EcoPay(string Player, long amount) {
171171
Context.Respond("Player is not online or cannot be found!");
172172
return;
173173
}
174-
MyBankingSystem.RequestTransfer(Context.Player.Identity.IdentityId, p.IdentityId, amount);
174+
175+
var finalFromBalance = MyBankingSystem.GetBalance(Context.Player.Identity.IdentityId) - amount;
176+
var finalToBalance = MyBankingSystem.GetBalance(p.Identity.IdentityId) + amount;
177+
178+
MyBankingSystem.RequestTransfer_BroadcastToClients(Context.Player.Identity.IdentityId, p.Identity.IdentityId, amount, finalFromBalance, finalToBalance);
175179
ModCommunication.SendMessageTo(new NotificationMessage($"Your have recieved {amount} credits from {Context.Player}!", 10000, "Blue"),p.SteamUserId);
176180
ModCommunication.SendMessageTo(new NotificationMessage($"Your have sent {amount} credits to {p.DisplayName}!", 10000, "Blue"),Context.Player.SteamUserId);
177181
}

‎Essentials/Commands/GridModule.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using VRage.ObjectBuilders;
1717
using System.Collections.Concurrent;
1818
using VRage.Groups;
19+
using VRage.ObjectBuilders.Private;
1920

2021
namespace Essentials
2122
{
@@ -201,7 +202,7 @@ public void Export(string gridName, string exportName)
201202
return;
202203
}
203204

204-
MyObjectBuilderSerializer.SerializeXML(path, false, ent.GetObjectBuilder());
205+
MyObjectBuilderSerializerKeen.SerializeXML(path, false, ent.GetObjectBuilder());
205206
Context.Respond($"Grid saved to {path}");
206207
}
207208

@@ -233,7 +234,7 @@ public void Import(string gridName, string targetName = null)
233234
return;
234235
}
235236

236-
if (MyObjectBuilderSerializer.DeserializeXML(path, out MyObjectBuilder_CubeGrid grid))
237+
if (MyObjectBuilderSerializerKeen.DeserializeXML(path, out MyObjectBuilder_CubeGrid grid))
237238
{
238239
Context.Respond($"Importing grid from {path}");
239240
MyEntities.RemapObjectBuilder(grid);

0 commit comments

Comments
 (0)