mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-18 03:43:09 +00:00
add docs
This commit is contained in:
parent
7e087707cd
commit
1bff02e3b0
3 changed files with 11 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ namespace
|
||||||
|
|
||||||
void invalidPropErr(std::string_view prop, const MWWorld::Ptr& ptr)
|
void invalidPropErr(std::string_view prop, const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(std::string(prop) + " does not exist for item "
|
throw std::runtime_error("'" + std::string(prop) + "'" + " property does not exist for item "
|
||||||
+ std::string(ptr.getClass().getName(ptr)) + "(" + std::string(ptr.getTypeDescription()) + ")");
|
+ std::string(ptr.getClass().getName(ptr)) + "(" + std::string(ptr.getTypeDescription()) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -96,11 +96,7 @@ namespace MWLua
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
invalidPropErr(prop, ptr);
|
invalidPropErr(prop, ptr);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ignore or error?*/
|
|
||||||
invalidPropErr(prop, ptr);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
void setCharge(int charge);
|
void setCharge(int charge);
|
||||||
void setChargeFloat(float charge);
|
void setChargeFloat(float charge);
|
||||||
void applyChargeRemainderToBeSubtracted(float chargeRemainder); // Stores remainders and applies if > 1
|
void applyChargeRemainderToBeSubtracted(float chargeRemainder); // Stores remainders and applies if <= -1
|
||||||
|
|
||||||
// Stores fractional part of mChargeInt
|
// Stores fractional part of mChargeInt
|
||||||
void setChargeIntRemainder(float chargeRemainder);
|
void setChargeIntRemainder(float chargeRemainder);
|
||||||
|
|
|
||||||
|
|
@ -658,6 +658,15 @@
|
||||||
-- @param openmw.core#GameObject object
|
-- @param openmw.core#GameObject object
|
||||||
-- @return #boolean
|
-- @return #boolean
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Set of properties that differentiates one item from another of the same record type.
|
||||||
|
-- @function [parent=#Item] itemData
|
||||||
|
-- @param openmw.core#GameObject item
|
||||||
|
-- @return #ItemData
|
||||||
|
|
||||||
|
---
|
||||||
|
-- @type ItemData
|
||||||
|
-- @field #number condition The item's current condition. Time remaining for lights. Uses left for lockpicks and probes. Current health for weapons and armor.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- @{#Creature} functions
|
-- @{#Creature} functions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue