improve docs and remove irrelevant example

This commit is contained in:
Evil Factory
2022-02-02 22:42:03 -03:00
parent 53231347bb
commit 438070a81f
2 changed files with 1 additions and 24 deletions
+1 -8
View File
@@ -78,14 +78,7 @@ end)
## How do i give a character a certain affliction
```lua
local burnPrefab
for k, v in pairs(AfflictionPrefab.ListArray) do
if v.Identifier == "burn" then
burnPrefab = v
break
end
end
local burnPrefab = AfflictionPrefab.Prefabs["burn"]
local char = Character.CharacterList[1]
local limb = char.AnimController.MainLimb
-16
View File
@@ -10,22 +10,6 @@ Hook.Add('chatMessage', 'suicide_mod', function(msg, client)
end)
```
```lua
local characters = Character.CharacterList
local biteWoundsPrefab
for k, v in pairs(AfflictionPrefab.ListArray) do
if v.name == "Bite wounds" then
biteWoundsPrefab = v
break
end
end
for k, v in pairs(characters) do
v.CharacterHealth.ApplyAffliction(v.AnimController.MainLimb, biteWoundsPrefab.Instantiate(100));
end
```
```lua
Hook.Add("itemApplyTreatment", "testItemApplyTreatment", function (item, user, character, targetlimb)
if item.name == "Bandage" then