Commit Graph

1362 Commits

Author SHA1 Message Date
Cyantime
34a985b983 Observe improvements 2020-06-03 08:00:49 -04:00
Atermonera
55e12aad7b Merge pull request #7210 from VOREStation/vplk-static-power
[PORT] Static Machinery Power
2020-05-30 21:18:27 -07:00
Atermonera
6ab622a2b5 Merge pull request #7205 from VOREStation/Arokha/playsound
Alter playsound paradigm
2020-05-28 16:05:59 -07:00
Atermonera
551fc88ce1 Merge pull request #7204 from VOREStation/Arokha/performance
Performance improvements
2020-05-28 12:47:08 -07:00
Atermonera
9350308b8e Fixes particle accelerator construction. (#7232)
Left is left and right is right.
2020-05-24 14:31:43 -07:00
Aronai Sieyes
30613fff5c Optimize what starts in SSobj (#7155)
* Make intercom power change stateful

* Clean up air tank processing and initialize

* Optimize flashlight processing

* Optimize suit cooler processing

* Optimize geiger counter processing

* Optimize lighting processing

* Only process rigs on a person

* One more rig cleanup
2020-05-21 11:28:27 -07:00
Leshana
ccef6cc908 Implements "static" area machinery power usage
- Instead of using auto_use_power to re-tally up machinery's power usage every cycle, track the steady "static" load separately from the transient "oneoff" usage.  Machines then only need to inform the area when they use oneoff power or *change* their steady usage.
- Remove auto_use_power and stop SSmachines from calling it.
- Add vars to track "static" usage for each of the three power channels to /area
- Rename the existing three vars to "oneoff" so its clear what they mean (and to catch people accidentally updating them directly)
- Update area power procs and APCs to use the new variables.
- Rename /area/proc/use_power() to use_power_oneoff() to make it clear what it is doing.
- Deprecate /obj/machinery/use_power() in favor of use_power_oneoff() but don't delete yet.  Can transition gradually.
- Add logic to the update_power procs on machines to calculate the deltas and update static area power whenever their usage changes.
- Add logic to machines to update area power when they are created, destroyed, or move.
- Moved /obj/machinery procs related to area power usage into machinery_power.dm to make them easier to find.
- Added or updated comments in several places to explain what is going on and how to use it.
2020-05-19 20:17:48 -04:00
Aronai Sieyes
ad75bb86bd Alter playsound paradigm 2020-05-19 11:06:28 -04:00
Aronai Sieyes
07acd05537 Obsolete the PROXMOVE flag and uses 2020-05-19 10:39:44 -04:00
Atermonera
fb4f381651 Merge pull request #7090 from VOREStation/aro-poismes
Don't give POI SMES more charge than possible
2020-05-15 17:55:19 -07:00
Atermonera
6571a10ad4 Merge pull request #7052 from VOREStation/pol-moved
Refactor Move() Code
2020-05-14 22:05:11 -07:00
Atermonera
8ba72a556d Merge pull request #7137 from Rykka-Stormheart/shep-dev-fix-byond-512-compat
CLAMP Backwards Compatibility Fix
2020-05-12 22:25:06 -07:00
Aronai Sieyes
eff72a9850 Merge branch 'master' into pol-moved 2020-05-12 11:22:43 -04:00
Aronai Sieyes
b3f475654d Merge branch 'master' into aro-poismes 2020-05-12 11:20:54 -04:00
Atermonera
d3b7d8e743 Merge pull request #7087 from VOREStation/pol-nightshift
Port SSnightshift from Paradise
2020-05-10 15:16:14 -07:00
Rykka
d689ba1b9a CLAMP Backwards Compatibility Fix
Fixes backwards compat with BYOND Stable versions below 513.
2020-05-10 14:04:05 -04:00
Little-119
14e3c8a830 Fix cooldown math while I'm here 2020-05-09 15:48:28 -04:00
Little-119
09d0fc9f1f Add nightshift setting 2020-05-09 15:48:20 -04:00
Aronai Sieyes
71c4e2b1d8 Allow locked APCs to still toggle night lighting 2020-05-09 15:48:09 -04:00
Atermonera
c8ab0a41ac Merge pull request #7059 from atlantiscze/2020_04_28_DelamChange
Supermatter delamination tweaks
2020-05-08 12:17:11 -07:00
Atermonera
6ecfe951ed Merge pull request #7091 from VOREStation/vplk-proper-atmos-canpass
[PORT] Use can_atmos_pass to reduce proc-calls in c_airblock()
2020-05-06 23:02:51 -07:00
Atermonera
2d2b8cce76 Merge pull request #7089 from VOREStation/vplk-smes-overcharge-fix
Fix an overcharged smes from breaking charging on other smes.
2020-05-06 23:00:00 -07:00
Atermonera
756fa5d6fa Merge pull request #7088 from VOREStation/pol-smesexamine
Fix SMES and debug power item examine messages
2020-05-06 22:59:29 -07:00
Aronai Sieyes
b7aae34335 Merge branch 'master' into pol-defaultparts 2020-05-05 22:51:02 -04:00
Leshana
e74ebd9805 Use can_atmos_pass to reduce proc-calls in c_airblock()
- Add additional can_atmos_pass value ATMOS_PASS_PROC which indicates custom behavior requiring calling the CanZASPass proc.
  - The benefit being for the other three values we DON'T need to call CanZASPass at all!  We already know the behavior without the overhead of a proc call.
  - Obviously any atom with can_atmos_pass = ATMOS_PASS_PROC cannot now call ..() in CanZASPass() since the default behavior would be to (recursively) call CanZASPass()
  - This required re-numbering the constants, so I also fixed all code that assumed particular values for the constants.
- Switched all types which overrode CanZASPass with custom logic to be can_atmos_pass = ATMOS_PASS_PROC
- Changed /turf/c_airblock() to skip calling /atom/movable/c_airblock() for the three can_atmos_pass values that don't require calling the proc.
2020-05-04 13:47:52 -04:00
Leshana
35b7446a32 Fix return values of CanZASPass
- CanZASPass is supposed to return boolean.  Nobody noticed this bug because ATMOS_PASS_YES and ATMOS_PASS_NO happen to be defined as 1 and 0.  But thats not a good assumption to make, so lets fix it!
2020-05-04 13:47:08 -04:00
Aronai Sieyes
88acff2c96 Don't give POI SMES more charge than possible 2020-05-04 13:44:42 -04:00
Leshana
1378829744 Fix an overcharged smes from breaking charging on other smes.
An overcharged smes could demand negative power from the grid, swamping other SMES and resulting in zero power being distributed.
2020-05-04 13:38:36 -04:00
Aronai Sieyes
34580a54b6 Fix typo in debug_items examine 2020-05-03 23:27:40 -04:00
Aronai Sieyes
ea5e49cb03 Fix SMES and debug power item examine messages 2020-05-03 22:48:41 -04:00
Aronai Sieyes
df12cd888a Port SSnightshift from Paradise
Makes the station have a night mode.
2020-05-03 21:17:55 -04:00
Atlantiscze
539b5cc0c8 Implements another batch of feedback 2020-05-03 23:29:03 +02:00
Atlantiscze
c32112c69c Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 2020_04_17_LoadBalancing 2020-05-03 23:17:27 +02:00
Atlantiscze
2d50c71553 Buffs devastation and heavy damage ranges when supermatter is energised (up to 2x at very high power levels).
- Intentionally leaving light damage range lower as at high power levels to somewhat concentrate the damage in engineering.
2020-05-03 22:56:50 +02:00
Atermonera
103d64ed43 Merge pull request #7046 from Neerti/system_3_fixes
Tweaks and fixes for the new new event system.
2020-04-29 14:26:58 -07:00
Atermonera
61c4929d61 Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
Removes limits on eating, centralizes nutrition changing.
2020-04-29 14:14:11 -07:00
Aronai Sieyes
6c6644f86c Rewrite examine() to pass a list around (#7038) 2020-04-29 13:42:16 -07:00
Atlantiscze
3ee4747502 Supermatter delamination tweaks
- In short, delamination changed to more or less mirror effects it has on Bay.
- All of the new delamination effects can be easily tweaked in the future using set of defines.
- In general, aim is to make supermatter delamination a more or less "recoverable" event with enough materials and manpower. Before it was just a mangled irrepairable mess of scuttled steel.
- This brings a LOT of performance improvements and runtime error fixes (grav pull of anchored items which were never meant to move tends to cause runtimes)

Detailed changes:
- Supermatter (and also S5/S6 singularity in the event someone manages to build one, they share the proc) no longer pull anchored items. This brings a MASSIVE reduction in delamination lag (from few second freezes to quite smooth) and prevents things from breaking (i saw dozens of various runtimes when delamination occured as it forcibly dragged things around that weren't supposed to be dragged).
- Delamination crashes the station's power grid, shutting down all APCs for few minutes. Critical areas get shut down only for fraction of that time (we don't want to one-hit the AI). This includes healthcare facilities, which are likely to be very important given the other effects.
- Delamination irradiates and briefly weakens all mobs on the station (not only on the same Z level). I have verified that this is enough to kill an unprotected human if no kind of medical care (at least dylovene, ideally something against rads) is administered.
- Delamination will break a bunch of lights. Nuisance, but easily repairable. Adds to the atmosphere.
- Delamination breaks part of the solar arrays, reducing their output by roughly 60%. This is way less than required to run the station. Puts more emphasis on delamination being engineering-centric emergency, with power rationing being a necessity until solars can be fixed, or other power source secured. Rewards engineering if they managed to stockpile some energy in the SMESes around the station.
- Delamination's explosion is quite weaker than it used to be. It should still be enough to pretty much destroy the engine room (see attached screenshots below), and cause some minor damage in adjacent rooms. It should still, however, be repairable with enough resources and some time.
- Supermatter no longer has additional 99% flat modifier to miss a station Z level when ejected. Emergency core ejection is a last resort measure. It does have its risks. With other changes in this PR, delamination on outer hull is significantly less dangerous than it would be before. It still has various secondary risks, however, such as the radiation or temporary power outage, but with considerably mitigated damage (explosion in space, mostly on outer grilles is generally weaker)

Screenshots:
https://i.imgur.com/K7nBd8a.png    (Standing directly where the core was. Engine room has heavy structural damage and all pipes/machinery are pretty much devastated)
https://i.imgur.com/SGBdTRo.png     (Standing in engine control room. Damage nearby is quite minor (occassional snapped wire or wall panel), but quite widespread).
https://i.imgur.com/JqzF4pW.png     (Solar arrays are heavily damaged. They still provide /some/ power but only a fraction of the original)
2020-04-28 02:49:09 +02:00
Aronai Sieyes
b3e9960029 Move machines to use default_apply_parts() 2020-04-27 11:57:43 -04:00
Heroman
b3476340fe Ports tg cablecoils instead of bay's 2020-04-27 10:50:56 -04:00
Aronai Sieyes
51846b4bfe Port some power sprites from Bay 2020-04-27 10:50:56 -04:00
Aronai Sieyes
bc1fa7bd05 Refactor Move() code 2020-04-27 10:08:55 -04:00
Neerti
c5c0888d8e Tweaks and fixes for the new new event system. 2020-04-26 07:21:56 -04:00
Neerti
2dee403370 Removes limits on eating, centralizes nutrition changing. 2020-04-26 05:30:32 -04:00
Atermonera
ec79adad68 Merge pull request #7026 from VOREStation/vplk-update-power-usage
More machinery power update_var() proc usage
2020-04-25 12:54:30 -07:00
Atlantiscze
2a9547f3d9 Implements additional feedback 2020-04-23 08:02:51 +02:00
Atlantiscze
b3d866c4d5 Adds updated version of power debugging items
- Infinite powersource, Infinite grid load (powersink without boom) and APC dummy load.
- Not buildable, intended primarily for debugging or admin shenanigans. For mapped-in variants setting show_extended_information = FALSE is recommended.
2020-04-23 07:48:53 +02:00
Leshana
21c8c94971 Fix remaining code that directly modified use_power to call update_use_power. 2020-04-21 13:15:32 -04:00
Leshana
66b40b2c71 Call update procs instead of directly setting idle_power_usage or active_power_usage.
- Adds the update_idle_power_usage() and update_active_power_usage() procs for the respective vars.
- Switches all places modifying those vars directly to call the procs instead.
- This will let us react to the change appropriately, paving the way towards static area power.
- Adds update_power_channel proc for the sake of completeness, but no machines actually modify it so far.
2020-04-21 12:53:05 -04:00
Atlantiscze
252719c5f0 Implements feedback 2020-04-21 10:03:07 +02:00