fluids fixed. thanks chojrak. still needs to create some constants to fluids type.
This commit is contained in:
parent
aad540f5b5
commit
32c916ee68
|
@ -315,6 +315,30 @@ namespace Otc
|
||||||
NorthWest
|
NorthWest
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum FluidsColor {
|
||||||
|
FluidTransparent,
|
||||||
|
FluidBlue,
|
||||||
|
FluidRed,
|
||||||
|
FluidBrown,
|
||||||
|
FluidGreen,
|
||||||
|
FluidYellow,
|
||||||
|
FluidWhite,
|
||||||
|
FluidPurple
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FluidsType {
|
||||||
|
FluidWater = 1,
|
||||||
|
FluidMana = 2,
|
||||||
|
FluidBeer = 3,
|
||||||
|
FluidBlood = 5,
|
||||||
|
FluidSlime = 6,
|
||||||
|
FluidLemonade = 8,
|
||||||
|
FluidMilk = 9,
|
||||||
|
FluidWine = 10,
|
||||||
|
FluidHealth = 11,
|
||||||
|
FluidCoconutMilk = 15
|
||||||
|
};
|
||||||
|
|
||||||
enum SpeakClasses {
|
enum SpeakClasses {
|
||||||
SpeakSay = 0x01, //normal talk
|
SpeakSay = 0x01, //normal talk
|
||||||
SpeakWhisper = 0x02, //whispering - #w text
|
SpeakWhisper = 0x02, //whispering - #w text
|
||||||
|
|
|
@ -47,7 +47,7 @@ void Item::setPosition(const Position& position)
|
||||||
{
|
{
|
||||||
const ThingType& type = getType();
|
const ThingType& type = getType();
|
||||||
|
|
||||||
if(type.properties[ThingType::NotMovable]) {
|
if(type.properties[ThingType::IsGround]) {
|
||||||
m_xPattern = position.x % type.dimensions[ThingType::PatternX];
|
m_xPattern = position.x % type.dimensions[ThingType::PatternX];
|
||||||
m_yPattern = position.y % type.dimensions[ThingType::PatternY];
|
m_yPattern = position.y % type.dimensions[ThingType::PatternY];
|
||||||
m_zPattern = position.z % type.dimensions[ThingType::PatternZ];
|
m_zPattern = position.z % type.dimensions[ThingType::PatternZ];
|
||||||
|
@ -91,70 +91,70 @@ void Item::setData(int data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(type.properties[ThingType::IsFluid] || type.properties[ThingType::IsFluidContainer]) {
|
else if(type.properties[ThingType::IsFluid] || type.properties[ThingType::IsFluidContainer]) {
|
||||||
int var = 0;
|
int color = 0;
|
||||||
// TODO: find out what the heck does it mean
|
// TODO: find out what the heck does it mean 4, 7, 12, 13, 14, 16, 17. options are already there
|
||||||
switch(data) {
|
switch(data) {
|
||||||
case 0:
|
case 0:
|
||||||
var = 0;
|
color = 0;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case Otc::FluidWater:
|
||||||
var = 1;
|
color = Otc::FluidBlue;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case Otc::FluidMana:
|
||||||
var = 7;
|
color = Otc::FluidPurple;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case Otc::FluidBeer:
|
||||||
var = 3;
|
color = Otc::FluidBrown;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
var = 3;
|
color = Otc::FluidBrown; // oil, mud, mead, rum, tea
|
||||||
break;
|
break;
|
||||||
case 5:
|
case Otc::FluidBlood:
|
||||||
var = 2;
|
color = Otc::FluidRed;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case Otc::FluidSlime:
|
||||||
var = 4;
|
color = Otc::FluidGreen;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
var = 3;
|
color = Otc::FluidBrown; // oil, mud, mead, rum, tea
|
||||||
break;
|
break;
|
||||||
case 8:
|
case Otc::FluidLemonade:
|
||||||
var = 5;
|
color = Otc::FluidYellow;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case Otc::FluidMilk:
|
||||||
var = 6;
|
color = Otc::FluidWhite;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case Otc::FluidWine:
|
||||||
var = 7;
|
color = Otc::FluidPurple;
|
||||||
break;
|
break;
|
||||||
case 11:
|
case Otc::FluidHealth:
|
||||||
var = 2;
|
color = Otc::FluidRed;
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
var = 5;
|
color = Otc::FluidYellow; // urine, fruit juice
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
var = 3;
|
color = Otc::FluidBrown; // oil, mud, mead, rum, tea
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
var = 5;
|
color = Otc::FluidYellow; // urine, fruit juice
|
||||||
break;
|
break;
|
||||||
case 15:
|
case Otc::FluidCoconutMilk:
|
||||||
var = 6;
|
color = Otc::FluidWhite;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
var = 3;
|
color = Otc::FluidBrown; // oil, mud, mead, rum, tea
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
var = 3;
|
color = Otc::FluidBrown; // oil, mud, mead, rum, tea
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var = 1;
|
color = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_xPattern = (var & 3) % type.dimensions[ThingType::PatternX];
|
m_xPattern = (color % 4) % type.dimensions[ThingType::PatternX];
|
||||||
m_yPattern = (var >> 2) % type.dimensions[ThingType::PatternY];
|
m_yPattern = (color / 4) % type.dimensions[ThingType::PatternY];
|
||||||
}
|
}
|
||||||
|
|
||||||
m_data = data;
|
m_data = data;
|
||||||
|
|
Loading…
Reference in New Issue