initial cs-lua merge work

This commit is contained in:
Oiltanker
2022-04-11 22:44:53 +03:00
parent ae2b84cceb
commit 1e6ac68e86
44 changed files with 786 additions and 1046 deletions
@@ -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();
}