MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / destroyLiquid

Method destroyLiquid

source/game/scripting/StarWorldLuaBindings.cpp:1082–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080 }
1081
1082 Maybe<LiquidLevel> WorldCallbacks::destroyLiquid(World* world, Vec2F const& position) {
1083 auto liquidLevel = world->liquidLevel(Vec2I::floor(position));
1084 if (liquidLevel.liquid != EmptyLiquidId) {
1085 if (world->modifyTile(Vec2I::floor(position), PlaceLiquid{EmptyLiquidId, 0}, true))
1086 return liquidLevel;
1087 }
1088 return {};
1089 }
1090
1091 bool WorldCallbacks::isTileProtected(World* world, Vec2F const& position) {
1092 return world->isTileProtected(Vec2I::floor(position));

Callers

nothing calls this directly

Calls 2

liquidLevelMethod · 0.45
modifyTileMethod · 0.45

Tested by

no test coverage detected