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

Power System (Complete) #25

Merged
merged 13 commits into from Feb 4, 2018

Conversation

Projects
None yet
2 participants
@clusterfack
Member

clusterfack commented Jan 29, 2018

This establishes a powernet system for the base game.
Fixes #24

This system isn't fully tested due to a spawning system bug, however I've fixed every exception that has come up during testing and it compiles and runs and each individual entity spawns without any problem.

Components

  • Power Transfer - creates wirenet
  • Node - connects to wirenet (components who needs this generate it themselves)
  • Device - uses power
  • Power Provider (device subtype) - broadcasts power to devices
  • Power Generator - creates power
  • Power Storage - stores power, can give back to powernet or supply device internally depending on settings

Classes

  • Powernet - controls wirenet and distribution energy supply to and from during its Update()

Entity System

  • Powernet entity system - regenerates dirty powernets (when a wire gets removed) on the next update() tick, and then calls update() on the necessary powernets

Prototypes

  • Wire - Power Transfer
  • Power Generator - Node + Power Generator
  • APC - Node + Power Provider (+ storage)
  • Wired Machine - Node + Device
  • Wireless Machine - Device
  • SMES - Node + Storage (chargepowernet set on)

@clusterfack clusterfack self-assigned this Jan 29, 2018

@wafflebot wafflebot bot added the review label Jan 29, 2018

@Silvertorch5

Good base to work off of in the future

@Silvertorch5

This comment has been minimized.

Member

Silvertorch5 commented Jan 30, 2018

forthebadge

@clusterfack

This comment has been minimized.

Member

clusterfack commented Jan 31, 2018

Pls wait to merge this until I add shutdown functions on all the components and can do a small bit of testing with the spawn entity fix

@ghost ghost referenced this pull request Jan 31, 2018

Open

Features priority? #14

5 of 8 tasks complete
Adds onremove functionality to all components
Without these bits of logic nothing makes any sense!

@clusterfack clusterfack changed the title from Power System (WIP) to Power System Feb 2, 2018

@clusterfack

This comment has been minimized.

Member

clusterfack commented Feb 2, 2018

I didn't add "shutdown" and "startup" functionality like I said I was going to, but I added the functionality that was my intention to add all along which was onremove() which is necessary for this to function properly with removal of entities. I still need to do some testing however with a spawnentity fix which I'm tackling next.

@clusterfack clusterfack changed the title from Power System to Power System (testing) Feb 2, 2018

@clusterfack clusterfack changed the title from Power System (testing) to Power System (Complete) Feb 2, 2018

@clusterfack

This comment has been minimized.

Member

clusterfack commented Feb 2, 2018

Alright, tested and removed about four bugs, no more could be found

@clusterfack clusterfack added Ready to merge and removed review labels Feb 3, 2018

@Silvertorch5 Silvertorch5 merged commit 1f22f8a into master Feb 4, 2018

@PJB3005 PJB3005 deleted the power branch Feb 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment