Commit Graph

9 Commits

Author SHA1 Message Date
SkyratBot
d833cfa83b [MIRROR] Optimize mirage_border by converting it to an element and a movable [MDB IGNORE] (#22913)
* Optimize mirage_border by converting it to an element and a movable (#77137)

## About The Pull Request

Converts /datum/component/mirage_border to an element, saving init time
spent attaching components to thousands of objects. It also repaths it
from /obj/effect/abstract to /atom/movable, since it doesn't need to be
an object, as it's not a physical object within the game.

~~Also adds a case handling when world.view is not an integer.~~ This
never happens

Here it is working:

https://github.com/tgstation/tgstation/assets/10366817/c8cfe2df-275a-4c97-b063-4fd83f7f09c3

Port of https://github.com/BeeStation/BeeStation-Hornet/pull/9490/

## Why It's Good For The Game

Saves init time, approx 0.32sec on Meta on my machine.

![image](https://github.com/tgstation/tgstation/assets/10366817/f423813e-e627-44a4-b6c6-b1d6fe49e8c3)

![image](https://github.com/tgstation/tgstation/assets/10366817/ad6796c6-ff78-4140-9a5a-3572ac34f42c)

## Changelog

🆑
code: Optimized z-level transition mirages, saving ~0.32s init.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Optimize mirage_border by converting it to an element and a movable

---------

Co-authored-by: itsmeow <itsmeow@itsmeow.dev>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2023-08-07 09:41:46 -04:00
SkyratBot
7b4237c692 [MIRROR] Implements usage of the REVERSE_DIR macro throughout the code. [MDB IGNORE] (#22743)
* Implements usage of the REVERSE_DIR macro throughout the code. (#77122)

## About The Pull Request
Replaces a ton of `turn(dir, 180)` calls with the aforementioned macro.

## Why It's Good For The Game
Afaik, `REVERSE_DIR` was coded to be faster than the classic `turn(dir,
180)` call, being a simple set of binary operations. To sum it up, micro
optimization.

## Changelog

N/A

* Implements usage of the REVERSE_DIR macro throughout the code.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-07-28 14:32:01 -04:00
SkyratBot
c6de4c93b9 [MIRROR] Macro optimizes SSmapping saving 50% [MDB IGNORE] (#16375)
* Macro optimizes SSmapping saving 50%

* fix merge issues, update to current turf_blacklist api

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-26 17:29:32 -04:00
SkyratBot
98428cdfb5 [MIRROR] Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. [MDB IGNORE] (#9298)
* Replaces a portion of C-style for loops with the more commonplace for loops, which are faster.

* Update code/modules/projectiles/boxes_magazines/_box_magazine.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2021-11-08 10:50:29 -05:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
ninjanomnom
176d76ff90 Makes it possible to see tiles past z transitions 2018-04-21 16:46:12 -04:00
Emmett Gaines
b932655c78 Flatten the map transition edges (#37301) 2018-04-21 23:42:49 +03:00
Tad Hardesty
bbe4d12d13 Support stations with multiple z-levels (#35339)
* Remove ZLEVEL_STATION_PRIMARY

* Add Up and Down traits for use by ladders and chasms

* Give map_config creation its own proc

* Combine LoadConfig and ValidateJSON and remove transition_config

* Make space linkage a z-level trait

* Remove ZLEVEL_EMPTY_SPACE

* Update uses of GetFullMapPath

* Handle multi-Z stations and load Lavaland and Reebe at runtime

* Remove unused space maps

* Fix inappropriate z-expansion in map reader, improve logging

* Update comments relating to z-level configuration

* Add Lavaland and Reebe to ALL_MAPS
2018-02-15 10:21:25 +01:00
Tad Hardesty
827c4b3f99 Replace hardcoded z-level numbers with a trait system (#34090)
* Add basic structure of z-level traits

* Restore space transitions and add z-level debug verb

* Restore proper ruin spawning and transit level creation

* Replace station_z_levels and related checks with traits

* Eliminate more uses of ZLEVEL_{STATION_PRIMARY,LAVALAND}
2018-01-12 09:05:49 +13:00