forcecore / yupgi_alert0

엽기얼럿 제로
Other
10 stars 3 forks source link

TODO: make a PR for Lua #82

Closed forcecore closed 7 years ago

forcecore commented 7 years ago

}

    BuildableInfo GetBuildableInfo(string actorType)
    {
        if (!Player.World.Map.Rules.Actors.ContainsKey(actorType))
            throw new LuaException("Actor of type {0} is invalid".F(actorType));

        var ri = Player.World.Map.Rules.Actors[actorType];
        var bi = ri.TraitInfoOrDefault<BuildableInfo>();

        if (bi == null)
            throw new LuaException("Actor of type {0} cannot be produced".F(actorType));
        else
            return bi;
    }
}

}