Coder Social home page Coder Social logo

sclean's Introduction

A Torch plugin for Scrapyard scenario cleanup.

I wrote all the code but to avoid plagiarism I do admit that I have relied heavily on reading Essentials code to show me how to do it.

Why another plugin? We have Essentials Cleanup.

Unlike Essential Cleanup, Sclean works on grid groups, a grid group is a grid with subgrids and connected grids and subgrids. For example, a base with a four-wheeled rover docked via connectors would be one grid group consisting of six grids. The grids are the base, rover body and four wheels. With Essentials Cleanup if any grid in the group fails a condition, the whole group fails. An example would be "!cleanup list hastype Beacon" for a rover with a Beacon, as the wheels do not have Beacons the whole rover fails the condition and is not returned. With Sclean if any grid in a group satisfies one of the requirements then the whole grid group is kept. This means Sclean can find all grids with Beacons.

In Sclean the requirements are hard coded partly for efficiency but mainly because the Scrapyard Scenario has very specific rules. The requirements for a grid to be kept are:

  • Is player-owned and powered.
  • Is within the safe AOE range of the player.
  • Is within the safe AOE range of the Scrap Beacon.

Plus:

  • The safe zones apply to any ownership, this ensures that found scrap is not removed.
  • Beacons do not need to be operational or fully built.
  • Any grid group that does not meet these requirements are deleted.
  • The ranges for the safe zones can be set in configuration.
  • Sclean optimises the scan by not using any beacon that has its AOE inside the player's AOE.

Sclean only does what Essentials Cleanup can't do, you still need to use Cleanup to remove floating objects and reset voxels

Use:

Show which grids/groups would be deleted.

!sclean list

Show which grids/groups would be deleted ignoring players.

!sclean list nop

Show which grids/groups are protected.

!sclean list prot

Show all grids/groups.

!sclean list all

Delete grids/groups.

!sclean delete

Delete grids/groups ignoring players.

!sclean delete nop

Show the current configuration.

!sclean info

Install:

This has been published and is available via the Torch Client.

sclean's People

Contributors

adrianre12 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.