mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 11:19:51 +02:00
Prevent "!set type none blah"
This commit is contained in:
@@ -334,6 +334,8 @@ AnyType TPTScriptInterface::tptS_set(std::deque<std::string> * words)
|
|||||||
|
|
||||||
if(type<0 || type>=PT_NUM)
|
if(type<0 || type>=PT_NUM)
|
||||||
throw GeneralException("Invalid particle type");
|
throw GeneralException("Invalid particle type");
|
||||||
|
if(type==0)
|
||||||
|
throw GeneralException("Cannot set properties of particles that do not exist");
|
||||||
std::cout << propertyOffset << std::endl;
|
std::cout << propertyOffset << std::endl;
|
||||||
switch(propertyFormat)
|
switch(propertyFormat)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user