Coder Social home page Coder Social logo

nodepolus / framework Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 3.07 MB

An open-source Among Us server implementation in TypeScript

License: GNU Affero General Public License v3.0

TypeScript 100.00%
among-us amongus innersloth server nodejs node-js node typescript javascript among-us-mods

framework's Introduction

About NodePolus

NodePolus is an open-source Among Us server implementation written in Typescript. Some of the features of NodePolus include:

  • A server-authoritative region server

    The server is in control of the game state, not the host of a game.

  • An announcement server

    Keep your players up-to-date using the game's built-in announcement window.

  • Plugin support

    Build custom gamemodes, support custom maps and mods, integrate with external services, and more (this is in an early stage of development and may change in the future).

  • Extensive API

    Interact with all facets of a game: the players, their raw connections, ship systems, and more.

  • Events

    Listen to, modify, and cancel multiple types of events--this enables server-side task selection, force impostor, cancelling sabotages, and more.

  • Command framework

    Define custom chat and console commands using a simple and intuitive API (coming soon).

  • Custom packets

    Register custom packets of each type with their own handler (this is in an early stage of development and may change in the future).

NodePolus is being actively developed, and you can usually find us in our Discord server. If you would like to play on a large-scale server that uses NodePolus, check out Polus.gg and play some custom gamemodes!

Development

  • Instructions coming soon

framework's People

Contributors

alexejhero avatar codyphobe avatar cybershard avatar przebor avatar roobscoob avatar sanae6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

framework's Issues

Host doesn't get assigned any tasks

src/host/host.ts line 739

    this.lobby.setGameState(GameState.Started);
-   this.setInfected(this.lobby.getOptions().getImpostorCount());
+   await this.setInfected(this.lobby.getOptions().getImpostorCount());
    this.setTasks();

Rose is never gonna push her changes so here's the fix that Rose came up with.

Plugins which override end game logic can cause errors to happen

framework/src/host/host.ts

Lines 508 to 514 in a306952

if (this.shouldEndGame()) {
if (exiledPlayerData!.isImpostor()) {
this.endGame(GameOverReason.CrewmatesByVote);
} else {
this.endGame(GameOverReason.ImpostorsByVote);
}
}

If a plugin cancels end game events, there can be cases in which the code above throws an error because
exiledPlayerData is null. The solution for this would be to replace the ! operator 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.