Giter Site home page Giter Site logo

copypaste's Introduction

Commands

Copy

/copy NAME options values - Copy a building
Example: /copy home radius 3 method building
Short example: /copy home r 3 m building

Syntax - Options:

  • each true/false - default: true - Check radius from each entity
  • method building/proximity - default: proximity - Choose the type of mechanics to use to copy a building - Building: Only copy the current building. Proximity: Copy all blocks close to the building. (Some deployables can be missing with Building also use proximity in these cases)
  • radius XX - default: 3 - Sets the radius to search for entities around each building parts & deployables
  • share true/false - default: true - Set to copy data CodeLocks, BuildingPrivileges, SleepingBag
  • tree true/false - default: false - Set to copy trees and resources

Paste

/paste NAME options values - Paste a building
Example: /paste home auth true stability false
Short example: /paste home a true s false

Syntax - Options:

  • auth true/false - default: true - Authorize player in all cupboards
  • blockcollision XX - default: 0 - Checks in XX radius if there is something that could collide with the new building, if so, blocks the build. 0 is to deactivate the detection.
  • deployables true/false - default: true - Set to paste the deployables
  • **height XX **- *default: 0 *- Adjust height to paste
  • inventories true/false - default: true - Set to paste the inventories
  • stability true/false - default: true - Set false to ignore stability system
  • vending true/false - default: true - Set to paste sellings, name and broadcasting for Vending Machine

Pasteback

/pasteback NAME options values - Paste on old place a building where it was when it was saved Example: /pasteback home auth true stability false Short example: /pasteback home a true s false

Syntax - Options:

  • auth true/false - default: false - Authorize player in all cupboards
  • deployables true/false - default: true - Set to paste the deployables
  • **inventories true/false **- default: true - Set to paste the inventories
  • height XX - default: 0 - Adjust height to pasteback
  • stability true/false - default: true - Set false to ignore stability system
  • vending true/false - default: false - Set to paste sellings, name and broadcasting for Vending Machine

Other

/undo - Removes what you've last pasted /list - List of stuctures (from folder oxide/data/copypaste)

Permissions

  • copypaste.copy
  • copypaste.list
  • copypaste.paste
  • copypaste.pasteback
  • copypaste.undo

Config

Default Config (Simply deleting file will generate this):

{
  "Amount of entities to paste per batch. Use to tweak performance impact of pasting": 15,
  "Amount of entities to copy per batch. Use to tweak performance impact of copying": 100,
  "Amount of entities to undo per batch. Use to tweak performance impact of undoing": 15,
  "Copy Options": {
    "Check radius from each entity (true/false)": true,
    "Share (true/false)": true,
    "Tree (true/false)": false
  },
  "Paste Options": {
    "Auth (true/false)": true,
    "Deployables (true/false)": true,
    "Inventories (true/false)": true,
    "Vending Machines (true/false)": true,
    "Stability (true/false)": true
  }
}

API

object TryCopyFromSteamID(ulong userID, string filename, string[] args)
object TryPasteFromSteamID(ulong userID, string filename, string[] args)
object TryPasteFromVector3(Vector3 pos, float rotationCorrection, string filename, string[] args)

Returns string on failure and true on success

Example:

bool BuyBuilding(BasePlayer player, string buildingName)
{
    var options = new List<string>{ "blockcollision", "true" };

    var success = CopyPaste.Call("TryPasteFromSteamID", player.userID, buildingName, options.ToArray());

    if(success is string)
    {
        SendReply(player, "Can't place the building here");

        return false;
    }

    SendReply(player, "You've successfully bought this building");

    return true;
}

Credits

  • Reneb, the original author of this plugin
  • MiRror, the previous maintainer of this plugin

copypaste's People

Contributors

umod-org[bot] avatar niekschoemaker avatar

Watchers

James Cloos 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.