Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tools.heal2(unit)
- if unit==nil then
- unit=getCreatureAtPos(getxyz())
- end
- unit.body.wounds:resize(0) -- memory leak here :/
- unit.body.blood_count=unit.body.blood_max
- --set flags for standing and grasping...
- unit.status2.able_stand=4
- unit.status2.able_stand_impair=4
- unit.status2.able_grasp=4
- unit.status2.able_grasp_impair=4
- --should also set temperatures, and flags for breath etc...
- unit.flags1.dead=false
- unit.flags2.calculated_bodyparts=false
- unit.flags2.calculated_nerves=false
- unit.flags2.circulatory_spray=false
- unit.flags2.vision_good=true
- unit.flags2.vision_damaged=false
- unit.flags2.vision_missing=false
- unit.flags2.breathing_good=true
- unit.counters.winded=0
- unit.counters.unconscious=0
- for k,v in pairs(unit.body.components) do
- for kk,vv in pairs(v) do
- v[kk]=0
- end
- end
- end
- tools.menu:add("heal2",tools.heal2)
Add Comment
Please, Sign In to add comment