Skip to content

Commit

Permalink
Assembly and Script Loading System for Content Packages Overhauled.
Browse files Browse the repository at this point in the history
- Supports Dependency System.
- Supports Hot Reloading.
  • Loading branch information
TBN-MapleWheels committed Sep 16, 2023
1 parent 6b149e0 commit a7c7d15
Show file tree
Hide file tree
Showing 23 changed files with 2,780 additions and 468 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/harden-ci-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
ref: ${{ inputs.target }}
- name: Ensure all actions are pinned to a specific commit
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@555a30da2656b4a7cf47b107800bef097723363e # v2.1.3
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@f32435541e24cd6a4700a7f52bb2ec59e80603b1 # v2.1.4
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
done
- name: Publish release
uses: notpeelz/action-gh-create-release@a12edfc71daf5daa7922b931c28e2bf88d3b2ced # v5.0.0
uses: notpeelz/action-gh-create-release@c1bebd17c8a128e8db4165a68be4dc4e3f106ff1 # v5.0.1
with:
target: ${{ inputs.target }}
tag: ${{ inputs.tag }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void ReadIds(IReadMessage netMessage)
{
if (netReceives.ContainsKey(name))
{
netReceives[name](netMessage, null);
netReceives[name](queueMessage, null);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public void CheckInitialize()
if (GameMain.Client.IsServerOwner)
{
new GUIMessageBox("", "You have CSharp mods enabled but don't have the Cs For Barotrauma package enabled, those mods might not work.");
Initialize();
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ RegisterBarotrauma("Media.Video")

RegisterBarotrauma("SoundsFile")
RegisterBarotrauma("SoundPrefab")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.SoundPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.BackgroundMusic]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.GUISound]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.DamageSound]]")
RegisterBarotrauma("PrefabSelector`1[[Barotrauma.SoundPrefab]]")
RegisterBarotrauma("PrefabCollection`1")
RegisterBarotrauma("PrefabSelector`1")
RegisterBarotrauma("BackgroundMusic")
RegisterBarotrauma("GUISound")
RegisterBarotrauma("DamageSound")
Expand Down Expand Up @@ -57,7 +54,6 @@ RegisterBarotrauma("Particles.Particle")
RegisterBarotrauma("Particles.ParticleEmitterProperties")
RegisterBarotrauma("Particles.ParticleEmitter")
RegisterBarotrauma("Particles.ParticlePrefab")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.Particles.ParticlePrefab]]")

RegisterBarotrauma("Lights.LightManager")
RegisterBarotrauma("Lights.LightSource")
Expand Down Expand Up @@ -145,4 +141,5 @@ RegisterBarotrauma("Store")
RegisterBarotrauma("UISprite")
RegisterBarotrauma("ParamsEditor")

RegisterBarotrauma("Inventory+SlotReference")
RegisterBarotrauma("Inventory+SlotReference")
RegisterBarotrauma("VisualSlot")
31 changes: 7 additions & 24 deletions Barotrauma/BarotraumaShared/Lua/DefaultRegister/RegisterShared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Register("System.Exception")
Register("System.Console")
Register("System.Exception")

RegisterBarotrauma("Success`2[[Barotrauma.ContentPackage],[System.Exception]]")
RegisterBarotrauma("Failure`2[[Barotrauma.ContentPackage],[System.Exception]]")
RegisterBarotrauma("Success`2")
RegisterBarotrauma("Failure`2")

RegisterBarotrauma("LuaSByte")
RegisterBarotrauma("LuaByte")
Expand All @@ -24,8 +24,7 @@ RegisterBarotrauma("GameMain")
RegisterBarotrauma("Networking.BanList")
RegisterBarotrauma("Networking.BannedPlayer")

RegisterBarotrauma("Range`1[System.Single]")
RegisterBarotrauma("Range`1[System.Int32]")
RegisterBarotrauma("Range`1")

RegisterBarotrauma("RichString")
RegisterBarotrauma("Identifier")
Expand Down Expand Up @@ -399,27 +398,11 @@ end
RegisterBarotrauma("Camera")
RegisterBarotrauma("Key")

RegisterBarotrauma("PrefabCollection`1[[Barotrauma.ItemPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.JobPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.CharacterPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.AfflictionPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.TalentPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.TalentTree]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.OrderPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.LevelGenerationParams]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.OutpostGenerationParams]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.RuinGeneration.RuinGenerationParams]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.LevelGenerationParams]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.LocationType]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.EventPrefab]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.EventSet]]")
RegisterBarotrauma("PrefabCollection`1[[Barotrauma.EventManagerSettings]]")
RegisterBarotrauma("PrefabCollection`1")

RegisterBarotrauma("PrefabSelector`1[[Barotrauma.SkillSettings]]")
RegisterBarotrauma("PrefabSelector`1")

RegisterBarotrauma("Pair`2[[Barotrauma.JobPrefab],[System.Int32]]")

RegisterBarotrauma("Range`1[System.Single]")
RegisterBarotrauma("Pair`2")

RegisterBarotrauma("Items.Components.Signal")
RegisterBarotrauma("SubmarineInfo")
Expand Down Expand Up @@ -461,4 +444,4 @@ LuaUserData.RemoveMember(workshopItem, "AddFavorite")
LuaUserData.RemoveMember(workshopItem, "RemoveFavorite")
LuaUserData.RemoveMember(workshopItem, "Vote")
LuaUserData.RemoveMember(workshopItem, "GetUserVote")
LuaUserData.RemoveMember(workshopItem, "Edit")
LuaUserData.RemoveMember(workshopItem, "Edit")
50 changes: 0 additions & 50 deletions Barotrauma/BarotraumaShared/SharedSource/LuaCs/Cs/CsScriptBase.cs

This file was deleted.

Loading

0 comments on commit a7c7d15

Please sign in to comment.