Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the Tesla Engine to the game. #13258

Merged
merged 11 commits into from
Dec 20, 2015

Conversation

Iamgoofball
Copy link
Contributor

tzku3m2
https://www.dropbox.com/s/ajt97pp5nzd76ek/fortheunion.webm?dl=0

Sprites by Ausops, concept by Carn

Foreword: I know the code's bad, I was hoping you guys could help me make it not-shit
Foreword 2: Those PA sprites replace the current PA, they're much better. This is non-negotiable and I will not be changing it.

Oh man, let's get this shit going.

Welcome to the future, Wardenclyffe style.

The new Tesla Engine is now in the game, only 499 days late.

How it works:

You have a Tesla Generator. It works just like the singularity generator does, except that it makes an Energy Ball. This big floaty ball of pure electricity can only be contained by the containment field. It will shoot bolts of electricity off at conductors, which it prioritizes in this order:
Tesla Coils -> Mobs -> Machines. It will also strike the closest distance-wise of the list after it goes through that criteria. This is non-negotiable because this solves a lot of problems down the line that I'm not going to go into here.

Tesla Coils will attract the bolts. They will take half the power of the bolt, pump it into the powernet it is hooked to, and then will send the other half of the power to the next available conductor, which follows the criteria listed above. Preferably, this will be another coil to harness more of the power and pump it into the grid.

If the Energy Ball is to get out of containment somehow, it will pass through walls, windows, anything. It will shoot electricity at conductors, mobs, etc, and direct bolts from the Energy Ball will instantly kill a spaceman. Dusting occurs if you run into the ball itself. Machines hit by the bolts will EMP or suffer explosive damage.

When you shoot the energy ball with the Particle Accellerator, it gains energy like a singularity, but when it hits 300 energy, it generates a mini-energy ball that orbits the big energy ball. This will send off an extra shock when the energy ball pulses, and this can happen as many times as you let it. The energy ball will also naturally generate small amounts of energy, so eventually a second ball will form.

Be warned, the more mini-balls the energy ball has, the more shocks it sends out at once, and the further it can travel each move. A good engineer can use this to generate lots of power, and a bad one can abuse this to murder the entire station.

It's simple, but it gets the job done. After this is merged, I'll be looking into a map setup that allows boxstation to be set up for engineers to choose between singulo and tesla with very little effort between switching the two out for eachother.

@RemieRichards
Copy link
Contributor

Those PA sprites replace the current PA, they're much better. This is non-negotiable and I will not be changing it.

Debatable, and this PA was designed for the computer sprite set we don't use, because it's bad!

@WJohn
Copy link
Contributor

WJohn commented Nov 27, 2015

I dunno, while these new sprites are really good, our current PA sprites aren't bad at all. I'd like to have both side by side, no reason to throw out good sprites in favor of slightly better ones, right? Why not have two functionally identically set-up engines, but with different sprites?

@WJohn WJohn added Sprites A bikeshed full of soulless bikes. Feature Exposes new bugs in interesting ways labels Nov 27, 2015
@MrStonedOne
Copy link
Member

@RemieRichards

Debatable, and this PA was designed for the computer sprite set we don't use, because it's bad!

I like that computer sprite set, i wouldn't mind a re-spriting of a lot of space mans to use this kind of style/theme...

@RemieRichards
Copy link
Contributor

@MrStonedOne Wacky Sci-Fi > Dark Sci-Fi
Live tests with that sprite set were hated, iirc.

@Iamgoofball
Copy link
Contributor Author

i can't sprite, take up spriting shit with our only 2 active spriters

@MrPerson
Copy link
Contributor

Just leave the PA with its current sprites. If someone wants to resprite them, that's fine, but the two machines cannot share the same sprites. You need to be able to tell which one it is just by looking at it.

@@ -0,0 +1,94 @@
/obj/singularity/energy_ball
name = "Energy Ball"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be lower case. And possibly given a cooler name like "lightning storm".

@PKPenguin321
Copy link
Contributor

damn goof, this is pretty cool
great work

C.dust()
return

proc/get_closest_atom(var/type, var/list, var/source)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and all further proc defines should have a / before them like so
/proc/get_closest_atom()

Also this one has a good case to be a general helper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i made it specifically for this but moving it to being a helper sounds good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of the var/ parameters too.

@MrPerson
Copy link
Contributor

I gotta question the logic of making this thing a child of the singulo. I feel like they should both be descendants of an ancestor non-machine, ticking object, but that's probably out of scope for this PR.

if(closest_atom)
source.Beam(closest_atom,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
tesla_zap(closest_atom, 3, power / 4)
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proc should really be tied to the energy_ball type. If we want to reuse it later, it can be seperated out trivially at that point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to add more things doing tesla zaps in the weapons field of things, which is why I made it a global proc like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these if(!closest_atom) and constant get_closest_atom() calls are pretty bad, considering how its all list handling

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a way to keep the same process order of coils then mobs then machines I'll try to implement it, this is the main ugly bit I have problems with

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of doing 3 loops, you could make the first argument of get_closest_atom an associative list where the key is a type and the argument is a weight, and have get_closest_atom return the closest atom of the highest available weight

EDIT: actually just make it an array instead, with the lower index arguments taking priority
you can have a closest_atom_index var and use a modified version of is_type_in_list that returns the index

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright I'm stumped here, I need some examples of shit that do this to rip apart and cannibalize into this

@Iamgoofball
Copy link
Contributor Author

It allowed me to avoid copypasting some safety stuff and a lot of the code for blocking movement through containment fields

(Also lets me inherit the shit for when some dumbfuck tries to start the engine without removing 1 of the 2 engine bits)

user.visible_message("[user.name] unsecures the [src.name].", \
"<span class='notice'>You unsecure the external bolts.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
disconnect_from_network()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copypasta, use the procs who already exist for this

@Steelpoint
Copy link
Contributor

The Singulo Generator should use the current sprites, the Teslsa Generator should use the new sprites.

@Nanotransistor
Copy link

Im no electrical engineer. But why would it get "loose"? If it overloads shouldn't it send ricochets of lighting bolts through the station until it goes off?

@peoplearestrange
Copy link
Contributor

@Nanotransistor well for a start ball lightning isn't actually a real thing, or rather not one you could contain that would somehow "create" power. Its all seems like sci-fi speak stuff.

Also 👍 really glad to see this is being merged, the concept is really nice and definitely something different to the standard singulo we've had for so long. Also hugely unique.

@Iamgoofball Is the PA required to keep the tesla ball up and running? What starts the process? Also what causes it to dissipate? and is there anyway to stop a loose one like the singulo?

@Dorsisdwarf
Copy link
Contributor

Rename it the "tesla anomaly" and use the current sprites, maybe?

Also add chainmail shock suits which make you lightningproof, (an equivalent to radsuits, for the new engine)

@daman997
Copy link

tesla thing is badass 👍
PA sprite is kinda eh

@Strathcona
Copy link
Contributor

Looks great, lots of interesting mapping possibilities without a PA taking up space. That being said the sprites need to be distinct but also still match our general aesthetic. I don't think they do that right now.

var/move_dir = pick(alldirs)
var/turf/T = get_step(src,move_dir)
if(can_move(T))
loc = get_step(src,move_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loc = T

@Jacquerel
Copy link
Member

Guys it doesn't matter if the sprites are "non-negotiable" to this PR, if the rest is fine then just push this one and immediately make a separate PR to revert the icons. Problem solved.

@Fox-McCloud
Copy link
Contributor

Really like this idea--want to see where it goes; I love the singulo, but it may be finally time for something new.

Current PA sprite is better than this though--going to agree with @RemieRichards the 80'sish current look of SS13 is more preferable to the the dark corporate apocalypse feel.

@Dorsisdwarf
Copy link
Contributor

4 days is hardly stale hunnygranny

@tkdrg tkdrg removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Dec 20, 2015
@@ -12,7 +12,7 @@
var/burn_state = FIRE_PROOF // LAVA_PROOF | FIRE_PROOF | FLAMMABLE | ON_FIRE
var/burntime = 10 //How long it takes to burn to ashes, in seconds
var/burn_world_time //What world time the object will burn up completely

var/being_shocked = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: could use a newline below this

@imtakingabreakdontatme
Copy link
Contributor

Did you remember to make the gang dom get blown up by tesla_act or whatever?

tkdrg added a commit that referenced this pull request Dec 20, 2015
…_1891

Adds the Tesla Engine to the game.
@tkdrg tkdrg merged commit df3fd0d into tgstation:master Dec 20, 2015
@peoplearestrange
Copy link
Contributor

Looks awesome. I'd love a little "ZAP" sfx to play each time it strikes an object. Would help it to feel a little more deadly and there.

@ComicIronic
Copy link

Wow, this looks interesting.
Has there been any feedback on it since it was added?

@PKPenguin321
Copy link
Contributor

yeah a lot actually, there's also been a bunch of work done
it's really boring and way more anticlimactic than singulo though

@optimumtact
Copy link
Member

It's popular because it requires less setup and oversight than the singulo, things that probably need some attention.

Other than that it's pretty neat

@Iamgoofball
Copy link
Contributor Author

its cool visually but there's debate about the power output meme, and the station damage vs personal damage meme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways Needs Reproducing Nobody will fix your issue unless you do this Sprites A bikeshed full of soulless bikes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet