Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
4cf4b16
Fixed some NREs.
MapleWheels Feb 3, 2026
cf25145
Fix EventService.Call not implemented correctly
evilfactory Feb 4, 2026
80555ef
IT WORKS!!!!!!!!!!!!!!!!!!!!
evilfactory Feb 4, 2026
cae3741
Made most of the networking interfaces public.
MapleWheels Feb 4, 2026
9cc20a0
Fixed networking references errors.
MapleWheels Feb 4, 2026
863ee23
- Some work on config service.
MapleWheels Feb 5, 2026
e752085
- Config Services almost ready.
MapleWheels Feb 6, 2026
771e73a
- Basic Config & Settings working (read-only, changes must be made vi…
MapleWheels Feb 6, 2026
fa340e9
Fixed an issue affecting parsing the required runstate to edit a sett…
MapleWheels Feb 6, 2026
b3d0fbe
Add cfg_setvalue command
evilfactory Feb 6, 2026
dcd7df4
Fixed TrySetValue returning an incorrect result.
MapleWheels Feb 6, 2026
c84d966
Add command cfg_getvalue
evilfactory Feb 6, 2026
2c29969
- Oops.
MapleWheels Feb 6, 2026
d47b75c
Give Lua references to IEvent and finally add an alias for think
evilfactory Feb 7, 2026
87dc9be
-Changed NetworkSync interfaces.
MapleWheels Feb 7, 2026
ba10d9d
Working NetworkingService without net vars
evilfactory Feb 7, 2026
422e8a6
Misc Lua fixes
evilfactory Feb 8, 2026
e76aaf5
Fix deadlock when reloading packages
evilfactory Feb 8, 2026
02b1f52
Re-enable DefaultHook.lua
evilfactory Feb 8, 2026
67c1950
Network Sync work. Added network unique key.
MapleWheels Feb 8, 2026
c637e34
Fix GUI enums in Lua
evilfactory Feb 8, 2026
f01ee61
Clear file cache when resetting LuaScriptManagementService
evilfactory Feb 8, 2026
224e32c
Some work on save/load for configs.
MapleWheels Feb 8, 2026
ce4cd1f
Implement most of the net var networking functionality
evilfactory Feb 8, 2026
705137e
Finalize networking service
evilfactory Feb 8, 2026
36a1267
Register INetworkIdProvider
evilfactory Feb 8, 2026
5b10661
Legacy network stuff
evilfactory Feb 8, 2026
0a91b89
Add publicized assemblies to metadata references
evilfactory Feb 9, 2026
668197a
Fix Lua/Cs execute order
evilfactory Feb 9, 2026
bcc4357
Pass in cs enabled check in ExecuteLoadedScripts
evilfactory Feb 9, 2026
a505d48
- Loading/Saving for Settings via console.
MapleWheels Feb 9, 2026
e8bec96
THE REQUIRE PATHS WORK!@!!!!!!11!
evilfactory Feb 9, 2026
70e9846
nuh uh
evilfactory Feb 9, 2026
511f98e
- Added pre-touch to the ContentPath.FullPath to make them thread-safe.
MapleWheels Feb 9, 2026
9537662
- Added LuaCsForBarotrauma check to enabled packages list.
MapleWheels Feb 9, 2026
dc1093e
Added LuaCs package lookup to the info provider.
MapleWheels Feb 9, 2026
64831bd
- Made the assembly compilation logs output in production builds.
MapleWheels Feb 9, 2026
a61e705
Better LoggerService
evilfactory Feb 9, 2026
f1bae4c
- Added Copy-On-Build for publicized assemblies to the luatrauma loca…
MapleWheels Feb 9, 2026
d14c353
Remove old LuaCsNetworking
evilfactory Feb 10, 2026
fb4648d
Converting everything into Harmony patches part 1
evilfactory Feb 10, 2026
30149b5
- Added publicized assemblies to LuaCsForBarotrauma package via ModCo…
MapleWheels Feb 10, 2026
6b9e48f
- Added ISystem (automatically run services) service type.
MapleWheels Feb 10, 2026
9dde5ca
Fixed Evil's obsession with OnKeyUpdate.
MapleWheels Feb 10, 2026
6bbe5be
Fix networking being completely bamboozled
evilfactory Feb 10, 2026
9e2fc13
- Fixed the server not loading saved convars and not having absolute …
MapleWheels Feb 10, 2026
5e33a90
Removed NIException.
MapleWheels Feb 11, 2026
948b7c4
-- MonoMod.Hook replacement.
MapleWheels Feb 11, 2026
59584fe
- Updated dependencies versions.
MapleWheels Feb 11, 2026
471e256
Revert "-- MonoMod.Hook replacement."
MapleWheels Feb 11, 2026
ad152ee
- pOoosh
MapleWheels Feb 11, 2026
5747d89
- Removed ImpromptuInterfaces
MapleWheels Feb 12, 2026
07d838e
Finished removing Impromptu Interfaces package.
MapleWheels Feb 12, 2026
5f38b4a
Fix bullshit Lua issues
evilfactory Feb 13, 2026
dff38f7
- Added XmlDoc for InternalScript instance.
MapleWheels Feb 13, 2026
36471f2
Move more events to be Harmony patches
evilfactory Feb 13, 2026
a36bd70
Strip down the original logger class
evilfactory Feb 13, 2026
a50dce8
Forgot to remove old Hook Call
evilfactory Feb 13, 2026
13bfffa
More events moved
evilfactory Feb 15, 2026
f70251f
Event pain
evilfactory Feb 15, 2026
6ac49a1
- XML GUI Asset service implemented (alpha, requires testing).
MapleWheels Feb 15, 2026
a0287b8
Oops
MapleWheels Feb 15, 2026
c28a08a
Revert "Oops"
MapleWheels Feb 16, 2026
c8657ca
Update .NET SDK version from 6 to 8 in README
Regalis11 Feb 20, 2026
f52617d
The great event move
evilfactory Feb 20, 2026
124b1e5
Fix missing ILuaCsNetworking API
evilfactory Feb 20, 2026
ddd9dac
Fix Descriptors not being populated correctly
evilfactory Feb 20, 2026
da5b938
Fix missing HookMethod APIs in the interface
evilfactory Feb 20, 2026
a7e9dc8
oops
evilfactory Feb 20, 2026
9199219
Fix return events not working in Lua
evilfactory Feb 20, 2026
f4138d2
- Added networking permission checks to SettingEntry.
MapleWheels Feb 22, 2026
a28333f
Implemented ConfigProfiles internally.
MapleWheels Feb 23, 2026
394856f
- Final commit before migration to /dev
MapleWheels Feb 23, 2026
d9d9801
- Moved all console commands to their respective services and added v…
MapleWheels Feb 24, 2026
94556fd
- SettingsMenuService added.
MapleWheels Feb 25, 2026
6e556a0
I'm cooked, will finish this later.
MapleWheels Feb 27, 2026
ebf2935
- Some menu implementation.
MapleWheels Feb 27, 2026
9b61cda
- SettingsMenu work.
MapleWheels Feb 27, 2026
c676233
[Save/Sync] Work on SettingsMenu
MapleWheels Feb 27, 2026
8e8b8eb
GameMain.LuaCs is no more
evilfactory Feb 28, 2026
de73a18
Compatibility for in memory scripts that used GameMain.LuaCs
evilfactory Feb 28, 2026
3192cc8
Remove need to define custom network header in upstream
evilfactory Feb 28, 2026
e2c4282
Add netMessageReceived hook back
evilfactory Feb 28, 2026
28b3559
Add missing ILuaCsNetworking APIs
evilfactory Feb 28, 2026
09bc2d0
- Weird LuaCs Settings Menu bug present: package is loaded on startup…
MapleWheels Mar 1, 2026
e74f083
LuaCs package bug fixed.
MapleWheels Mar 1, 2026
9b55bf4
[Save/Sync] Work on the settings menu.
MapleWheels Mar 1, 2026
845fcef
Fix Start(0 not returning an empty write only message
evilfactory Mar 1, 2026
22a74bf
Move compat hooks
evilfactory Mar 1, 2026
9ee4728
Better logging
evilfactory Mar 1, 2026
f8ff97d
Fix debug console commands
evilfactory Mar 1, 2026
580f26b
New CI files
evilfactory Mar 1, 2026
800dec3
I guess this doesnt exist anymore
evilfactory Mar 1, 2026
0452c1f
oops
evilfactory Mar 1, 2026
5cbb635
Ok this should be the last one
evilfactory Mar 1, 2026
168ce83
Fixed potential NRE that shouldn't happen so long as the LuaCsForBaro…
MapleWheels Mar 1, 2026
4b04131
Added post-publishing publicized assemblies copy task.
MapleWheels Mar 2, 2026
26b3827
- Made publicizer only copy the required assemblies.
MapleWheels Mar 2, 2026
83c198b
[Save/Sync] Commit work before .NET 10 tests.
MapleWheels Mar 4, 2026
a66b904
Fixed reference name error.
MapleWheels Mar 4, 2026
d0969cc
- Fixed assembly references not resolving for minor dll signature dif…
MapleWheels Mar 4, 2026
ce8b984
Fixed Csharp/Shared path resolution in ModConfigService.
MapleWheels Mar 4, 2026
f38a7bd
The gameplay settings menu kinda works (only for luacsforbarotrauma).
MapleWheels Mar 5, 2026
1fe68aa
- Added float, double settingentry types. Adjusted display formatting.
MapleWheels Mar 5, 2026
368b18d
- Fixed shet.
MapleWheels Mar 5, 2026
947a481
Added spacer to settings labels.
MapleWheels Mar 6, 2026
8470e81
Added tooltips and SettingControl input listener to the settings menu…
MapleWheels Mar 6, 2026
5a45270
Minor adjustment to setting entry height and styles.
MapleWheels Mar 6, 2026
5b52d22
Added references cache for some hot paths services.
MapleWheels Mar 6, 2026
e26cfa2
[Untested][Save/Sync]
MapleWheels Mar 6, 2026
8190b3f
Fixed cs enabled prompt for hosts.
MapleWheels Mar 9, 2026
e5aa381
performance fixes for IDE/attached debugger stuttering.
MapleWheels Mar 10, 2026
dd51bda
Revert "performance fixes for IDE/attached debugger stuttering."
evilfactory Mar 14, 2026
103f284
Register setting types
evilfactory Mar 14, 2026
d4b7746
ModUtils namespace compatibility
evilfactory Mar 14, 2026
ecc4d8a
Update moonsharp
evilfactory Mar 14, 2026
f802356
Add legacy redirect for LuaCsSetup.Timer
evilfactory Mar 14, 2026
cf2c8b8
Add missing HttpGet in the interface
evilfactory Mar 14, 2026
8083245
Added api for getting content package associatged with a plugin type.
MapleWheels Mar 15, 2026
b402e09
Move MainMenu code to a separate service that just injects our stuff …
evilfactory Mar 15, 2026
8717706
Fix check ready to run not working properly
evilfactory Mar 15, 2026
fe34dcb
Added null location check to assembly inclusion list.
MapleWheels Mar 17, 2026
b0e3faa
Make LuaCsLogger public
evilfactory Mar 21, 2026
9946108
Fixed deadlock scenario caused by unsubscribing during an event.
MapleWheels Mar 22, 2026
de53b45
Fix console command registration
evilfactory Mar 22, 2026
23e0ff7
Remove types that have been registered when unloading
evilfactory Mar 22, 2026
44a9ce2
Guh?
evilfactory Mar 22, 2026
e62450c
Actually subscribe to IEventAssemblyUnloading
evilfactory Mar 22, 2026
ac329a7
- Reduced console spam when failing to load config file in release bu…
MapleWheels Mar 22, 2026
cf3a50d
- Added back modifyChatMessage.
MapleWheels Mar 22, 2026
7c8dd45
SettingsList implementation.
MapleWheels Mar 22, 2026
cf6104f
Added Dropdown menu implementation for settings list.
MapleWheels Mar 23, 2026
5c136aa
Added test debug settings for settings list.
MapleWheels Mar 23, 2026
26ac37e
Added fallback native assembly resolver.
MapleWheels Mar 22, 2026
3dd9cfa
Implemented plugin assembly lookup api.
MapleWheels Mar 21, 2026
1e76377
- Added full implementation of lua event "modifyChatMessage" in IEvents.
MapleWheels Mar 23, 2026
28acf02
Updated client-side/common files tracking list for luacsinstaller.
MapleWheels Mar 23, 2026
b70b6bf
Fixed deadlock scenario in the event dispatcher CRUD API.
MapleWheels Mar 24, 2026
c1fdedf
Fixed ConfigService not filtering out configs that it shouldn't be lo…
MapleWheels Mar 24, 2026
57daa3c
Fix missing type register
evilfactory Mar 28, 2026
bb2490e
Fix wrong arguments in RemovePatch
evilfactory Mar 28, 2026
2ea97d3
Add CallLuaFunction legacy redirect
evilfactory Mar 28, 2026
5bfa155
Move partial classes to extension methods, the ones that can't, turn …
evilfactory Mar 28, 2026
6481877
Whoops
evilfactory Mar 28, 2026
b8f1642
Simplify command register
evilfactory Mar 28, 2026
b358882
This should be ItemPrefab, not Item, also add it the source code compat
evilfactory Mar 28, 2026
958335a
Replicate old Add() method signature structure
evilfactory Mar 28, 2026
14c610e
Re-added the install_cl_lua command
evilfactory Mar 29, 2026
bcec409
Fix deep-fried main menu text
evilfactory Mar 29, 2026
f1808d9
Added verbose cs compilation.
MapleWheels Mar 29, 2026
4f2da55
- Added legacy LuaCsPerformanceCounter.cs
MapleWheels Mar 31, 2026
413cc3e
- Added setting to disable lua scripts caching in the storage service…
MapleWheels Apr 3, 2026
4167448
Fix Game.Settings being nil
evilfactory Apr 4, 2026
f05d4ef
Fic CSharp enabling message printing before config got loaded
evilfactory Apr 4, 2026
121f670
Fix character.death hook getting called a billion times per second
evilfactory Apr 4, 2026
5e003bc
Fix missing Game.Commands
evilfactory Apr 5, 2026
9b05c51
Fix calling Hook.Call directly from Lua being broken
evilfactory Apr 5, 2026
0e14983
Allow System.Console
evilfactory Apr 5, 2026
7055480
- Fixed publicized Barotrauma.dll missing error on DedicatedServer.
MapleWheels Apr 5, 2026
df0a4e6
Added logging for additional plugin loading exceptions.
MapleWheels Apr 7, 2026
232f720
Fixed shared Csharp src files not being included if there weren't als…
MapleWheels Apr 7, 2026
4c8e016
- Added extra source code translation (for CTS).
MapleWheels Apr 8, 2026
1294ba6
- Added API to get package by name to PackageManagementService.cs and…
MapleWheels Apr 8, 2026
d440ccb
Register IConfigService and add back some missing APIs
evilfactory Apr 8, 2026
ebe8ec4
LuaCs CSharp Enabled Rework
MapleWheels Apr 7, 2026
bdd4dcf
Disabled caching on the ConfigService.
MapleWheels Apr 8, 2026
6c32873
Only register ILuaConfigService
evilfactory Apr 8, 2026
c882b0b
Update moonsharp
evilfactory Apr 8, 2026
eeeb3d9
Expose all settings in Lua
evilfactory Apr 8, 2026
e9673bf
Update moonsharp
evilfactory Apr 8, 2026
b0b4acf
- Made readonly readonly.
MapleWheels Apr 8, 2026
2e65650
- Added null check to get string value.
MapleWheels Apr 8, 2026
e161d92
Fix settings not being properly exposed to Lua
evilfactory Apr 8, 2026
b9b4572
Test Lua config mod
evilfactory Apr 8, 2026
3a5fbfd
Fix cs enabled for session state not being preserved between reloads
evilfactory Apr 8, 2026
89aa818
Made Config initialization errors more forgiving to noobs.
MapleWheels Apr 8, 2026
53be3f0
Fixed lua attempting to invoke the base interface type.
MapleWheels Apr 8, 2026
84cb7cf
server auth var.
MapleWheels Apr 9, 2026
ef66d27
- Fixed network synchro of vars, needs synctype testing.
MapleWheels Apr 9, 2026
a4607df
v1.12.6.2 (Spring Update 2026)
Regalis11 Apr 9, 2026
790378d
Merge remote-tracking branch 'upstream/master' into develop
evilfactory Apr 9, 2026
2cfa1e6
Update bug-reports.yml
Regalis11 Apr 9, 2026
87e0191
- Debug tests.
MapleWheels Apr 9, 2026
a963498
Fix signalReceived hook not being called
evilfactory Apr 9, 2026
928cfb4
Re-add loaded Lua hook call
evilfactory Apr 9, 2026
a85d489
Fix modifyChatMessage hook
evilfactory Apr 9, 2026
b68ffa2
Add LuaCsSetup.Lua back for compatibility
evilfactory Apr 9, 2026
e3b2b34
Fix Game.AssignOnExecute having command arguments be passed as vararg…
evilfactory Apr 10, 2026
a86b814
Actually use the PackageId const everywhere we need to refer to our c…
evilfactory Apr 10, 2026
f6ea4df
Load languages files even if the package is disabled
evilfactory Apr 10, 2026
fd324ac
Fix Hook.Remove not being implemented properly
evilfactory Apr 10, 2026
c3a9551
- Changed event aliases to be case insensitive.
MapleWheels Apr 10, 2026
9250e27
- Fixed assembly logging style.
MapleWheels Apr 10, 2026
1adf761
Fix garbage network data being read by the game when reading LuaCs ne…
evilfactory Apr 10, 2026
5505f20
PackageId -> PackageName
evilfactory Apr 10, 2026
ccd0b9f
Added caching toggle to PluginManagementService
MapleWheels Apr 10, 2026
df8bfb1
Fix LuaCs initializing too late for singleplayer campaigns and rework…
evilfactory Apr 11, 2026
f97c001
Oops, fix NRE crash
evilfactory Apr 11, 2026
3cc7467
Fix hide username in logs config not doing anything
evilfactory Apr 11, 2026
ac6147e
Fix Cs prompt showing up more than one between rounds
evilfactory Apr 11, 2026
775ae0e
Fix server host being prompted twice with the C# popup
evilfactory Apr 11, 2026
1703b5a
Ignore our workshop packages from the game's dependency thing since i…
evilfactory Apr 11, 2026
f3535e2
Load console commands after executing and possible fix for the not co…
evilfactory Apr 12, 2026
3605571
Added fallback friendly name resolution for ModConfig assembly contents.
MapleWheels Apr 12, 2026
eeef7af
Register Voronoi2 stuff
evilfactory Apr 12, 2026
1b8bcf4
Added configinfo null check to SettingBase.cs
MapleWheels Apr 12, 2026
c5976cc
Add safety check so this stops crashing when we look at it the wrong way
evilfactory Apr 12, 2026
c6ccc68
Fixed "Folder" attribute files not being found.
MapleWheels Apr 12, 2026
666b96f
Keep the LuaCsConfig class laying around for compatibility, not sure …
evilfactory Apr 12, 2026
a40e54f
Added fallback compilation for UseInternalsAwareAssembly if the publi…
MapleWheels Apr 13, 2026
addd3f7
Added legacy overload of AddCommand for mod compat.
MapleWheels Apr 13, 2026
344027d
Added LoggerService to Lua env. Made ILoggerService compliant with Lu…
MapleWheels Apr 13, 2026
a2c67f7
Changed csharp script compilation algorithm to be best effort.
MapleWheels Apr 13, 2026
38f0055
Added "RunUnrestricted" mode for lua scripts that need to run outside…
MapleWheels Apr 13, 2026
17003e4
- Fixed networking sync vars failing to sync initially.
MapleWheels Apr 14, 2026
8896377
Add alias for human.CPRSuccess and human.CPRFailed
evilfactory Apr 15, 2026
8f33e0a
- Fixed up the settings menu.
MapleWheels Apr 17, 2026
12e05cb
Fix LuaCs net messages received during connection initialization to b…
evilfactory Apr 18, 2026
f5f7eb7
Allow reloadlua to force the state to running
evilfactory Apr 18, 2026
bb21a09
New icon for settings and make the top left text more user friendly
evilfactory Apr 18, 2026
ab77e9d
Fix client.packages hook sending normal packages
evilfactory Apr 18, 2026
f612112
Fixed OnUpdate() not passing in deltaTime instead of totalTime.
MapleWheels Apr 19, 2026
3c0621c
Missing diffs from bb21a09244
evilfactory Apr 19, 2026
f61f852
Added networking tests for configs.
MapleWheels Apr 19, 2026
8a08152
Added missing diffs for f61f852a256a03111072041ba892b062d25e33bc.
MapleWheels Apr 19, 2026
7daefe6
Some tweaks to the text
evilfactory Apr 19, 2026
0a3ca24
Remove missing Value error, it should just use the default value if i…
evilfactory Apr 19, 2026
1e1fb64
Fix UseInternalAccessName
evilfactory Apr 20, 2026
96906ef
Always purge cashes for plugin content on unloading.
MapleWheels Apr 20, 2026
3dc4548
Fix texture not multiple of 4
evilfactory Apr 20, 2026
7446dc1
v1.12.7.0 (Spring Update 2026 Hotfix 1)
Regalis11 Apr 21, 2026
8d90ccb
Merge remote-tracking branch 'upstream/master' into develop
evilfactory Apr 21, 2026
93bdd03
Fix missing SettingControl in global Lua table
evilfactory Apr 21, 2026
798954d
Fix main menu text alignment
evilfactory Apr 22, 2026
3f199a9
Remove hard coded string LuaCsForBarotrauma everywhere possible
evilfactory Apr 24, 2026
66717c7
Several changes to improve unloadability of assemblies.
MapleWheels Apr 29, 2026
ada9a09
Added experimental fix for inlining issue in assembly init.
MapleWheels May 11, 2026
81f57ea
Add unstable version option to bug report template
Regalis11 May 13, 2026
cfde6f3
- Fixed assembly unloading. However, requires 'plugin_forcerungc' to …
MapleWheels May 15, 2026
d80ac4a
Added background gc collection task upon unloading assemblies.
MapleWheels May 17, 2026
1f5ee45
Increased number of GC iterations by one.
MapleWheels May 18, 2026
eb22fbd
Make the no packages currently executing warning debug-only
evilfactory May 23, 2026
d420e1e
Added experimental fix for inlining issue in assembly init.
MapleWheels May 11, 2026
c452493
New GC algorithm (untested).
MapleWheels May 31, 2026
a729269
added gcthread cleanup on failure.
MapleWheels May 31, 2026
1cd0178
v1.13.3.1 (Summer Update 2026)
Regalis11 Jun 16, 2026
0661653
Updated bug report template
Regalis11 Jun 16, 2026
c1073ff
Merge remote-tracking branch 'upstream/master' into develop
evilfactory Jun 16, 2026
9794fe5
Merge branch 'develop'
evilfactory Jun 16, 2026
61f05d2
Sync with upstream
NotAlwaysTrue Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/DISCUSSION_TEMPLATE/bug-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ body:
label: Version
description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu.
options:
- v1.12.6.2 (Spring Update 2026)
- v1.13.3.1 (Summer Update 2026)
- Other
validations:
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,20 @@ partial void InitProjSpecific(ContentXElement element, Character character)
//RelativeSpacing = 0.05f
};

InventorySlotContainer = new GUICustomComponent(new RectTransform(new Vector2(0.1f, 1.0f), characterIndicatorArea.RectTransform, Anchor.TopLeft, Pivot.TopRight),
GUIFrame left = new(new RectTransform(new Vector2(0.25f, 1f), characterIndicatorArea.RectTransform), style: null);

InventorySlotContainer = new GUICustomComponent(new RectTransform(Vector2.One, left.RectTransform),
(spriteBatch, component) =>
{
for (int i = 0; i < character.Inventory.Capacity; i++)
{
if (character.Inventory.SlotTypes[i] != InvSlotType.HealthInterface) { continue; }
if (character.Inventory.HideSlot(i)) { continue; }

int width = Character.Inventory.visualSlots[i].Rect.Width;
left.RectTransform.MinSize = new Point(width, left.RectTransform.MinSize.Y);
if (afflictionIconList != null) { afflictionIconList.RectTransform.MinSize = new Point(width, afflictionIconList.RectTransform.MinSize.Y); }

//don't draw the item if it's being dragged out of the slot
bool drawItem = !Inventory.DraggingItems.Any() || !Character.Inventory.GetItemsAt(i).All(it => Inventory.DraggingItems.Contains(it)) || character.Inventory.visualSlots[i].MouseOn();

Expand All @@ -292,8 +298,7 @@ partial void InitProjSpecific(ContentXElement element, Character character)
}
});


cprButton = new GUIButton(new RectTransform(new Vector2(0.17f, 0.17f), characterIndicatorArea.RectTransform, Anchor.BottomLeft, scaleBasis: ScaleBasis.Smallest), text: "", style: "CPRButton")
cprButton = new GUIButton(new RectTransform(new Vector2(0.75f), left.RectTransform, Anchor.BottomLeft, scaleBasis: ScaleBasis.Smallest), text: "", style: "CPRButton")
{
UserData = UIHighlightAction.ElementId.CPRButton,
OnClicked = (button, userData) =>
Expand All @@ -316,12 +321,11 @@ partial void InitProjSpecific(ContentXElement element, Character character)

return true;
},
ToolTip = TextManager.Get("doctor.cprobjective"),
IgnoreLayoutGroups = true,
ToolTip = TextManager.Get("tutorial.roles.medic.objective.cpr"),
Visible = false
};

var limbSelection = new GUICustomComponent(new RectTransform(new Vector2(0.4f, 1.0f), characterIndicatorArea.RectTransform),
var limbSelection = new GUICustomComponent(new RectTransform(new Vector2(0.5f, 1.0f), characterIndicatorArea.RectTransform),
(spriteBatch, component) =>
{
DrawHealthWindow(spriteBatch, component.RectTransform.Rect, true);
Expand Down Expand Up @@ -368,8 +372,6 @@ partial void InitProjSpecific(ContentXElement element, Character character)
CanBeFocused = false
};

characterIndicatorArea.Recalculate();

healthBarHolder = new GUIFrame(new RectTransform(Point.Zero, GUI.Canvas), style: null)
{
HoverCursor = CursorState.Hand
Expand Down
33 changes: 28 additions & 5 deletions Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,20 @@ async Task gameOwnershipTokenTest()
GameSettings.SaveCurrentConfig();
});
}, isCheat: false));


commands.Add(new Command("togglespoofeventmanagerid", "togglespoofeventmanagerid: Forces the client to report the last received event ID as always being 1, making the server believe the client is always behind.", (string[] args) =>
{
if (GameMain.Client != null)
{
GameMain.Client.SpoofEntityManagerReceivedId = !GameMain.Client.SpoofEntityManagerReceivedId;
DebugConsole.NewMessage(GameMain.Client.SpoofEntityManagerReceivedId ? "Spoofing enabled ": "Spoofing disabled", Color.Green);
}
else
{
DebugConsole.NewMessage("Not connected to server", Color.Red);
}
}));

commands.Add(new Command("togglegrid", "Toggle visual snap grid in sub editor.", (string[] args) =>
{
SubEditorScreen.ShouldDrawGrid = !SubEditorScreen.ShouldDrawGrid;
Expand Down Expand Up @@ -4454,17 +4467,24 @@ private static void GetAdjustedPrice(ItemPrefab itemPrefab, ref int componentCos

public static void StartLocalMPSession(int numClients = 2)
{
string extraArguments = "-multiclienttestmode";
if (NetConfig.UseLenientHandshake)
{
extraArguments += " -lenienthandshake";
}

try
{
if (Process.GetProcessesByName("DedicatedServer").Length == 0)
{
#if WINDOWS
Process.Start("DedicatedServer.exe", arguments: "-multiclienttestmode");
Process.Start("DedicatedServer.exe", arguments: extraArguments);
#else
Process.Start("./DedicatedServer", arguments: "-multiclienttestmode");
Process.Start("./DedicatedServer", arguments: extraArguments);
#endif
System.Threading.Thread.Sleep(1000);
}

#if DEBUG
GameClient.MultiClientTestMode = true;
#endif
Expand All @@ -4478,10 +4498,13 @@ public static void StartLocalMPSession(int numClients = 2)
for (int i = 2; i <= numClients; i++)
{
System.Threading.Thread.Sleep(1000);

string clientArguments = $"-connect server localhost -username client{i} -skipintro";

#if WINDOWS
Process.Start("Barotrauma.exe", arguments: "-connect server localhost -username client" + i + " -multiclienttestmode");
Process.Start("Barotrauma.exe", arguments: $"{clientArguments} {extraArguments}");
#else
Process.Start("./Barotrauma", arguments: "-connect server localhost -username client" + i + " -multiclienttestmode");
Process.Start("./Barotrauma", arguments: $"{clientArguments} {extraArguments}");
#endif
}
}
Expand Down
11 changes: 6 additions & 5 deletions Barotrauma/BarotraumaClient/ClientSource/GUI/GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;

namespace Barotrauma
{
Expand Down Expand Up @@ -649,12 +650,12 @@ public static void Draw(Camera cam, SpriteBatch spriteBatch)
DrawMessages(spriteBatch, cam);

if (MouseOn != null)
{
{
MouseOn.OnDrawToolTip?.Invoke(MouseOn);
if (!MouseOn.ToolTip.IsNullOrWhiteSpace())
{
MouseOn.DrawToolTip(spriteBatch);
}
MouseOn.OnDrawToolTip?.Invoke(MouseOn);
}

if (SubEditorScreen.IsSubEditor())
Expand Down Expand Up @@ -2323,10 +2324,10 @@ public static GUIMessageBox PromptTextInput(LocalizedString header, string body,
/// <summary>
/// Creates a 7-segment display.
/// </summary>
/// <param name="leftLabel">Returns <see langword="null"/> if <paramref name="leftLabelText"/> is <see langword="null"/> or empty.</param>
/// <param name="leftLabel">Returns <see langword="null"/> if <paramref name="leftLabelText"/> is <see langword="null"/>.</param>
/// <param name="rightLabelText">Defaults to <c>TextManager.Get("kilowatt")</c>.</param>
/// <param name="leftLabelFont">Defaults to <see cref="GUIStyle.LargeFont"/>.</param>
public static GUITextBlock CreateDigitalDisplay(RectTransform rect, out GUITextBlock? leftLabel, out GUITextBlock rightLabel, LocalizedString? leftLabelText = null, LocalizedString? rightLabelText = null, LocalizedString? tooltip = null, GUIFont? leftLabelFont = null)
public static GUITextBlock CreateDigitalDisplay(RectTransform rect, [NotNullIfNotNull(nameof(leftLabelText))] out GUITextBlock? leftLabel, out GUITextBlock rightLabel, LocalizedString? leftLabelText = null, LocalizedString? rightLabelText = null, LocalizedString? tooltip = null, GUIFont? leftLabelFont = null)
{
GUILayoutGroup textArea = new(rect, isHorizontal: true, childAnchor: Anchor.CenterLeft)
{
Expand All @@ -2337,7 +2338,7 @@ public static GUITextBlock CreateDigitalDisplay(RectTransform rect, out GUITextB
};

leftLabel = null;
if (!leftLabelText.IsNullOrEmpty())
if (leftLabelText != null)
{
leftLabel = new GUITextBlock(new RectTransform(new Vector2(0.4f, 1f), textArea.RectTransform), leftLabelText, textColor: GUIStyle.TextColorBright, font: leftLabelFont ?? GUIStyle.LargeFont, textAlignment: Alignment.CenterRight);
}
Expand Down
8 changes: 4 additions & 4 deletions Barotrauma/BarotraumaClient/ClientSource/GUI/GUITextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,14 @@ public void Select(int forcedCaretIndex = -1, bool ignoreSelectSound = false)
CaretIndex = forcedCaretIndex == - 1 ? textBlock.GetCaretIndexFromScreenPos(PlayerInput.MousePosition) : forcedCaretIndex;
CalculateCaretPos();
ClearSelection();
bool wasSelected = selected;
selected = true;
GUI.KeyboardDispatcher.Subscriber = this;
OnSelected?.Invoke(this, Keys.None);
if (!wasSelected && PlaySoundOnSelect && !ignoreSelectSound)
if (!selected && PlaySoundOnSelect && !ignoreSelectSound)
{
SoundPlayer.PlayUISound(GUISoundType.Select);
}
selected = true;
//set this after we've set selected to true -> otherwise the textbox taking keyboard focus will trigger Select again
GUI.KeyboardDispatcher.Subscriber = this;
}

public void Deselect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics, float deltaTi

spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, samplerState: GUI.SamplerState);

GUI.DrawBackgroundSprite(spriteBatch, currentBackgroundTexture, Color.White, drawArea);
if (currentBackgroundTexture.Texture != null)
{
GUI.DrawBackgroundSprite(spriteBatch, currentBackgroundTexture, Color.White, drawArea);
}
overlay.Draw(spriteBatch, Vector2.Zero, scale: overlayScale);

double noiseT = Timing.TotalTime * 0.02f;
Expand Down
6 changes: 6 additions & 0 deletions Barotrauma/BarotraumaClient/ClientSource/GameMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ public GameMain(string[] args)
GameClient.MultiClientTestMode = true;
}
#endif

if (ConsoleArguments.Contains("-lenienthandshake"))
{
NetConfig.UseLenientHandshake = true;
}

GUI.KeyboardDispatcher = new EventInput.KeyboardDispatcher(Window);

PerformanceCounter = new PerformanceCounter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ public override void CreateSlots()
(int)SlotPositions[i].X,
(int)SlotPositions[i].Y,
(int)(slotSprite.size.X * multiplier), (int)(slotSprite.size.Y * multiplier));

if (SlotTypes[i] == InvSlotType.HealthInterface &&
character.CharacterHealth?.InventorySlotContainer != null)
{
slotRect.Width = slotRect.Height = (int)(character.CharacterHealth.InventorySlotContainer.Rect.Width * 1.2f);
}

ItemContainer itemContainer = slots[i].FirstOrDefault()?.GetComponent<ItemContainer>();
if (itemContainer != null)
Expand Down Expand Up @@ -622,6 +616,7 @@ public override void Update(float deltaTime, Camera cam, bool isSubInventory = f

for (int i = 0; i < capacity; i++)
{
if (HideSlot(i)) { continue; }
var item = slots[i].FirstOrDefault();
if (item != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void UpdateMsg()
}
else
{
DisplayMsg = TextManager.ParseInputTypes(TextManager.Get(Msg));
DisplayMsg = TextManager.ParseInputTypes(TextManager.Get(Msg)).Fallback(Msg);
}

CharacterHUD.RecreateHudTextsIfControlling(Character.Controlled);
Expand Down
Loading
Loading