Administrator's Toolkit VS plugin
Revisión | 49c9d088761774bc6c583d8635c0eb629f910ef5 (tree) |
---|---|
Tiempo | 2019-12-31 12:44:40 |
Autor | melchior <melchior@user...> |
Commiter | melchior |
Updates for VS1.11 - Banner W.I.P.
@@ -75,6 +75,7 @@ | ||
75 | 75 | <Compile Include="Commands\BackupCycleCommand.cs" /> |
76 | 76 | <Compile Include="Commands\RulesCommand.cs" /> |
77 | 77 | <Compile Include="MechTurk.cs" /> |
78 | + <Compile Include="Commands\BannerControl.cs" /> | |
78 | 79 | </ItemGroup> |
79 | 80 | <ItemGroup> |
80 | 81 | <Folder Include="VS_libs\" /> |
@@ -19,12 +19,14 @@ namespace AdminToolkit | ||
19 | 19 | { |
20 | 20 | /* Things it should do: |
21 | 21 | * ============== |
22 | - * Server RULES Printout {richtext / multi-linugual } | |
23 | - * Optional: ACCEPTANCE / REJECT of server rules {changes players role} | |
24 | - * List all Admins (online or offline) & track last logoff date | |
25 | - * Keeps track of Elapsed game calendar days for players | |
26 | - * { Alter ADMIN text to look 'different' } | |
27 | - * Cyclic automatic Backups | |
22 | + * [DONE] Server RULES Printout {richtext / multi-linugual } | |
23 | + * [DONE] Optional: ACCEPTANCE / REJECT of server rules {changes players role} | |
24 | + * [DONE] List all Admins (online or offline) & track last logoff date | |
25 | + * [DONE] Keeps track of Elapsed game calendar days for players | |
26 | + * [DONE] Alter ADMIN text to look 'different' | |
27 | + * [DONE] Cyclic automatic Backups | |
28 | + * ?????? Broadcast messages, on a schedule ?????? | |
29 | + * Status/MOTD/Server name : custom formats to indicate server state/time/things | |
28 | 30 | */ |
29 | 31 | |
30 | 32 | private ICoreAPI API { get; set; } |
@@ -143,8 +145,8 @@ namespace AdminToolkit | ||
143 | 145 | /// <param name="byPlayer">By player.</param> |
144 | 146 | /// <param name="channelId">Channel identifier.</param> |
145 | 147 | /// <param name="message">Message.</param> |
146 | - /// <param name="consumed">Consumed.</param> | |
147 | - private string BoomingVoiceOfAuthority(IServerPlayer byPlayer, int channelId, string message, BoolRef consumed) | |
148 | + /// <param name="consumed">Consumed.</param> | |
149 | + private void BoomingVoiceOfAuthority(IServerPlayer byPlayer, int channelId, ref string message, ref string data, BoolRef consumed) | |
148 | 150 | { |
149 | 151 | if (AdminRoles.Contains(byPlayer.Role.Code)) { |
150 | 152 | //Make text lined |
@@ -159,9 +161,8 @@ namespace AdminToolkit | ||
159 | 161 | } |
160 | 162 | } |
161 | 163 | |
162 | - return adminMessage.ToString( ); | |
164 | + message = adminMessage.ToString( ); | |
163 | 165 | } |
164 | - return message; | |
165 | 166 | } |
166 | 167 | |
167 | 168 | private void SaveConfigSettings( ) |
@@ -286,6 +286,7 @@ namespace AdminToolkit | ||
286 | 286 | //ServerAPI.WorldManager.CurrentWorldName |
287 | 287 | //ServerAPI.WorldManager.SaveGame.WorldName |
288 | 288 | string worldNameTrimmed = Path.GetFileNameWithoutExtension(ServerAPI.WorldManager.CurrentWorldName); |
289 | + | |
289 | 290 | fileFilter = $"{worldNameTrimmed}-*{GlobalConstants.WorldSaveExtension}"; |
290 | 291 | Logger.VerboseDebug("File Filter: {0}", fileFilter); |
291 | 292 |
@@ -0,0 +1,15 @@ | ||
1 | +using System; | |
2 | + | |
3 | +using Vintagestory.API.Server; | |
4 | + | |
5 | +namespace AdminToolkit | |
6 | +{ | |
7 | + public class BannerControl : AdminModCommand | |
8 | + { | |
9 | + public BannerControl(ICoreServerAPI _serverAPI) : base(_serverAPI) | |
10 | + { | |
11 | + | |
12 | + } | |
13 | + } | |
14 | +} | |
15 | + |
@@ -171,6 +171,16 @@ namespace AdminToolkit | ||
171 | 171 | throw new NotImplementedException( ); |
172 | 172 | } |
173 | 173 | |
174 | + public PlayerGroupMembership GetGroup(int groupId) | |
175 | + { | |
176 | + throw new NotImplementedException( ); | |
177 | + } | |
178 | + | |
179 | + public PlayerGroupMembership[ ] GetGroups( ) | |
180 | + { | |
181 | + throw new NotImplementedException( ); | |
182 | + } | |
183 | + | |
174 | 184 | public bool HasPrivilege(string privilegeCode) |
175 | 185 | { |
176 | 186 | return true;//Robot can do anything |
@@ -3,9 +3,9 @@ | ||
3 | 3 | "name": "Administrator's Toolkit mod", |
4 | 4 | "description" : "Provides misc. Admin functions;\n list admins, print & accept rules (multi-lingual) , auto-backup...", |
5 | 5 | "authors": ["Melchior", ], |
6 | - "version": "0.3.2", | |
6 | + "version": "0.3.3", | |
7 | 7 | "dependencies": { |
8 | - "game": "1.10.0" | |
8 | + "game": "1.11.0" | |
9 | 9 | }, |
10 | 10 | "requiredonclient":false, |
11 | 11 | "website": "https://osdn.net/users/melchior/pf/admintoolkit/" |
@@ -1,5 +1,5 @@ | ||
1 | 1 | |
2 | -Instructions for using the Administrator's Toolkit (V0.3.0); | |
2 | +Instructions for using the Administrator's Toolkit (V0.3.3); | |
3 | 3 | ============================================================ |
4 | 4 | |
5 | 5 | It provides the (server side only) commands: |