diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-07-01 20:46:45 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-07-01 20:46:45 +0200 |
commit | 37f6c78404aeb92a40c1a96c856e69225788c3db (patch) | |
tree | a0fc1be5a64a00b46c6a01db21a936d6f56ab9c3 /source/BlockID.h | |
parent | Fixed burn / fire damage in each game tick. (diff) | |
download | cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar.gz cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar.bz2 cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar.lz cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar.xz cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.tar.zst cuberite-37f6c78404aeb92a40c1a96c856e69225788c3db.zip |
Diffstat (limited to 'source/BlockID.h')
-rw-r--r-- | source/BlockID.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source/BlockID.h b/source/BlockID.h index 7e03388d3..9b2a104f3 100644 --- a/source/BlockID.h +++ b/source/BlockID.h @@ -614,6 +614,48 @@ enum eDimension } ; + + + +/// Damage type, used in the TakeDamageInfo structure and related functions +enum eDamageType +{ + // Canonical names for the types (as documented in the plugin wiki): + dtAttack, // Being attacked by a mob + dtLightning, // Hit by a lightning strike + dtFalling, // Falling down; dealt when hitting the ground + dtDrowning, // Drowning in water / lava + dtSuffocating, // Suffocating inside a block + dtStarving, // Hunger + dtCactusContact, // Contact with a cactus block + dtLavaContact, // Contact with a lava block + dtPoisoning, // Having the poison effect + dtOnFire, // Being on fire + dtFireContact, // Standing inside a fire block + dtInVoid, // Falling into the Void (Y < 0) + dtPotionOfHarming, + dtAdmin, // Damage applied by an admin command + + // Some common synonyms: + dtPawnAttack = dtAttack, + dtEntityAttack = dtAttack, + dtMob = dtAttack, + dtMobAttack = dtAttack, + dtFall = dtFalling, + dtDrown = dtDrowning, + dtSuffocation = dtSuffocating, + dtStarvation = dtStarving, + dtHunger = dtStarving, + dtCactus = dtCactusContact, + dtCactuses = dtCactusContact, + dtCacti = dtCactusContact, + dtLava = dtLavaContact, + dtPoison = dtPoisoning, + dtBurning = dtOnFire, + dtInFire = dtFireContact, + dtPlugin = dtAdmin, +} ; + // tolua_end @@ -649,6 +691,12 @@ extern EMCSBiome StringToBiome(const AString & a_BiomeString); /// Translates a dimension string to dimension enum. Takes either a number or a dimension alias (built-in). Returns -1000 on failure extern eDimension StringToDimension(const AString & a_DimensionString); +/// Translates damage type constant to a string representation (built-in). +extern AString DamageTypeToString(eDamageType a_DamageType); + +/// Translates a damage type string to damage type. Takes either a number or a damage type alias (built-in). Returns -1 on failure +extern eDamageType StringToDamageType(const AString & a_DamageString); + // tolua_end |