Commit Graph

683 Commits

Author SHA1 Message Date
Neerti
70ac478aea Merge pull request #5065 from VOREStation/vs-port-3204
[PORT] Revamp logging for consistency
2018-03-20 21:13:47 -04:00
Atermonera
c1ed3a0c6c Merge pull request #5060 from Anewbe/away_kicker
AFK Kicker should affect ghosts and people in the lobby
2018-03-19 12:17:24 -07:00
Atermonera
2e63e856d0 Merge pull request #5053 from Anewbe/zas_priority
Should speed up ZAS
2018-03-16 11:25:18 -07:00
Anewbe
5212fa152b Species names should now use defines 2018-03-15 20:24:45 -05:00
Arokha Sieyes
7f93f3cca7 POLARIS: Moves daily logs into being folders rather than files 2018-03-13 18:20:59 -04:00
Anewbe
e2bade91c8 AFK Kicker should affect ghosts and people in the lobby 2018-03-13 15:02:49 -05:00
Anewbe
9f56416684 Merge pull request #5037 from VOREStation/aro-updateicons
Rewrite human/update_icons()
2018-03-11 21:03:10 -05:00
Anewbe
d4d2f1d0ad Should speed up ZAS 2018-03-11 19:41:00 -05:00
Anewbe
6c2c57fb65 Merge pull request #5044 from VOREStation/vplk-qdel-log-oops
Reduce qdel log file by 150000%
2018-03-10 15:04:32 -06:00
Leshana
b666e76d7d Reduce qdel log file by 150000%
Fix indenting error that caused it to log repeatedly.  Also put it in its own file to match the pattern used by overlays and initialize.
2018-03-09 23:53:15 -05:00
Leshana
74332405a8 Optimize scheduler process by sorting its task list
It previously had to iterate over EVERY task in its list every time.   With lots of queued tasks that is slow.
Instead we sort it by schedule time.   That means when iterating thru list, if we get to a single task that is in the future, so are all remaining.
2018-03-08 22:27:47 -05:00
Leshana
4c5b7655b5 U_I Phase 2.5: Fix *swish deleting tail overlay
All more cases of "don't call apply/remove multiple times!
2018-03-08 19:34:01 -05:00
Leshana
741e02407a Port SSoverlays & Convert turfs to use it (#5004)
* Added "Display Initialize() Log" admin debug command so you can see it mid-round.

* Ported the core of the overlays management subsystem from /tg

- Added SSoverlays subsystem for compiling overlay lists and applying them to atoms in a controlled anti-lag subsystem.
- Added vars and procs to atom which should eventually replace all direct interaction with BYOND's /atom/overlays var outside the subsystem.
- Added OVERLAY_QUEUED flag to var/atom/flags bitfield.
- Added small framework for subsystem performance tracking. So far used only by SSoverlays
- Added admin debug command "Display overlay Log" to see performance stats mid-round.

* Fix runtime on universal pipe adaptor update_icons

* Workaround for appearance_bro not initialized

Unfortuantely BYOND's initialization order is strange, and the appearance_bro var is only half initialized when map starts to load, causing errors.  We temporarily fix by moving it to be a global-scoped global.

* Convert fire alarms to use add_overlay() A good first test.

* Convert turfs to use add_overlays(), eliminating the turf_overlay_holder!

- Converted as much as I could find about turf overlays to use add_overlay().
- This should be enough to stop BYOND from crashing, so we can eliminate the turf_overlay_holder hack.
- This also lets us remove the anti-corruption hacks from walls and open space.
- ZAS gas overlays can use priority overlays, so this also fixes the gas-goes-away-when-crowbarring-plating issue.
- Stuff like that

* Convert turf overlay interactions to use add_overlay.

Note: This is a plain and simple conversion of existing code to use SSoverlays. However I look at the line changed, and note that that line likely never fully worked as intended, as it has no way of re-applying itself.
I would make it use a priority overlay, but there is no code present for *removing* said overlay from neighbors when it is no longer required.  That code should be implemented by original author.
2018-03-05 19:43:23 -06:00
Arokha Sieyes
2d192edeb7 POLARIS?: Attempt to find the source of qdel'd images 2018-02-20 10:00:48 -05:00
Aronai Sieyes
78d7ef1d72 Port Bay-style attack animations (#4827)
* POLARIS: Attack animations

* POLARIS: Overlay flick system

You can't do this in Byond, unfortunately, so here's some code from /tg/

* Make attack anims a preference
2018-02-15 22:02:04 -06:00
Leshana
676efe73e5 Move Xenoarcheology globals and initialization into a subsystem
* Move the global spawning_turfs lists from master_controller into SSxenoarch.  Rename all references.
* Move the call to SetupXenoarch from master_controller.setup() to SSxenoarch.Initialize()  Put SSxenoarch init order near the end to match current behavior.
2018-02-06 01:08:10 -05:00
Anewbe
f56597efed Merge pull request #4727 from VOREStation/vplk-bitfields
Code fix for stat_entry on NO_FIRE subsystems
2018-02-05 22:46:25 -06:00
Leshana
2c90995dcc Let objects register to be informed when shuttles have been setup.
* Switch /obj/shuttle_connector to use it instead of the icky process hack.
2018-02-05 15:50:15 -05:00
Leshana
8bec38ee00 Implement SSshuttles subsystem
* Replaces the shuttle_controller and shuttle process with the shuttles subsystem.  Instead of docking ports being initialized by the game ticker, its part of the StonedMC Master init order.
* The main advantage of this is control over the initialization order, as well as letting Master be aware of CPU we're using up with shuttle processing.
* By being part of the Master init order, we reduce the uncertainty about "are objects initialized yet?" which is nice, since shuttle docks break if machines aren't finished initializing!
2018-02-05 15:50:14 -05:00
Leshana
5847319443 Update every initialize() proc to return an initialize hint.
* Yes, all of them.
* Also did a few corrections to redundant New() and broken Destroy() along the way
* Renamed the turf_initializer.initialize() proc to InitializeTurf to avoid confusion.
* Subsumed /area/proc/initialize into /atom/proc/initialize() - Made /area's LateInitialize to get same behavior as before.
2018-02-05 15:50:13 -05:00
Leshana
44dc4b7286 Implement SSatoms
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too
* Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions.
* Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now.
* Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation
* Removed SScreation, as it was only a stop-gap until SSatoms could be ported.
* Updated the maploader to inform SSatoms when it is loading maps instead of SScreation.
* Updated the template map loader to use SSatoms to perform initTemplateBounds
* Renamed 'initialized' var in seed_storage to deconflict.
* Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
2018-02-05 15:50:06 -05:00
Leshana
63a1806b41 Bitfields do not work that way.
Fix attempt to use `in` on a non-list.
2018-02-05 13:13:37 -05:00
Arokha Sieyes
13bfcf6bd3 Improve admin idlekick capability/awareness 2018-02-04 01:05:03 -05:00
Leshana
8c09d39ef1 Convert ZAS "Airflow" into a subsystem plus fixes
* Port of the "Airflow" portions of Yonaguni/EuropaStation#618
* The "airflow" part of ZAS used to be handled by a sleep'd loop.   This has the potential to bunch up and lag.  Switching to a StonedMC managed subsystem improves it.
* Fixed to ensure that zshadow mobs cannot be blown around by the wind no matter how fierce.
* Added a message to mobs informing them when their boots save them from being wind-thwapped.
* Check w_class on non-item objects if they have it defined (might as well since var/w_class is on /obj)
* Tiny optimization of c_airblock
2018-01-30 12:28:45 -05:00
Leshana
8e22707e24 Merge air_master into SSair, now its all one type 2018-01-30 12:28:45 -05:00
Leshana
5a2162a264 Preliminary implementation of ZAS as a StonedMC subsystem.
* Creates the SSair subsystem which replaces the Setup, Start(), and Tick() procs of air_master.
* It may be best to have SSair completely replace air_master, but for now we are having them work together.   It does completely replace the old processScheduer air ticker however.
* Remove the obsolete Setup and Tick procs.
* Adjust admin and debug verbs that dealt with some ZAS internals to work with the new implementation.
2018-01-30 12:28:45 -05:00
Leshana
9d700f5946 Fix writing [date] on paper and printout of ref in garbage collector error message. 2018-01-23 13:24:32 -05:00
Leshana
db0ba60f64 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.
2018-01-19 14:56:08 -06:00
Leshana
6bc422ff5e Ported VOREStation/VOREStation#461 - Allow greater customisation of wiki links 2018-01-17 16:46:48 -05:00
Anewbe
829cd092c8 Merge pull request #4534 from Neerti/1/14/2018_autopilot_and_other_shuttle_stuff
Web Shuttle Update
2018-01-15 11:15:02 -06:00
PrismaticGynoid
10b2cc7eef Multiple loadout slots (#4530)
* Multiple loadout slots

Ported from Bay. Each character can have 3 (number can be overridden by config) loadout slots. This way, you can have different outfits for different situations without needing to have a separate character slot or edit your loadout every time.

Tested here, works as intended. The current loadout is set as slot 1, so you don't need to worry about remaking it. This also ports the to_file and from_file macros to make it work, I'm assuming they could later be used elsewhere as well.

* Log of Changing
2018-01-14 14:47:47 -06:00
Neerti
d0d6689263 Web Shuttle Update
Adds autopilot functionality for shuttle one and shuttle two. It can be enabled and disabled by the flight computer.
Autopilot is active by default on both shuttles. The shuttle waits for two minutes when it reaches the outpost or station, except for the first flight, where it waits for about ten minutes, which should be plenty of time for people to get on and for the pilot to turn it off if one exists.
Adds renaming feature to all shuttles.
Ports /tg/'s 'shuttle warning' effect, which adds a bunch of blue circles where a ship is about to land, which should prevent surprise shuttle crushes if paying attention.
Flight times for all routes are cut in half to act as the bonus for flying manually. Automatic flight takes twice as long, and so it will take the current amount of time.
Makes Ninja shuttle faster because Nippen steal.
Does some cleanup with temporary effects.
2018-01-14 14:03:58 -05:00
Leshana
224fe42e77 Prepare Atmospherics Machinery for SSatoms (#4501)
* to_chat() replacement.

* Revert calling target.init_dir() before connecting.

* This change was added in https://github.com/PolarisSS13/Polaris/pull/3775 to counteract `dir` not being set prior to New() for dynamically loaded maps.  The root cause was /atom/New() not calling _preloader.load().  Undoing the change now that /atom/New() is fixed.
* The addition of the init_dir() proc itself however, is useful, because there ARE other times some atmos machinery will want to re-initialize its dir, specifically whenever it is rotated.
* init_dir() must be called in the constructor of all atmospherics machines capable of connecting to another.   Since it has to happen for ALL machines, lets move that call to /obj/machinery/atmospherics/New()

* Rename /obj/machinery/atmospherics initialize() to atmos_init()

* These days `initialize()` is used to handle general object initialization that is moved outside of New().  The node connection discovery of atmos machinery needs to happen after all that, and so needs to be in a separate proc.
* Make sure to actually call atmos_init during system startup.
2018-01-06 10:52:56 -06:00
Leshana
a97a574278 Transformed the machinery processor into an StonedMC subsystem
* This is PHASE 1 of a multi-phase conversion.  In this first phase we implement the subsystem, but leave it processing the existing global list variables.  In the next phase we will switch to use datum variables in the subsystem.  The main reason for splitting into two phases is ease of code review; change the meaningful code without the hundreds of machines -> SSmachines.machinery substitutions.
* We did declare macros for adding/removing things to the processing lists, and convert everywhere to use the macros.
* Added var/is_processing to /datum to keep track of whether an instance is already in a processing list (prevents it being in the list twice!) and also debugging, making sure its not in two lists etc.
* NOTE: The global machines list is **no longer sorted** for performance reasons.  As far as I know, the only module that actually ever cared was cameras.   Our camera system already handles its own sorting in the cameranets anyway, so it should no longer be needed.
2017-12-29 15:31:59 -05:00
Leshana
66e9d9cfdf Unify datum var definitions
Inspired by https://github.com/tgstation/tgstation/pull/29636
Also consolidated some sideways overridden /datum/Delete() here to reduce proc-call overhead.
2017-12-29 14:23:13 -05:00
Leshana
5ebcc92645 Port /tg garbage collection tweaks and statistics improvements
https://github.com/tgstation/tgstation/pull/30118 - Garbage collection tweaks and refactors.
https://github.com/tgstation/tgstation/pull/32022 - Find references fix.
2017-12-27 21:45:37 -05:00
Leshana
a435d73450 Ports /tg controller optimizations
https://github.com/tgstation/tgstation/pull/31092 - Fixes subsystems not returning a qdel hint
https://github.com/tgstation/tgstation/pull/31494 - In which the stoner one gets stoned and tries to address tick contention... again
https://github.com/tgstation/tgstation/pull/31950 - Removes an empty New()
https://github.com/tgstation/tgstation/pull/31951 - Logs subsystem shutdowns
2017-12-27 21:19:55 -05:00
Leshana
c6e8184b58 Ports https://github.com/tgstation/tgstation/pull/30184
* Adds defines for world.tick_usage
* This provides no useful benefit whatsoever, but /tg and Baystation12 have done it, so it will make porting future code easier if we do too.  No real harm done either.
2017-12-27 19:10:15 -05:00
Leshana
032d26010b Merging changes from /tg
https://github.com/tgstation/tgstation/pull/29637 Fixes subsystem MC crash tracking
https://github.com/tgstation/tgstation/pull/30092 Subsystem PreInit() now respects init_order
2017-12-27 18:58:51 -05:00
Woodratt
ed9395e58f SC Stupid Sized Map Update
Or how Woodrat spent too long on something that was supposed to be simple.

- Addition of a Explorer Radio Channel and headsets.
- Explorers and Search and Rescue job slots added
- Adjustments to the pilot job including getting rid of the flatcap
- Map fixes, adjustments, (including signs pointing to cryo) planetside side map additions splitting up of the wilderness into two area sections
- Disabled lighting on the arrivals shuttle area once it is docked with the station, should help with the whole issue of lighting bugging out and having dark space
- Fixed EMS jacket missing icons
- Fixed Research signs being missing for some reason, addition of directional signs for cryo
- Addition of a Search and Rescue Winter coat
- Probably a dozen other small bug fixes I forgot, and bug additions

Tested, seems fine. At least in short tests.
2017-12-24 07:04:34 -08:00
Neerti
fe33977812 Adds Submap (PoI) Seeding Procedure
Mostly ports /tg/'s method of seeding submaps into specific z-levels.
Due to the low number of submaps present, all of the PoIs are guaranteed to spawn. As more are added, this should fix itself.
2017-11-21 19:21:39 -05:00
Anewbe
cad5ef12e7 Does work on the event manager role again 2017-10-18 20:00:01 -05:00
killer653
fb8ba69ada Fixes all the other stuff 2017-10-15 20:56:13 -04:00
killer653
0080539924 More fixes 2017-10-15 19:54:50 -04:00
Anewbe
4459d7087a Revert "Does more prep for the Event Manager role" 2017-10-04 18:33:34 -05:00
Anewbe
c2c6b5949a Does more prep for the Event Manager role 2017-10-02 21:51:48 -05:00
Neerti
aa454c0e1d Adds Farm PoI
Also fixes various bugs with surface tiles, hopefully.
Adds some documentation to the map file system.
Adds a new 'plane' map, ideal for testing PoIs by loading them manually.
Makes space heaters glow orange.
Adds a new grille type for fancy surface windows.
Adds self planting hydro trays/dirts if a seed is on top of them when the map is loaded.
2017-09-26 01:44:06 -04:00
Neerti
e703d629c6 Fixes the Sun/Weather and Ports Vore's Lighting SS
New lighting system is needed to handle updating literally 14k+ tiles whenever the sun moves.  The straight port seems to have had no adverse effects from what I could see.  Don't know if it's more performant but it doesn't seem to be less.

I didn't expect the latter would be needed for the former.
2017-09-22 12:16:21 -04:00
Anewbe
6ffebcef6e Merge pull request #3775 from Neerti/9/8/2017_tg_maploader_port
Port's TG's Maploader
2017-09-11 17:17:23 -04:00
Neerti
1bc28c07c0 Port's TG's Maploader 2017-09-08 12:49:26 -04:00