internal static void Postfix(ref bool __result) { if (__result) { return; } __result = ModUtils.GetModComponent(GameManager.GetPlayerManagerComponent().m_ItemInHands) != null; }
private static void MapModComponent(GameObject prefab) { ModComponent modComponent = ModUtils.GetModComponent(prefab); if (modComponent == null) { return; } Mapper.Map(prefab); }
public static bool Prefix(ref bool __result) { PlayerManager playerManager = GameManager.GetPlayerManagerComponent(); if (ModUtils.GetModComponent(playerManager.m_ItemInHands) == null) { return(true); } __result = false; return(false); }
public static void Postfix(GearItem gi, ref string __result) { if (__result != string.Empty) { return; } ModComponent modComponent = ModUtils.GetModComponent(gi); if (modComponent != null) { __result = modComponent.InventoryActionLocalizationId; } }
public static MappedItem Map(GameObject prefab) { if (prefab == null) { throw new ArgumentException("The prefab was NULL."); } ModComponent modComponent = ModUtils.GetModComponent(prefab); if (modComponent == null) { throw new ArgumentException("Prefab " + prefab.name + " does not contain a ModComponent."); } if (prefab.GetComponent <GearItem>() == null) { Implementation.Log("Mapping {0}", prefab.name); InspectMapper.Configure(modComponent); HarvestableMapper.Configure(modComponent); RepairableMapper.Configure(modComponent); FireStarterMapper.Configure(modComponent); ConfigureAccelerant(modComponent); ConfigureStackable(modComponent); ConfigureBurnable(modComponent); ScentMapper.Configure(modComponent); SharpenableMapper.Configure(modComponent); EvolveMapper.Configure(modComponent); ConfigureEquippable(modComponent); ConfigureLiquidItem(modComponent); ConfigureFood(modComponent); CookableMapper.Configure(modComponent); ConfigureCookingPot(modComponent); ConfigureRifle(modComponent); ClothingMapper.ConfigureClothing(modComponent); FirstAidMapper.Configure(modComponent); ToolMapper.Configure(modComponent); BedMapper.Configure(modComponent); ConfigureGearItem(modComponent); mappedItems.Add(modComponent); PostProcess(modComponent); } return(new MappedItem(prefab)); }