Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarCommandProcessor.cpp
diff options
context:
space:
mode:
authorWasabiRaptor <ketchupraptor@gmail.com>2024-03-08 18:14:40 -0500
committerWasabiRaptor <ketchupraptor@gmail.com>2024-03-08 18:14:40 -0500
commit84fe2dfd4cd8c3134963f90ed693c2562fc71306 (patch)
tree1db4c9cc9a62f6a1fac6e44d807b309b98e952e7 /source/game/StarCommandProcessor.cpp
parent7bc9eaa43240cfacc826cbaa921daa338af23ca4 (diff)
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
Diffstat (limited to 'source/game/StarCommandProcessor.cpp')
-rw-r--r--source/game/StarCommandProcessor.cpp4
1 files changed, 2 insertions, 2 deletions
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";