mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 12:32:36 +00:00
Merge branch 'capacity' into 'master'
Lua: Expose capacity for creatures as well See merge request OpenMW/openmw!4481
This commit is contained in:
commit
03f1702636
@ -415,6 +415,11 @@ namespace MWLua
|
|||||||
return ptr.getClass().getEncumbrance(ptr);
|
return ptr.getClass().getEncumbrance(ptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
actor["getCapacity"] = [](const Object& actor) -> float {
|
||||||
|
const MWWorld::Ptr ptr = actor.ptr();
|
||||||
|
return ptr.getClass().getCapacity(ptr);
|
||||||
|
};
|
||||||
|
|
||||||
addActorStatsBindings(actor, context);
|
addActorStatsBindings(actor, context);
|
||||||
addActorMagicBindings(actor, context);
|
addActorMagicBindings(actor, context);
|
||||||
}
|
}
|
||||||
|
@ -353,9 +353,5 @@ namespace MWLua
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
npc["getCapacity"] = [](const Object& actor) -> float {
|
|
||||||
const MWWorld::Ptr ptr = actor.ptr();
|
|
||||||
return ptr.getClass().getCapacity(ptr);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,12 @@
|
|||||||
-- @param openmw.core#GameObject actor
|
-- @param openmw.core#GameObject actor
|
||||||
-- @return #number
|
-- @return #number
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Get the total weight that the actor can carry.
|
||||||
|
-- @function [parent=#Actor] getCapacity
|
||||||
|
-- @param openmw.core#GameObject actor
|
||||||
|
-- @return #number
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Check if the given actor is dead (health reached 0, so death process started).
|
-- Check if the given actor is dead (health reached 0, so death process started).
|
||||||
-- @function [parent=#Actor] isDead
|
-- @function [parent=#Actor] isDead
|
||||||
@ -1035,12 +1041,6 @@
|
|||||||
-- @param openmw.core#GameObject player The player that you want to modify the disposition for.
|
-- @param openmw.core#GameObject player The player that you want to modify the disposition for.
|
||||||
-- @param #number value Base disposition modification value
|
-- @param #number value Base disposition modification value
|
||||||
|
|
||||||
---
|
|
||||||
-- Get the total weight that the actor can carry.
|
|
||||||
-- @function [parent=#NPC] getCapacity
|
|
||||||
-- @param openmw.core#GameObject actor
|
|
||||||
-- @return #number
|
|
||||||
|
|
||||||
--- @{#Classes}: Class Data
|
--- @{#Classes}: Class Data
|
||||||
-- @field [parent=#NPC] #Classes classes
|
-- @field [parent=#NPC] #Classes classes
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user