initial cs-lua merge work
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ namespace Barotrauma
|
||||
|
||||
public void AddObjective<T>(T objective) where T : AIObjective
|
||||
{
|
||||
var result = new LuaResult(GameMain.Lua.hook.Call("AI.AddObjective", this, objective));
|
||||
var result = new LuaResult(GameMain.LuaCs.hook.Call("AI.AddObjective", this, objective));
|
||||
|
||||
if (result.Bool()) return;
|
||||
|
||||
|
||||
+3
-3
@@ -1440,11 +1440,11 @@ namespace Barotrauma
|
||||
// -> the character should be revived if there are no major afflictions in addition to lack of oxygen
|
||||
target.Oxygen = Math.Max(target.Oxygen + 10.0f, 10.0f);
|
||||
|
||||
GameMain.Lua.hook.Call("human.CPRSuccess", this);
|
||||
}
|
||||
GameMain.LuaCs.hook.Call("human.CPRSuccess", this);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameMain.Lua.hook.Call("human.CPRFailed", this);
|
||||
GameMain.LuaCs.hook.Call("human.CPRFailed", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -745,9 +745,9 @@ namespace Barotrauma
|
||||
|
||||
float impactDamage = Math.Min((impact - ImpactTolerance) * ImpactDamageMultiplayer, character.MaxVitality * MaxImpactDamage);
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("changeFallDamage", new object[] { impactDamage, character, impactPos, velocity }));
|
||||
var should = new LuaResult(GameMain.LuaCs.hook.Call("changeFallDamage", new object[] { impactDamage, character, impactPos, velocity }));
|
||||
|
||||
if (!should.IsNull())
|
||||
if (!should.IsNull())
|
||||
{
|
||||
impactDamage = should.Float();
|
||||
}
|
||||
|
||||
@@ -1043,7 +1043,7 @@ namespace Barotrauma
|
||||
}
|
||||
#endif
|
||||
|
||||
GameMain.Lua.hook.Call("characterCreated", new object[] { newCharacter });
|
||||
GameMain.LuaCs.hook.Call("characterCreated", new object[] { newCharacter });
|
||||
|
||||
return newCharacter;
|
||||
}
|
||||
@@ -2723,13 +2723,13 @@ namespace Barotrauma
|
||||
{
|
||||
for (int i = 0; i < CharacterList.Count; i++)
|
||||
{
|
||||
if (GameMain.Lua.game.updatePriorityCharacters.Contains(CharacterList[i])) continue;
|
||||
if (GameMain.LuaCs.game.updatePriorityCharacters.Contains(CharacterList[i])) continue;
|
||||
|
||||
CharacterList[i].Update(deltaTime * CharacterUpdateInterval, cam);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Character character in GameMain.Lua.game.updatePriorityCharacters)
|
||||
foreach (Character character in GameMain.LuaCs.game.updatePriorityCharacters)
|
||||
{
|
||||
if (character.Removed) continue;
|
||||
|
||||
|
||||
+1
-1
@@ -388,7 +388,7 @@ namespace Barotrauma
|
||||
AdditionStrength -= amount;
|
||||
}
|
||||
#if SERVER
|
||||
GameMain.Lua.hook.Call("afflictionUpdate", new object[] { this, characterHealth, targetLimb, deltaTime });
|
||||
GameMain.LuaCs.hook.Call("afflictionUpdate", new object[] { this, characterHealth, targetLimb, deltaTime });
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -302,13 +302,13 @@ namespace Barotrauma
|
||||
|
||||
if (Prefab is AfflictionPrefabHusk huskPrefab)
|
||||
{
|
||||
if (huskPrefab.ControlHusk || GameMain.Lua.game.enableControlHusk)
|
||||
if (huskPrefab.ControlHusk || GameMain.LuaCs.game.enableControlHusk)
|
||||
{
|
||||
#if SERVER
|
||||
if (client != null)
|
||||
{
|
||||
GameMain.Server.SetClientCharacter(client, husk);
|
||||
GameMain.Lua.hook.Call("husk.clientControlHusk", new object[] { client, husk });
|
||||
GameMain.LuaCs.hook.Call("husk.clientControlHusk", new object[] { client, husk });
|
||||
}
|
||||
#else
|
||||
if (!character.IsRemotelyControlled && character == Character.Controlled)
|
||||
|
||||
@@ -541,7 +541,7 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("character.applyDamage", new object[] { this, attackResult, hitLimb, allowStacking }));
|
||||
var should = new LuaResult(GameMain.LuaCs.hook.Call("character.applyDamage", new object[] { this, attackResult, hitLimb, allowStacking }));
|
||||
|
||||
if (should.Bool())
|
||||
return;
|
||||
@@ -674,7 +674,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("character.applyAffliction", new object[] { this, limbHealth, newAffliction, allowStacking }));
|
||||
var should = new LuaResult(GameMain.LuaCs.hook.Call("character.applyAffliction", new object[] { this, limbHealth, newAffliction, allowStacking }));
|
||||
|
||||
if (should.Bool())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user