Author Topic: [Server] No Chain Kills  (Read 15450 times)

chainkills: When you destroy a brick, and all of the unsupported bricks connected to it are also destroyed.

Add-ons such as the Floating Bricks add-on allow you to place bricks in mid-air, but don't give support to all connected bricks.
This may lead to situations where a stray hit of "Ctrl+Z" causes your entire building to be destroyed.

This add-ons modifies the Hammer, New Duplicator Undo, and Default Undo command to destroy bricks without causing chainkills.
The wand and destructo wand are unaffected, as causing chainkills is their primary purpose.

Download: https://leopard.hosting.pecon.us/dl/nylxy/Server_noChainKills.zip




v1.01
   + Fixed bug with undo stack head not moving if no trust on undo brick.
   + Added trust check when undoing duplications, to account for possible brick ownership changes.
v1.02
   + Optimized New Dup undo to use normal killbrick() when appropriate
   + Added case to delete bots faster upon brick removal
« Last Edit: August 14, 2023, 10:56:42 PM by Tendon »

super useful! many times I've accidentally did ctrl+z with the dup and messed a bunch of bricks up lol

minor bug, undoing a duplicated bot hole doesnt remove the bot though th server im on has like 500 trillion other addons so take it with a grain of salt

minor bug, undoing a duplicated bot hole doesnt remove the bot though th server im on has like 500 trillion other addons so take it with a grain of salt
Checked it out.  When .delete(); is used instead of .killBrick() to destroy a bot hole, the bot will persist for a short time.

unless the hole bot ai is turned off, in which case it will never check to see if its spawn brick still exists

i would delete %brick.hbot on %brick.delete(); if the object exists

unless the hole bot ai is turned off, in which case it will never check to see if its spawn brick still exists

i would delete %brick.hbot on %brick.delete(); if the object exists
yeah good idea, and just for lag sake if there are a bunch of bots/holes being deleted might want to schedule the brick deletion a bit after hbot deletion