Advertisement
grymlahv

Untitled

Jul 6th, 2020
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. local function onbecamehuman(inst)
  2. if inst.prefab == nil then
  3. --when entity is being spawned
  4. CustomSetDebuffSymbolForSkinMode(inst, "normal_skin")
  5. --CustomSetShadowForSkinMode(inst, "normal_skin") --should be same as default already
  6. elseif not inst.sg:HasStateTag("ghostbuild") then
  7. CustomSetSkinMode(inst, "normal_skin")
  8. end
  9.  
  10. inst.MiniMapEntity:SetIcon("woodie.png")
  11.  
  12. inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED
  13. inst.components.combat:SetDefaultDamage(TUNING.UNARMED_DAMAGE)
  14. inst.components.combat.bonusdamagefn = nil
  15. inst.components.health:SetAbsorptionAmount(0)
  16. inst.components.sanity.custom_rate_fn = nil
  17. inst.components.pinnable.canbepinned = true
  18. if not GetGameModeProperty("no_hunger") then
  19. inst.components.hunger:Resume()
  20. if IsWereMode(inst.weremode:value()) then
  21. inst.components.hunger:SetPercent(0, true)
  22. end
  23. end
  24. inst.components.temperature.inherentinsulation = 0
  25. inst.components.temperature.inherentsummerinsulation = 0
  26. inst.components.moisture:SetInherentWaterproofness(0)
  27. inst.components.talker:StopIgnoringAll("becamewere")
  28. inst.components.catcher:SetEnabled(true)
  29. inst.components.stormwatcher:SetSandstormSpeedMultiplier(TUNING.SANDSTORM_SPEED_MOD)
  30. inst.components.carefulwalker:SetCarefulWalkingSpeedMultiplier(TUNING.CAREFUL_SPEED_MOD)
  31. inst.components.wereeater:ResetFoodMemory()
  32. inst.components.wereness:StopDraining()
  33.  
  34. if inst.components.inspectable.getstatus == GetWereStatus then
  35. inst.components.inspectable.getstatus = inst._getstatus
  36. inst._getstatus = nil
  37. end
  38.  
  39. inst.CanExamine = nil
  40.  
  41. --[[if inst.components.playercontroller ~= nil then
  42. inst.components.playercontroller:SetCanUseMap(true)
  43. end]]
  44.  
  45. SetWereDrowning(inst, WEREMODES.NONE)
  46. SetWereRunner(inst, WEREMODES.NONE)
  47. SetWereWorker(inst, WEREMODES.NONE)
  48. SetWereFighter(inst, WEREMODES.NONE)
  49. SetWereActions(inst, WEREMODES.NONE)
  50. SetWereSounds(inst, WEREMODES.NONE)
  51. SetWereVision(inst, WEREMODES.NONE)
  52. ChangeWereModeValue(inst, WEREMODES.NONE)
  53. OnResetBeard(inst)
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement