Coder Social home page Coder Social logo

cheshify / event-toolbox-tournament-2022 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tgstation/event-toolbox-tournament-2022

0.0 0.0 0.0 2.03 GB

License: GNU Affero General Public License v3.0

Shell 0.10% JavaScript 5.56% C++ 0.04% Python 0.98% PHP 0.11% C# 0.02% PowerShell 0.02% TypeScript 2.96% CSS 0.05% DM 89.64% HTML 0.09% Batchfile 0.01% Dockerfile 0.01% SCSS 0.40% Lua 0.02%

event-toolbox-tournament-2022's Introduction

/tg/station Events Base

This repository is a descendant of the "events base". The events base is modular, meaning you should avoid editing code in the code folder itself.

Adding a new module, where do I do it?

Modules should be individual features/edits, packed into one.

modular_event houses two folders: one called base, and the other named whatever the event is called. base should hold anything that makes sense and/or is likely to reuse in other events. For example, multiple events want to limit jobs to only assistant and cyborg. Thus, the limit_jobs module exists in base. However, only the Toolbox Tournament is interested in running tournaments, so the tournament module only exists in modular_event/toolbox_tournament.

_modular_event exists for one purpose: to run before code. Thus, this should only be used for non-modular changes that HAVE to run before code. Otherwise, just make your own __DEFINES file in your module.

Tips for writing modular code

BYOND overrides are done in the order of which they appear, and you can even override the same proc twice!

For example, let's consider station traits, which look like this:

/datum/controller/subsystem/processing/station/proc/SetupTraits()
	// Find station traits
	// Initialize some station traits

We don't want this in our events, but how do we change it modularly? Well, like this!

// Avoid putting `proc/` here, since this isn't the base
/datum/controller/subsystem/processing/station/SetupTraits()
	return

And...that's it! BYOND will use the latest override.

I need to make a non-modular change!

If you're confident you cannot make a change without editing something in code, do so while explicitly marking where it begins and ends. That way, it's easy for us to handle merge conflicts with // EVENT EDIT: Description and // END EVENT EDIT.

some_normal_code()
other_normal_code()
// EVENT EDIT: We needed to do something cool here
do_something_cool_for_event()
// END EVENT EDIT

That being said, a lot of non-modular changes can be allowed modularly upstream. It's totally fine to add new signals on the tgstation repository that are only registered by events, for example, signals are basically free.

If possible, contact a maintainer (specifically Mothblocks, if she's still around) for help with non-modular code, and especially in the realm of being able to make non-modular code modular through upstream edits.

event-toolbox-tournament-2022's People

Contributors

tgstation-server avatar cheridan avatar cyberboss avatar changelingrain avatar optimumtact avatar shizcalev avatar anturk avatar jordie0608 avatar razharas avatar imtakingabreakdontatme avatar giacom avatar phil235 avatar mrstonedone avatar lzimann avatar tkdrg avatar coiax avatar actions-user avatar remierichards avatar silicons avatar ikarrus avatar theoperand avatar incoming5643 avatar aranclanos avatar iamgoofball avatar duncathan avatar spacemaniac avatar fikou avatar korphaeron avatar kriskog avatar 81denton 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.