Giter VIP home page Giter VIP logo

lc_easysync's Introduction

Notice

CSync is now able to fulfill the same purpose EasySync was made for so it is now archived.

Overview

EasySync aims to be the easiest way of syncing configuration between host and players (clients) for Lethal Company so that you can focus on creating the meat of your mod. All you'd have to do is to write your config class!

Most config syncing guides (I've seen) require you to copy paste a bunch of code such as the request, receive, patches, etc... So why not reduce the amount of duplicate code and put it in one place? This will handle that for you.

How To Use

I actually wrote a wiki. I didn't like that :(

How does it work?

TLDR: Reflection based code to handle the static members of CSync due to its generic type requirement.

Cursed code that uses reflection to be able to handle CSync's requirement for generic types. Static members are not one and the same in generic types and one exists for each generic type. Using reflection, it grabs the members needed for CSync's functionality and handles them the same way as CSync requires so that there isn't the same code for each different class that inherits from CSync's SyncedInstance class.

Credits

Owen3H - CSync - Made this possible.
icons8 - Mod icon

lc_easysync's People

Contributors

dreadrith avatar

Stargazers

Owen avatar

Watchers

 avatar

lc_easysync's Issues

CSync Dependency & "2.0.0" Update

CSync has just been updated from 1.0.8 to 2.0.0 & EasySync currently still relies on the 1.0.8 version:

CHANGELOG

v2.0.0


BREAKING UPDATE This version is not backwards compatible and mods are required to update! Only update if you can be sure all of your mods use this version.

If you are a mod dev, please see the "Updating to v2.0.0" section of the wiki.

Changelog

Removed need for unnecessary boilerplate. CSync now does messaging and patching itself.
Added a new SyncComplete event you can subscribe to.
Implemented missing .BindSyncedEntry() overloads to support ConfigDefinition and ConfigDescription arguments.
Renamed the main class from CSync to Plugin to avoid confusion with the namespace.

Missing README

Heyo, thought I'd let you know the repo should probably have a README instead of a big wall of lawyer speak :P
Great stuff btw, this is essentially what I wanted to achieve with SyncedConfig but yet to do extensive testing with.

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.