Scrap Mechanic

Scrap Mechanic

95 ratings
Laser Tools
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
24.328 MB
2 Aug, 2022 @ 1:38pm
9 Jul @ 6:48am
35 Change Notes ( view )

Subscribe to download
Laser Tools

Description
This mod adds 4 new items which use lasers to unleash total annihilation!
All of these items use Plasma Batteries as a power source, which can be crafted in the craftbot.

Thanks to Questionable Mark's Modded Craftbot Recipes, they're also craftable in survival!

Credits
  • Vajdani - Scripting, animation
  • Dart Frog - Handheld Laser Cutter model, thumbnail help
  • DriVer - Laser Pistol model
150 Comments
Ulon 20 Aug @ 3:54am 
Fair. Have a great day! I love your mod! <3
Vajdani  [author] 20 Aug @ 12:59am 
I probably could, but I wont.
Ulon 19 Aug @ 8:20pm 
Can you make it work with Fant Mod Skills?
Vajdani  [author] 9 Jul @ 10:51am 
I've thought of an easier way of doing it.
At the top of the file, there is a table that defines what collision types instantly kill the laser.

ProjectileManager.killTypes = {
terrainSurface = true,
terrainAsset = true,
limiter = true
}

A clean and simple way of disabling block damage is to add body collisions to it as well.

ProjectileManager.killTypes = {
terrainSurface = true,
terrainAsset = true,
limiter = true,
body = true
}

Now, the projectiles will destroy themselves when colliding with blocks and parts, without harming them.
Time_pug 9 Jul @ 10:40am 
which line in ProjectileManager.lua should I edit to disable block destruction? So far every attempt has just completely disabled the lasers.
Vajdani  [author] 9 Jul @ 10:24am 
There are no damage values, the script just deletes them outright. Do a search for the functions I mentioned earlier( destroyBlock , destroyShape ).
Time_pug 9 Jul @ 10:19am 
I've checked and changed every damage value I could find in all the json files and still the laser will infinitely destroy anything it touches. Having a comment for each function would help a lot with understanding them.
Time_pug 9 Jul @ 10:06am 
where can I find the damage value for placeable items (blocks, electronics etc)
Vajdani  [author] 9 Jul @ 7:24am 
I didn't make any really substantial additions, just a few small ones.
Time_pug 9 Jul @ 7:17am 
I've made multiple backups of my edit so I still have all the original values so nothing will be lost