示例#1
0
        private float GetSelectionWeight(ThingSetMaker_RandomOption.Option option, ThingSetMakerParams parms)
        {
            float?weightIfPlayerHasNoItem = option.weightIfPlayerHasNoItem;

            if (weightIfPlayerHasNoItem != null && !PlayerItemAccessibilityUtility.PlayerOrQuestRewardHas(option.weightIfPlayerHasNoItemItem))
            {
                return(option.weightIfPlayerHasNoItem.Value);
            }
            return(option.weight);
        }
        private float GetSelectionWeight(ThingSetMaker_RandomOption.Option option)
        {
            float?weightIfPlayerHasNoSuchItem = option.weightIfPlayerHasNoSuchItem;
            float result;

            if (weightIfPlayerHasNoSuchItem != null && !PlayerItemAccessibilityUtility.PlayerOrItemStashHas(option.thingSetMaker.fixedParams.filter))
            {
                result = option.weightIfPlayerHasNoSuchItem.Value;
            }
            else
            {
                result = option.weight;
            }
            return(result);
        }
示例#3
0
 internal float <> m__1(ThingSetMaker_RandomOption.Option x)
 {
     return(this.$this.GetSelectionWeight(x, this.parms));
 }
示例#4
0
 internal bool <> m__0(ThingSetMaker_RandomOption.Option x)
 {
     return(x.thingSetMaker.CanGenerate(this.parms));
 }