mirror of
https://github.com/Wincent01/InfectedRose.git
synced 2026-01-01 09:49:35 -06:00
23 lines
568 B
C#
23 lines
568 B
C#
namespace InfectedRose.Interface.Templates;
|
|
|
|
[ModType("environmental")]
|
|
public class EnvironmentalMod : ModType
|
|
{
|
|
public override void Apply(Mod mod)
|
|
{
|
|
if (mod.Action != "add")
|
|
{
|
|
return;
|
|
}
|
|
|
|
mod.Default("static", 1);
|
|
mod.Default("shader_id", 1);
|
|
|
|
var obj = ObjectMod.CreateObject(mod);
|
|
|
|
obj["type"].Value = "Environmental";
|
|
|
|
ObjectMod.AddComponent(mod, obj, ComponentId.RenderComponent);
|
|
ObjectMod.AddComponent(mod, obj, ComponentId.SimplePhysicsComponent);
|
|
}
|
|
} |