1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 00:39:58 +00:00
This commit is contained in:
Kindi 2023-10-26 03:32:15 +08:00
parent 7e087707cd
commit 1bff02e3b0
3 changed files with 11 additions and 6 deletions

View File

@ -17,7 +17,7 @@ namespace
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()) + ")");
}
}
@ -96,11 +96,7 @@ namespace MWLua
}
else
invalidPropErr(prop, ptr);
return;
}
/*ignore or error?*/
invalidPropErr(prop, ptr);
}
};
}

View File

@ -130,7 +130,7 @@ namespace MWWorld
}
void setCharge(int 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
void setChargeIntRemainder(float chargeRemainder);

View File

@ -658,6 +658,15 @@
-- @param openmw.core#GameObject object
-- @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