74 Commits

Author SHA1 Message Date
UnknownShadow200
134da6f5c5 Transfer repository to ClassiCube organisation 2024-02-20 12:01:44 +11:00
UnknownShadow200
a8c096c14a Fix stare bot instruction not always giving bots the right pitch due to recent changes (Thanks Goodly), try to fix rare issue where NWSE cursor is invalid 2023-10-26 18:38:00 +11:00
UnknownShadow200
ada403cb0f Fix ECL license linking to non-existent page (Thanks TomCube2) 2023-07-06 21:22:09 +10:00
UnknownShadow200
626cfd3752 Fix server getting stuck in restart loop if GUI DetectBuggyCursors() failed, also begin abstracting away process resource measurement
This will be necessary to add OS specific code that avoids relying on the framework's implementation of Process
2023-06-16 19:51:38 +10:00
UnknownShadow200
f2ce59e19d Restore original software name in rest of copyright headers 2022-12-24 21:21:35 +11:00
UnknownShadow200
b84f2345eb Linux: Try to workaround very rare case where problematic X11 video drivers cause cursor creation to fail with ArgumentException, which in turn causes the GUI to fail to start. Might address #658 2022-09-25 20:22:08 +10:00
UnknownShadow200
88c5c1dac3 Linux: Fix rare case where GUI would crash at startup (mostly when using standalone builds compiled with mkbundle)
This happened due to two factors:

1) the standalone build would show a message box warning because it couldn't change the current/working directory
2) the gui schedules InitServerTask to run on the background thread. This in turn will eventually call Server.Start on the background thread, which in turn will call Logger.Log(..) which in turn calls back to Window.LogMessage

Note that the UI can only be updated from the main/UI thread. Normally this wouldn't cause any issues, because LogMessage checked whether 'InvokeRequired' returned true or not - if it did, then LogMessage scheduled the message to be logged later on the main/UI thread by using BeginInvoke.

However, it was rarely possible that due to thread scheduling, the call to LogMessage from the background thread would be run *before* the main window control handle had finished being created.
And unexpectedly, 'InvokeRequired' would return *false* if the main window handle hadn't been created yet - and hence the background thread would attempt to directly update UI controls with catastrophic consequences. Sometimes this worked, but other times it would cause the app to SIGABRT and crash in X11 somewhere, usually in X11Keyboard:XCreateFontSet

So to workaround this I made the following changes:
1) failing to set working/current directory doesn't show a warning message box popup anymore
2) LogMessage doesn't check 'InvokeRequired' anymore and just always calls BeginInvoke to schedule the message logging on the main/UI thread

So in the most of the rare cases when this issue even happened, it shouldn't occur anymore now. However, the underlying issue still isn't completely solved.. if you change the code to show a message box before the main window, you'll still rarely end up with the main window being a black box with X11
2022-06-06 23:11:24 +10:00
UnknownShadow200
10a91128d7 Make GUI work with mkbundle 2022-05-26 22:48:33 +10:00
UnknownShadow200
8ee32ba780 Get rid of obsolete warning when compiling GUI, partially fix scale 1/2 not working 2021-11-10 20:37:14 +11:00
UnknownShadow200
38d0b14544 Cleanup custom commands GUI by using two buttons for creating C#/VB commands instead of 1 button + 2 radio buttons 2021-04-20 22:58:32 +10:00
UnknownShadow200
2f9a453f9e Remove Viewmode.cfg support (Doesn't even work on Windows, obsolete since over 3.25 years ago) 2021-04-20 20:17:19 +10:00
UnknownShadow200
32f75c4c1a GUI: If you double click url, it opens web browser instead of just selecting all 2021-01-17 18:10:50 +11:00
UnknownShadow200
2f07581133 When failing to start due to missing MCGalaxy_.dll, also include the folder path MCGalaxy thinks it is running from 2020-10-11 22:22:35 +11:00
UnknownShadow200
0391fc4920 Add /server update 2019-05-06 21:01:38 +10:00
UnknownShadow200
3936724572 Fix Database datetime issues 2018-07-10 01:58:05 +10:00
UnknownShadow200
e0d0f6f3bc Make UI popups consistent 2018-05-24 11:57:32 +10:00
UnknownShadow200
8e4156974c Add a separate pure CLI executable, tidy up some UI related code.
Also, MCGalaxy_.dll no longer depends on System.Windows.Forms now
2017-12-02 17:28:44 +11:00
UnknownShadow200
838dbf6568 Allow repeating commands from console 2017-07-27 17:14:34 +10:00
UnknownShadow200
240ada38d9 Organise ServerConfig fields, give its fields more logical names. 2017-06-27 19:49:05 +10:00
UnknownShadow200
613c3a5cd3 Move Server settings to separate ServerConfig class. 2017-06-27 18:28:19 +10:00
UnknownShadow200
288c6e67dd Server class is static 2017-06-24 13:03:30 +10:00
UnknownShadow200
d972ef9dae Fix console no longer showing timestamp for commands, fixes #455. (Thanks goodlyay) 2017-06-16 14:54:36 +10:00
UnknownShadow200
8af7ce291b Add a generic Logger class. This breaks any usage of Server.s.log or Server.LogError by custom commands/plugins. 2017-06-15 12:41:47 +10:00
UnknownShadow200
0dc366c44a Stage 1 of blocks gui rewrite 2017-05-27 13:15:22 +10:00
UnknownShadow200
9ba8e05d32 Make it easier to change software name from MCGalaxy 2017-03-04 12:58:45 +11:00
UnknownShadow200
c268ad1bce Also show number of BlockDB entries in /mi 2017-02-23 21:49:35 +11:00
UnknownShadow200
226fbc260a More fixes for when only have mono-runtime package 2017-02-12 08:44:53 +11:00
UnknownShadow200
de455d17a8 add expfog to /env 2017-02-06 11:50:53 +11:00
UnknownShadow200
9e2b54bc52 get the gui to work on mono now 2017-02-03 16:05:18 +11:00
UnknownShadow200
ba47c7fc07 Make 'new version available' message box actually show, one less usage of timers. 2017-02-02 22:19:36 +11:00
UnknownShadow200
18f71f8c23 allow removing builder/advbuilder/op/superop ranks 2017-01-06 14:18:06 +11:00
UnknownShadow200
831f002d34 DB: now FindChangesAt also does in-memory, start work on FindChangesBy 2017-01-02 09:32:14 +11:00
UnknownShadow200
d97e3078af Style: Split up App.cs, remove two Program.cs, rename Formatter to LineFormatter. 2016-09-17 14:10:57 +10:00
UnknownShadow200
42dcbeff90 Style: Structure everything properly. 2016-09-17 12:24:34 +10:00
UnknownShadow200
8a8855bcfc Get rid of pointless check for first char being a % in HandleChat, fix 'auto mute' appearing before last message that triggered the mute. 2016-09-08 10:44:11 +10:00
UnknownShadow200
8a27ec99bc Fix shutting down the server always raising on error on linux environments without a display. 2016-09-05 19:37:26 +10:00
UnknownShadow200
2f29aeaccd Now default to CLI mode when not running on windows, avoids the unintuitive method of the user having to know to change 'cli=true' in viewmode.cfg. 2016-07-28 16:09:14 +10:00
UnknownShadow200
8631316201 Use DateTime.UtcNow in more places and fix TimeUtils.Shorten for negative timespans. 2016-07-13 09:19:34 +10:00
UnknownShadow200
49533facba Fix getting 'cannot build that far away' message when clicking extremities of reach, and when reach distance is increased. (Thanks grimmjowforever) 2016-07-11 20:15:36 +10:00
UnknownShadow200
86fde29248 Do not create a separate unnecessary thread for initing the server. 2016-07-11 19:24:24 +10:00
UnknownShadow200
e69600fd95 Reduce code duplication for gui and cli input/command handling. 2016-06-07 09:24:45 +10:00
UnknownShadow200
7d9800de1c Fix console missing colour codes on IRC, fix whitespace at end of IRC message not being trimmed. 2016-06-06 12:04:49 +10:00
UnknownShadow200
5dfabb6050 Use single formatting method for writing coloured text to GUI or CLI. 2016-05-27 20:40:19 +10:00
UnknownShadow200
c5af31da4d Fix console not outputting text correctly on IRC, when its name ends with a %S colour code and running in headless mode. 2016-05-23 16:41:28 +10:00
UnknownShadow200
d4373a052d Save console input/commands to log, don't spam CLI mode with system messages. 2016-05-10 14:41:22 +10:00
UnknownShadow200
0bc7b8bdf4 Move GUI code to the starter project in which it logically belongs. 2016-04-15 17:32:18 +10:00
UnknownShadow200
6501c8fade More properties cleanup. 2016-04-12 22:44:03 +10:00
UnknownShadow200
18b6b3ceb6 Fix custom colours not working for rank colours (Thanks goodlyay), also less hardcoding of options. 2016-04-12 13:54:49 +10:00
UnknownShadow200
c97513fa00 Finish chat tab. Allow changing help syntax colour, help description colour, promote/demote messages. 2016-04-09 14:56:53 +10:00
UnknownShadow200
1e16b1a251 And kill off more unused stuff in the gui. 2016-04-08 21:46:03 +10:00