Jump to content

Recommended Posts

There should be a specific setting in the Data\Scripts\Prefabs\Webber.lua (or whatever the specific .lua prefab is for Webber) that specifically makes that alteration. If it's not, try Data\Scripts\tuning.lua as it may be a variation of Wilson.

 

>If a modification can be done by modifying Wilson's stats/rates, it tends to be done through TUNING.LUA.

 

>If the modification becomes clumsy or absolutely requires extra code, it'll me made into a specific file with the extra stuff. Webber most likely comes under this.

 

I'd check for you but, alas, I'm at work. If no one else answers your question in absolution, I will when I get home in a few hours.

 

Best of luck!

From the webber prefab:

 

    inst.components.eater.monsterimmune = true
 

Relevant code from the Eater component:

function Eater:DoFoodEffects(food)    if food:HasTag("monstermeat") then        if self.inst:HasTag("player") then            return not self.monsterimmune        else            return not self.strongstomach        end    else        return true    endendfunction Eater:Eat( food )    if self:CanEat(food) then		        if self.inst.components.health then			if (food.components.edible.healthvalue < 0 and self:DoFoodEffects(food) or food.components.edible.healthvalue > 0) and self.inst.components.health then				self.inst.components.health:DoDelta(food.components.edible:GetHealth(self.inst), nil, food.prefab)			end        end        if self.inst.components.hunger then            self.inst.components.hunger:DoDelta(food.components.edible:GetHunger(self.inst))        end                if (food.components.edible.sanityvalue < 0 and self:DoFoodEffects(food) or food.components.edible.sanityvalue > 0) and self.inst.components.sanity then			self.inst.components.sanity:DoDelta(food.components.edible:GetSanity(self.inst))        end                self.inst:PushEvent("oneat", {food = food})        if self.oneatfn then            self.oneatfn(self.inst, food)        end                if food.components.edible then            food.components.edible:OnEaten(self.inst)        end                if food.components.stackable and food.components.stackable.stacksize > 1 and not self.eatwholestack then            food.components.stackable:Get():Remove()        else            food:Remove()        end                self.lasteattime = GetTime()                self.inst:PushEvent("oneatsomething", {food = food})                return true    endend
Edited by Stroomschok

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...