From 84fe2dfd4cd8c3134963f90ed693c2562fc71306 Mon Sep 17 00:00:00 2001 From: WasabiRaptor Date: Fri, 8 Mar 2024 18:14:40 -0500 Subject: Perfectly Generic Item improvements spawnitem won't create generic items unless you intend to generic items will retain the data for what item they were if a mod is uninstalled, and will attempt to restore themselves if re-installed --- source/game/StarCommandProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/game/StarCommandProcessor.cpp') diff --git a/source/game/StarCommandProcessor.cpp b/source/game/StarCommandProcessor.cpp index 02a8ec0..0d9d4e9 100644 --- a/source/game/StarCommandProcessor.cpp +++ b/source/game/StarCommandProcessor.cpp @@ -183,7 +183,7 @@ String CommandProcessor::warpRandom(ConnectionId connectionId, String const& typ } } } - + if (size.magnitude() > 1024) return "could not find a matching world"; size *= 2; @@ -296,7 +296,7 @@ String CommandProcessor::spawnItem(ConnectionId connectionId, String const& argu bool done = m_universe->executeForClient(connectionId, [&](WorldServer* world, PlayerPtr const& player) { auto itemDatabase = Root::singleton().itemDatabase(); - world->addEntity(ItemDrop::createRandomizedDrop(itemDatabase->item(ItemDescriptor(kind, amount, parameters), level, seed), player->aimPosition())); + world->addEntity(ItemDrop::createRandomizedDrop(itemDatabase->item(ItemDescriptor(kind, amount, parameters), level, seed, true), player->aimPosition())); }); return done ? "" : "Invalid client state"; -- cgit v1.2.3