Skip to content

dvdvideo1234/LaserSTool

Repository files navigation

LaserSTool

Description

This is the LaserSTool I've originally ported to Garry's mod 13 since then, I am constantly improving it. My goal is making it behave as similar to a real laser beam. The repository contains MadJawa's original SVN, but drastically changed to include a lot of added features, better user experience and improved beam physics behavior accuracy. This is by far the most bug free laser addon that is up to date and with active development.

Brief history

The original creator and huge credit goes to one and only MadJawa. His repository is located here. I cannot tell you that he will still and eventually support this repo in the future, but we can clearly see no commits are made since 2009. This has been quite a ride since January 2020 when I first started fixing this, but as the time flew by I got hooked on another projects IRL and this was kind of aside forgotten. I did not make a repository at the time, so I kept fixing it on my local machine at home, thinking that no one will eventually get interested in me reviving this gem, but here we are now and boy was I wrong! Last I decided to push it to github, so the code will not get lost again or something may happen to this marvel!

LaserSTool

Installation

Just clone this repo in your addons folder or subscribe in the workshop.

Features

The code base has been drastically changed now and does not correspond to the original 2.0 version anymore. This was the only way I could support the things I needed the most from the addon:

  1. Very stable crystal calculating routine and beam trace
  2. Reflect beam traces via hit surface material override
  3. Refract beam traces via hit surface material override
  4. Calculate full internal reflection according to medium boundary
  5. Code base and updates in tone with Garry's mod 13
  6. Supports wire and every element supports advanced duplicator 1 and 2
  7. Wire inputs override internals when connected
  8. Internal wire wrapper taking care of the wire interface
  9. Surface reflection and medium refraction power absorption
  10. Better model for the crystal entity not to get confused where beam comes out
  11. Material override can be saved and restored with advanced duplicator 1 and 2
  12. Editable entity support option for changing internals of the laser elements
  13. User customizable models for active entities and reflectors via convar tweak
  14. Absorption degradation and self sustain beam loop for crystal entities
  15. Wiremod API for retrieving beam source settings and make control feedback
  16. A bunch of different laser addon dedicated elements you can find here in the wiki page
  17. Coding effective wrapper for editable entity manipulation and adjustment
  18. You can combine the refraction with Shadowscion's primitive for using lenses

Workshop

I see many copies of this tool everywhere, but still, there is none that have crated official repository for community contribution, besides, I think the original author will not like that in general. If you want to try the tool go ahead and install it.

Versioning

Small modifications are pushed to the workshop when they are tested. Large modifications require a dedicated PR, which when gets tested and when merged is pushed to the workshop automatically.

Pull requests

I am a fan of this tool, so any help I get will be appreciated.