internal static DirectOwner GetOwner(DirectEve directEve, long ownerId) { var pyOwner = directEve.PySharp.Import("__builtin__").Attribute("cfg").Attribute("eveowners").Call("GetIfExists", ownerId); var owner = new DirectOwner(directEve); owner.OwnerId = (long) pyOwner.Attribute("ownerID"); owner.Name = (string) pyOwner.Attribute("ownerName"); owner.TypeId = (int) pyOwner.Attribute("typeID"); return owner; }
internal static DirectOwner GetOwner(DirectEve directEve, long ownerId) { var pyOwner = directEve.PySharp.Import("__builtin__").Attribute("cfg").Attribute("eveowners").Call("GetIfExists", ownerId); var owner = new DirectOwner(directEve); owner.OwnerId = (long)pyOwner.Attribute("ownerID"); owner.Name = (string)pyOwner.Attribute("ownerName"); owner.TypeId = (int)pyOwner.Attribute("typeID"); return(owner); }
public bool IsStillUsableBy(Pawn pawn) { if (!Available()) { return(false); } if (!DirectOwner.VerbsStillUsableBy(pawn)) { return(false); } if (verbProps.GetDamageFactorFor(this, pawn) == 0f) { return(false); } return(true); }