Implements the Tesla engine and supporting features (#4539)

* Adds "typecache" utility functions. A fast way to filter lists by type.

Ported from TG

* Ports the "orbit" feature and subsystem from TG

* Adds a feature that allows mobs and objs to "orbit" around some atom.  They literally are moved around in circles.  See the `orbit` proc in orbit.dm.
* Adds a subsystem that processes the actual movement of orbiting items.

* Adds utility methods for common machinery behavior.

* Adds default_unfasten_wrench which handles the standard anchor/unanchor behavior of wrenches being used on machines.  Together with the other default_x_tool machinery procs we can eliminate having that code duplicated in dozens of places!
* Adds is_wire_tool proc to easily detect when a machine is hit with a tool that should open its wires UI (if it has one).

Based on ideas from Paradise, with improvements for us.

* Implements the Tesla Engine

Ported from a mixture of TG and Paradise code and assets: Edison's Bane

Includes the tesla energy ball itself, the generator that makes it, tesla coils, grounding rods, the circuits and frames to build them.

* Switch dusting to zapping on impact and spin better

Ported /tg SpinAnimation which supports more than triangles.
This commit is contained in:
Leshana
2018-01-19 14:56:08 -06:00
committed by Anewbe
parent 1348077678
commit db0ba60f64
24 changed files with 857 additions and 27 deletions
+2 -1
View File
@@ -8,11 +8,12 @@
density = 1
use_power = 0
var/energy = 0
var/creation_type = /obj/singularity
/obj/machinery/the_singularitygen/process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
new /obj/singularity/(T, 50)
new creation_type(T, 50)
if(src) qdel(src)
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
@@ -29,15 +29,11 @@
var/chained = 0//Adminbus chain-grab
/obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
/obj/singularity/New(loc, var/starting_energy = 50)
//CARN: admin-alert for chuckle-fuckery.
admin_investigate_setup()
energy = starting_energy
if (temp)
spawn (temp)
qdel(src)
..()
processing_objects += src
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)