mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 19:51:45 +02:00
some testing with DEBUG mode, add some stuff
Conflicts: src/cat/TPTScriptInterface.cpp
This commit is contained in:
@@ -218,7 +218,12 @@ AnyType TPTScriptInterface::tptS_set(std::deque<std::string> * words)
|
|||||||
{
|
{
|
||||||
newValue = GetParticleType(((StringType)value).Value());
|
newValue = GetParticleType(((StringType)value).Value());
|
||||||
if (newValue < 0 || newValue >= PT_NUM)
|
if (newValue < 0 || newValue >= PT_NUM)
|
||||||
throw GeneralException("Invalid element");
|
{
|
||||||
|
if (newString == "GOLD")
|
||||||
|
throw GeneralException("No, GOLD will not be an element");
|
||||||
|
else
|
||||||
|
throw GeneralException("Invalid element");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw GeneralException("Invalid value for assignment");
|
throw GeneralException("Invalid value for assignment");
|
||||||
|
@@ -283,6 +283,47 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a
|
|||||||
if(key == KEY_RIGHT)
|
if(key == KEY_RIGHT)
|
||||||
focusedComponent_->Position.X++;
|
focusedComponent_->Position.X++;
|
||||||
}
|
}
|
||||||
|
if (key == KEY_DELETE)
|
||||||
|
{
|
||||||
|
RemoveComponent(focusedComponent_);
|
||||||
|
halt = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(shift)
|
||||||
|
{
|
||||||
|
if(key == KEY_UP)
|
||||||
|
Size.Y--;
|
||||||
|
if(key == KEY_DOWN)
|
||||||
|
Size.Y++;
|
||||||
|
if(key == KEY_LEFT)
|
||||||
|
Size.X--;
|
||||||
|
if(key == KEY_RIGHT)
|
||||||
|
Size.X++;
|
||||||
|
}
|
||||||
|
if(ctrl)
|
||||||
|
{
|
||||||
|
if(key == KEY_UP)
|
||||||
|
Size.Y++;
|
||||||
|
if(key == KEY_DOWN)
|
||||||
|
Size.Y--;
|
||||||
|
if(key == KEY_LEFT)
|
||||||
|
Size.X++;
|
||||||
|
if(key == KEY_RIGHT)
|
||||||
|
Size.X--;
|
||||||
|
}
|
||||||
|
if(!shift)
|
||||||
|
{
|
||||||
|
if(key == KEY_UP)
|
||||||
|
Position.Y--;
|
||||||
|
if(key == KEY_DOWN)
|
||||||
|
Position.Y++;
|
||||||
|
if(key == KEY_LEFT)
|
||||||
|
Position.X--;
|
||||||
|
if(key == KEY_RIGHT)
|
||||||
|
Position.X++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user