Git Product home page Git Product logo

stocksoup's Introduction

stocksoup

A mishmashed collection of various SourceMod stock functions that I've written for use in my projects. Might be useful to you at some point as well.

Usage (simplified)

For your sanity's sake, just copy the stocks that you need into your own project. This repository is a moving target that gets changed fairly often; if you just sync this repository to your main scripting includes, you may will have a bad time if any stock functions change.

Usage (traditional)

Install stocksoup as a git submodule. The directory structure is set up this way with includes at the root so the repository has its own nice little folder to sit in.

Using this as a submodule means effectively pinning the dependencies; you and possible contributors won't be tripped up by function and include renames whenever I feel like doing them. Of course, you'll have to be on a git-compatible system for your repository in the first place.

  1. Add the repository as a submodule (as an include relative to your scripting directory).

    $ git submodule add https://github.com/nosoop/stocksoup scripting/include/stocksoup
    
  2. If not already, make sure your SourcePawn compiler looks into the custom include directory.

    spcomp "scripting/in_progress_file.sp" -i"scripting/include"
    
  3. Include a specific file and use a stock.

    #include <stocksoup/client>
    
    public void Example_OnPlayerSpawn(int client) {
            SetClientScreenOverlay(client, "combine_binocoverlay");
    }
    
  4. For collaboration, you should know how to recursively initialize a repository:

    $ git clone --recurse-submodules $YOUR_GIT_REPOSITORY
    

Updates (as a submodule)

  1. Pull in updates for all the submodules.

    $ git submodule update --remote --checkout
    
  2. Make sure your project actually builds; fix things as necessary. No stability guaranteed.

  3. Commit as usual.

Releases

If I remember to do so, I may publish a tag on a commit prior to a major breaking change to mark commits that projects should be able to move up to without significant problems.

I consider a major breaking change as one that:

  • Removes a function, or an argument within a function (keyword changes are not major).
  • Moves functions between filenames in a way that referencing the old include doesn't work.

Directory structure

Pretty simple:

  • Base directory has stocks applicable to all games.
    • The sdkports/ directory contains ports of select Source SDK functions.
  • Other subdirectories have stocks applicable to a specific mod. Mainly TF2, since that's the only game I write for. Any stock functions for a specific game should be prefixed with a game abbreviation, similar to SourceMod functions.

Questions and Answers

Is the name of the library a reference to Weird Al's Talk Soup? Yes. Yes it is.

stocksoup's People

Contributors

nosoop avatar nopied avatar notnheavy avatar scags avatar caxanga334 avatar maxijabase 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.